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
Click to show internal directories.
Click to hide internal directories.