Documentation
¶
Index ¶
Constants ¶
View Source
const ( STATIC = "static" FILE = "file" DNS = "dns" KUBERNETES = "kubernetes" )
Variables ¶
This section is empty.
Functions ¶
func NewDNSRefresher ¶ added in v0.2.5
Types ¶
type Configuration ¶
type Configuration struct { // MaxConcurrentStreams max concurrent streams for gRPC server MaxConcurrentStreams uint32 `yaml:"max_concurrent_streams,omitempty" validate:"omitempty,number" default:"1000000"` SourceType string `yaml:"source_type,omitempty" validate:"oneof=dns kubernetes file static" default:"static"` NodeID string `yaml:"node_id,omitempty" validate:"required,uuid"` RefreshInterval time.Duration `yaml:"refresh_interval,omitempty" validate:"omitempty,min=0s,max=1h" default:"30s"` Kubernetes struct { // Namespace to monitor when SourceType = kubernetes. default:"" means all namespaces Namespace string `yaml:"namespace,omitempty" validate:"omitempty,ascii" default:""` } ` yaml:"kubernetes,omitempty" validate:"omitempty"` DNS struct { Hostnames []string `yaml:"hostnames" validate:"omitempty,dive,hostname"` } `yaml:"dns,omitempty" validate:"omitempty"` }
Configuration is for xds config
type Option ¶
type Option func(*Options)
func WithFS ¶
WithFS enables use custom FileSystem to load config files. e.g., embed.FS default: os.DirFS(".")
func WithHostnames ¶ added in v0.2.5
WithHostnames : kubernetes namespace to monitor for endpoints
func WithNamespace ¶
WithNamespace : kubernetes namespace to monitor for endpoints
func WithNodeID ¶ added in v0.2.5
WithNodeID set NodeID in UUID format which should math to xDS Bootstrap file
func WithRefreshInterval ¶
WithRefreshInterval specifies the interval to poll Source for endpoints updates. default = 0, means: never refresh
Source Files
¶
Click to show internal directories.
Click to hide internal directories.