Documentation ¶
Index ¶
- func ApplyDBlock(ctx context.Context, c *factom.Client, h uint32, state State) error
- func ApplyPendingEntries(ctx context.Context, c *factom.Client, state State) error
- func Get(ctx context.Context, chainID *factom.Bytes32, includePending bool) (state.Chain, func(), error)
- func GetSyncStatus() (sync, current uint32)
- func IssuedIDs() []*factom.Bytes32
- func Start(ctx context.Context, c *factom.Client) (done <-chan struct{})
- func TrackedIDs() []*factom.Bytes32
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDBlock ¶ added in v1.1.0
func ApplyPendingEntries ¶ added in v1.1.0
func GetSyncStatus ¶
func GetSyncStatus() (sync, current uint32)
GetSyncStatus is a threadsafe way to get the sync height and current Factom Blockchain height.
func Start ¶
Start launches the main engine goroutine, which loads state and starts the worker goroutines. If stop is closed or if an error occurs, the engine will finish processing the current DBlock, cleanup and close state, all goroutines will exit, and done will be closed. If the done channel is closed before the stop channel is closed, an error occurred.
func TrackedIDs ¶ added in v1.1.0
Types ¶
type State ¶ added in v1.1.0
type State interface { ApplyEBlock(context.Context, *factom.Bytes32, factom.EBlock) error ApplyPendingEntries(context.Context, []factom.Entry) error SetSync(context.Context, uint32, *factom.Bytes32) error GetSync() uint32 TrackedIDs() []*factom.Bytes32 IssuedIDs() []*factom.Bytes32 Get(context.Context, *factom.Bytes32, bool) (state.Chain, func(), error) Close() }
Click to show internal directories.
Click to hide internal directories.