check

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: BSD-3-Clause Imports: 27 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 api.CIDType) (*api.Broker, error)
	FetchBrokers() (*[]api.Broker, error)
	CreateCheckBundle(cfg *api.CheckBundle) (*api.CheckBundle, error)
	FetchCheckBundleMetrics(cid api.CIDType) (*api.CheckBundleMetrics, error)
	FetchCheckBundle(cid api.CIDType) (*api.CheckBundle, error)
	SearchCheckBundles(searchCriteria *api.SearchQueryType, filterCriteria *map[string][]string) (*[]api.CheckBundle, error)
	UpdateCheckBundle(cfg *api.CheckBundle) (*api.CheckBundle, error)
	UpdateCheckBundleMetrics(cfg *api.CheckBundleMetrics) (*api.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) 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 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