printer

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcast added in v0.12.0

type Broadcast struct {
	PrinterConfigs []config.PrinterConfig
	// contains filtered or unexported fields
}

Broadcast is a printer that broadcasts events to multiple printers

func NewBroadcast added in v0.12.0

func NewBroadcast(printerConfigs []config.PrinterConfig, containerMode config.ContainerMode) (*Broadcast, error)

NewBroadcast creates a new Broadcast printer

func (*Broadcast) Active added in v0.24.0

func (b *Broadcast) Active() bool

Active reports whether the broadcast has meaningful kinds to process.

It returns true if there is at least one printer kind and it's not solely "ignore". If no printer configurations are present or if the only kind is "ignore", the broadcast is considered inactive.

func (*Broadcast) Close added in v0.14.1

func (b *Broadcast) Close()

Close closes Broadcast printer

func (*Broadcast) Epilogue added in v0.15.0

func (b *Broadcast) Epilogue(stats metrics.Stats)

func (*Broadcast) Init added in v0.15.0

func (b *Broadcast) Init() error

func (*Broadcast) Kinds added in v0.24.0

func (b *Broadcast) Kinds() []string

Kinds returns a list of all printer kinds configured in the broadcast.

Each kind corresponds to a specific printer configuration.

func (*Broadcast) Preamble added in v0.15.0

func (b *Broadcast) Preamble()

func (*Broadcast) Print added in v0.12.0

func (b *Broadcast) Print(event trace.Event)

Print broadcasts the event to all printers

type EventPrinter

type EventPrinter interface {
	// Init serves as the initializer method for every event Printer type
	Init() error
	// Preamble prints something before event printing begins (one time)
	Preamble()
	// Epilogue prints something after event printing ends (one time)
	Epilogue(stats metrics.Stats)
	// Print prints a single event
	Print(event trace.Event)
	// dispose of resources
	Close()
}

func New

Jump to

Keyboard shortcuts

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