config

package
v0.0.0-...-2bf1e3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

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

func (a *AWS) GetSession() *session.Session

Populates the Session() variable and returns it.

type Config

type Config struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(filename string) (*Config, error)

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) GetLogger

func (c *Config) GetLogger(ctx context.Context) *slog.Logger

Returns the top level logger that was generated during initialization.

func (*Config) GetNameSpaces

func (c *Config) GetNameSpaces(ctx context.Context) map[string]*storage.Storage

Returns a map of all namespaces mapped into the Storage structure that will be serving them.

func (*Config) GetPIDFile

func (c *Config) GetPIDFile() string

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

func (c *Config) InitializeLogging(ctx context.Context) (err error)

Initializes the logging system.

func (*Config) PreLoadSecrets

func (c *Config) PreLoadSecrets(ctx context.Context) error

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

func (c *Config) StartSecretRefreshers(ctx context.Context)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL