loki

package
v0.0.0-...-8d63230 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BATCH_SIZE int = 1000
	LIMIT      int = 10000

	// duration is for the last year
	DURATION int64 = int64(time.Hour) * 168 * 52
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Loki

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

func NewLoki

func NewLoki(c *config.LokiConfig) (*Loki, error)

func (*Loki) ApplicationLogs

func (loki *Loki) ApplicationLogs(hosts []string, result *chan SimpleMessage, done chan bool) error

func (*Loki) Search

func (loki *Loki) Search(user string, results *[]Result) error

type Result

type Result struct {
	Namespace string
	Paths     []string
}

func (*Result) Contains

func (r *Result) Contains(what string) bool

type SimpleMessage

type SimpleMessage struct {
	Time    string `json:"time"`
	Message string `json:"message"`
	Host    string `json:"host"`
}

Jump to

Keyboard shortcuts

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