db

package
v0.0.0-...-855f182 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DayFormat = "20060102"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewTaskService

func NewTaskService(taskDb *config.TaskDb, sourceDb *config.SourceDb, x *xlog.XLog) *Service

func (*Service) AddNodeSource

func (s *Service) AddNodeSource(source *service.NodeSource) error

func (*Service) AddNodeSourceList

func (s *Service) AddNodeSourceList(sources []*service.NodeSource) error

func (*Service) AddNodeTask

func (s *Service) AddNodeTask(list []*service.NodeTask) error

func (*Service) GetNodeTaskByBlockHash

func (s *Service) GetNodeTaskByBlockHash(hash string, taskType int, blockChain int) (*service.NodeTask, error)

func (*Service) GetNodeTaskByBlockNumber

func (s *Service) GetNodeTaskByBlockNumber(number string, taskType int, blockChain int) (*service.NodeTask, error)

func (*Service) GetNodeTaskWithTx

func (s *Service) GetNodeTaskWithTx(txHash string, taskType int, blockChain int, taskStatus int) (*service.NodeTask, error)

func (*Service) GetNodeTaskWithTxs

func (s *Service) GetNodeTaskWithTxs(txHash []string, taskType int, blockChain int, taskStatus int) ([]int64, error)

func (*Service) GetTaskWithBlock

func (s *Service) GetTaskWithBlock(blockChain int, nodeId string) ([]*service.NodeTask, error)

func (*Service) GetTaskWithReceipt

func (s *Service) GetTaskWithReceipt(blockChain int, nodeId string) ([]*service.NodeTask, error)

func (*Service) GetTaskWithTx

func (s *Service) GetTaskWithTx(blockChain int, nodeId string) ([]*service.NodeTask, error)

func (*Service) UpdateNodeTaskListStatusWithTx

func (s *Service) UpdateNodeTaskListStatusWithTx(txHashList []string, taskType int, blockChain int, taskStatus int) error

func (*Service) UpdateNodeTaskStatus

func (s *Service) UpdateNodeTaskStatus(id int64, status int) error

func (*Service) UpdateNodeTaskStatusWithBatch

func (s *Service) UpdateNodeTaskStatusWithBatch(ids []int64, status int) error

func (*Service) UpdateNodeTaskStatusWithBlockByHash

func (s *Service) UpdateNodeTaskStatusWithBlockByHash(hash string, taskType int, blockChain int, taskStatus int) error

func (*Service) UpdateNodeTaskStatusWithBlockByNumber

func (s *Service) UpdateNodeTaskStatusWithBlockByNumber(number string, taskType int, blockChain int, taskStatus int) error

func (*Service) UpdateNodeTaskStatusWithTx

func (s *Service) UpdateNodeTaskStatusWithTx(txHash string, taskType int, blockChain int, taskStatus int) error

Jump to

Keyboard shortcuts

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