loki

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: AGPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DroppedEntry

type DroppedEntry struct {
	Labels    map[string]string `json:"labels"`
	Timestamp time.Time         `json:"timestamp"`
}

func (*DroppedEntry) MarshalJSON

func (d *DroppedEntry) MarshalJSON() ([]byte, error)

func (*DroppedEntry) UnmarshalJSON

func (d *DroppedEntry) UnmarshalJSON(data []byte) error

type Entry

type Entry struct {
	Timestamp time.Time
	Line      string
}

func (*Entry) MarshalJSON

func (e *Entry) MarshalJSON() ([]byte, error)

func (*Entry) UnmarshalJSON

func (e *Entry) UnmarshalJSON(data []byte) error

type Loki

type Loki struct {
	Url string // websocket url
	// contains filtered or unexported fields
}

func NewLoki

func NewLoki(url string) (*Loki, error)

func (*Loki) Tail

func (l *Loki) Tail(ctx context.Context, query string, delayFor time.Duration, limit int, start time.Time, handler func(*Tail) error) error

type LokiInput

type LokiInput struct {
	Url   string
	Query string
	// contains filtered or unexported fields
}

func New

func New(url string, query string, line log.LineReader, memory *memory.Memory) (*LokiInput, error)

func (*LokiInput) Serve

func (l *LokiInput) Serve(ctx context.Context) error

type Stream

type Stream struct {
	Stream  map[string]string `json:"stream"`
	Entries []Entry           `json:"values"`
}

type Tail

type Tail struct {
	Streams        []Stream       `json:"streams"`
	DroppedEntries []DroppedEntry `json:"dropped_entries"`
}

Jump to

Keyboard shortcuts

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