types

package
v0.19.8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 22 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const APrefix = "dbg"

Variables

View Source
var (
	ParamsOutputDiagramsNone  = ParamsOutputDiagrams{0}
	ParamsOutputDiagramsOne   = ParamsOutputDiagrams{1}
	ParamsOutputDiagramsTwo   = ParamsOutputDiagrams{2}
	ParamsOutputDiagramsThree = ParamsOutputDiagrams{3}

	ParamsOutputDiagramsEnum = enum.New(
		ParamsOutputDiagramsNone,
		ParamsOutputDiagramsOne,
		ParamsOutputDiagramsTwo,
		ParamsOutputDiagramsThree,
	)
)

0, 1, 2, 3

View Source
var (
	ParamsOutDiagTxNone      = ParamsOutDiagTx{""}
	ParamsOutDiagTxCalled    = ParamsOutDiagTx{"called"}
	ParamsOutDiagTxMutated   = ParamsOutDiagTx{"mutated"}
	ParamsOutDiagTxTouched   = ParamsOutDiagTx{"touched"}
	ParamsOutDiagTxRelations = ParamsOutDiagTx{"relations"}

	ParamsOutDiagTxEnum = enum.New(ParamsOutDiagTxNone, ParamsOutDiagTxCalled,
		ParamsOutDiagTxMutated, ParamsOutDiagTxTouched, ParamsOutDiagTxRelations)
)

"", "called", "changed", "touched"

View Source
var (
	ParamsOutDiagGroupNone = ParamsOutDiagGroup{""}
	ParamsOutDiagGroupHide = ParamsOutDiagGroup{"hide"}
	ParamsOutDiagGroupSkip = ParamsOutDiagGroup{"skip"}

	ParamsOutDiagGroupEnum = enum.New(ParamsOutDiagGroupNone,
		ParamsOutDiagGroupHide, ParamsOutDiagGroupSkip)
)

"", "hide", "skip"

View Source
var (
	ParamsDiagLayoutNone  = ParamsDiagLayout{""}
	ParamsDiagLayoutTala  = ParamsDiagLayout{"tala"}
	ParamsDiagLayoutElk   = ParamsDiagLayout{"elk"}
	ParamsDiagLayoutDagre = ParamsDiagLayout{"dagre"}

	ParamsDiagLayoutEnum = enum.New(ParamsDiagLayoutNone, ParamsDiagLayoutTala,
		ParamsDiagLayoutElk, ParamsDiagLayoutDagre)
)

"", "tala", "elk", "dagre"

View Source
var (
	ParamsViewTimelinesNone = ParamsViewTimelines{0}
	ParamsViewTimelinesOne  = ParamsViewTimelines{1}
	ParamsViewTimelinesTwo  = ParamsViewTimelines{2}

	ParamsViewTimelinesEnum = enum.New(
		ParamsViewTimelinesNone,
		ParamsViewTimelinesOne,
		ParamsViewTimelinesTwo,
	)
)

0, 1, 2

