grafana

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 10 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 {
	ID          int
	AlertID     int
	DashboardID int
	PanelID     int
	UserID      int
	UserName    string
	NewState    string
	PrevState   string
	Time        int64
	Text        string
	Metric      string
	RegionID    int
	Tags        []string
}

Annotation : grafana annotation

type AnnotationsResp

type AnnotationsResp []Annotation

AnnotationsResp : Grafana annotations list

type Client

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

Client : Grafana client

func NewClient

func NewClient(config ClientConfig) (*Client, error)

NewClient : create new Grafana client

func (*Client) GetAnnotations

func (client *Client) GetAnnotations(fromTime time.Time, toTime time.Time) (AnnotationsResp, error)

GetAnnotations : get annotations list from Grafana

func (*Client) GetStatus

func (client *Client) GetStatus() (HealthResp, error)

GetStatus : Get Grafana status

type ClientConfig

type ClientConfig struct {
	URL         *url.URL
	Token       string
	TLSInsecure bool
	SkipVerify  bool
	CertFile    string
	KeyFile     string
	Logger      log.Logger
}

ClientConfig : Grafana client config

type HealthResp

type HealthResp struct {
	Commit   string
	Database string
	Version  string
}

HealthResp : Grafana status response

Jump to

Keyboard shortcuts

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