config

package
v0.0.0-...-d9b5379 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(file string, reloadOnChange bool)

func Contextual

func Contextual(ctx any) *configHolder

Get a contextual config

func DcsServiceConfig

func DcsServiceConfig() *config_api.DcsServiceConfig

func GetAuthenticatorByName

func GetAuthenticatorByName(name string) (*config_api.GatewayAuthenticator, error)

func GetMessagingConfigByName

func GetMessagingConfigByName(name string) (*config_api.MessagingAdapter, error)

func GetSecret

func GetSecret(name string) (*config_api.GatewaySecret, error)

func IsFeatureDisabled

func IsFeatureDisabled(key string) bool

Takes a string such as "app_dcs" and determine if feature is explicitly disabled by looking up FF_APP_DCS_DISABLED=true

func PdpServiceConfig

func PdpServiceConfig() *config_api.PdpServiceConfig

func TapServiceConfig

func TapServiceConfig() *config_api.TapServiceConfig

func Upstreams

func Upstreams() []*config_api.GatewayUpstream

Types

type ConfigRepository

type ConfigRepository interface {
	LoadGatewayConfiguration() (*config_api.GatewayConfiguration, error)
	SaveGatewayConfiguration(config *config_api.GatewayConfiguration) error
}

Define a repository interface to get the current configuration the repository implementation can internally refresh / cache configuration as required

func NewConfigFileRepository

func NewConfigFileRepository(path string, lazy bool, monitorForChange bool) (ConfigRepository, error)

func NewConfigRepository

func NewConfigRepository() (ConfigRepository, error)

type PullTranslator

type PullTranslator[T any] interface {
	Translate(gen.GatewayConfiguration) (T, error)
}

type PushTranslator

type PushTranslator[T any] interface {
	RegisterReceiver(func(T, error) error)
}

Jump to

Keyboard shortcuts

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