remote

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageWriter

type MessageWriter struct {
	*Remote
	// contains filtered or unexported fields
}

MessageWriter is a sinks.MessageWriter that writes to a remote server

func (*MessageWriter) Close

func (r *MessageWriter) Close() error

Close closes the remote stream.

func (*MessageWriter) WriteMessage

func (r *MessageWriter) WriteMessage(ctx context.Context, m *logspray.Message) error

WriteMessage writes a message to the log stream.

type Remote

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

Remote is a sinks.Sink impllementation that sends messages to a remote logspray gRPC server

func New

func New(client logspray.LogServiceClient) *Remote

New creates a new sink that send via the provided client

func (*Remote) AddSource

func (r *Remote) AddSource(id string, labels map[string]string) (sinks.MessageWriter, error)

AddSource adds a new source ot the remote server

Jump to

Keyboard shortcuts

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