observer

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	RunForever()
	Run()
}

Controller defines a type that can Run once or RunForever. Method of stopping is up to the implementor

func NewController

func NewController(client client.Client, stopCh <-chan struct{}, options Options, nodeLister k8s.NodeLister, observers map[string]Observer, metricsAddr string) Controller

NewController creates an implementation of a controller for observing changes and returns the public Controller interface

type ListedNodeGroups

type ListedNodeGroups struct {
	NodeGroup *atlassianv1.NodeGroup
	List      []*corev1.Node
	Reason    string
}

ListedNodeGroups defines a type that contains a NodeGroup, a List of Nodes for that NodeGroup, and an optional Reason for why they are there

type Observer

type Observer interface {
	Changed(*atlassianv1.NodeGroupList) []*ListedNodeGroups
}

Observer defines a type that can stateless-ly detect changes on a resource for a list of NodeGroups

type Options

type Options struct {
	CNRPrefix         string
	Namespace         string
	CheckSchedule     string
	PrometheusAddress string

	DryMode        bool
	RunImmediately bool
	RunOnce        bool

	CheckInterval            time.Duration
	WaitInterval             time.Duration
	NodeStartupTime          time.Duration
	PrometheusScrapeInterval time.Duration
}

Options contains the options config for a controller

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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