server

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: 23 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

This section is empty.

Variables

View Source
var Pass = am.Pass

Functions

func AcceptConn added in v0.18.0

func AcceptConn(
	conn io.ReadWriteCloser, mach *am.Machine, fwdTo []*fwdConn,
)

AcceptConn accepts a std rpc connection, or alike.

func New added in v0.18.9

func New(
	mach *am.Machine, addr string, params func() *types.Params,
) (cmux.CMux, *http.Server, error)

New initializes listeners, fwd conns, and returns unstated servers.

Types

type A added in v0.18.8

type A = types.A

type Client added in v0.16.1

type Client struct {
	// bits which get saved into the go file
	*Exportable

	// current transition, 1-based, mirrors the slider (eg 1 means tx.ID == 0)
	// TODO atomic
	ReaderCollapsed bool
	Id              string
	MTimeSum        uint64
	SelectedGroup   string
	Connected       atomic.Bool
	ConnId          string
	SchemaHash      string
	// processed list of filtered tx _indexes_
	MsgTxsFiltered []int
	// cache of processed log entries
	LogMsgs [][]*am.LogEntry
	// indexes of txs with errors, desc order for bisects
	// TOOD refresh on GC
	Errors []int
	// processed
	MsgTxsParsed    []*types.MsgTxParsed
	MsgSchemaParsed *types.MsgSchemaParsed
	// contains filtered or unexported fields
}

func NewClient added in v0.19.3

func NewClient(connId string, msgSchema *dbg.DbgMsgStruct) *Client

func (*Client) ClearCache added in v0.16.1

func (c *Client) ClearCache()

func (*Client) FilterIndexByCursor1 added in v0.16.1

func (c *Client) FilterIndexByCursor1(cursor1 int) int

func (*Client) HadErrSinceTx added in v0.16.1

func (c *Client) HadErrSinceTx(tx, distance int) bool

func (*Client) IndexesToStates added in v0.16.1

func (c *Client) IndexesToStates(indexes []int) am.S

func (*Client) LastActive added in v0.16.1

func (c *Client) LastActive() time.Time

func (*Client) ParseSchema added in v0.16.1

func (c *Client) ParseSchema()

func (*Client) StatesStringToIndex added in v0.19.5

func (c *Client) StatesStringToIndex(states string) []int

func (*Client) StatesToIndexes added in v0.16.1

func (c *Client) StatesToIndexes(states am.S) []int

func (*Client) Tx added in v0.16.1

func (c *Client) Tx(idx int) *dbg.DbgMsgTx

func (*Client) TxAtHTime added in v0.18.9

func (c *Client) TxAtHTime(hTime time.Time) int

func (*Client) TxAtMachTime added in v0.18.9

func (c *Client) TxAtMachTime(sum uint64) int

func (*Client) TxAtQueueTick added in v0.18.9

func (c *Client) TxAtQueueTick(qTick uint64) int

func (*Client) TxAtStateTick added in v0.19.7

func (c *Client) TxAtStateTick(state string, tick uint64) int

TxAtStateTick returns the index of the first transition after which [state] reached the [tick] of its clock, or the closest later transition.

func (*Client) TxExecutedBy added in v0.18.9

func (c *Client) TxExecutedBy(idx int) *dbg.DbgMsgTx

TxExecutedBy returns the execution transition for a queued transition

func (*Client) TxIndex added in v0.16.1

func (c *Client) TxIndex(id string) int

TxIndex returns the index of transition ID [id] or -1 if not found.

func (*Client) TxIsMarked added in v0.19.3

func (c *Client) TxIsMarked(txId string) bool

func (*Client) TxMark added in v0.19.3

func (c *Client) TxMark(txId string, mark bool)

func (*Client) TxParsed added in v0.16.1

func (c *Client) TxParsed(idx int) *types.MsgTxParsed

type DbgMsgSchemaFwd added in v0.12.0

type DbgMsgSchemaFwd struct {
	MsgStruct *dbg.DbgMsgStruct
	ConnId    string
}

type DbgMsgTx added in v0.12.0

type DbgMsgTx struct {
	MsgTx  *dbg.DbgMsgTx
	ConnId string
}

type Exportable added in v0.16.1

type Exportable struct {
	// TODO refac to MsgSchema
	// TODO version schemas
	MsgStruct *dbg.DbgMsgStruct
	MsgTxs    []*dbg.DbgMsgTx
	// TODO clean up on GC
	Markers map[string]struct{}
	Version string
}

type RPCServer

type RPCServer struct {
	Mach *am.Machine
	// TODO ConnId
	ConnID string
	FwdTo  []*fwdConn
	// contains filtered or unexported fields
}

TODO rename to RPCServer (compat break)

func (*RPCServer) DbgMsgSchema added in v0.15.0

func (r *RPCServer) DbgMsgSchema(
	msgSchema *dbg.DbgMsgStruct, _ *string,
) error

func (*RPCServer) DbgMsgSchemaFwd added in v0.12.0

func (r *RPCServer) DbgMsgSchemaFwd(
	msg *DbgMsgSchemaFwd, _ *string,
) error

TODO rename to RemoteMsgSchemaReceive (compat break)

func (*RPCServer) DbgMsgTx

func (r *RPCServer) DbgMsgTx(msgTx *dbg.DbgMsgTx, _ *string) error

func (*RPCServer) DbgMsgTxFwd added in v0.12.0

func (r *RPCServer) DbgMsgTxFwd(msg *DbgMsgTx, _ *string) error

TODO rename to RemoteMsgTxReceive (compat break)

Jump to

Keyboard shortcuts

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