snapshotreceiver

package
v0.0.0-...-bfa2730 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(receiverCfg map[string]interface{}, pusher SnapshotPusher, middleware Middleware, logger gkLog.Logger) (services.Service, tp.SnapshotServiceServer, error)

New creates a new snapshotReceiver that can accept and process snapshots

Types

type Middleware

type Middleware interface {
	WrapPoll(poll receivers.ProcessPoll) receivers.ProcessPoll
	WrapSnapshots(snap receivers.ProcessSnapshots) receivers.ProcessSnapshots
}

Middleware is used to intercept GRPC and HTTP calls from receivers and ensure that the x-scope-orgid header is available

func FakeTenantMiddleware

func FakeTenantMiddleware() Middleware

func MultiTenancyMiddleware

func MultiTenancyMiddleware() Middleware

type SnapshotPusher

type SnapshotPusher interface {
	PushSnapshot(ctx context.Context, snapshot *tp.Snapshot) (*tp.SnapshotResponse, error)
	PushPoll(ctx context.Context, pollRequest *pb.PollRequest) (*pb.PollResponse, error)
}

type SnapshotReceiver

type SnapshotReceiver struct {
	tp.UnimplementedSnapshotServiceServer
}

Jump to

Keyboard shortcuts

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