output

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BubbleTUIOutput

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

BubbleTUIOutput is an MTR-like TUI using Bubble Tea

func NewBubbleTUIOutput

func NewBubbleTUIOutput(info shared.OutputInfo) *BubbleTUIOutput

NewBubbleTUIOutput creates a new Bubble Tea TUI output

func (*BubbleTUIOutput) Close

func (b *BubbleTUIOutput) Close() error

Close implements the Output interface

func (*BubbleTUIOutput) CompleteProbe

func (b *BubbleTUIOutput) CompleteProbe(probeID uint16, stats shared.ProbeStats)

CompleteProbe implements the Output interface

func (*BubbleTUIOutput) CompleteProbeRun

func (b *BubbleTUIOutput) CompleteProbeRun(run *shared.ProbeRun)

func (*BubbleTUIOutput) DeleteHops

func (b *BubbleTUIOutput) DeleteHops(probeID uint16, ttls []uint8)

func (*BubbleTUIOutput) QuitChan

func (b *BubbleTUIOutput) QuitChan() <-chan struct{}

QuitChan returns the channel that signals when the user quits the TUI

func (*BubbleTUIOutput) Start

func (b *BubbleTUIOutput) Start()

Start initializes and starts the Bubble Tea program

func (*BubbleTUIOutput) UpdateHop

func (b *BubbleTUIOutput) UpdateHop(probeID uint16, ttl uint8, hopStats shared.HopStats)

UpdateHop implements the Output interface

type JSONOutput

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

JSONOutput writes probe data to a file or stdout when complete

func NewJSONOutput

func NewJSONOutput(filename string) (*JSONOutput, error)

func (*JSONOutput) Close

func (j *JSONOutput) Close() error

func (*JSONOutput) CompleteProbe

func (j *JSONOutput) CompleteProbe(probeID uint16, stats shared.ProbeStats)

func (*JSONOutput) CompleteProbeRun

func (j *JSONOutput) CompleteProbeRun(run *shared.ProbeRun)

func (*JSONOutput) DeleteHops

func (j *JSONOutput) DeleteHops(probeID uint16, ttls []uint8)

func (*JSONOutput) UpdateHop

func (j *JSONOutput) UpdateHop(probeID uint16, ttl uint8, hopStats shared.HopStats)

type Output

type Output interface {
	UpdateHop(probeID uint16, ttl uint8, hopStats shared.HopStats)
	DeleteHops(probeID uint16, ttls []uint8)
	CompleteProbe(probeID uint16, stats shared.ProbeStats)
	CompleteProbeRun(run *shared.ProbeRun)
	Close() error
}

Output interface for different output types

type OutputManager

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

OutputManager manages multiple outputs

func (*OutputManager) Close

func (om *OutputManager) Close()

func (*OutputManager) CompleteProbe

func (om *OutputManager) CompleteProbe(probeID uint16, stats shared.ProbeStats)

func (*OutputManager) CompleteProbeRun

func (om *OutputManager) CompleteProbeRun(run *shared.ProbeRun)

func (*OutputManager) DeleteHops

func (om *OutputManager) DeleteHops(probeID uint16, ttls []uint8)

func (*OutputManager) Register

func (om *OutputManager) Register(o Output)

func (*OutputManager) UpdateHop

func (om *OutputManager) UpdateHop(probeID uint16, ttl uint8, hopStats shared.HopStats)

Jump to

Keyboard shortcuts

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