inspector

package
v0.8.0-nightly.20230826 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBufferSize = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspector

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

Inspector is attached to an inspectable pipeline component and makes returns records coming in or out of the component. An Inspector is a "proxy" between the pipeline component being inspected and the API, which broadcasts records to all clients.

func New

func New(logger log.CtxLogger, bufferSize int) *Inspector

func (*Inspector) Close added in v0.6.0

func (i *Inspector) Close()

func (*Inspector) NewSession

func (i *Inspector) NewSession(ctx context.Context, componentID string) *Session

NewSession creates a new session in given inspector. componentID is the ID of the component being inspected (connector or processor).

func (*Inspector) Send

func (i *Inspector) Send(ctx context.Context, r record.Record)

Send the given record to all registered sessions. The method does not wait for consumers to get the records.

type Session

type Session struct {
	C chan record.Record
	// contains filtered or unexported fields
}

Session wraps a channel of records and provides: 1. a way to send records to it asynchronously 2. a way to know if it's closed or not

Jump to

Keyboard shortcuts

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