Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientTLSConfig ¶
type ClientTLSConfigSchema ¶
type Config ¶
type Config struct { MessageBusServers []MessageBusServer RoutingAPI RoutingAPI Routes []Route DynamicConfigGlobs []string NATSmTLSConfig ClientTLSConfig Host string AvailabilityZone string `json:"availability_zone"` UnregistrationMessageLimit int }
type ConfigSchema ¶
type ConfigSchema struct { MessageBusServers []MessageBusServerSchema `json:"message_bus_servers"` RoutingAPI RoutingAPISchema `json:"routing_api"` Routes []RouteSchema `json:"routes"` DynamicConfigGlobs []string `json:"dynamic_config_globs"` NATSmTLSConfig ClientTLSConfigSchema `json:"nats_mtls_config"` Host string `json:"host"` AvailabilityZone string `json:"availability_zone"` UnregistrationMessageLimit *int `json:"unregistration_message_limit,omitempty"` }
func NewConfigSchemaFromFile ¶
func NewConfigSchemaFromFile(configFile string) (ConfigSchema, error)
func (ConfigSchema) ParseSchemaAndSetDefaultsToConfig ¶
func (c ConfigSchema) ParseSchemaAndSetDefaultsToConfig() (*Config, error)
type HealthCheckSchema ¶
type LoadBalancingAlgorithm ¶
type LoadBalancingAlgorithm string
const ( RoundRobin LoadBalancingAlgorithm = "round-robin" LeastConns LoadBalancingAlgorithm = "least-connection" )
type MessageBusServer ¶
type MessageBusServerSchema ¶
type Options ¶
type Options struct {
LoadBalancingAlgorithm LoadBalancingAlgorithm `json:"lb_algo,omitempty" yaml:"lb_algo,omitempty"`
}
type Route ¶
type Route struct { Type string Name string Port *uint16 Protocol string TLSPort *uint16 Tags map[string]string URIs []string RouterGroup string Host string ExternalPort *uint16 RouteServiceUrl string RegistrationInterval time.Duration HealthCheck *HealthCheck ServerCertDomainSAN string Options *Options }
func RouteFromSchema ¶
func RouteFromSchema(r RouteSchema, index int, host string) (*Route, error)
type RouteSchema ¶
type RouteSchema struct { Type string `json:"type" yaml:"type"` Name string `json:"name" yaml:"name"` Host string `json:"host" yaml:"host"` Port *uint16 `json:"port" yaml:"port"` Protocol string `json:"protocol" yaml:"protocol"` SniPort *uint16 `json:"sni_port" yaml:"sni_port"` TLSPort *uint16 `json:"tls_port" yaml:"tls_port"` Tags map[string]string `json:"tags" yaml:"tags"` URIs []string `json:"uris" yaml:"uris"` RouterGroup string `json:"router_group" yaml:"router_group"` ExternalPort *uint16 `json:"external_port,omitempty" yaml:"external_port,omitempty"` RouteServiceUrl string `json:"route_service_url" yaml:"route_service_url"` RegistrationInterval string `json:"registration_interval,omitempty" yaml:"registration_interval,omitempty"` HealthCheck *HealthCheckSchema `json:"health_check,omitempty" yaml:"health_check,omitempty"` ServerCertDomainSAN string `json:"server_cert_domain_san,omitempty" yaml:"server_cert_domain_san,omitempty"` SniRoutableSan string `json:"sni_routable_san,omitempty" yaml:"sni_routable_san,omitempty"` Options *Options `json:"options,omitempty" yaml:"options,omitempty"` }
type RoutingAPI ¶
type RoutingAPISchema ¶
type RoutingAPISchema struct { APIURL string `json:"api_url"` OAuthURL string `json:"oauth_url"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` CACerts string `json:"ca_certs"` SkipSSLValidation bool `json:"skip_ssl_validation"` ClientCertificatePath string `json:"client_cert_path"` ClientPrivateKeyPath string `json:"client_private_key_path"` ServerCACertificatePath string `json:"server_ca_cert_path"` MaxTTL string `json:"max_ttl,omitempty"` }
Click to show internal directories.
Click to hide internal directories.