http

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Multiplexer

type Multiplexer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Multiplexer implements `http.Handler`.

func NewMultiplexer

func NewMultiplexer(logger *zap.Logger, ingestFn ingestFunc, lokiEndpoint, defaultDataset, datasetKey string) (*Multiplexer, error)

NewMultiplexer creates a new Multiplexer which uses the passed Axiom client to send logs to Axiom.

func (*Multiplexer) ServeHTTP

func (m *Multiplexer) ServeHTTP(resp http.ResponseWriter, req *http.Request)

ServeHTTP implements `http.Handler`.

type PushRequest

type PushRequest struct {
	Streams []Stream
}

func DecodeJSONPushRequest

func DecodeJSONPushRequest(b io.Reader) (*PushRequest, error)

func DecodeProtoPushRequest

func DecodeProtoPushRequest(r io.Reader) (*PushRequest, error)

type Stream

type Stream struct {
	Entries []pb.Entry
	Labels  loghttp.LabelSet
}

Jump to

Keyboard shortcuts

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