sdk

package
v0.0.0-...-e45066c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(host string) (*Client, error)

func (*Client) Ping

func (c *Client) Ping() (bool, error)

func (*Client) SendEvent

func (c *Client) SendEvent(event Event) error

func (*Client) Stats

func (c *Client) Stats() (*StatsPayload, error)

type Event

type Event struct {
	Labels Labels `json:"labels"`
	Time   Time   `json:"time"`
	Value  Value  `json:"value"`
}

type Labels

type Labels map[string]string

type StatsPayload

type StatsPayload struct {
	Count struct {
		Insert uint64 `json:"insert"`
	} `json:"count"`
}

type Time

type Time uint64

type Value

type Value string

Jump to

Keyboard shortcuts

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