Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Lifecycle ¶
func Lifecycle( startCtx, lifecycleCtx context.Context, p fraud.ProofType, fraudModule Module, start, stop func(context.Context) error, ) error
Lifecycle controls the lifecycle of service depending on fraud proofs. It starts the service only if no fraud-proof exists and stops the service automatically if a proof arrives after the service was started.
Types ¶
type API ¶ added in v0.5.0
type API struct {
Subscribe func(fraud.ProofType) (fraud.Subscription, error)
Get func(context.Context, fraud.ProofType) ([]fraud.Proof, error)
}
API is a wrapper around Module for the RPC. TODO(@distractedm1nd): These structs need to be autogenerated.
type Module ¶
Module encompasses the behavior necessary to subscribe and broadcast fraud proofs within the network. Any method signature changed here needs to also be changed in the API struct.
Click to show internal directories.
Click to hide internal directories.