server

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package server contains the interface and implementation of the BindPlane Server

Index

Constants

View Source
const HeaderSessionID = "X-BindPlane-Session-ID"

HeaderSessionID is the name of the HTTP header where a BindPlane Session ID can be found. This will be used by Relayer to match up the request with an eventual response via OTLP HTTP POST.

Variables

This section is empty.

Functions

func NewBindPlane

func NewBindPlane(cfg *config.Config, logger *zap.Logger, s store.Store, versions agent.Versions) bpserver.BindPlane

NewBindPlane creates a new BindPlane Server using the given store and agent versions

Types

type Relayer added in v1.1.0

type Relayer[T any] struct {
	// contains filtered or unexported fields
}

Relayer forwards results to consumers awaiting the results. It is intentionally generic and is used to support cases where the request for results is decoupled from the response with the results.

func (*Relayer[T]) AwaitResult added in v1.1.0

func (r *Relayer[T]) AwaitResult() (id string, result <-chan T, cancelFunc func())

AwaitResult will create a new ID and channel where results will be received. It also returns a cancelFunc that must be called to cleanup the channel.

func (*Relayer[T]) SendResult added in v1.1.0

func (r *Relayer[T]) SendResult(id string, result T)

SendResult will forward results to the channel returned by AwaitResult

type Relayers added in v1.1.0

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

Relayers is a wrapper around multiple Relayer instances used for different types of results

func NewRelayers added in v1.1.0

func NewRelayers(logger *zap.Logger) *Relayers

NewRelayers returns a new set of Relayers

func (*Relayers) Logs added in v1.1.0

Logs returns the Relayer for logs

func (*Relayers) Metrics added in v1.1.0

Metrics returns the Relayer for metrics

func (*Relayers) Traces added in v1.1.0

Traces returns the Relayer for traces

Jump to

Keyboard shortcuts

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