activator

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointsToDests

func EndpointsToDests(endpoints *corev1.Endpoints) []string

EndpointsToDests takes an endpoints object and a port name and returns a list of l4 dests in the endpoints object which have that port

func GetServicePort

func GetServicePort(protocol networking.ProtocolType, svc *corev1.Service) (port int, ok bool)

GetServicePort takes a service and a protocol and returns the port number of the port named for that protocol. If the port is not found then ok is false.

Types

type RevisionBackendsManager

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

RevisionBackendsManager listens to revision endpoints and keeps track of healthy l4 dests which can be used to reach a revision

func NewRevisionBackendsManager

func NewRevisionBackendsManager(updateCh chan<- *RevisionDestsUpdate,
	transport http.RoundTripper, revisionLister servinglisters.RevisionLister,
	serviceLister corev1listers.ServiceLister, endpointsInformer corev1informers.EndpointsInformer,
	logger *zap.SugaredLogger) *RevisionBackendsManager

func NewRevisionBackendsManagerWithProbeFrequency

func NewRevisionBackendsManagerWithProbeFrequency(updateCh chan<- *RevisionDestsUpdate,
	transport http.RoundTripper, revisionLister servinglisters.RevisionLister,
	serviceLister corev1listers.ServiceLister, endpointsInformer corev1informers.EndpointsInformer,
	logger *zap.SugaredLogger, probeFrequency time.Duration) *RevisionBackendsManager

NewRevisionBackendsManagerWithProbeFrequency returnes a RevisionBackendsManager that uses the supplied probe frequency

func (*RevisionBackendsManager) Clear

func (rbm *RevisionBackendsManager) Clear()

Clear removes all watches and essentially "shuts down" the PodIPWatcher. This should be called after endpointsInformer is shut down as any subsequent informer events will cause new watchers to be created.

type RevisionDestsUpdate

type RevisionDestsUpdate struct {
	Rev           types.NamespacedName
	ClusterIPDest string
	Dests         []string
}

RevisionDestsUpdate contains the state of healthy l4 dests for talking to a revision and is the primary output from the RevisionBackendsManager system. If a healthy ClusterIP is found then ClusterIPDest will be set to non empty string and Dests will be nil. Otherwise Dests will be set to a slice of healthy l4 dests for reaching the revision.

Jump to

Keyboard shortcuts

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