store

package
v0.0.0-...-cfded13 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grafana

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

Grafana

func NewGrafana

func NewGrafana(apiKey, apiUrl, tlsKey, tlsCert string) (Grafana, error)

NewGrafana returns a new grafana instance

func (Grafana) Check

func (g Grafana) Check() error

Check ensures the API is healthy

func (Grafana) Save

func (g Grafana) Save(memo memo.Memo) error

Save stores the memo in the API

type GrafanaAnnotationReq

type GrafanaAnnotationReq struct {
	// Time unix ts in ms
	Time int64 `json:"time"`
	// IsRegion
	IsRegion bool `json:"isRegion"`
	// Tags
	Tags []string `json:"tags"`
	// Text
	Text string `json:"text"`
}

GrafanaAnnotationReq

type GrafanaAnnotationResp

type GrafanaAnnotationResp struct {
	// Message
	Message string `json:"message"`
	// Id
	Id int `json:"id"`
	// EndId
	EndId int `json:"endId"`
}

GrafanaAnnotationResp

type GrafanaHealthResp

type GrafanaHealthResp struct {
	// Commit
	Commit string
	// Database
	Database string
	// Version
	Version string
}

GrafanaHealthResp

type Store

type Store interface {
	// Save stores the memo in the storage engine
	Save(memo memo.Memo) error
}

Store

Jump to

Keyboard shortcuts

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