config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(ctx context.Context, c *Config) context.Context

ToContext adds config to given context.

Types

type Config

type Config struct {
	Network *network.Config
	Domain  *routecfg.Domain
}

Config of namespace controller +k8s:deepcopy-gen=false

func FromContext

func FromContext(ctx context.Context) *Config

FromContext fetches config from context.

type Store

type Store struct {
	*configmap.UntypedStore
}

Store is based on configmap.UntypedStore and is used to store and watch for updates to configuration related to routes (currently only config-domain).

+k8s:deepcopy-gen=false

func NewStore

func NewStore(logger configmap.Logger, onAfterStore ...func(name string, value interface{})) *Store

NewStore creates a configmap.UntypedStore based config store.

logger must be non-nil implementation of configmap.Logger (commonly used loggers conform)

onAfterStore is a variadic list of callbacks to run after the ConfigMap has been processed and stored.

See also: configmap.NewUntypedStore().

func (*Store) Load

func (s *Store) Load() *Config

Load fetches config from Store.

func (*Store) ToContext

func (s *Store) ToContext(ctx context.Context) context.Context

ToContext adds Store contents to given context.

Jump to

Keyboard shortcuts

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