detector

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// if it detects the upstream is a known functional type, give us the
	// service info and annotations to mark it with
	DetectFunctionalService(us *v1.Upstream, addr string) (*v1.ServiceInfo, map[string]string, error)
}

detectors detect a specific type of functional service if they detect the service, they return service info and annotations (optional) for the service

type Marker

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

marker marks the upstream as functional. this modifies the upstream it was received, so should not be called concurrently from multiple goroutines

func NewMarker

func NewMarker(detectors []Interface, resolver resolver.Resolver) *Marker

func (*Marker) DetectFunctionalServiceType

func (m *Marker) DetectFunctionalServiceType(us *v1.Upstream) (*v1.ServiceInfo, map[string]string, error)

should only be called for k8s, consul, and static type upstreams

func (*Marker) UnmarkUpstream added in v0.4.3

func (m *Marker) UnmarkUpstream(usName string)

remove any "finished" upstreams that were deleted the caller should invoke this function before detection, after a new set of upstreams has been read in this way we can clear the cache out TODO(ilackarms): this is a bit of a combina to solve https://github.com/solo-io/gloo/issues/160#

Jump to

Keyboard shortcuts

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