metrics

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	AnnotationOptions
	Text                string   `json:"text"`
	Tags                []string `json:"tags"`
	TimestampInMilliSec int64    `json:"time"`
}

Annotation is a specification of the desired behavior of adding annotation

type AnnotationOptions

type AnnotationOptions struct {
	DashboardID int   `json:"dashboardId,omitempty"`
	PanelID     int   `json:"panelId,omitempty"`
	IsRegin     bool  `json:"isRegion,omitempty"`
	TimeEnd     int64 `json:"timeEnd,omitempty"`
}

AnnotationOptions is the query options to a standard REST list call.

type Client

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

Client request grafana API on a set of resource paths.

func NewClient

func NewClient(grafanaURL string, userName string, password string) (*Client, error)

NewClient creats a new grafanaClient. This client performs rest functions such as Get, Post on specified paths.

func (*Client) AddAnnotation

func (cli *Client) AddAnnotation(annotation Annotation) error

IncreErrorCountWithAnno increments the errorcount by 1, and add the annotation to grafanan.

func (*Client) IncrErrorCount

func (cli *Client) IncrErrorCount()

Jump to

Keyboard shortcuts

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