master

package
v0.0.0-...-17003a6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalMaster

type LocalMaster struct {
	// contains filtered or unexported fields
}

LocalMaster is the implement of master in local

func NewLocalMaster

func NewLocalMaster() (*LocalMaster, error)

NewLocalMaster create LocalMaster.

func (*LocalMaster) GetContext

func (m *LocalMaster) GetContext() ([]byte, error)

GetContext generate the context, which will be passed to Worker

func (*LocalMaster) LogStatus

func (m *LocalMaster) LogStatus() (end int64, err error)

LogStatus records blockheight and time

func (*LocalMaster) Prepare

func (m *LocalMaster) Prepare() (err error)

Prepare is used to prepare

func (*LocalMaster) Statistic

func (m *LocalMaster) Statistic(from, to int64) (*fcom.RemoteStatistic, error)

Statistic query the remote statistic data from chain

type Master

type Master interface {
	// Prepare is used to prepare
	Prepare() error

	// GetContext generate the context, which will be passed to Worker
	GetContext() ([]byte, error)

	// Statistic query the remote statistic data from chain
	Statistic(from, to int64) (*fcom.RemoteStatistic, error)

	// LogStatus records blockheight and time
	LogStatus() (int64, error)
}

Master is the interface of mater node

Jump to

Keyboard shortcuts

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