service

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VochainPrintInfo

func VochainPrintInfo(interval time.Duration, vi *vochaininfo.VochainInfo)

VochainPrintInfo initializes the Vochain statistics recollection.

Types

type VocdoniService added in v1.4.0

type VocdoniService struct {
	Config         *config.VochainCfg
	App            *vochain.BaseApplication
	Router         *httprouter.HTTProuter
	OffChainData   *offchaindatahandler.OffChainDataHandler
	DataDownloader *downloader.Downloader
	CensusDB       *censusdb.CensusDB
	Indexer        *indexer.Indexer
	Stats          *vochaininfo.VochainInfo
	Storage        data.Storage
	Signer         *ethereum.SignKeys
	KeyKeeper      *keykeeper.KeyKeeper
}

VocdoniService is the main struct that holds all the services of the Vocdoni node.

func (*VocdoniService) IPFS added in v1.4.0

func (vs *VocdoniService) IPFS(ipfsconfig *config.IPFSCfg) (data.Storage, error)

IPFS starts the IPFS service

func (*VocdoniService) OffChainDataHandler added in v1.4.0

func (vs *VocdoniService) OffChainDataHandler() error

OffChainDataHandler creates the offchain data downloader handler service and a censusDB.

func (*VocdoniService) ProcessArchiver added in v1.4.0

func (vs *VocdoniService) ProcessArchiver() error

func (*VocdoniService) Start added in v1.4.0

func (vs *VocdoniService) Start() error

Start the vochain node and the vochaininfo service. Blocks until the node is ready if config.NoWaitSync is false.

func (*VocdoniService) Vochain added in v1.4.0

func (vs *VocdoniService) Vochain() error

Vochain initializes the Vochain service. It takes the service configuration and initializes the missing services of the VocdoniService struct. All started services will be respected unless the App, which is the main service and thus overwritten by this function.

func (*VocdoniService) VochainIndexer added in v1.4.0

func (vs *VocdoniService) VochainIndexer() error

VochainIndexer creates the vochain indexer service.

Jump to

Keyboard shortcuts

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