consumers

package
v0.0.0-...-200a656 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIPush push url
	APIPush = "/loki/api/v1/push"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	C() chan *common.Message
	Consume()
}

Consumer consume messages

func NewESConsumer

func NewESConsumer(url, username, password string) (Consumer, error)

NewESConsumer create ealsticsearch consumer

func NewLokiConsumer

func NewLokiConsumer(url string) (Consumer, error)

NewLokiConsumer create loki consumer

type PushRequest

type PushRequest struct {
	Streams []Stream `json:"streams"`
}

PushRequest POST /loki/api/v1/push body struct

type Stream

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

Stream struct

Jump to

Keyboard shortcuts

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