Documentation ¶
Index ¶
Constants ¶
View Source
const ( HealthPoolName string = "health" HealthBindAddress string = "127.0.0.1:22333" )
View Source
const (
TwemproxyConfigFile = "/etc/twemproxy/nutcracker.yml"
)
Variables ¶
This section is empty.
Functions ¶
func AddTwemproxySidecar ¶
func AddTwemproxySidecar(dep appsv1.Deployment, spec *saasv1alpha1.TwemproxySpec) *appsv1.Deployment
Types ¶
type Server ¶ added in v0.16.1
func (*Server) MarshalJSON ¶ added in v0.16.1
func (*Server) UnmarshalJSON ¶ added in v0.16.1
type ServerPoolConfig ¶ added in v0.16.1
type ServerPoolConfig struct { Listen string `json:"listen"` Hash string `json:"hash,omitempty"` HashTag string `json:"hash_tag,omitempty"` Distribution string `json:"distribution,omitempty"` Timeout int `json:"timeout,omitempty"` Backlog int `json:"backlog,omitempty"` PreConnect bool `json:"preconnect"` Redis bool `json:"redis"` AutoEjectHosts bool `json:"auto_eject_hosts"` ServerFailureLimit int `json:"server_failure_limit,omitempty"` Servers []Server `json:"servers"` }
func GenerateServerPool ¶ added in v0.16.1
func GenerateServerPool(pool saasv1alpha1.TwemproxyServerPool, targets map[string]Server) ServerPoolConfig
type TwemproxyOptions ¶
type TwemproxyOptions struct { ConfigFile pod.EnvVarValue `env:"TWEMPROXY_CONFIG_FILE"` MetricsAddress pod.EnvVarValue `env:"TWEMPROXY_METRICS_ADDRESS"` StatsInterval pod.EnvVarValue `env:"TWEMPROXY_STATS_INTERVAL"` LogLevel pod.EnvVarValue `env:"TWEMPROXY_LOG_LEVEL"` }
TwemproxyOptions holds configuration for the Twemproxy sidecar
func NewTwemproxyOptions ¶
func NewTwemproxyOptions(spec saasv1alpha1.TwemproxySpec) TwemproxyOptions
NewTwemproxyOptions returns a NewTwemproxyOptions struct for the given saasv1alpha1.BackendSpec
Click to show internal directories.
Click to hide internal directories.