repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/plugins_test.go | pkg/config/dynamic/plugins_test.go | package dynamic
import (
"testing"
"github.com/stretchr/testify/assert"
)
type FakeConfig struct {
Name string `json:"name"`
}
// DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FakeConfig) DeepCopyInto(out *FakeConfig) {
*out = *in
}
// DeepCopy is a ... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/config.go | pkg/config/dynamic/config.go | package dynamic
import (
"github.com/traefik/traefik/v3/pkg/tls"
)
// +k8s:deepcopy-gen=true
// Message holds configuration information exchanged between parts of traefik.
type Message struct {
ProviderName string
Configuration *Configuration
}
// +k8s:deepcopy-gen=true
// Configurations is for currentConfigur... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/middlewares.go | pkg/config/dynamic/middlewares.go | package dynamic
import (
"fmt"
"net/http"
"time"
ptypes "github.com/traefik/paerser/types"
"github.com/traefik/traefik/v3/pkg/ip"
"github.com/traefik/traefik/v3/pkg/types"
)
// ForwardAuthDefaultMaxBodySize is the ForwardAuth.MaxBodySize option default value.
const ForwardAuthDefaultMaxBodySize int64 = -1
// ... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | true |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/plugins.go | pkg/config/dynamic/plugins.go | package dynamic
import (
"encoding/json"
"fmt"
"reflect"
)
// +k8s:deepcopy-gen=false
// PluginConf holds the plugin configuration.
type PluginConf map[string]any
// DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PluginConf) DeepCopyInto(out *PluginConf... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/tcp_middlewares.go | pkg/config/dynamic/tcp_middlewares.go | package dynamic
// +k8s:deepcopy-gen=true
// TCPMiddleware holds the TCPMiddleware configuration.
type TCPMiddleware struct {
InFlightConn *TCPInFlightConn `json:"inFlightConn,omitempty" toml:"inFlightConn,omitempty" yaml:"inFlightConn,omitempty" export:"true"`
// Deprecated: please use IPAllowList instead.
IPWhit... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/config_test.go | pkg/config/dynamic/config_test.go | package dynamic
import (
"reflect"
"testing"
"github.com/BurntSushi/toml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestDeepCopy(t *testing.T) {
cfg := &Configuration{}
_, err := toml.DecodeFile("./fixtures/sample.toml", &cfg)
require.NoError(t, err)
cfgCopy := cfg
... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/tcp_config.go | pkg/config/dynamic/tcp_config.go | package dynamic
import (
"reflect"
"time"
ptypes "github.com/traefik/paerser/types"
traefiktls "github.com/traefik/traefik/v3/pkg/tls"
"github.com/traefik/traefik/v3/pkg/types"
)
// +k8s:deepcopy-gen=true
// TCPConfiguration contains all the TCP configuration parameters.
type TCPConfiguration struct {
Routers... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/http_config.go | pkg/config/dynamic/http_config.go | package dynamic
import (
"reflect"
"time"
ptypes "github.com/traefik/paerser/types"
otypes "github.com/traefik/traefik/v3/pkg/observability/types"
traefiktls "github.com/traefik/traefik/v3/pkg/tls"
"github.com/traefik/traefik/v3/pkg/types"
"google.golang.org/grpc/codes"
)
const (
// DefaultHealthCheckInterva... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/http_config_test.go | pkg/config/dynamic/http_config_test.go | package dynamic
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestEncodedCharactersMap(t *testing.T) {
tests := []struct {
name string
config RouterDeniedEncodedPathCharacters
expected map[string]struct{}
}{
{
name: "Handles empty configuration",
expected: map[string]struct{... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/dynamic/udp_config.go | pkg/config/dynamic/udp_config.go | package dynamic
import (
"reflect"
)
// +k8s:deepcopy-gen=true
// UDPConfiguration contains all the UDP configuration parameters.
type UDPConfiguration struct {
Routers map[string]*UDPRouter `json:"routers,omitempty" toml:"routers,omitempty" yaml:"routers,omitempty" export:"true"`
Services map[string]*UDPServic... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/label/label_test.go | pkg/config/label/label_test.go | package label
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
ptypes "github.com/traefik/paerser/types"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
"github.com/traefik/traefik/v3/pkg/tls"
"github.com/traefik/traefik/v3/pkg/types"
)
func point... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | true |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/label/label.go | pkg/config/label/label.go | // Package label implements the decoding and encoding between flat labels and a typed Configuration.
package label
import (
"github.com/traefik/paerser/parser"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
)
// DecodeConfiguration converts the labels to a configuration.
func DecodeConfiguration(labels map[stri... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_http_test.go | pkg/config/runtime/runtime_http_test.go | package runtime
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
)
func TestGetRoutersByEntryPoints(t *testing.T) {
testCases := []struct {
desc string
conf dynamic.Configuration
entryPoints []string
expected map[string]map[string... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_tcp_test.go | pkg/config/runtime/runtime_tcp_test.go | package runtime
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
)
func TestGetTCPRoutersByEntryPoints(t *testing.T) {
testCases := []struct {
desc string
conf dynamic.Configuration
entryPoints []string
expected map[string]map[str... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_test.go | pkg/config/runtime/runtime_test.go | package runtime_test
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
ptypes "github.com/traefik/paerser/types"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
"github.com/traefik/traefik/v3/pkg/config/runtime"
)
// all the Routers/Middlewares/Services ar... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_tcp.go | pkg/config/runtime/runtime_tcp.go | package runtime
import (
"context"
"errors"
"fmt"
"slices"
"sync"
"github.com/rs/zerolog/log"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
"github.com/traefik/traefik/v3/pkg/observability/logs"
)
// GetTCPRoutersByEntryPoints returns all the tcp routers by entry points name and routers name.
func (c *C... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_udp_test.go | pkg/config/runtime/runtime_udp_test.go | package runtime
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
)
func TestGetUDPRoutersByEntryPoints(t *testing.T) {
testCases := []struct {
desc string
conf dynamic.Configuration
entryPoints []string
expected map[string]map[str... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_http.go | pkg/config/runtime/runtime_http.go | package runtime
import (
"context"
"errors"
"fmt"
"slices"
"sort"
"sync"
"github.com/rs/zerolog/log"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
"github.com/traefik/traefik/v3/pkg/observability/logs"
)
// GetRoutersByEntryPoints returns all the http routers by entry points name and routers name.
func... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime_udp.go | pkg/config/runtime/runtime_udp.go | package runtime
import (
"context"
"errors"
"fmt"
"slices"
"github.com/rs/zerolog/log"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
"github.com/traefik/traefik/v3/pkg/observability/logs"
)
// GetUDPRoutersByEntryPoints returns all the UDP routers by entry points name and routers name.
func (c *Configura... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/runtime/runtime.go | pkg/config/runtime/runtime.go | package runtime
import (
"sort"
"strings"
"github.com/rs/zerolog/log"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
"github.com/traefik/traefik/v3/pkg/observability/logs"
)
// Status of the router/service.
const (
StatusEnabled = "enabled"
StatusDisabled = "disabled"
StatusWarning = "warning"
)
// St... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/kv/kv.go | pkg/config/kv/kv.go | package kv
import (
"path"
"reflect"
"github.com/kvtools/valkeyrie/store"
"github.com/traefik/paerser/parser"
)
// Decode decodes the given KV pairs into the given element.
// The operation goes through three stages roughly summarized as:
// KV pairs -> tree of untyped nodes
// untyped nodes -> nodes augmented w... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/kv/kv_node.go | pkg/config/kv/kv_node.go | package kv
import (
"fmt"
"regexp"
"sort"
"strings"
"github.com/kvtools/valkeyrie/store"
"github.com/traefik/paerser/parser"
)
// DecodeToNode converts the labels to a tree of nodes.
// If any filters are present, labels which do not match the filters are skipped.
func DecodeToNode(pairs []*store.KVPair, rootN... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/kv/kv_node_test.go | pkg/config/kv/kv_node_test.go | package kv
import (
"encoding/json"
"fmt"
"testing"
"github.com/kvtools/valkeyrie/store"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/traefik/paerser/parser"
)
func TestDecodeToNode(t *testing.T) {
type expected struct {
error bool
node *parser.Node
}
testCas... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/config/kv/kv_test.go | pkg/config/kv/kv_test.go | package kv
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestDecode(t *testing.T) {
testCases := []struct {
desc string
rootName string
pairs map[string]string
expected *sample
}{
{
desc: "simple case",
rootName: "traefik",
pai... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/cli/loader_env.go | pkg/cli/loader_env.go | package cli
import (
"fmt"
"os"
"strings"
"github.com/rs/zerolog/log"
"github.com/traefik/paerser/cli"
"github.com/traefik/paerser/env"
)
// EnvLoader loads a configuration from all the environment variables prefixed with "TRAEFIK_".
type EnvLoader struct{}
// Load loads the command's configuration from the e... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/cli/loader_flag.go | pkg/cli/loader_flag.go | package cli
import (
"fmt"
"github.com/rs/zerolog/log"
"github.com/traefik/paerser/cli"
"github.com/traefik/paerser/flag"
)
// FlagLoader loads configuration from flags.
type FlagLoader struct{}
// Load loads the command's configuration from flag arguments.
func (*FlagLoader) Load(args []string, cmd *cli.Comman... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/cli/deprecation.go | pkg/cli/deprecation.go | package cli
import (
"errors"
"fmt"
"os"
"reflect"
"strconv"
"strings"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/traefik/paerser/cli"
"github.com/traefik/paerser/env"
"github.com/traefik/paerser/file"
"github.com/traefik/paerser/flag"
"github.com/traefik/paerser/parser"
)
type Depr... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/cli/deprecation_test.go | pkg/cli/deprecation_test.go | package cli
import (
"testing"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/traefik/paerser/cli"
"github.com/traefik/traefik/v3/cmd"
)
func ptr[T any](t T) *T {
return &t
}
func TestDeprecationNotice(t *testing.T) ... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/cli/loader_file.go | pkg/cli/loader_file.go | package cli
import (
"os"
"strings"
"github.com/rs/zerolog/log"
"github.com/traefik/paerser/cli"
"github.com/traefik/paerser/file"
"github.com/traefik/paerser/flag"
)
// FileLoader loads a configuration from a file.
type FileLoader struct {
ConfigFileFlag string
filename string
}
// GetFilename return... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/job/job_test.go | pkg/job/job_test.go | package job
import (
"testing"
"time"
"github.com/cenkalti/backoff/v4"
)
func TestJobBackOff(t *testing.T) {
var (
testInitialInterval = 500 * time.Millisecond
testRandomizationFactor = 0.1
testMultiplier = 2.0
testMaxInterval = 5 * time.Second
testMinJobInterval = 1 * time.Se... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/pkg/job/job.go | pkg/job/job.go | package job
import (
"time"
"github.com/cenkalti/backoff/v4"
)
var _ backoff.BackOff = (*BackOff)(nil)
const (
defaultMinJobInterval = 30 * time.Second
)
// BackOff is an exponential backoff implementation for long running jobs.
// In long running jobs, an operation() that fails after a long Duration should not... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/configuration.go | cmd/configuration.go | package cmd
import (
"time"
ptypes "github.com/traefik/paerser/types"
"github.com/traefik/traefik/v3/pkg/config/static"
)
// TraefikCmdConfiguration wraps the static configuration and extra parameters.
type TraefikCmdConfiguration struct {
static.Configuration `export:"true"`
// ConfigFile is the path to the co... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/traefik/plugins.go | cmd/traefik/plugins.go | package main
import (
"fmt"
"net/http"
"path/filepath"
"time"
"github.com/hashicorp/go-retryablehttp"
"github.com/rs/zerolog/log"
"github.com/traefik/traefik/v3/pkg/config/static"
"github.com/traefik/traefik/v3/pkg/observability/logs"
"github.com/traefik/traefik/v3/pkg/plugins"
)
const outputDir = "./plugin... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/traefik/traefik.go | cmd/traefik/traefik.go | package main
import (
"context"
"crypto/x509"
"fmt"
"io"
stdlog "log"
"maps"
"net/http"
"os"
"os/signal"
"slices"
"strings"
"syscall"
"time"
"github.com/coreos/go-systemd/v22/daemon"
"github.com/go-acme/lego/v4/challenge"
gokitmetrics "github.com/go-kit/kit/metrics"
"github.com/rs/zerolog/log"
"gith... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/traefik/logger.go | cmd/traefik/logger.go | package main
import (
"context"
"errors"
"fmt"
"io"
stdlog "log"
"os"
"strings"
"time"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/sirupsen/logrus"
"github.com/traefik/traefik/v3/pkg/config/static"
"github.com/traefik/traefik/v3/pkg/observability/logs"
"gopkg.in/natefinch/lumberjack.... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/traefik/traefik_test.go | cmd/traefik/traefik_test.go | package main
import (
"crypto/x509"
"encoding/pem"
"strings"
"testing"
"github.com/go-kit/kit/metrics"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/traefik/traefik/v3/pkg/config/static"
)
// FooCert is a PEM-encoded TLS cert.
// generated from src/crypto/tls:
// go r... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/version/version.go | cmd/version/version.go | package version
import (
"fmt"
"io"
"os"
"runtime"
"text/template"
"github.com/traefik/paerser/cli"
"github.com/traefik/traefik/v3/pkg/version"
)
var versionTemplate = `Version: {{.Version}}
Codename: {{.Codename}}
Go version: {{.GoVersion}}
Built: {{.BuildTime}}
OS/Arch: {{.Os}}/{{.Arc... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/internal/gen/centrifuge.go | cmd/internal/gen/centrifuge.go | package main
import (
"bytes"
"fmt"
"go/format"
"go/importer"
"go/token"
"go/types"
"io"
"log"
"os"
"path"
"path/filepath"
"reflect"
"slices"
"sort"
"strings"
"golang.org/x/tools/imports"
)
// File a kind of AST element that represents a file.
type File struct {
Package string
Imports []string
E... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/internal/gen/main.go | cmd/internal/gen/main.go | package main
import (
"fmt"
"go/build"
"go/types"
"log"
"os"
"path"
"path/filepath"
"strings"
)
const rootPkg = "github.com/traefik/traefik/v3/pkg/config/dynamic"
const (
destModuleName = "github.com/traefik/genconf"
destPkg = "dynamic"
)
const marsh = `package %s
import "encoding/json"
type JSON... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/cmd/healthcheck/healthcheck.go | cmd/healthcheck/healthcheck.go | package healthcheck
import (
"errors"
"fmt"
"net/http"
"os"
"time"
"github.com/traefik/paerser/cli"
"github.com/traefik/traefik/v3/pkg/config/static"
)
// NewCmd builds a new HealthCheck command.
func NewCmd(traefikConfiguration *static.Configuration, loaders []cli.ResourceLoader) *cli.Command {
return &cli.... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/docker_compose_test.go | integration/docker_compose_test.go | package integration
import (
"encoding/json"
"net/http"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
"github.com/traefik/traefik/v3/pkg/api"
"github.com/traefik/traef... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/routing_test.go | integration/routing_test.go | package integration
import (
"net"
"net/http"
"strings"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// RoutingSuite tests multi-layer routing with authentication middleware.
type RoutingSuite struct{ BaseSuite }
... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/redis_test.go | integration/redis_test.go | package integration
import (
"bytes"
"encoding/json"
"net"
"net/http"
"os"
"path/filepath"
"strings"
"testing"
"time"
"github.com/kvtools/redis"
"github.com/kvtools/valkeyrie"
"github.com/kvtools/valkeyrie/store"
"github.com/pmezard/go-difflib/difflib"
"github.com/stretchr/testify/require"
"github.com/... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/ratelimit_test.go | integration/ratelimit_test.go | package integration
import (
"net"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type RateLimitSuite struct {
BaseSuite
ServerIP string
RedisEndpoint string
}
func TestRateLimitSuite(t *testing.T... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/tcp_healthcheck_test.go | integration/tcp_healthcheck_test.go | package integration
import (
"net"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// TCPHealthCheckSuite test suite for TCP health checks.
type TCPHealthCheckSuite stru... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/healthcheck_test.go | integration/healthcheck_test.go | package integration
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// HealthCheck test suites.
type HealthCheckSuite str... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/simple_test.go | integration/simple_test.go | package integration
import (
"bufio"
"bytes"
"crypto"
"crypto/rand"
"crypto/tls"
"encoding/json"
"fmt"
"io"
"net"
"net/http"
"net/http/httptest"
"os"
"regexp"
"strings"
"sync/atomic"
"syscall"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/t... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | true |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/udp_test.go | integration/udp_test.go | package integration
import (
"net"
"net/http"
"strings"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type UDPSuite struct{ BaseSuite }
func TestU... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/tracing_test.go | integration/tracing_test.go | package integration
import (
"encoding/json"
"fmt"
"io"
"net"
"net/http"
"net/url"
"os"
"strings"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/tidwall/gjson"
"github.com/traefik/traefik/v3/integration/try"
)
type Tra... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | true |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/rest_test.go | integration/rest_test.go | package integration
import (
"bytes"
"encoding/json"
"net"
"net/http"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
"github.com/traefik/traefik/v3/pkg/config/dynamic"... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/timeout_test.go | integration/timeout_test.go | package integration
import (
"fmt"
"net"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type TimeoutSuite struct{ BaseSuite }
func TestTimeoutSuite(t *testing.T) {
... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/retry_test.go | integration/retry_test.go | package integration
import (
"io"
"net/http"
"testing"
"time"
"github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type RetrySuite struct {
BaseSuite
whoamiIP string
}... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/grpc_test.go | integration/grpc_test.go | package integration
import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"math/rand"
"net"
"os"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/helloworld"
"github.com/traefik/traefik/v3/in... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/dual_logging_test.go | integration/dual_logging_test.go | package integration
import (
"compress/gzip"
"encoding/json"
"io"
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"go.opentelemetry.io/collector/pdata/plog/plogotlp"
)
const traefikTestOTLPLogFile = "traefik_otlp.log"... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/consul_test.go | integration/consul_test.go | package integration
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"net"
"net/http"
"os"
"path/filepath"
"testing"
"time"
"github.com/kvtools/consul"
"github.com/kvtools/valkeyrie"
"github.com/kvtools/valkeyrie/store"
"github.com/pmezard/go-difflib/difflib"
"github.com/stretchr/testify/require"
"gith... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/file_test.go | integration/file_test.go | package integration
import (
"net/http"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// File tests suite.
type FileSuite struct{ BaseSuite }
func TestFileSuite(t *testing.T) {
suite.Run(t, new(FileSuite))
}
func ... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/keepalive_test.go | integration/keepalive_test.go | package integration
import (
"math"
"net"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type KeepAliveSuite struct {
BaseSuite
}
func TestKeepAliveSuit... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/redis_sentinel_test.go | integration/redis_sentinel_test.go | package integration
import (
"bytes"
"encoding/json"
"fmt"
"net"
"net/http"
"os"
"path/filepath"
"strings"
"testing"
"text/template"
"time"
"github.com/fatih/structs"
"github.com/kvtools/redis"
"github.com/kvtools/valkeyrie"
"github.com/kvtools/valkeyrie/store"
"github.com/pmezard/go-difflib/difflib"
... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/headers_test.go | integration/headers_test.go | package integration
import (
"net"
"net/http"
"net/http/httptest"
"os"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// Headers tests suite.
type HeadersSuite struct{ BaseSuit... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/knative_conformance_test.go | integration/knative_conformance_test.go | // Use a build tag to include and run Knative conformance tests.
// The Knative conformance toolkit redefines the skip-tests flag,
// which conflicts with the testing library and causes a panic.
//go:build knativeConformance
package integration
import (
"flag"
"io"
"os"
"slices"
"testing"
"time"
"github.com/s... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/k8s_test.go | integration/k8s_test.go | package integration
import (
"bytes"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
"path/filepath"
"regexp"
"strings"
"testing"
"time"
"github.com/pmezard/go-difflib/difflib"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"gi... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/conf_throttling_test.go | integration/conf_throttling_test.go | package integration
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"regexp"
"strconv"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
"github.com/traefik/traefik/v3/pkg... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/zk_test.go | integration/zk_test.go | package integration
import (
"bytes"
"encoding/json"
"net"
"net/http"
"os"
"path/filepath"
"testing"
"time"
"github.com/kvtools/valkeyrie"
"github.com/kvtools/valkeyrie/store"
"github.com/kvtools/zookeeper"
"github.com/pmezard/go-difflib/difflib"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/hostresolver_test.go | integration/hostresolver_test.go | package integration
import (
"net/http"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type HostResolverSuite struct{ BaseSuite }
func TestHostResolverSuite(t *testing.T) {
suite.Run(t, new(HostResolverSuite))
}
fu... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/access_log_test.go | integration/access_log_test.go | package integration
import (
"crypto/md5"
"crypto/rand"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/websocket_test.go | integration/websocket_test.go | package integration
import (
"crypto/tls"
"crypto/x509"
"encoding/base64"
"net"
"net/http"
"net/http/httptest"
"os"
"testing"
"time"
gorillawebsocket "github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/http_test.go | integration/http_test.go | package integration
import (
"encoding/json"
"net"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
)
type HTTPSuite struct{ BaseSuite ... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/integration_test.go | integration/integration_test.go | // This is the main file that sets up integration tests using go-check.
package integration
import (
"bytes"
"context"
"errors"
"flag"
"fmt"
"io"
"io/fs"
stdlog "log"
"net/http"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"slices"
"strings"
"testing"
"text/template"
"time"
"github.com/docker... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/fake_dns_server.go | integration/fake_dns_server.go | package integration
import (
"fmt"
"net"
"os"
"github.com/miekg/dns"
"github.com/rs/zerolog/log"
)
type handler struct {
traefikIP string
}
// ServeDNS a fake DNS server
// Simplified version of the Challenge Test Server from Boulder
// https://github.com/letsencrypt/boulder/blob/a6597b9f120207eff192c3e4107a7... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/log_rotation_test.go | integration/log_rotation_test.go | //go:build !windows
// +build !windows
package integration
import (
"bufio"
"net/http"
"os"
"strings"
"syscall"
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integr... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/docker_test.go | integration/docker_test.go | package integration
import (
"encoding/json"
"io"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// Docker tests suite.
type DockerSuite struct {
BaseSuite
}
func T... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/tls_client_headers_test.go | integration/tls_client_headers_test.go | package integration
import (
"crypto/tls"
"net/http"
"os"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
const (
rootCertPath = "./fixtures/tlsclientheaders/root.pem"
certPemP... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/proxy_protocol_test.go | integration/proxy_protocol_test.go | package integration
import (
"bufio"
"net"
"testing"
"time"
"github.com/pires/go-proxyproto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type ProxyProtocolSuite struct {
BaseSuite
whoamiIP ... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/https_test.go | integration/https_test.go | package integration
import (
"bytes"
"crypto/tls"
"crypto/x509"
"fmt"
"net"
"net/http"
"net/http/httptest"
"os"
"testing"
"time"
"github.com/BurntSushi/toml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/int... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | true |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/tcp_test.go | integration/tcp_test.go | package integration
import (
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io"
"net"
"net/http"
"net/http/httptest"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
t... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/acme_test.go | integration/acme_test.go | package integration
import (
"crypto/tls"
"crypto/x509"
"fmt"
"net"
"net/http"
"os"
"path/filepath"
"testing"
"time"
"github.com/miekg/dns"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/trae... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/gateway_api_conformance_test.go | integration/gateway_api_conformance_test.go | //go:build gatewayAPIConformance
package integration
import (
"fmt"
"io"
"io/fs"
"os"
"path/filepath"
"slices"
"strings"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/m... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/consul_catalog_test.go | integration/consul_catalog_test.go | package integration
import (
"fmt"
"net"
"net/http"
"testing"
"time"
"github.com/hashicorp/consul/api"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
type ConsulCatalogSuite struct {
BaseSuite... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/error_pages_test.go | integration/error_pages_test.go | package integration
import (
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/traefik/traefik/v3/integration/try"
)
// ErrorPagesSuite test suites.
type ErrorPagesSuite struct {
BaseSuite
ErrorPageIP string
BackendIP str... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/etcd_test.go | integration/etcd_test.go | package integration
import (
"bytes"
"encoding/json"
"net"
"net/http"
"os"
"path/filepath"
"testing"
"time"
"github.com/kvtools/etcdv3"
"github.com/kvtools/valkeyrie"
"github.com/kvtools/valkeyrie/store"
"github.com/pmezard/go-difflib/difflib"
"github.com/stretchr/testify/require"
"github.com/stretchr/t... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/fixtures/knative/tools.go | integration/fixtures/knative/tools.go | //go:build tools
package tools
// The following dependencies are required by the Knative conformance tests.
// They allow to download the test_images when calling "go mod vendor".
import (
_ "knative.dev/networking/test/test_images/grpc-ping"
_ "knative.dev/networking/test/test_images/httpproxy"
_ "knative.dev/net... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/fixtures/ocsp/gencert.go | integration/fixtures/ocsp/gencert.go | package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"math/big"
"os"
"time"
)
func main() {
// generate CA
caKey, caCert := generateCA("Test CA")
saveKeyAndCert("integration/fixtures/ocsp/ca.key", "integration/fixtures/ocsp/ca.crt", caKey, ca... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/helloworld/helloworld.pb.go | integration/helloworld/helloworld.pb.go | // Code generated by protoc-gen-go. DO NOT EDIT.
// source: helloworld.proto
/*
Package helloworld is a generated protocol buffer package.
It is generated from these files:
helloworld.proto
It has these top-level messages:
HelloRequest
HelloReply
StreamExampleRequest
StreamExampleReply
*/
package helloworld
... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/try/try.go | integration/try/try.go | package try
import (
"fmt"
"math"
"net/http"
"os"
"time"
"github.com/rs/zerolog/log"
)
const (
// CITimeoutMultiplier is the multiplier for all timeout in the CI.
CITimeoutMultiplier = 3
maxInterval = 5 * time.Second
)
type timedAction func(timeout time.Duration, operation DoCondition) error
// Sl... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/integration/try/condition.go | integration/try/condition.go | package try
import (
"context"
"errors"
"fmt"
"io"
"net/http"
"reflect"
"strings"
"github.com/kvtools/valkeyrie/store"
)
// ResponseCondition is a retry condition function.
// It receives a response, and returns an error if the response failed the condition.
type ResponseCondition func(*http.Response) error
... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/internal/gendoc.go | internal/gendoc.go | package main
import (
"bytes"
"fmt"
"io"
"os"
"reflect"
"sort"
"strings"
"github.com/BurntSushi/toml"
"github.com/rs/zerolog/log"
"github.com/traefik/paerser/flag"
"github.com/traefik/paerser/generator"
"github.com/traefik/traefik/v3/cmd"
"github.com/traefik/traefik/v3/pkg/collector/hydratation"
"github... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/internal/anchors.go | internal/anchors.go | package main
import (
"bufio"
"fmt"
"log"
"os"
"path/filepath"
"regexp"
"strings"
)
var (
// detect any existing <a ...> tag in the cell (case-insensitive).
reExistingAnchor = regexp.MustCompile(`(?i)<\s*a\b[^>]*>.*?</\s*a\s*>`)
// separator cell like --- or :---: (3+ dashes, optional leading/trailing colon... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/internal/release/release.go | internal/release/release.go | package main
import (
"fmt"
"log"
"os"
"path"
"strings"
"text/template"
)
func main() {
if len(os.Args) < 2 {
log.Fatal("GOOS should be provided as a CLI argument")
}
goos := strings.TrimSpace(os.Args[1])
if goos == "" {
log.Fatal("GOOS should be provided as a CLI argument")
}
tmpl := template.Must(... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/internal/testsci/genmatrix.go | internal/testsci/genmatrix.go | package main
import (
"encoding/json"
"fmt"
"os"
"strings"
"github.com/rs/zerolog/log"
"golang.org/x/tools/go/packages"
)
const groupCount = 12
type group struct {
Group string `json:"group"`
}
func main() {
cfg := &packages.Config{
Mode: packages.NeedName,
Dir: ".",
}
pkgs, err := packages.Load(cf... | go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
traefik/traefik | https://github.com/traefik/traefik/blob/f7280439e6378221a541910f43a01323d52db048/webui/embed.go | webui/embed.go | package webui
import (
"embed"
"io/fs"
)
// Files starting with . and _ are excluded by default
//
//go:embed static
var assets embed.FS
// FS contains the web UI assets.
var FS, _ = fs.Sub(assets, "static")
| go | MIT | f7280439e6378221a541910f43a01323d52db048 | 2026-01-07T08:35:43.502324Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/main.go | main.go | package main
//go:generate go run src/install/updateversion.go
//go:generate git commit -am "bump $VERSION"
//go:generate git tag -af v$VERSION -m "v$VERSION"
import (
"fmt"
"os"
"os/signal"
"syscall"
"github.com/schollz/croc/v10/src/cli"
"github.com/schollz/croc/v10/src/utils"
)
func main() {
// "github.com... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/tcp/tcp.go | src/tcp/tcp.go | package tcp
import (
"bytes"
"fmt"
"net"
"strings"
"sync"
"time"
log "github.com/schollz/logger"
"github.com/schollz/pake/v3"
"github.com/schollz/croc/v10/src/comm"
"github.com/schollz/croc/v10/src/crypt"
"github.com/schollz/croc/v10/src/models"
)
type server struct {
host string
port strin... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/tcp/defaults.go | src/tcp/defaults.go | package tcp
import "time"
const (
DEFAULT_LOG_LEVEL = "debug"
DEFAULT_ROOM_CLEANUP_INTERVAL = 10 * time.Minute
DEFAULT_ROOM_TTL = 3 * time.Hour
)
| go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/tcp/options.go | src/tcp/options.go | package tcp
import (
"fmt"
"time"
)
// TODO: maybe export from logger library?
var availableLogLevels = []string{"info", "error", "warn", "debug", "trace"}
type serverOptsFunc func(s *server) error
func WithBanner(banner ...string) serverOptsFunc {
return func(s *server) error {
if len(banner) > 0 {
s.banne... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/tcp/tcp_test.go | src/tcp/tcp_test.go | package tcp
import (
"bytes"
"fmt"
"testing"
"time"
log "github.com/schollz/logger"
"github.com/stretchr/testify/assert"
)
func BenchmarkConnection(b *testing.B) {
log.SetLevel("trace")
go Run("debug", "127.0.0.1", "8283", "pass123", "8284")
time.Sleep(100 * time.Millisecond)
b.ResetTimer()
for i := 0; i ... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/comm/comm.go | src/comm/comm.go | package comm
import (
"bytes"
"encoding/binary"
"fmt"
"io"
"net"
"net/url"
"strings"
"time"
"github.com/magisterquis/connectproxy"
"github.com/schollz/croc/v10/src/utils"
log "github.com/schollz/logger"
"golang.org/x/net/proxy"
)
var Socks5Proxy = ""
var HttpProxy = ""
var MAGIC_BYTES = []byte("croc")
... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/comm/comm_test.go | src/comm/comm_test.go | package comm
import (
"crypto/rand"
"net"
"testing"
"time"
log "github.com/schollz/logger"
"github.com/stretchr/testify/assert"
)
func TestComm(t *testing.T) {
token := make([]byte, 3000)
if _, err := rand.Read(token); err != nil {
t.Error(err)
}
// Use dynamic port allocation to avoid conflicts
listen... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/models/constants.go | src/models/constants.go | package models
import (
"context"
"fmt"
"net"
"os"
"path"
"time"
"github.com/schollz/croc/v10/src/utils"
log "github.com/schollz/logger"
)
// TCP_BUFFER_SIZE is the maximum packet size
const TCP_BUFFER_SIZE = 1024 * 64
// DEFAULT_RELAY is the default relay used (can be set using --relay)
var (
DEFAULT_RELA... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/models/models_test.go | src/models/models_test.go | package models
import (
"net"
"strings"
"testing"
"time"
)
func TestConstants(t *testing.T) {
if TCP_BUFFER_SIZE != 1024*64 {
t.Errorf("TCP_BUFFER_SIZE = %d, want %d", TCP_BUFFER_SIZE, 1024*64)
}
if DEFAULT_PORT != "9009" {
t.Errorf("DEFAULT_PORT = %s, want %s", DEFAULT_PORT, "9009")
}
if DEFAULT_PASSP... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
schollz/croc | https://github.com/schollz/croc/blob/913c22f8ab0b399f87ac3a681091771b39dc763b/src/utils/utils.go | src/utils/utils.go | package utils
import (
"archive/zip"
"bufio"
"bytes"
"compress/flate"
"crypto/md5"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"math"
"math/big"
"net"
"net/http"
"os"
"path"
"path/filepath"
"strings"
"time"
"unicode"
"github.com/cespare/xxhash/v2"
"github.com/kalafut/imohash"
"githu... | go | MIT | 913c22f8ab0b399f87ac3a681091771b39dc763b | 2026-01-07T08:36:10.668174Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.