watch

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterWatcher

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

func NewClusterWatcher

func NewClusterWatcher(pCtx context.Context, clusterId string, storage storage.Storage, zk zk.Zk, config *config.Config) *ClusterWatcher

func (*ClusterWatcher) Start

func (cw *ClusterWatcher) Start(event chan *MetricEvent)

func (*ClusterWatcher) Stop

func (cw *ClusterWatcher) Stop()

type EventType

type EventType int
const (
	EventMetricUpd EventType = iota
	EventMetricDel
	EventDynamicUpd
)

func (EventType) String

func (et EventType) String() string

type MetricEvent

type MetricEvent struct {
	ID     string
	Type   EventType
	Metric *types.Metric
	First  bool
	Last   bool
	Meta   map[string]btypes.ObjectMeta
}

type StorageApplicationIf

type StorageApplicationIf struct {
	Data string `json:"data"`
}

type StorageCollectorIf

type StorageCollectorIf struct {
	Data *types.ApplicationCollectorCfg `json:"data"`
}

type StorageMetricIf

type StorageMetricIf struct {
	ID   string        `json:"_id"`
	Data *types.Metric `json:"data"`
}

type Watcher

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

func NewWatcher

func NewWatcher(storage storage.Storage, zk zk.Zk, config *config.Config) *Watcher

func (*Watcher) Start

func (w *Watcher) Start() chan *MetricEvent

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

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