Documentation
¶
Index ¶
- func SetupFlags()
- type AWS
- type Config
- func (c *Config) GetDelayQueue() *delayqueue.DelayQueue
- func (c *Config) GetLogger(ctx context.Context) *slog.Logger
- func (c *Config) GetNameSpaces(ctx context.Context) map[string]*storage.Storage
- func (c *Config) GetPIDFile() string
- func (c *Config) GetRotators(ctx context.Context) []*sloghelper.Rotator
- func (c *Config) GetServer(ctx context.Context) httpserver.Server
- func (c *Config) InitializeLogging(ctx context.Context) (err error)
- func (c *Config) PreLoadSecrets(ctx context.Context) error
- func (c *Config) StartSecretRefreshers(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupFlags ¶
func SetupFlags()
Types ¶
type AWS ¶
type AWS struct { KeyID *string `toml:"key_id"` Region *string `toml:"region"` SecretKey *string `toml:"secret_key"` AssumeRoleARN *string `toml:"assume_role_arn"` Profile *string `toml:"profile"` FromEnvironment *bool `toml:"from_environment"` FromEC2Role *bool `toml:"from_ec2_role"` // contains filtered or unexported fields }
Each proxy is configured via this definition.
func (*AWS) GetSession ¶
Populates the Session() variable and returns it.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func Parse ¶
Parses a file and validates its contents, returning the objects that can be used for configuration later.
func (*Config) GetDelayQueue ¶
func (c *Config) GetDelayQueue() *delayqueue.DelayQueue
Returns the DelayQueue that will be used for state transitions.
func (*Config) GetNameSpaces ¶
Returns a map of all namespaces mapped into the Storage structure that will be serving them.
func (*Config) GetPIDFile ¶
Returns the pid file (if configured). If not configured this returns and empty string.
func (*Config) GetRotators ¶
func (c *Config) GetRotators(ctx context.Context) []*sloghelper.Rotator
Returns all log rotators created as part of the configuration.
func (*Config) GetServer ¶
func (c *Config) GetServer(ctx context.Context) httpserver.Server
Returns the httpserver.Server for this config.
func (*Config) InitializeLogging ¶
Initializes the logging system.
func (*Config) PreLoadSecrets ¶
Pre-loads all of the secrets in the configuration. If any secrets were configured (certificates, passwords, aes keys, htpasswd files, etc) then this will perform the initial load of those resources.
func (*Config) StartSecretRefreshers ¶
If configured to do so this will setup a logger and start the secret refresher goroutine. This routine will run until the given context is canceled.