discovery

package
v0.1.1-rc.6-body-doubl... Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoutingDiscovery

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

RoutingDiscovery allows to get fresh director and backendpool configuration filled with autogenerated routings based on service annotations. See more details about it in server/README.md#Running_with_Dynaming_Routing_Discovery

func NewFromFlags

func NewFromFlags(logger logrus.FieldLogger, baseDirector *pb_config.DirectorConfig, baseBackendpool *pb_config.BackendPoolConfig) (*RoutingDiscovery, error)

NewFromFlags creates new RoutingDiscovery flow flags.

func NewWithClient

func NewWithClient(logger logrus.FieldLogger, baseDirector *pb_config.DirectorConfig, baseBackendpool *pb_config.BackendPoolConfig, serviceClient serviceClient) *RoutingDiscovery

NewWithClient returns a new Kubernetes RoutingDiscovery using given k8s.APIClient configured to be used against kube-apiserver.

func (*RoutingDiscovery) DiscoverAndSetFlags

func (d *RoutingDiscovery) DiscoverAndSetFlags(
	ctx context.Context,
	directorFlagz *protoflagz.DynProto3Value,
	backendpoolFlagz *protoflagz.DynProto3Value,
) error

DiscoverAndSetFlags constantly watches service list endpoint for changes and sets director and backendpool flags to change routing configuration. Having it set by flagz is giving us possibility to see current values in debug/flagz page and perform proper apply in different place (where we are parsing flags).

func (*RoutingDiscovery) DiscoverOnce

DiscoverOnce returns director & backendpool configs filled with mix of persistent routes & backends given in base configs and dynamically discovered ones.

Jump to

Keyboard shortcuts

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