tasks

package
v0.0.0-...-abf49f6 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SeparatorByte byte = 255

SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is used to separate label names, label values, and other strings from each other when calculating their combined hash value (aka signature aka fingerprint).

Variables

This section is empty.

Functions

func TaskID

func TaskID(addr string, labels map[string]string) uint64

Types

type Collector

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

func New

func New(logger *zap.Logger, externalLabels map[string]string) *Collector

func (*Collector) Collect

func (c *Collector) Collect(metrics chan<- prometheus.Metric)

func (*Collector) Coordinate

func (c *Collector) Coordinate(me *targetpb.MeshEntry)

func (*Collector) Describe

func (c *Collector) Describe(descs chan<- *prometheus.Desc)

type Store

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

func NewStore

func NewStore() *Store

func (*Store) AddCallback

func (s *Store) AddCallback(name string, fn func(me *targetpb.MeshEntry))

func (*Store) Jobs

func (s *Store) Jobs() []string

func (*Store) MarshalBinary

func (s *Store) MarshalBinary() ([]byte, error)

todo: may the enable compress for the state

func (*Store) Merge

func (s *Store) Merge(b []byte) error

func (*Store) Snapshot

func (s *Store) Snapshot(w io.Writer) error

type Task

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

func (*Task) Collect

func (task *Task) Collect(metrics chan<- prometheus.Metric)

func (*Task) Describe

func (task *Task) Describe(descs chan<- *prometheus.Desc)

func (*Task) Start

func (task *Task) Start(logger *zap.Logger)

func (*Task) Stop

func (task *Task) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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