native

package
v1.89.0-cluster Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 6 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 {
	AuthCfg              *auth.Config
	Addr                 string
	ExtraLabels          []string
	DisableHTTPKeepAlive bool
}

Client is an HTTP client for exporting and importing time series via native protocol.

func (*Client) Explore

func (c *Client) Explore(ctx context.Context, f Filter, tenantID string) (map[string]struct{}, error)

Explore finds series by provided filter from api/v1/series

func (*Client) ExportPipe

func (c *Client) ExportPipe(ctx context.Context, url string, f Filter) (io.ReadCloser, error)

ExportPipe makes request by provided filter and return io.ReadCloser which can be used to get data

func (*Client) GetSourceTenants

func (c *Client) GetSourceTenants(ctx context.Context, f Filter) ([]string, error)

GetSourceTenants discovers tenants by provided filter

func (*Client) ImportPipe

func (c *Client) ImportPipe(ctx context.Context, dstURL string, pr *io.PipeReader) error

ImportPipe uses pipe reader in request to process data

type Filter

type Filter struct {
	Match     string
	TimeStart string
	TimeEnd   string
	Chunk     string
}

Filter represents request filter

func (Filter) String

func (f Filter) String() string

type LabelValues

type LabelValues map[string]string

LabelValues represents series from api/v1/series response

type Response

type Response struct {
	Status string        `json:"status"`
	Series []LabelValues `json:"data"`
}

Response represents response from api/v1/series

Jump to

Keyboard shortcuts

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