fsmservice

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FSMStateKey = "fsm_state"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FSM

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

func (*FSM) GetAllFSM

func (fsm *FSM) GetAllFSM() (map[string]*state_machines.FSMInstance, error)

func (*FSM) GetFSMDump

func (fsm *FSM) GetFSMDump(dto *dto.DkgIdDTO) (*state_machines.FSMDump, error)

func (*FSM) GetFSMInstance

func (fsm *FSM) GetFSMInstance(dkgRoundID string, createIfMissing bool) (*state_machines.FSMInstance, error)

GetFSMInstance returns FSM for a necessary DKG round.

func (*FSM) GetFSMList

func (fsm *FSM) GetFSMList() (map[string]string, error)

func (*FSM) IsExist

func (fsm *FSM) IsExist(dkgRoundID string) (bool, error)

func (*FSM) ResetFSMState

func (fsm *FSM) ResetFSMState(dto *dto.ResetStateDTO) (string, error)

func (*FSM) SaveFSM

func (fsm *FSM) SaveFSM(dkgRoundID string, dump []byte) error

type FSMService

type FSMService interface {
	GetFSMInstance(dkgRoundID string, createIfMissing bool) (*state_machines.FSMInstance, error)
	GetFSMDump(dto *dto.DkgIdDTO) (*state_machines.FSMDump, error)
	GetFSMList() (map[string]string, error)
	ResetFSMState(dto *dto.ResetStateDTO) (string, error)
	SaveFSM(dkgRoundID string, dump []byte) error
	IsExist(dkgRoundID string) (bool, error)
}

func NewFSMService

func NewFSMService(state state.State, storage storage.Storage, stateNamespace string) FSMService

Jump to

Keyboard shortcuts

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