watchapi

package
v1.13.9-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulWatchSpec

type ConsulWatchSpec struct {
	Id            string `json:"id"`
	ConsulAddress string `json:"consul-address"`
	Datacenter    string `json:"datacenter"`
	ServiceName   string `json:"service-name"`
}

func (ConsulWatchSpec) WatchId

func (c ConsulWatchSpec) WatchId() string

type IConsulWatchMaker

type IConsulWatchMaker interface {
	MakeConsulWatch(spec ConsulWatchSpec) (*supervisor.Worker, error)
}

IConsulWatchMaker is an interface for ConsulWatchMaker implementations. It mostly exists to facilitate the creation of testing mocks.

type IKubernetesWatchMaker

type IKubernetesWatchMaker interface {
	MakeKubernetesWatch(spec KubernetesWatchSpec) (*supervisor.Worker, error)
}

IKubernetesWatchMaker is an interface for KubernetesWatchMaker implementations. It mostly exists to facilitate the creation of testing mocks.

type KubernetesWatchSpec

type KubernetesWatchSpec struct {
	Kind          string `json:"kind"`
	Namespace     string `json:"namespace"`
	FieldSelector string `json:"field-selector"`
	LabelSelector string `json:"label-selector"`
}

func (KubernetesWatchSpec) WatchId

func (k KubernetesWatchSpec) WatchId() string

type WatchSet

type WatchSet struct {
	KubernetesWatches []KubernetesWatchSpec `json:"kubernetes-watches"`
	ConsulWatches     []ConsulWatchSpec     `json:"consul-watches"`
}

func (*WatchSet) Interpolate

func (w *WatchSet) Interpolate() WatchSet

Interpolate values into specific watches in specific places. This is not a generic method but could be made one eventually if so desired by implementing interpolate() methods on the various types contained within the WatchSet struct.

FIXES:

Jump to

Keyboard shortcuts

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