Documentation
¶
Overview ¶
Package core implements the runtime state machine.
Index ¶
- Variables
- func StateName(sid StateID) string
- type Core
- func (k *Core) Abort() error
- func (k Core) Config() *config.Config
- func (k Core) ConfigFlags() *config.Flags
- func (k *Core) Configure() error
- func (k *Core) Context() context.Context
- func (k *Core) Init(ctx context.Context, cfl *config.Flags, cfg *config.Config) (context.Context, error)
- func (k *Core) SetState(s StateID) error
- func (k *Core) Start() error
- func (k *Core) State() string
- func (k *Core) StateID() StateID
- func (k *Core) Stop() error
- func (k *Core) String() string
- func (k *Core) UUID() string
- func (k *Core) WithContext(ctx context.Context) (context.Context, error)
- type Flags
- type Machine
- type Mem
- type Runtime
- type SHalt
- type SInit
- type SRun
- type State
- type StateID
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConfigure error = errors.New("can not Configure in this state")
View Source
var ErrHalt error = errors.New("can not Halt in this state")
View Source
var ErrInit error = errors.New("can not Init in this state")
View Source
var ErrMemLock error = errors.New("mem lock failed")
View Source
var ErrRun error = errors.New("can not Run in this state")
View Source
var ErrStart error = errors.New("can not Start in this state")
View Source
var ErrStop error = errors.New("can not Stop in this state")
Functions ¶
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (Core) ConfigFlags ¶
type Flags ¶
type Flags struct {
// contains filtered or unexported fields
}
Flags holds main flags settings.
type Mem ¶
type Runtime ¶
type Runtime interface { Context() context.Context WithContext(context.Context) (context.Context, error) Init(context.Context, *config.Flags, *config.Config) (context.Context, error) Configure() error Start() error Stop() error }
func NewRuntime ¶
func NewRuntime() Runtime
Click to show internal directories.
Click to hide internal directories.