Documentation
¶
Index ¶
- Constants
- Variables
- func NewMultiHandler(handlers ...slog.Handler) slog.Handler
- func OkHandler() http.HandlerFunc
- func RenderServicesTable(enabledModules map[string]bool) string
- func ValidateConfig(cfg Config) []error
- type Atc
- func (t *Atc) ApplyFailoverOverride(ctx context.Context, service string, targetDc string, targetNs string, ...) error
- func (t *Atc) DependenciesForModule(mod string) []string
- func (t *Atc) ForceUnlock(ctx context.Context, moduleName string) error
- func (t *Atc) GetAtcEnabledServices(ctx context.Context) ([]string, error)
- func (t *Atc) GetEnabledModulesTable() string
- func (t *Atc) GetFederationStatus(ctx context.Context) (map[string]string, error)
- func (t *Atc) GetLeaderDetails(ctx context.Context, moduleName string) (LeaderDetails, error)
- func (t *Atc) GetPredefinedStrategies(ctx context.Context) (string, error)
- func (t *Atc) IsLeader() bool
- func (t *Atc) ListActiveOverrides(ctx context.Context) ([]map[string]any, error)
- func (t *Atc) PurgeServiceResolver(ctx context.Context, name string) error
- func (t *Atc) ReloadConfig(cfg Config)
- func (t *Atc) Run(ctx context.Context) error
- func (t *Atc) TriggerConfigReload() error
- func (t *Atc) TriggerManualRedirect(ctx context.Context, service string, redirectDc string, redirectNs string, ...) error
- func (t *Atc) UserVisibleModuleNames() []string
- type AuthConfig
- type Config
- type HaConfig
- type LeaderDetails
- type LeaderStatusResponse
- type MultiHandler
- type StrategiesConfig
Constants ¶
Variables ¶
View Source
var UserVisibleModules = []string{ Consul, Forwarder, Redirector, All, }
View Source
var ValidTargets = []string{"all", "consul", "forwarder", "redirector", "server"}
ValidTargets holds the list of acceptable target modules.
Functions ¶
func OkHandler ¶
func OkHandler() http.HandlerFunc
func RenderServicesTable ¶
func ValidateConfig ¶ added in v0.2.0
ValidateConfig performs semantic and syntactical validation on the ATC config.
Types ¶
type Atc ¶
type Atc struct {
Cfg Config
Server *atc_server.Server
Forwarder *forwarder.Forwarder
Redirector *redirector.Redirector
// contains filtered or unexported fields
}
func (*Atc) ApplyFailoverOverride ¶
func (*Atc) DependenciesForModule ¶
func (*Atc) ForceUnlock ¶ added in v0.4.0
func (*Atc) GetAtcEnabledServices ¶
func (*Atc) GetEnabledModulesTable ¶
func (*Atc) GetFederationStatus ¶
func (*Atc) GetLeaderDetails ¶ added in v0.4.0
func (*Atc) GetPredefinedStrategies ¶ added in v0.3.0
func (*Atc) ListActiveOverrides ¶ added in v0.3.0
func (*Atc) PurgeServiceResolver ¶
func (*Atc) ReloadConfig ¶
func (*Atc) TriggerConfigReload ¶ added in v0.3.0
func (*Atc) TriggerManualRedirect ¶
func (*Atc) UserVisibleModuleNames ¶
type AuthConfig ¶ added in v0.3.0
type AuthConfig struct {
Enabled bool `yaml:"enabled" json:"enabled" mapstructure:"enabled"`
StaticKeys []string `yaml:"static_keys" json:"static_keys" mapstructure:"static_keys"`
ConsulTokenDelegation bool `yaml:"consul_token_delegation" json:"consul_token_delegation" mapstructure:"consul_token_delegation"`
}
type Config ¶
type Config struct {
Name string `yaml:"service" mapstructure:"service"`
Server atc_server.Config `yaml:"server" mapstructure:"server"`
Target []string `yaml:"target" mapstructure:"target"`
ConsulAddr string `yaml:"consul_addr" mapstructure:"consul_addr"`
ConsulToken string `yaml:"consul_token" mapstructure:"consul_token"`
ConsulDC string `yaml:"consul_dc" mapstructure:"consul_dc"`
ConsulNamespace string `yaml:"consul_namespace" mapstructure:"consul_namespace"`
WriteRateLimit string `yaml:"write_rate_limit" mapstructure:"write_rate_limit"`
DampeningPeriod string `yaml:"dampening_period" mapstructure:"dampening_period"`
MinDampeningPeriod string `yaml:"min_dampening_period" mapstructure:"min_dampening_period"`
Strategies StrategiesConfig `yaml:"strategies" json:"strategies" mapstructure:"strategies"`
HA HaConfig `yaml:"ha" json:"ha" mapstructure:"ha"`
Auth AuthConfig `yaml:"auth" json:"auth" mapstructure:"auth"`
DryRun bool `yaml:"dry_run" json:"dry_run" mapstructure:"dry_run"`
}
type LeaderDetails ¶ added in v0.4.0
type LeaderStatusResponse ¶ added in v0.4.0
type MultiHandler ¶
type MultiHandler struct {
// contains filtered or unexported fields
}
MultiHandler multiplexes slog records to multiple slog Handlers.
type StrategiesConfig ¶
type StrategiesConfig struct {
Failover map[string]forwarder.FailoverStrategy `yaml:"failover" json:"failover" mapstructure:"failover"`
Redirect map[string]redirector.RedirectStrategy `yaml:"redirect" json:"redirect" mapstructure:"redirect"`
}
Click to show internal directories.
Click to hide internal directories.