View Source
var (
	ToolFilterCanceledTx = ToolName{"skip-canceled"}
	ToolFilterQueuedTx   = ToolName{"skip-queued"}
	ToolFilterAutoTx     = ToolName{"skip-auto"}
	ToolFilterEmptyTx    = ToolName{"skip-empty"}
	ToolFilterHealth     = ToolName{"skip-health"}
	ToolFilterOutGroup   = ToolName{"skip-outgroup"}
	ToolFilterChecks     = ToolName{"skip-checks"}
	ToolFilterErrs       = ToolName{"skip-errs"}
	ToolFilterRpcMachs   = ToolName{"skip-rpc-machs"}
	ToolFilterDisconn    = ToolName{"skip-disconn"}
	ToolLogTimestamps    = ToolName{"hide-timestamps"}
	ToolFilterTraces     = ToolName{"hide-traces"}
	ToolNarrowLayout     = ToolName{"narrow-layout"}
	ToolLog              = ToolName{"log"}
	ToolDiagrams         = ToolName{"diagrams"}
	ToolDiagramsTx       = ToolName{"diag-tx"}
	ToolDiagramsGroup    = ToolName{"diag-group"}
	ToolOutputTx         = ToolName{"out-tx"}
	ToolOutputMach       = ToolName{"out-mach"}
	ToolOutputLog        = ToolName{"out-log"}
	ToolCallLog          = ToolName{"call-log"}
	ToolTimelines        = ToolName{"timelines"}
	ToolReader           = ToolName{"reader"}
	ToolReaderGroup      = ToolName{"reader-group"}
	ToolRain             = ToolName{"rain"}
	ToolLogWrap          = ToolName{"log-wrap"}
	ToolWeb              = ToolName{"web"}
	ToolHelp             = ToolName{"help"}
	ToolPlay             = ToolName{"play"}
	ToolTail             = ToolName{"tail"}
	ToolPrev             = ToolName{"prev"}
	ToolNext             = ToolName{"next"}
	ToolJumpNext         = ToolName{"jump-next"}
	ToolJumpPrev         = ToolName{"jump-prev"}
	ToolFirst            = ToolName{"first"}
	ToolLast             = ToolName{"last"}
	ToolExpand           = ToolName{"expand"}
	ToolMatrix           = ToolName{"matrix"}
	ToolExport           = ToolName{"export"}
	ToolMark             = ToolName{"mark"}
	ToolNextMarker       = ToolName{"next-mark"}
	ToolPrevMarker       = ToolName{"prev-mark"}
	ToolPrevClient       = ToolName{"prev-client"}
	ToolNextClient       = ToolName{"next-client"}

	ToolNames = enum.New(
		ToolFilterCanceledTx,
		ToolFilterQueuedTx,
		ToolFilterAutoTx,
		ToolFilterEmptyTx,
		ToolFilterHealth,
		ToolFilterOutGroup,
		ToolFilterChecks,
		ToolFilterErrs,
		ToolFilterDisconn,
		ToolLogTimestamps,
		ToolFilterTraces,
		ToolNarrowLayout,
		ToolLog,
		ToolDiagrams,
		ToolDiagramsTx,
		ToolDiagramsGroup,
		ToolOutputTx,
		ToolOutputMach,
		ToolOutputLog,
		ToolCallLog,
		ToolTimelines,
		ToolReader,
		ToolReaderGroup,
		ToolRain,
		ToolLogWrap,
		ToolWeb,
		ToolHelp,
		ToolPlay,
		ToolTail,
		ToolPrev,
		ToolNext,
		ToolJumpNext,
		ToolJumpPrev,
		ToolFirst,
		ToolLast,
		ToolExpand,
		ToolMatrix,
		ToolExport,
		ToolMark,
		ToolNextMarker,
		ToolPrevMarker,
		ToolPrevClient,
		ToolNextClient,
	)
)
View Source
var (
	DiagramTypeState = DiagramType{"state"}
	DiagramTypeMach  = DiagramType{"mach"}
	DiagramTypeSteps = DiagramType{"steps"}
	DiagramTypeGraph = DiagramType{"graph"}
)
View Source
var ArgsRpc = []am.ArgsApi{ARpc{}}

ArgsRpc will be available in the REPL.

