mackerel

package
v0.80.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 32

Documentation

Index

Constants

View Source
const (
	// NotificationIntervalFallback is the minimum minutes of Mackerel API's
	// notification_interval.
	NotificationIntervalFallback = 10
)

Variables

This section is empty.

Functions

func IsClientError added in v0.61.0

func IsClientError(err error) bool

IsClientError returns true if err is HTTP 4xx.

func IsNetworkError added in v0.70.0

func IsNetworkError(err error) bool

IsNetworkError returns true if err is url.Error caused by net/http

func IsServerError added in v0.61.0

func IsServerError(err error) bool

IsServerError returns true if err is HTTP 5xx.

Types

type API

type API struct {
	*mkr.Client
}

API is the main interface of Mackerel API.

func NewAPI added in v0.14.1

func NewAPI(rawurl string, apiKey string, verbose bool) (*API, error)

NewAPI creates a new instance of API.

func (*API) FindHostByCustomIdentifier added in v0.31.0

func (api *API) FindHostByCustomIdentifier(customIdentifier string) (*mkr.Host, error)

FindHostByCustomIdentifier find the host by the custom identifier

func (*API) ReportCheckMonitors added in v0.16.0

func (api *API) ReportCheckMonitors(hostID string, reports []*checks.Report) error

ReportCheckMonitors sends reports of *checks.Checker() to Mackrel API server.

type InfoError added in v0.54.1

type InfoError struct {
	Message string
}

InfoError represents Error of log level INFO

func (*InfoError) Error added in v0.54.1

func (e *InfoError) Error() string

Jump to

Keyboard shortcuts

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