native

package
v0.27.0-victorialogs Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 7 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
	HTTPClient  *http.Client
}

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, start, end time.Time) ([]string, error)

Explore finds metric names by provided filter from api/v1/label/__name__/values

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
	TimeReverse bool
}

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"`
	MetricNames []string `json:"data"`
}

Response represents response from api/v1/label/__name__/values

Jump to

Keyboard shortcuts

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