View Source
var StateCalls = []am.CallSignature{
	{States: am.S{ss.StateNameSelected}, Needed: []string{"State"}},
	{States: am.S{ss.Redraw}, Optional: []string{"Immediate"}},
	{States: am.S{ss.Fwd}, Optional: []string{"Amount"}},
	{States: am.S{ss.Back}, Optional: []string{"Amount"}},
	{
		States:   am.S{ss.FwdMarker},
		Desc:     "Go to the next marker.",
		Optional: []string{"Amount"},
	},
	{
		States:   am.S{ss.BackMarker},
		Desc:     "Go to the previous marker.",
		Optional: []string{"Amount"},
	},
	{States: am.S{ss.ConnectEvent}, Needed: []string{"MsgStruct", "ConnId"}},
	{States: am.S{ss.DisconnectEvent}, Needed: []string{"ConnId"}},
	{
		States: am.S{ss.ClientMsg},
		Needed: []string{"MsgsTx", "ConnIds"},
	},
	{
		States: am.S{ss.RemoveClient},
		Needed: []string{"ClientId"},
	},
	{
		States: am.S{ss.SetGroup},
		Needed: []string{"Group"},
	},
	{
		States: am.S{ss.SetFilterOut},
		Needed: []string{"FilterOut"},
	},
	{
		States:   am.S{ss.SelectingClient},
		Needed:   []string{"ClientId"},
		Optional: []string{"Group", "FromConnected"},
	},
	{
		States:   am.S{ss.ClientSelected},
		Optional: []string{"FromConnected", "FromPlaying"},
	},
	{
		States:   am.S{ss.ScrollToTx},
		Optional: []string{"CursorTx1", "TxId", "TrimHistory"},
	},
	{
		States: am.S{ss.ScrollToMarker},
		Needed: []string{"CursorMarker1"},
	},
	{
		States: am.S{ss.ToggleMark},
	},
	{
		States: am.S{ss.ToggleTool},
		Needed: []string{"ToolName"},
		Values: map[string][]string{
			"ToolName": ToolNames.Values(),
		},
	},
	{
		States:   am.S{ss.ToolToggled},
		Optional: []string{"FilterTxs", "BuildClientList"},
	},
	{
		States: am.S{ss.SwitchingClientTx},
		Desc:   "Go to N-th transition of a client.",
		Needed: []string{"ClientId", "CursorTx1"},
	},
	{
		States: am.S{ss.ScrollToMutTx},
		Desc: "ScrollToMutTxState scrolls to a transition which mutated the " +
			"passed state, If fwd is true, it scrolls forward, otherwise backwards.",
		Needed:   []string{"State"},
		Optional: []string{"Fwd"},
	},
	{
		States:   am.S{ss.AfterFocus},
		Needed:   []string{"FocusPrimitive"},
		Optional: []string{"MouseFocus"},
	},
	{
		States:   am.S{ss.Resized},
		Optional: []string{"LogRebuildEnd"},
	},
	{
		States:   am.S{ss.WebReqDiag},
		Needed:   []string{"HttpRequest", "HttpResponseWriter", "DoneChan"},
		Optional: []string{"Uri", "Addr"},
	},
	{
		States: am.S{ss.WebSocketDiag},
		Needed: []string{"WebSocketConn", "HttpRequest", "HttpResponseWriter",
			"DoneChan"},
		Optional: []string{"Addr"},
	},
	{
		States: am.S{ss.MatrixRainSelected},
		Needed: []string{"Row", "Column", "CurrTxRow"},
	},
}

StateCalls is a list binding args to state names.

Functions

func GetLogger

func GetLogger(params *Params, dir string) *log.Logger

GetLogger returns a file logger, according to params.

func HandleProfMem

func HandleProfMem(logger *log.Logger, p *Params)

func NormalizeGroupName added in v0.18.9

func NormalizeGroupName(name string) string

TODO

func StartCpuProfile

func StartCpuProfile(logger *log.Logger, p *Params) func()

func StartCpuProfileSrv

func StartCpuProfileSrv(ctx context.Context, logger *log.Logger, p *Params)

Types

type A added in v0.18.8

type A struct {
	Args `json:"-"`

	ClientId string `log:"client_id"`
	TxId     string `log:"tx_id"`
	ConnId   string `log:"conn_id"`
	ConnIds  []string

	Cursor1       int `log:"cursor1" json:",string"`
	CursorMarker1 int `log:"cursor_marker1" json:",string"`
	// TODO merge with Cursor1
	CursorTx1 int `log:"cursor_tx1" json:",string"`

	Amount int  `log:"amount" json:",string"`
	Fwd    bool `log:"fwd" json:",string"`

	State string `log:"state"`
	Group string
	// FilterOut is a case-insensitive regexp removing top-level state names.
	FilterOut string `log:"filter_out"`

	ToolName ToolName `log:"tool_name"`

	Id string `log:"id"`

	// 1-based index
	LogRebuildEnd int `json:",string"`
	LogBuffer     string
	LogLevel      am.LogLevel `json:",string"`

	SkipHistory bool
	TrimHistory bool
	FilterBack  bool

	FilterTxs       bool
	BuildClientList bool
	Immediate       bool
	FromConnected   bool
	FromPlaying     bool
	MouseFocus      bool

	Text string `log:"text"`
	Uri  string `log:"uri"`
	Addr string `log:"addr"`

	Row       int `json:",string"`
	Column    int `json:",string"`
	CurrTxRow int `json:",string"`

	// FocusPrimitive is the UI element receiving focus.
	FocusPrimitive cview.Primitive
	// HttpRequest is for web server route handlers.
	HttpRequest *http.Request
	// HttpResponseWriter is for web server route handlers.
	HttpResponseWriter http.ResponseWriter
	// DoneChan signals completion of a web handler.
	DoneChan chan struct{}
	// WebSocketConn is for WebSocket handlers.
	WebSocketConn *websocket.Conn
	// MsgStruct is the schema message from am-dbg protocol.
	MsgStruct *dbg.DbgMsgStruct
	// MsgsTx is a batch of transaction messages.
	MsgsTx []*dbg.DbgMsgTx

	// DiagDom is parsed HTML for diagram generation.
	DiagDom *goquery.Document
	// DiagName is the name of the diagram being generated.
	DiagName string
	DiagType DiagramType `log:"diag_type"`
}

