Documentation ¶
Index ¶
- func FromContext(ctx context.Context, name string) interface{}
- func RegisterConfigCreator(name string, creator Creator)
- func RegisterDynamicConfigCreator(name string, creator DynamicCreator)
- func WithConfig(ctx context.Context, name string, cfg interface{}) context.Context
- func WithJSONConfig(ctx context.Context, data []byte) (context.Context, error)
- func WithJSONDynamicConfig(ctx context.Context, data []byte) (context.Context, error)
- func WithYAMLConfig(ctx context.Context, data []byte) (context.Context, error)
- func WithYAMLDynamicConfig(ctx context.Context, data []byte) (context.Context, error)
- type Creator
- type DynamicConfig
- type DynamicConfigs
- type DynamicCreator
- type DynamicCreators
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext extracts config from a context
func RegisterConfigCreator ¶
RegisterConfigCreator registers a config struct for parsing
func RegisterDynamicConfigCreator ¶
func RegisterDynamicConfigCreator(name string, creator DynamicCreator)
func WithConfig ¶
func WithJSONConfig ¶
func WithJSONDynamicConfig ¶
func WithYAMLConfig ¶
Types ¶
type DynamicConfig ¶
func FromContextDynamic ¶
func FromContextDynamic(ctx context.Context, name string) DynamicConfig
type DynamicConfigs ¶
func NewDynamicConfigs ¶
func NewDynamicConfigs() *DynamicConfigs
func (*DynamicConfigs) Get ¶
func (dconfig *DynamicConfigs) Get(name string) DynamicConfig
func (*DynamicConfigs) ReloadHandler ¶
func (dconfig *DynamicConfigs) ReloadHandler(query url.Values) error
type DynamicCreator ¶
type DynamicCreator func() DynamicConfig
type DynamicCreators ¶
type DynamicCreators struct {
// contains filtered or unexported fields
}
func (DynamicCreators) Len ¶
func (dynamicCreators DynamicCreators) Len() int
func (DynamicCreators) Less ¶
func (dynamicCreators DynamicCreators) Less(i, j int) bool
func (DynamicCreators) Swap ¶
func (dynamicCreators DynamicCreators) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.