state_machines

package
v0.0.0-...-ee95d54 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

README

Events

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSMDump

type FSMDump struct {
	TransactionId string
	State         fsm.State
	Payload       *internal.DumpedMachineStatePayload
}

Is machine state scope dump will be locked?

func (*FSMDump) Marshal

func (d *FSMDump) Marshal() ([]byte, error)

TODO: Add encryption

func (*FSMDump) Unmarshal

func (d *FSMDump) Unmarshal(data []byte) error

TODO: Add decryption

type FSMInstance

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

func Create

func Create(dkgID string) (*FSMInstance, error)

Create new fsm with unique id transactionId required for unique identify dump

func FromDump

func FromDump(data []byte) (*FSMInstance, error)

DKGQuorumGet fsm from dump

func (*FSMInstance) Do

func (i *FSMInstance) Do(event fsm.Event, args ...interface{}) (result *fsm.Response, dump []byte, err error)

func (*FSMInstance) Dump

func (i *FSMInstance) Dump() ([]byte, error)

func (*FSMInstance) FSMDump

func (i *FSMInstance) FSMDump() *FSMDump

func (*FSMInstance) GetIDByUsername

func (i *FSMInstance) GetIDByUsername(username string) (int, error)

func (*FSMInstance) GetPubKeyByUsername

func (i *FSMInstance) GetPubKeyByUsername(username string) (ed25519.PublicKey, error)

func (*FSMInstance) Id

func (i *FSMInstance) Id() string

func (*FSMInstance) InitDump

func (i *FSMInstance) InitDump(dkgID string) error

func (*FSMInstance) State

func (i *FSMInstance) State() (fsm.State, error)

type Participant

type Participant interface {
	GetStatus() internal.ParticipantStatus
	GetUsername() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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