input

package
v3.51.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtractTracingSpanMappingDocs = docs.FieldBloblang(
	"extract_tracing_map", "EXPERIMENTAL: A [Bloblang mapping](/docs/guides/bloblang/about) that attempts to extract an object containing tracing propagation information, which will then be used as the root tracing span for the message. The specification of the extracted fields must match the format used by the service wide tracer.",
	`root = meta()`,
	`root = this.meta.span`,
).AtVersion("3.45.0").Advanced()

ExtractTracingSpanMappingDocs returns a docs spec for a mapping field.

Functions

func NewSpanReader

func NewSpanReader(inputName, mapping string, rdr reader.Async, mgr types.Manager, logger log.Modular) (reader.Async, error)

NewSpanReader wraps an async reader with a mechanism for extracting tracing spans from the consumed message using a Bloblang mapping.

Types

type SpanReader

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

SpanReader wraps an async reader with a mechanism for extracting tracing spans from the consumed message using a Bloblang mapping.

func (*SpanReader) CloseAsync

func (s *SpanReader) CloseAsync()

CloseAsync triggers the shut down of this component but should not block the calling goroutine.

func (*SpanReader) ConnectWithContext

func (s *SpanReader) ConnectWithContext(ctx context.Context) error

ConnectWithContext attempts to establish a connection to the source, if unsuccessful returns an error. If the attempt is successful (or not necessary) returns nil.

func (*SpanReader) ReadWithContext

func (s *SpanReader) ReadWithContext(ctx context.Context) (types.Message, reader.AsyncAckFn, error)

ReadWithContext attempts to read a new message from the source. If successful a message is returned along with a function used to acknowledge receipt of the returned message. It's safe to process the returned message and read the next message asynchronously.

func (*SpanReader) WaitForClose

func (s *SpanReader) WaitForClose(timeout time.Duration) error

WaitForClose is a blocking call to wait until the component has finished shutting down and cleaning up resources.

Jump to

Keyboard shortcuts

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