fraud

package
v0.4.6-dirty Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lifecycle

func Lifecycle(
	startCtx, lifecycleCtx context.Context,
	p fraud.ProofType,
	fservice fraud.Service,
	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.

func Module

func Module(tp node.Type) fx.Option

func Service added in v0.5.0

func Service(
	lc fx.Lifecycle,
	sub *pubsub.PubSub,
	host host.Host,
	hstore header.Store,
	ds datastore.Batching,
) (fraud.Service, error)

Service constructs a fraud proof service with the syncer disabled.

func ServiceWithSyncer

func ServiceWithSyncer(
	lc fx.Lifecycle,
	sub *pubsub.PubSub,
	host host.Host,
	hstore header.Store,
	ds datastore.Batching,
) (fraud.Service, error)

ServiceWithSyncer constructs fraud proof service with enabled syncer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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