topology

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenerFunc

type ListenerFunc func(ctx context.Context, state *state.Cluster)

ListenerFunc is a function called by the watcher with the current state.

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher is a process from the Hub agent that watches the topology for changes and stores them over time to make them accessible from the SaaS.

func NewWatcher

func NewWatcher(f *state.Fetcher, s *store.Store) *Watcher

NewWatcher instantiates a new watcher that uses a fetcher to periodically get the K8S state and a store to write it.

func (*Watcher) AddListener

func (w *Watcher) AddListener(listener ListenerFunc)

AddListener adds a state listener.

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context)

Start runs the watcher process.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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