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
}
Click to show internal directories.
Click to hide internal directories.