consumer

package
v0.97.0-sumo-1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKeyCommandName = contextKey("commandName")

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Build(*zap.SugaredLogger, WriterOp) (Interface, error)
}

Builder builds a consumer

type CloseFunc

type CloseFunc func(ExecutionSummary)

CloseFunc

type ExecutionSummary

type ExecutionSummary struct {
	Command     string
	ExitCode    int
	RunDuration time.Duration
}

ExecutionSummary describes a command execution

type Interface

type Interface interface {
	Consume(ctx context.Context, stdin, stderr io.Reader) CloseFunc
}

Interface consumes command output and emits telemetry data

type WriterOp

type WriterOp interface {
	NewEntry(value interface{}) (*entry.Entry, error)
	Write(ctx context.Context, e *entry.Entry)
}

WriterOp is the consumer's interface to the stanza pipeline

Jump to

Keyboard shortcuts

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