watcher

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// how often to check for template file changes
	POLL_INTERVAL = 15 * time.Second
	// how often print template info for troubleshooting
	TIMESTAMP_DISPLAY_INTERVAL = 1 * time.Hour
)

Variables

This section is empty.

Functions

func EndpointSubsetIndex added in v0.5.0

func EndpointSubsetIndex(es []v1.EndpointSubset, portName string) (int, error)

EndpointSubsetIndex returns the index of EndpointSubset for which port.Name matches provided portName

Types

type Endpoint

type Endpoint struct {
	Name  string
	Host  string
	Port  string
	Probe *EndpointProbe
}

type EndpointConfig

type EndpointConfig struct {
	Endpoints EndpointList
	Primary   *Endpoint
}

func NewEndpointConfig

func NewEndpointConfig() *EndpointConfig

type EndpointList

type EndpointList []Endpoint

func EndpointListFromSubset

func EndpointListFromSubset(ep v1.EndpointSubset, portName string) (EndpointList, error)

func (EndpointList) Contains

func (l EndpointList) Contains(b *Endpoint) bool

func (EndpointList) EqualsEndpoints

func (l EndpointList) EqualsEndpoints(ep v1.EndpointSubset) bool

type EndpointProbe

type EndpointProbe struct {
	URL       string
	Interval  int
	Timeout   int
	Window    int
	Threshold int
}

type EndpointWatcher

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

func NewEndpointWatcher

func NewEndpointWatcher(client kubernetes.Interface, namespace, serviceName, portName string, retryBackoff time.Duration) *EndpointWatcher

func (*EndpointWatcher) Run

func (v *EndpointWatcher) Run(ctx context.Context) (chan *EndpointConfig, chan error)

type TemplateWatcher

type TemplateWatcher interface {
	Run() (chan []byte, chan error)
}

func MustNewTemplateWatcher

func MustNewTemplateWatcher(filename string, polling bool) TemplateWatcher

func NewTemplateWatcher

func NewTemplateWatcher(filename string, polling bool) (TemplateWatcher, error)

Jump to

Keyboard shortcuts

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