logs

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnimplemented is returned whenever requested functionality is planned but unimplemented.
	ErrUnimplemented = errors.New("unimplemented")
	// ErrPublish is returned whenever publishing fails (say, due to a closed client).
	ErrPublish = errors.New("error publishing")
	// ErrBadRequest indicates that the client made an erroneous request.
	ErrBadRequest = errors.New("bad request")
)

Functions

This section is empty.

Types

type ErrInvalidBatchSize

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

func (ErrInvalidBatchSize) Error

func (err ErrInvalidBatchSize) Error() string

func (ErrInvalidBatchSize) RecommendedBatchSize

func (err ErrInvalidBatchSize) RecommendedBatchSize() int

type LogService

type LogService struct {
	GetLokiClient func() (*loki.Client, error)
	AuthServer    authserver.APIServer
}

LogService implements the core logs functionality.

func (LogService) GetLogs

func (ls LogService) GetLogs(ctx context.Context, request *logs.GetLogsRequest, publisher ResponsePublisher) error

GetLogs gets logs according its request and publishes them. The pattern is similar to that used when handling an HTTP request.

type ResponsePublisher

type ResponsePublisher interface {
	// Publish publishes a single GetLogsResponse to the client.
	Publish(context.Context, *logs.GetLogsResponse) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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