Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoValue indicates no value was set for the config ErrNoValue = errors.New("config: no value set") // ErrShutdown indicates the use of a Config after calling Shutdown ErrShutdown = errors.New("config: shutdown") )
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool interface { Get(ctx context.Context) bool GetSafe(ctx context.Context) (bool, error) Shutdown() }
Bool provides a boolean typed config.Config.
type Bytes ¶
type Bytes interface { Get(ctx context.Context) []byte GetSafe(ctx context.Context) ([]byte, error) Shutdown() }
Bytes provides a bytes typed config.Config.
type Config ¶
type Config interface { // Get returns the latest config value Get(ctx context.Context) (interface{}, error) // Shutdown signals the config to stop all underlying resources Shutdown() }
Config is an interface for getting a configuration value
type Duration ¶
type Duration interface { Get(ctx context.Context) time.Duration GetSafe(ctx context.Context) (time.Duration, error) Shutdown() }
Duration provides a time.Duration typed config.Config.
type Encrypted ¶
type Encrypted interface { Get(ctx context.Context) []byte GetSafe(ctx context.Context) ([]byte, error) Shutdown() }
Encrypted provides an encrypted bytes typed config.Config.
type Float64 ¶
type Float64 interface { Get(ctx context.Context) float64 GetSafe(ctx context.Context) (float64, error) Shutdown() }
Float64 provides a float64 typed config.Config.
type Int64 ¶
type Int64 interface { Get(ctx context.Context) int64 GetSafe(ctx context.Context) (int64, error) Shutdown() }
Int64 provides an int64 typed config.Config.
Click to show internal directories.
Click to hide internal directories.