protocol

package
Version: v1.2.23 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwarderDims

func ForwarderDims(name string, typ string) map[string]string

ForwarderDims are the common stat dimensions we expect on forwarder protocols

func ListenerDims

func ListenerDims(name string, typ string) map[string]string

ListenerDims are the common stat dimensions we expect on listener protocols

Types

type CloseableHealthCheck added in v0.9.14

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

CloseableHealthCheck is a helper class intended to be used as an anonymous field

func (*CloseableHealthCheck) CloseHealthCheck added in v0.9.14

func (c *CloseableHealthCheck) CloseHealthCheck()

CloseHealthCheck is called to change the status of the healthcheck from 200 to 404 and close the connection

func (*CloseableHealthCheck) HealthDatapoints added in v0.9.14

func (c *CloseableHealthCheck) HealthDatapoints() []*datapoint.Datapoint

HealthDatapoints returns the total health checks done

func (*CloseableHealthCheck) SetupHealthCheck added in v0.9.14

func (c *CloseableHealthCheck) SetupHealthCheck(healthCheck *string, r *mux.Router, logger log.Logger)

SetupHealthCheck sets up a closeable healthcheck, when open returns 200, when closed returns 404 and close the connection

type DatapointForwarder added in v0.9.0

type DatapointForwarder interface {
	sfxclient.Collector
	io.Closer
	dpsink.DSink
	DebugDatapoints() []*datapoint.Datapoint
	DefaultDatapoints() []*datapoint.Datapoint
}

DatapointForwarder can send datapoints and not events

type DebugEndpointer added in v1.0.9

type DebugEndpointer interface {
	DebugEndpoints() map[string]http.Handler
}

DebugEndpointer gives an object a chance to expose http endpoints

type Forwarder

type Forwarder interface {
	dpsink.Sink
	trace.Sink
	Pipeline
	sfxclient.Collector
	io.Closer
	StartupHook
	DebugEndpointer
	DebugDatapoints() []*datapoint.Datapoint
	DefaultDatapoints() []*datapoint.Datapoint
}

Forwarder is the basic interface endpoints must support for the gateway to forward to them

type HealthChecker added in v0.9.14

type HealthChecker interface {
	CloseHealthCheck()
}

HealthChecker interface is anything that exports a healthcheck that would need to be invalidated on graceful shutdown

type Listener

type Listener interface {
	sfxclient.Collector
	io.Closer
	HealthChecker
	DebugDatapoints() []*datapoint.Datapoint
	DefaultDatapoints() []*datapoint.Datapoint
}

Listener is the basic interface anything that listens for new metrics must implement

type Pipeline added in v0.9.14

type Pipeline interface {
	Pipeline() int64
}

Pipeline returns the number of items still in flight that need to be drained

type StartupHook added in v0.10.13

type StartupHook interface {
	StartupFinished() error
}

StartupHook interface allows a forwarder to present a callback after startup if it needs to do something that requires a fully running gateway

type UneventfulForwarder added in v0.9.0

type UneventfulForwarder struct {
	DatapointForwarder
}

UneventfulForwarder converts a datapoint only forwarder into a datapoint/event forwarder

func (*UneventfulForwarder) AddEvents added in v0.9.0

func (u *UneventfulForwarder) AddEvents(ctx context.Context, events []*event.Event) error

AddEvents does nothing and returns nil

func (*UneventfulForwarder) AddSpans added in v0.10.6

func (u *UneventfulForwarder) AddSpans(ctx context.Context, events []*trace.Span) error

AddSpans does nothing and returns nil

func (*UneventfulForwarder) DebugEndpoints added in v1.0.9

func (u *UneventfulForwarder) DebugEndpoints() map[string]http.Handler

DebugEndpoints does nothing

func (*UneventfulForwarder) Pipeline added in v0.9.14

func (u *UneventfulForwarder) Pipeline() int64

Pipeline returns zero since UneventfulForwarder doesn't have it's own buffer

func (*UneventfulForwarder) StartupFinished added in v0.10.13

func (u *UneventfulForwarder) StartupFinished() error

StartupFinished is to be called after startup is finished

Jump to

Keyboard shortcuts

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