provider

package
v1.7.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRouterConfiguration

func BuildRouterConfiguration(ctx context.Context, configuration *dynamic.HTTPConfiguration, defaultRouterName string, defaultRuleTpl *template.Template, model any)

BuildRouterConfiguration builds a router configuration.

func BuildTCPRouterConfiguration

func BuildTCPRouterConfiguration(ctx context.Context, configuration *dynamic.TCPConfiguration)

BuildTCPRouterConfiguration builds a router configuration.

func BuildUDPRouterConfiguration

func BuildUDPRouterConfiguration(ctx context.Context, configuration *dynamic.UDPConfiguration)

BuildUDPRouterConfiguration builds a router configuration.

func MakeDefaultRuleTemplate

func MakeDefaultRuleTemplate(defaultRule string, funcMap template.FuncMap) (*template.Template, error)

MakeDefaultRuleTemplate creates the default rule template.

func Merge

func Merge(ctx context.Context, configurations []NamedConfiguration, strategy ResourceStrategy) *dynamic.Configuration

Merge merges multiple configurations.

func Normalize

func Normalize(name string) string

Normalize replaces all special chars with `-`.

Types

type NamedConfiguration

type NamedConfiguration struct {
	Name          string
	Configuration *dynamic.Configuration
}

NamedConfiguration is a configuration with its name.

func NameSortedConfigurations

func NameSortedConfigurations(configurations map[string]*dynamic.Configuration) []NamedConfiguration

NameSortedConfigurations returns the configurations sorted by name.

type NamespacedProvider

type NamespacedProvider interface {
	Provider

	// Namespace returns the specific namespace this provider instance is configured for.
	Namespace() string
}

NamespacedProvider is implemented by providers that support namespace-scoped configurations, where each configured namespace results in a dedicated provider instance. This enables clear identification of which namespace each provider instance serves during startup logging and operational monitoring.

type Provider

type Provider interface {
	// Provide allows the provider to provide configurations to ingress
	// using the given configuration channel.
	Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error
	Init() error
}

Provider defines methods of a provider.

type ResourceStrategy

type ResourceStrategy int

ResourceStrategy defines how the merge should handle resources.

const (
	// ResourceStrategyMerge tries to call the Merge method on the resource.
	ResourceStrategyMerge ResourceStrategy = iota
	// ResourceStrategySkipDuplicates skips duplicate resources.
	ResourceStrategySkipDuplicates
)

Directories

Path Synopsis
kubernetes
crd
crd/generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
crd/generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
crd/generated/clientset/versioned/typed/hanzoai/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
crd/generated/clientset/versioned/typed/hanzoai/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
crd/hanzoai/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
k8s
kv
zk

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL