protocol

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompositeCloser

func CompositeCloser(closers ...io.Closer) io.Closer

CompositeCloser creates a new io.Closer whos Close() method calls close of each of the closers

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 CompositeListener

type CompositeListener struct {
	sfxclient.Collector
	io.Closer
}

CompositeListener is a helper struct that expects users to inject their own versions of each type

type DatapointForwarder added in v0.9.0

type DatapointForwarder interface {
	sfxclient.Collector
	io.Closer
	dpsink.DSink
}

DatapointForwarder can send datapoints and not events

type Forwarder

type Forwarder interface {
	dpsink.Sink
	sfxclient.Collector
	io.Closer
}

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

type Listener

type Listener interface {
	sfxclient.Collector
	io.Closer
}

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

type OkCloser

type OkCloser func()

OkCloser allows any function to become a io.Closer that returns nil and calls itself on close

func (OkCloser) Close

func (o OkCloser) Close() error

Close calls the wrapped function and returns nil

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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