inspector

package
v0.11.0-nightly.20240627 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 7 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). The session will be closed and removed from the inspector when the context is closed.

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 represents a single inspector session. Records are continuously sent into channel C. If the buffer of C is full, records will be dropped. C will be closed once the session is removed from the inspector.

Jump to

Keyboard shortcuts

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