Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryConfig ¶
type DiscoveryRef ¶
type Dynamic ¶
type Dynamic struct {
Routes []RouteConfig `yaml:"routes"`
Upstreams []UpstreamConfig `yaml:"upstreams,omitempty"`
Plugins []PluginConfig `yaml:"plugins,omitempty"`
StreamRoute []StreamRouteConfig `yaml:"streamRoutes,omitempty"`
}
type DynamicValidator ¶
type DynamicValidator struct {
// contains filtered or unexported fields
}
TODO: Make dynamic validation's validator registerable by each component (e.g., plugins, discovery, etc.). (maybe jsonschema validation?)
func NewDynamicValidator ¶
func NewDynamicValidator() *DynamicValidator
func (*DynamicValidator) GetErrors ¶
func (v *DynamicValidator) GetErrors() []ValidationError
func (*DynamicValidator) HasErrors ¶
func (v *DynamicValidator) HasErrors() bool
func (*DynamicValidator) ToError ¶
func (v *DynamicValidator) ToError() error
func (*DynamicValidator) Validate ¶
func (v *DynamicValidator) Validate(cfg *Dynamic) error
type ListenerConfig ¶
type PluginConfig ¶
type PluginConfig struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Config types.PluginConf `yaml:"config"`
}
type ProviderConfig ¶
type RouteConfig ¶
type RouteConfig struct {
Name string `yaml:"name"`
Listener string `yaml:"listener"`
Matches []Match `yaml:"matches"`
Plugins []PluginConfig `yaml:"plugins,omitempty"`
Upstream *UpstreamConfig `yaml:"upstream,omitempty"`
}
type Static ¶
type Static struct {
Listeners []ListenerConfig `yaml:"listeners"`
Providers []ProviderConfig `yaml:"providers"`
DiscoveryConfigs []DiscoveryConfig `yaml:"discovery"`
LogLevel string `yaml:"log_level"`
}
type StaticValidator ¶
type StaticValidator struct {
// contains filtered or unexported fields
}
func NewStaticValidator ¶
func NewStaticValidator() *StaticValidator
func (*StaticValidator) GetErrors ¶
func (v *StaticValidator) GetErrors() []ValidationError
func (*StaticValidator) HasErrors ¶
func (v *StaticValidator) HasErrors() bool
func (*StaticValidator) ToError ¶
func (v *StaticValidator) ToError() error
func (*StaticValidator) Validate ¶
func (v *StaticValidator) Validate(cfg *Static) error
Validate performs all validation checks on the static configuration
type StreamRouteConfig ¶
type StreamRouteConfig struct {
Name string `yaml:"name"`
Listener string `yaml:"listener"`
Plugins []PluginConfig `yaml:"plugins,omitempty"`
Upstream *UpstreamConfig `yaml:"upstream,omitempty"`
}
type UpstreamConfig ¶
type UpstreamConfig struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Nodes []Node `yaml:"nodes,omitempty"`
Service string `yaml:"service,omitempty"`
Discovery DiscoveryRef `yaml:"discovery,omitempty"`
}
type ValidationError ¶
type ValidationError struct {
Field string `json:"field,omitempty"`
Message string `json:"message"`
}
ValidationError represents a configuration validation error
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.