A is a struct for debugger arguments. It's a typesafe alternative to am.A.

type ARpc added in v0.18.8

type ARpc struct {
	Args `json:"-"`

	ClientId string `log:"client_id"`
	TxId     string `log:"tx_id"`
	ConnId   string `log:"conn_id"`
	ConnIds  []string

	Cursor1       int `log:"cursor1" json:",string"`
	CursorMarker1 int `log:"cursor_marker1" json:",string"`
	// TODO merge with Cursor1
	CursorTx1 int `log:"cursor_tx1" json:",string"`

	Amount int  `log:"amount" json:",string"`
	Fwd    bool `log:"fwd" json:",string"`

	State string `log:"state"`
	Group string
	// FilterOut is a case-insensitive regexp removing top-level state names.
	FilterOut string `log:"filter_out"`

	ToolName ToolName `log:"tool_name"`

	Id string `log:"id"`

	LogRebuildEnd int `json:",string"`
	LogBuffer     string
	LogLevel      am.LogLevel `json:",string"`

	SkipHistory bool
	TrimHistory bool
	FilterBack  bool

	FilterTxs       bool
	BuildClientList bool
	Immediate       bool
	FromConnected   bool
	FromPlaying     bool
	MouseFocus      bool

	Text string `log:"text"`
	Uri  string `log:"uri"`
	Addr string `log:"addr"`

	Row       int `json:",string"`
	Column    int `json:",string"`
	CurrTxRow int `json:",string"`
}

ARpc is a subset of A, that can be passed over RPC.

type Args added in v0.19.0

type Args struct {
	am.ArgsBase `json:"-"`
}

func (Args) ArgsPrefix added in v0.19.0

func (Args) ArgsPrefix() string

type DiagramType added in v0.19.1

type DiagramType enum.Member[string]

DiagramType is a type of a diagram.

func (DiagramType) String added in v0.19.1

func (d DiagramType) String() string

type Filters added in v0.18.4

type Filters struct {
	SkipCanceledTx     bool
	SkipAutoTx         bool
	SkipAutoCanceledTx bool
	SkipEmptyTx        bool
	SkipHealthTx       bool
	SkipQueuedTx       bool
	SkipOutGroup       bool
	SkipChecks         bool
	SkipErrs           bool
	LogLevel           am.LogLevel
	SkipRpcMach        bool
}

Filters controls which transitions and log entries are shown.

func (*Filters) Equal added in v0.18.4

func (f *Filters) Equal(filters *Filters) bool

type LogReaderEntry

type LogReaderEntry struct {
	Kind LogReaderKind
	// states are empty for logReaderWhenQueue
	States []int
	// CreatedAt is machine time when this entry was created
	CreatedAt uint64
	// ClosedAt is human time when this entry was closed, so it can be disposed.
	ClosedAt time.Time

	// Pipe is for logReaderPipeIn, logReaderPipeOut
	Pipe am.MutationType
	// Mach is for logReaderPipeIn, logReaderPipeOut, logReaderMention
	Mach string
	// Ticks is for logReaderWhenTime only
	Ticks am.Time
	// Args is for logReaderWhenArgs only
	Args string
	// QueueTick is for logReaderWhenQueue only
	QueueTick int
}

type LogReaderEntryPtr

