Version: v2.5.1+incompatible Latest Latest

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

Go to latest
Published: Oct 4, 2019 License: Apache-2.0 Imports: 15 Imported by: 1




This section is empty.


This section is empty.


func DefaultDimensions

func DefaultDimensions(conf *ClientConfig) (map[string]string, error)

DefaultDimensions extracts default sfxclient dimensions that identify the host

func WatchSinkChanges

func WatchSinkChanges(sink sfxclient.Sink, Conf *ClientConfig, logger log.Logger) sfxclient.Sink

WatchSinkChanges returns a new ClientConfigChangerSink that wraps a sink with auth/endpoint changes from distconf


type ClientConfig

type ClientConfig struct {
	SourceName               *distconf.Str
	AuthToken                *distconf.Str
	Endpoint                 *distconf.Str
	ReportingInterval        *distconf.Duration
	ReportingTimeoutInterval *distconf.Duration
	TimeKeeper               timekeeper.TimeKeeper
	OsHostname               func() (name string, err error)
	DisableCompression       *distconf.Bool
	DebugCollectDatapoints   *distconf.Bool

ClientConfig configures a SfxClient

func (*ClientConfig) Load

func (c *ClientConfig) Load(d *distconf.Distconf)

Load the client config values from distconf

type ClientConfigChangerSink

type ClientConfigChangerSink struct {
	Destination *sfxclient.HTTPSink
	// contains filtered or unexported fields

ClientConfigChangerSink is a sink that can update auth and endpoint values

func WatchHTTPSinkChange added in v1.1.7

func WatchHTTPSinkChange(httpSink *sfxclient.HTTPSink, Conf *ClientConfig, logger log.Logger) *ClientConfigChangerSink

WatchHTTPSinkChange returns anew ClientConfigChangerSink that takes an http sink, instead of a regular sinc

func (*ClientConfigChangerSink) AddDatapoints

func (s *ClientConfigChangerSink) AddDatapoints(ctx context.Context, points []*datapoint.Datapoint) error

AddDatapoints forwards the call to Destination

func (*ClientConfigChangerSink) AddEvents added in v1.1.7

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

AddEvents forwards the call to Destination

func (*ClientConfigChangerSink) AddSpans added in v1.1.7

func (s *ClientConfigChangerSink) AddSpans(ctx context.Context, spans []*trace.Span) error

AddSpans forwards the call to Destination

Source Files

Jump to

Keyboard shortcuts

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