lokiwrapper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogEntriesChanSize = 5000
)
View Source
const (
	ResultTypeStream = "streams"
)

Variables

View Source
var (
	BatchEntriesNumber = 10000
	BatchWait          = 5 * time.Second
)

Functions

This section is empty.

Types

type Client added in v1.0.0

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

func NewClient added in v1.0.0

func NewClient(endpoint string) (*Client, error)

func (*Client) Query added in v1.0.0

func (i *Client) Query(ctx context.Context, query string, limit int, time time.Time) (*QueryResponse, error)

func (*Client) QueryRange added in v1.0.0

func (i *Client) QueryRange(ctx context.Context, query string, limit int, start, end time.Time) (*QueryResponse, error)

type Ingester

type Ingester struct {
	PushURL string
	Labels  string
	// contains filtered or unexported fields
}

func NewLokiIngester

func NewLokiIngester(addr string, node string) (*Ingester, error)

func (*Ingester) Close

func (i *Ingester) Close() error

func (*Ingester) Name

func (i *Ingester) Name() string

func (*Ingester) Send added in v1.0.0

func (i *Ingester) Send(data string)

func (*Ingester) Watch

func (i *Ingester) Watch(datach chan inspproto.RawEvent)

type LogLevel

type LogLevel int

type QueryResponse added in v1.0.0

type QueryResponse struct {
	Status string            `json:"status"`
	Data   QueryResponseData `json:"data"`
}

type QueryResponseData added in v1.0.0

type QueryResponseData struct {
	ResultType string `json:"resultType"`
	Result     []struct {
		Metric map[string]string `json:"metric"`
		Stream map[string]string `json:"stream"`
		Values [][]interface{}   `json:"values"`
	} `json:"result"`
}

type QueryResponseMetric added in v1.0.0

type QueryResponseMetric []interface{}

func (QueryResponseMetric) Unix added in v1.0.0

func (m QueryResponseMetric) Unix() int

func (QueryResponseMetric) Value added in v1.0.0

func (m QueryResponseMetric) Value() string

type QueryResponseStream added in v1.0.0

type QueryResponseStream []interface{}

func (QueryResponseStream) Log added in v1.0.0

func (s QueryResponseStream) Log() string

func (QueryResponseStream) NanoSecond added in v1.0.0

func (s QueryResponseStream) NanoSecond() int

type ResultType added in v1.0.0

type ResultType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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