metrics

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer added in v1.1.0

func StartServer()

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 creates 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

AddAnnotation adds an annotation to grafana.

func (*Client) IncrErrorCount

func (cli *Client) IncrErrorCount()

IncrErrorCount increments the errorcount by 1.

Jump to

Keyboard shortcuts

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