endpoints

package
v1.16.109 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusKey                       = "consul.io/endpoint-manager"
	StatusConditionEndpointsManaged = "EndpointsManaged"

	StatusReasonSelectorNotFound = "SelectorNotFound"
	StatusReasonSelectorFound    = "SelectorFound"

	SelectorFoundMessage    = "A valid workload selector is present within the service."
	SelectorNotFoundMessage = "Either the workload selector was not present or contained no selection criteria."
)

Variables

Functions

func ServiceEndpointsController

func ServiceEndpointsController(workloadMap WorkloadMapper) controller.Controller

ServiceEndpointsController creates a controller to perform automatic endpoint management for services.

Types

type WorkloadMapper

type WorkloadMapper interface {
	// MapWorkload conforms to the controller.DependencyMapper signature. Given a Workload
	// resource it should report the resource IDs that have selected the workload.
	MapWorkload(context.Context, controller.Runtime, *pbresource.Resource) ([]controller.Request, error)

	// TrackIDForSelector should be used to associate the specified WorkloadSelector with
	// the given resource ID. Future calls to MapWorkload
	TrackIDForSelector(*pbresource.ID, *pbcatalog.WorkloadSelector)

	// UntrackID should be used to inform the tracker to forget about the specified ID
	UntrackID(*pbresource.ID)
}

The WorkloadMapper interface is used to provide an implementation around being able to map a watch even for a Workload resource and translate it to reconciliation requests

Jump to

Keyboard shortcuts

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