type LogReaderEntryPtr struct {
	TxId     string
	EntryIdx int
}

type LogReaderKind

type LogReaderKind int
const (
	LogReaderCtx LogReaderKind = iota + 1
	LogReaderWhen
	LogReaderWhenNot
	LogReaderWhenTime
	LogReaderWhenArgs
	LogReaderWhenQueue
	LogReaderPipeIn
	LogReaderPipeOut
)

type MachAddress

type MachAddress struct {
	MachId string
	TxId   string
	Step   int

	MachTime  uint64
	QueueTick uint64
	HumanTime time.Time

	// selected group
	Group string
	// selected state
	State string

	// ctx:// URL, generated by [am.CtxValue.Url]
	IsCtx     bool
	StateTick uint64
}

func ParseMachUrl

func ParseMachUrl(u string) (*MachAddress, error)

ParseMachUrl parses mach:// and ctx:// URLs into a MachAddress. ctx:// URLs are generated by am.CtxValue.Url and point to a state clock tick instead of a transition ID.

func (*MachAddress) Clone

func (a *MachAddress) Clone() *MachAddress

func (*MachAddress) String

func (a *MachAddress) String() string

String returns a full mach URL.

func (*MachAddress) StringBase added in v0.18.9

func (a *MachAddress) StringBase() string

StringBase returns a mach URL without GET params (unless no tx ID). Empty string ret if no link.

type MachTime

type MachTime struct {
	Id   string
	Time uint64
}

type MsgSchemaParsed

type MsgSchemaParsed struct {
	// TODO split to group ID, labels
	Groups      map[string]am.S
	GroupsOrder []string
	Hash        string
}

type MsgTxParsed

type MsgTxParsed struct {
	StatesAdded   []int
	StatesRemoved []int
	StatesTouched []int
	// TimeSum is machine time after this transition.
	TimeSum       uint64
	TimeDiff      uint64
	ReaderEntries []*LogReaderEntryPtr
	// Transitions which reported this one as their source
	Forks       []MachAddress
	ForksLabels []string
	// QueueTick when this tx should be executed
	ResultTick uint64
}

type Params

