common

package
v0.0.0-...-e39e8f7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStateMapFromContext

func GetStateMapFromContext(ctx context.Context) (map[string]interface{}, error)

func ParseMF

func ParseMF(reader io.Reader) (map[string]*dto.MetricFamily, error)

Types

type CheckDef

type CheckDef struct {
	Name        string         `json:"name"`
	Group       string         `json:"group"`
	Description string         `json:"description"`
	IsReadOnly  bool           `json:"is_read_only"`
	CheckFunc   CheckFuncDef   `json:"-"`
	CleanupFunc CleanupFuncDef `json:"-"`
}

type CheckFuncDef

type CheckFuncDef func(c context.Context) (string, error)

type ChecksRegistry

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

func GetRegistry

func GetRegistry() *ChecksRegistry

func (*ChecksRegistry) GetAllChecks

func (reg *ChecksRegistry) GetAllChecks() []*CheckDef

func (*ChecksRegistry) Register

func (reg *ChecksRegistry) Register(def *CheckDef)

type CleanupFuncDef

type CleanupFuncDef func(c context.Context) error

Jump to

Keyboard shortcuts

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