Documentation ¶
Index ¶
- func ForwarderDims(name string, typ string) map[string]string
- func ListenerDims(name string, typ string) map[string]string
- func ReadFromRequest(jeff *bytes.Buffer, req *http.Request, logger log.Logger) error
- type CloseableHealthCheck
- type DatapointForwarder
- type DebugEndpointer
- type Forwarder
- type HealthChecker
- type Listener
- type Pipeline
- type StartupHook
- type UneventfulForwarder
- func (u *UneventfulForwarder) AddEvents(ctx context.Context, events []*event.Event) error
- func (u *UneventfulForwarder) AddSpans(ctx context.Context, events []*trace.Span) error
- func (u *UneventfulForwarder) DebugEndpoints() map[string]http.Handler
- func (u *UneventfulForwarder) Pipeline() int64
- func (u *UneventfulForwarder) StartupFinished() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwarderDims ¶
ForwarderDims are the common stat dimensions we expect on forwarder protocols
func ListenerDims ¶
ListenerDims are the common stat dimensions we expect on listener protocols
Types ¶
type CloseableHealthCheck ¶
type CloseableHealthCheck struct {
// contains filtered or unexported fields
}
CloseableHealthCheck is a helper class intended to be used as an anonymous field
func (*CloseableHealthCheck) CloseHealthCheck ¶
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 ¶
func (c *CloseableHealthCheck) HealthDatapoints() []*datapoint.Datapoint
HealthDatapoints returns the total health checks done
func (*CloseableHealthCheck) SetupHealthCheck ¶
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 ¶
type DatapointForwarder interface { sfxclient.Collector io.Closer dpsink.DSink DebugDatapoints() []*datapoint.Datapoint DefaultDatapoints() []*datapoint.Datapoint }
DatapointForwarder can send datapoints and not events
type DebugEndpointer ¶
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 ¶
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 ¶
type Pipeline interface {
Pipeline() int64
}
Pipeline returns the number of items still in flight that need to be drained
type StartupHook ¶
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 ¶
type UneventfulForwarder struct {
DatapointForwarder
}
UneventfulForwarder converts a datapoint only forwarder into a datapoint/event forwarder
func (*UneventfulForwarder) DebugEndpoints ¶
func (u *UneventfulForwarder) DebugEndpoints() map[string]http.Handler
DebugEndpoints does nothing
func (*UneventfulForwarder) Pipeline ¶
func (u *UneventfulForwarder) Pipeline() int64
Pipeline returns zero since UneventfulForwarder doesn't have it's own buffer
func (*UneventfulForwarder) StartupFinished ¶
func (u *UneventfulForwarder) StartupFinished() error
StartupFinished is to be called after startup is finished