Documentation ¶
Index ¶
- Variables
- func Main()
- func NewAggregator(snapshots chan<- string, k8sWatches chan<- []KubernetesWatchSpec, ...) *aggregator
- func NewInvoker(port int, notify []string) *invoker
- type ConsulWatchMaker
- type ConsulWatchSpec
- type IConsulWatchMaker
- type IKubernetesWatchMaker
- type KubernetesWatchMaker
- type KubernetesWatchSpec
- type MockWatchMaker
- type Timeout
- type WatchHook
- type WatchSet
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CLOSE interface{} = &struct{}{}
)
View Source
var Version = "(unknown version)"
Version holds the version of the code. This is intended to be overridden at build time.
Functions ¶
func NewAggregator ¶
func NewAggregator(snapshots chan<- string, k8sWatches chan<- []KubernetesWatchSpec, consulWatches chan<- []ConsulWatchSpec, requiredKinds []string, watchHook WatchHook, limiter limiter.Limiter) *aggregator
func NewInvoker ¶
Types ¶
type ConsulWatchMaker ¶
type ConsulWatchMaker struct {
// contains filtered or unexported fields
}
func (*ConsulWatchMaker) MakeConsulWatch ¶
func (m *ConsulWatchMaker) MakeConsulWatch(spec ConsulWatchSpec) (*supervisor.Worker, error)
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 KubernetesWatchMaker ¶
type KubernetesWatchMaker struct {
// contains filtered or unexported fields
}
func (*KubernetesWatchMaker) MakeKubernetesWatch ¶
func (m *KubernetesWatchMaker) MakeKubernetesWatch(spec KubernetesWatchSpec) (*supervisor.Worker, error)
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 MockWatchMaker ¶
type MockWatchMaker struct {
// contains filtered or unexported fields
}
func (*MockWatchMaker) MakeConsulWatch ¶
func (m *MockWatchMaker) MakeConsulWatch(spec ConsulWatchSpec) (*supervisor.Worker, error)
func (*MockWatchMaker) MakeKubernetesWatch ¶
func (m *MockWatchMaker) MakeKubernetesWatch(spec KubernetesWatchSpec) (*supervisor.Worker, error)
type WatchHook ¶
type WatchHook func(p *supervisor.Process, snapshot string) WatchSet
func ExecWatchHook ¶
type WatchSet ¶
type WatchSet struct { KubernetesWatches []KubernetesWatchSpec `json:"kubernetes-watches"` ConsulWatches []ConsulWatchSpec `json:"consul-watches"` }
Click to show internal directories.
Click to hide internal directories.