loader

package
v0.0.0-...-f45b532 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package loader provides an injectable config loading mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

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

Loader will load in the config provided by loader.

func NewLoader

func NewLoader(ctx context.Context, l unmarshaled, opts ...Option) (*Loader, error)

NewLoader ...

func NewLocalConfig

func NewLocalConfig(ctx context.Context, path string, ll localloader, opts ...Option) (*Loader, error)

NewLocalConfig will create a new Loader that will take loader provided config and turn it into actionable server config types

func (Loader) BlockUntilLoaded

func (l Loader) BlockUntilLoaded()

BlockUntilLoaded will block until we are warmed up with parsed config

func (Loader) Get

func (l Loader) Get(ctx context.Context, remote net.Addr) ([]byte, tq.Handler, error)

Get implements tq.SecretProvider. The underlying user types and associated configs are protected by this method.

type Option

type Option func(l *Loader)

Option ...

func RegisterAccounter

func RegisterAccounter(t config.AccounterType, a accounterFactory) Option

RegisterAccounter ...

func RegisterAuthenticator

func RegisterAuthenticator(t config.AuthenticatorType, a authenticatorFactory) Option

RegisterAuthenticator ...

func RegisterHandlerType

func RegisterHandlerType(t config.HandlerType, h handlerFactory) Option

RegisterHandlerType ...

func RegisterSecretProviderType

func RegisterSecretProviderType(t config.ProviderType, sp secretProviderFactory) Option

RegisterSecretProviderType ...

func SetAuthorizerProvider

func SetAuthorizerProvider(a authorizerFactory) Option

SetAuthorizerProvider ...

func SetConfigProvider

func SetConfigProvider(c providerFactory) Option

SetConfigProvider ..

func SetKeychainProvider

func SetKeychainProvider(k keychainProvider) Option

SetKeychainProvider ..

func SetLoggerProvider

func SetLoggerProvider(log loggerProvider) Option

SetLoggerProvider will set a logger to use

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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