type Params struct {
	MachUrl string `arg:"positional" help:"Machine URL to connect to"`

	ListenAddr      string   `arg:"-l,--listen-addr" default:"localhost:6831" help:"Host and port for the debugger to listen on"`
	OutputDir       string   `arg:"-d,--dir" default:"am-dbg" help:"Output directory for generated files"`
	CleanOnConnect  bool     `arg:"--clean-on-connect" default:"true" help:"Clean up disconnected clients on the 1st connection"`
	ImportData      string   `arg:"-i,--import-data" help:"Import an exported gob.br file"`
	FwdData         []string `arg:"-f,--fwd-data,separate" help:"Forward incoming data to other instances (repeatable)"`
	FwdReplayMax    int      `arg:"--fwd-replay-max" default:"100" help:"Max number of recent tx msgs kept for replay to (re)connected fwd targets"`
	SelectConnected bool     `arg:"-c,--select-connected" help:"Select the newly connected machine, if no other is connected"`

	EnableClipboard      bool        `arg:"--enable-clipboard" default:"true" help:"Enable clipboard support"`
	EnableMouse          bool        `arg:"--enable-mouse" default:"true" help:"Enable mouse support"`
	FilterAutoTx         bool        `arg:"--filter-auto" help:"Filter automatic transitions"`
	FilterAutoCanceledTx bool        `arg:"--filter-auto-canceled" help:"Filter automatic canceled transitions"`
	FilterCanceledTx     bool        `arg:"--filter-canceled" help:"Filter canceled transitions"`
	FilterChecks         bool        `arg:"--filter-checks" help:"Filter check (read-only) transitions"`
	FilterDisconn        bool        `arg:"--filter-disconn" help:"Filter disconnected machines"`
	FilterEmptyTx        bool        `arg:"--filter-empty" help:"Filter empty transitions"`
	FilterErrs           bool        `arg:"--filter-errs" help:"Filter error and warning transitions (Err*, Warn*)"`
	FilterGroup          bool        `arg:"--filter-group" default:"true" help:"Filter transitions by a selected group"`
	FilterHealthTx       bool        `arg:"--filter-health" help:"Filter health-check transitions"`
	FilterLogLevel       am.LogLevel `arg:"--filter-log-level" default:"2" help:"Filter transitions up to this log level, 0-5 (silent-everything)"`
	FilterOutStates      string      `arg:"--filter-out-states" help:"Filter out top-level states matching this regexp"`
	FilterReaderGroup    bool        `arg:"--filter-reader-group" help:"Narrow down the log reader to the selected group"`
	FilterRpcMachs       bool        `arg:"--filter-rpc-machs" help:"Filter RPC machines"`
	FilterQueuedTx       bool        `arg:"--filter-queued" help:"Filter queued transitions"`

	OutputCallLog         bool                 `` /* 126-byte string literal not displayed */
	OutputClients         bool                 `arg:"--output-clients" help:"Write a detailed client list into clients.md inside --dir"`
	OutputDiagrams        ParamsOutputDiagrams `` /* 141-byte string literal not displayed */
	OutputDiagConcurrency int                  `arg:"--output-diag-concurrency" default:"3" help:"Max number of state-zoom diagram renders (0 = no limit)"`
	OutputDiagGroup       ParamsOutDiagGroup   `arg:"--output-diag-group" help:"Only show states from the selected group (valid: hide, skip)" default:"hide"`
	OutputDiagLayout      ParamsDiagLayout     `arg:"--output-diag-layout" help:"D2 layout engine for state and graph diagrams (valid: tala, elk, dagre)" default:"tala"`
	OutputDiagTx          ParamsOutDiagTx      `arg:"--output-diag-tx" help:"Dim states and rels unrelated to a transition (valid: called, changed, touched, relations)"`
	OutputGraph           bool                 `arg:"--output-graph" help:"Write the current network graph as graph.(md|mgml) inside --dir (EXPERIMENTAL)"`
	OutputLog             bool                 `arg:"--output-log" help:"Write the current log buffer to log.md inside --dir"`
	OutputMach            bool                 `arg:"--output-mach" default:"true" help:"Write the serialized machine state into mach.yml and schema.yml inside --dir"`
	OutputStackTrace      bool                 `` /* 133-byte string literal not displayed */
	OutputTx              bool                 `arg:"--output-tx" default:"true" help:"Write the current transition with steps into tx.md / d2 / mermaid / txt inside --dir"`

	UiMcp      bool `arg:"--ui-mcp" help:"Enable MCP server on port --listen-addr +1 (requires --ui-web) (EXPERIMENTAL)" default:"true"`
	UiPty      bool `arg:"--ui-pty" default:"true" help:"Enable the local PTY UI (disable for a headless 80x25 sim screen, eg for MCP or SSH)"`
	UiSsh      bool `arg:"--ui-ssh" help:"Enable the SSH UI on port --listen-addr +2 (EXPERIMENTAL)"`
	UiLivepage bool `` /* 144-byte string literal not displayed */
	UiWeb      bool `arg:"--ui-web" default:"true" help:"Start a web server for --dir and diagrams on --listen-addr +1"`

	PrintVersion    bool                `arg:"--version" help:"Print version and exit"`
	StartupView     string              `arg:"-v,--view" default:"tree-log" help:"Initial view (tree-log, tree-matrix, matrix)"`
	ViewExpandLinks bool                `arg:"--view-expand-links" help:"Expand all tree links" default:"true"`
	ViewLogWrap     bool                `arg:"--view-log-wrap" help:"Wrap log lines"`
	ViewNarrow      bool                `arg:"--view-narrow" help:"Force a narrow view, independently of the viewport size"`
	ViewRain        bool                `arg:"--view-rain" help:"Show the rain view"`
	ViewReader      bool                `arg:"-r,--view-reader" help:"Show the log reader pane" default:"true"`
	TailMode        bool                `arg:"--view-tail" default:"true" help:"Show the most recent transition"`
	ViewTheme       string              `arg:"--view-theme" default:"dark" help:"Color theme (dark, light)"`
	ViewTimelines   ParamsViewTimelines `arg:"--view-timelines" default:"1" help:"Number of timelines to show (0-2)"`

	LogOpsTtl time.Duration `arg:"--log-ops-ttl" default:"1h" help:"Max time to live for logs level LogOps"`
	MaxMemMb  int           `arg:"--max-mem" default:"1000" help:"Max memory usage (in MB) to flush old transitions"`

	DebugAddr    string `arg:"--dbg-am-dbg-addr" help:"Debug this instance of am-dbg with another one"`
	RaceDetector bool   `arg:"--dbg-go-race" help:"Go race detector is enabled"`
	// Id is the ID of this asyncmachine (for debugging).
	Id string `arg:"--dbg-id" default:"am-dbg" help:"ID of this instance"`
	// LogLevel is the log level of this instance (for debugging).
	LogLevel am.LogLevel `arg:"--dbg-log-level" default:"0" help:"Log level produced by this instance, 0-5 (silent-everything)"`
	DbgOtel  bool        `arg:"--dbg-otel" help:"Enable OpenTelemetry tracing for this instance"`
	ProfSrv  string      `arg:"--dbg-prof-srv" help:"Start pprof server"`
	Repl     bool        `arg:"--dbg-repl" help:"Start a REPL server in --dir"`

	// AddrHttp is the computed HTTP server address (ListenAddr port+1).
	AddrHttp string `arg:"-"`
	// AddrRpc is the RPC listen address (same as ListenAddr).
	AddrRpc string `arg:"-"`
	// AddrSsh is the computed SSH server address (ListenAddr port+2).
	AddrSsh string `arg:"-"`
	// DbgLogger is the file logger for this instance.
	DbgLogger *log.Logger `arg:"-"`
	// Filters is the active set of transition filters.
	Filters *Filters `arg:"-"`
	// Print is the output function for status messages
	Print   func(txt string, args ...any) `arg:"-"`
	ProfCpu bool                          `arg:"-"`
	ProfMem bool                          `arg:"-"`
	// Screen is an optional tcell screen projected as an extra UI (tests).
	Screen tcell.Screen `arg:"-"`
	// Version is the computed build version string.
	Version string `arg:"-"`
}

