dockerfrontproxy

package
v0.0.0-...-fbf086c Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicWeightsSpec

type DynamicWeightsSpec struct {
	Weight      int               `yaml:"weight"`
	MatchLabels map[string]string `yaml:"matchLabels"`
}

DynamicWeightsSpec associates a number of matchLabels with a concrete weight All containers matching the labels are given that weight.

type Spec

type Spec struct {
	MatchLabels    map[string]string     `yaml:"matchLabels"`
	DynamicWeights []*DynamicWeightsSpec `yaml:"dynamicWeights,omitempty"`
	// contains filtered or unexported fields
}

Spec is the spec subpart of a service for the docker front proxy plugin

func (*Spec) GetDownwardData

func (s *Spec) GetDownwardData() ([]model.DownwardBackendServer, error)

GetDownwardData queries docker containers by spec and returns a list of ip address/port number endpoints

func (*Spec) HasDownwardInterface

func (s *Spec) HasDownwardInterface() bool

HasDownwardInterface is true, plugin checks local docker containers for new ips

func (*Spec) HasUpwardInterface

func (s *Spec) HasUpwardInterface() bool

HasUpwardInterface is false, does not expose something

func (*Spec) Initialize

func (s *Spec) Initialize(globals *model.Globals) error

Initialize the plugin

func (*Spec) Name

func (s *Spec) Name() string

Name returns the plugin name

func (*Spec) PushUpwardData

func (s *Spec) PushUpwardData(data model.UpwardData) error

func (*Spec) RunNotificationLoop

func (s *Spec) RunNotificationLoop(notChan chan struct{}, quitChan chan struct{}) error

RunNotificationLoop connects to docker daemon and waits for container events. Each matching event will trigger an update on notCh

Jump to

Keyboard shortcuts

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