Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupported = errors.ErrUnsupported ErrTermZero = errors.New("Term zero") )
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface {
// Init
Init(ctx context.Context) error
// PrepareApply is to prepare for update scoped resource
PrepareUpdate(ctx context.Context) (context.Context, context.CancelFunc, error)
//make it easier for everyone..
OnUpdate(ctx context.Context, e Entry) (OnAfterApply, error)
// Apply to place the code to commit to disk or "Sync"
Apply(ctx context.Context) error
// Lookup
Lookup(ctx context.Context, key interface{}) (interface{}, error)
}
Application represents a dragonboat state machine application
type ApplicationV2 ¶
type ApplicationV2 interface {
// Simpler API for distributed state machine
// If return error, we will acknowledge it as applied. If you don't want, just crash the state machine.
OnUpdateV2(ctx context.Context, entry EntryV2) (any, error)
}
exploring etcd raft / make it simpler compared to Application or just EtcdApplication
type EventLeaderUpdate ¶
type EventLeaderUpdate raftio.LeaderInfo
type LeaderListener ¶
type OnAfterApply ¶
Click to show internal directories.
Click to hide internal directories.