instrumented

package
v0.0.0-...-3228f7a Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessageSink

func NewMessageSink(sink pubsub.MessageSink, counterOpts prometheus.CounterOpts, topic string) pubsub.MessageSink

NewMessageSink constructs a new pubsub MessageSink wrapped in instrumentation The counter vector will have the labels status and topic

func NewMessageSource

func NewMessageSource(
	source pubsub.MessageSource,
	counterOpts prometheus.CounterOpts,
	topic string) pubsub.MessageSource

NewMessageSource returns a new MessageSource

Types

type MessageSink

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

MessageSink is an instrumented implementation of the pubsub MessageSink

func (*MessageSink) Close

func (ims *MessageSink) Close() error

Close closes the message sink

func (*MessageSink) PutMessage

func (ims *MessageSink) PutMessage(m pubsub.ProducerMessage) error

PutMessage implements pubsub MessageSink interface method wrapped in instrumentation

func (*MessageSink) Status

func (ims *MessageSink) Status() (*pubsub.Status, error)

Status returns the status of this sink, or an error if the status could not be determined.

type MessageSource

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

MessageSource is an an Instrumented pubsub MessageSource The counter vector will have the labels "status" and "topic"

func (*MessageSource) ConsumeMessages

func (ims *MessageSource) ConsumeMessages(
	ctx context.Context, handler pubsub.ConsumerMessageHandler, onError pubsub.ConsumerErrorHandler) error

ConsumeMessages is an implementation of interface method, wrapping the call in instrumentation

func (*MessageSource) Status

func (ims *MessageSource) Status() (*pubsub.Status, error)

Status returns the status of this source, or an error if the status could not be determined.

Jump to

Keyboard shortcuts

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