watcher

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	Client clientV1.TargetsCRDInterface
	// contains filtered or unexported fields
}

A Watcher checks kubernetes custom resources ("Target") on a periodic basis for new URLs to monitor

func NewWithClient

func NewWithClient(register, unregister chan monitor.SiteSpec, namespace string, client clientV1.TargetsCRDInterface) *Watcher

NewWithClient creates a Watcher for the specified API client. When Watcher finds a created/removed URL, it sends the URL to the register/unregister channel respectively. If the namespace is specified, Watcher will only scan that namespace. Otherwise, all namespaces are scanned. Note that this needs RBAC setup to ensure the client can access those resources.

func (*Watcher) Run

func (watcher *Watcher) Run(ctx context.Context)

Run checks kubernetes for created/removed/modified URLs at the specified interval

Jump to

Keyboard shortcuts

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