Params are CLI params for am-dbg, also used as internal state via Debugger.Params.

type ParamsDiagLayout added in v0.19.6

type ParamsDiagLayout enum.Member[string]

ParamsDiagLayout is an enum for --output-diag-layout

func (*ParamsDiagLayout) UnmarshalText added in v0.19.6

func (p *ParamsDiagLayout) UnmarshalText(b []byte) error

type ParamsOutDiagGroup added in v0.18.8

type ParamsOutDiagGroup enum.Member[string]

ParamsOutDiagGroup is an enum for --output-diagrams-group

func (*ParamsOutDiagGroup) UnmarshalText added in v0.18.8

func (p *ParamsOutDiagGroup) UnmarshalText(b []byte) error

type ParamsOutDiagTx added in v0.18.8

type ParamsOutDiagTx enum.Member[string]

ParamsOutDiagTx is an enum for --output-diagrams-group

func (*ParamsOutDiagTx) UnmarshalText added in v0.18.8

func (p *ParamsOutDiagTx) UnmarshalText(b []byte) error

type ParamsOutputDiagrams added in v0.18.8

type ParamsOutputDiagrams enum.Member[int]

ParamsOutputDiagrams is an enum for --output-diagrams

func (*ParamsOutputDiagrams) UnmarshalText added in v0.18.8

func (p *ParamsOutputDiagrams) UnmarshalText(b []byte) error

type ParamsViewTimelines added in v0.18.8

type ParamsViewTimelines enum.Member[int]

ParamsViewTimelines is an enum for --view-timelines

func (*ParamsViewTimelines) UnmarshalText added in v0.18.8

func (p *ParamsViewTimelines) UnmarshalText(b []byte) error

type StateTraceItem added in v0.18.9

type StateTraceItem struct {
	Label      string
	Source     *MachAddress
	StateNames am.S
}

type ToolName added in v0.18.8

type ToolName enum.Member[string]

ToolName is a debugger's toolbar button.

type WsDiagMsg added in v0.19.1

type WsDiagMsg struct {
	// ID of this event (eg refresh)
	Event string
	// ID of this diagram (eg mach ID, state name...)
	Id    string
	Group string
}

Jump to

Keyboard shortcuts

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