loki

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 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 {
	// contains filtered or unexported fields
}

Client ...

func NewClient

func NewClient(startTime time.Time, address, username, password string) *Client

NewClient creates a client to query loki.

func (*Client) FetchPodLogs

func (c *Client) FetchPodLogs(ns, podName, containerName, match string, nonMatch []string, queryFrom, queryTo time.Time, limit int, isRegex bool) ([]string, error)

FetchPodLogs gets pod logs from loki API. ns and podName are used to match the specific logs in loki. match is a string which you want to query from loki, you can set isRegex to true to make it to be a regex match. nonMatch

is a set of strings you don't want to match.

Jump to

Keyboard shortcuts

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