types

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(rootCmd *cobra.Command)

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 RootCmd

func RootCmd(fn RootFn) *cobra.Command

func StartCpuProfile

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

func StartCpuProfileSrv

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

Types

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
	MachTime  uint64
	HumanTime time.Time
	// TODO support step
	Step int
	// TODO support queue ticks
	QueueTick uint64
}

func ParseMachUrl

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

func (*MachAddress) Clone

func (a *MachAddress) Clone() *MachAddress

func (*MachAddress) String

func (a *MachAddress) String() string

type MachTime

type MachTime struct {
	Id   string
	Time uint64
}

type MsgSchemaParsed

type MsgSchemaParsed struct {
	Groups      map[string]am.S
	GroupsOrder []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 {
	// LogLevel is the log level of this instance (for debugging).
	LogLevel am.LogLevel
	// Id is the ID of this asyncmachine (for debugging).
	Id              string
	Version         bool
	ListenAddr      string
	DebugAddr       string
	RaceDetector    bool
	ImportData      string
	EnableMouse     bool
	UiSsh           bool
	EnableClipboard bool
	CleanOnConnect  bool
	SelectConnected bool
	ProfMem         bool
	ProfCpu         bool
	ProfSrv         string
	MaxMemMb        int
	LogOpsTtl       time.Duration
	ViewReader      bool
	FwdData         []string

	StartupMachine string
	StartupView    string
	StartupTx      int
	StartupGroup   string

	ViewNarrow bool
	ViewRain   bool

	FilterGroup    bool
	FilterLogLevel am.LogLevel

	OutputDir      string
	OutputDiagrams int
	UiWeb          bool
	OutputClients  bool
	ViewTimelines  int
	Rain           bool
	TailMode       bool
	OutputTx       bool
	MachUrl        string
	OutputLog      bool
}

func ParseParams

func ParseParams(cmd *cobra.Command, args []string) Params

type RootFn

type RootFn func(cmd *cobra.Command, args []string, params Params)

Jump to

Keyboard shortcuts

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