publisher

package
v0.0.0-...-9f72cad Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KAFKA   = "kafka"
	NATS    = "nats"
	CONSOLE = "console"
)

Variables

This section is empty.

Functions

func InitSpanPublisherFromConfig

func InitSpanPublisherFromConfig() error

Types

type NatsMessage

type NatsMessage struct {
	Key   []byte
	Value []byte
}

type NatsPublisher

type NatsPublisher struct {
	URL       string
	ClusterID string
	ClientID  string
	// contains filtered or unexported fields
}

func (*NatsPublisher) Close

func (n *NatsPublisher) Close() error

func (*NatsPublisher) Publish

func (n *NatsPublisher) Publish(topic string, key, value []byte) error

func (*NatsPublisher) PublishSpan

func (n *NatsPublisher) PublishSpan(topic string, key []byte, spanData *orionproto.Span) error

type Publisher

type Publisher interface {
	Publish(topic string, key, value []byte) error
	Close() error
	// contains filtered or unexported methods
}

func GetPublisher

func GetPublisher() (Publisher, error)

type SpanPublisher

type SpanPublisher interface {
	Publisher
	PublishSpan(topic string, key []byte, spanData *orionproto.Span) error
}

func GetSpanPublisher

func GetSpanPublisher() (SpanPublisher, error)

Jump to

Keyboard shortcuts

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