watcher

package
v0.0.0-...-40d845c Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMHandler

type CMHandler struct {
	ResourceName string
	Ep           *endpoint.Endpoint
}

CMHandler handles Add Update Delete methods on Configmaps

func (*CMHandler) Add

func (c *CMHandler) Add(obj interface{})

Add for EventHandler

func (*CMHandler) Delete

func (c *CMHandler) Delete(obj interface{})

Delete for EventHandler

func (*CMHandler) GetResourceName

func (c *CMHandler) GetResourceName() string

GetResourceName returns the resource name

func (*CMHandler) Update

func (c *CMHandler) Update(obj, newObj interface{})

Update for EventHandler

type EpHandler

type EpHandler struct {
	ResourceName string
	Ep           *endpoint.Endpoint
}

EpHandler implements EventHandler

func (*EpHandler) Add

func (e *EpHandler) Add(obj interface{})

func (*EpHandler) Delete

func (e *EpHandler) Delete(obj interface{})

Delete for EventHandler

func (*EpHandler) GetResourceName

func (e *EpHandler) GetResourceName() string

GetResourceName returns the resource name

func (*EpHandler) Update

func (e *EpHandler) Update(obj, newObj interface{})

Update for EventHandler

type EventHandler

type EventHandler interface {
	Add(obj interface{})
	Update(obj, newObj interface{})
	Delete(obj interface{})
	GetResourceName() string // EventHandler should store the ResourceName e.g. ingresses, endpoints...
}

EventHandler interface defines the 3 required methods to implement for watchers

type IgHandler

type IgHandler struct {
	ResourceName string
	Ep           *endpoint.Endpoint
}

IgHandler implements EventHandler

func (*IgHandler) Add

func (g *IgHandler) Add(obj interface{})

func (*IgHandler) Delete

func (g *IgHandler) Delete(obj interface{})

Delete for EventHandler

func (*IgHandler) GetResourceName

func (g *IgHandler) GetResourceName() string

GetResourceName returns the resource name

func (*IgHandler) Update

func (g *IgHandler) Update(obj, newObj interface{})

Update for EventHandler

type Watcher

type Watcher struct {
	Cs           kubernetes.Interface
	ATSNamespace string
	ResyncPeriod time.Duration
	Ep           *endpoint.Endpoint
	StopChan     chan struct{}
}

Watcher stores all essential information to act on HostGroups

func (*Watcher) Watch

func (w *Watcher) Watch() error

Watch creates necessary threads to watch over resources

Jump to

Keyboard shortcuts

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