check

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Get(url string) ([]byte, error)
	FetchBroker(cid apiclient.CIDType) (*apiclient.Broker, error)
	FetchBrokers() (*[]apiclient.Broker, error)
	CreateCheckBundle(cfg *apiclient.CheckBundle) (*apiclient.CheckBundle, error)
	FetchCheckBundleMetrics(cid apiclient.CIDType) (*apiclient.CheckBundleMetrics, error)
	FetchCheckBundle(cid apiclient.CIDType) (*apiclient.CheckBundle, error)
	SearchCheckBundles(searchCriteria *apiclient.SearchQueryType, filterCriteria *apiclient.SearchFilterType) (*[]apiclient.CheckBundle, error)
	UpdateCheckBundle(cfg *apiclient.CheckBundle) (*apiclient.CheckBundle, error)
	UpdateCheckBundleMetrics(cfg *apiclient.CheckBundleMetrics) (*apiclient.CheckBundleMetrics, error)
}

API interface abstraction of circonus api (for mocking)

type Check

type Check struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Check exposes the check bundle management interface

func New

func New(apiClient API) (*Check, error)

New returns a new check instance

func (*Check) CheckMeta added in v0.16.1

func (c *Check) CheckMeta() (*Meta, error)

CheckMeta returns check bundle id and check ids

func (*Check) EnableNewMetrics

func (c *Check) EnableNewMetrics(m *cgm.Metrics) error

EnableNewMetrics updates the check bundle enabling any new metrics

func (*Check) GetReverseConfig

func (c *Check) GetReverseConfig() (*ReverseConfig, error)

GetReverseConfig returns the reverse configuration to use for the broker

func (*Check) RefreshCheckConfig

func (c *Check) RefreshCheckConfig() error

RefreshCheckConfig re-loads the check bundle using the API and reconfigures reverse (if needed)

type Meta added in v0.16.1

type Meta struct {
	BundleID string
	CheckIDs []string
}

Meta contains check id meta data

type ReverseConfig

type ReverseConfig struct {
	BrokerAddr *net.TCPAddr
	BrokerID   string
	ReverseURL *url.URL
	TLSConfig  *tls.Config
}

ReverseConfig contains the reverse configuration for the check

Jump to

Keyboard shortcuts

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