Documentation ¶
Index ¶
Constants ¶
View Source
const ( BLOCK_NUMBER_TABLE = "block_number" DayFormat = "20060102" TimeFormat = "2006-01-02 15:04:05" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockNumber ¶
type BlockNumber struct { Id int64 `json:"id" gorm:"column:id"` ChainCode int64 `json:"chain_code" gorm:"column:chain_code"` // 公链代码 RecentNumber int64 `json:"recent_number" gorm:"column:recent_number"` // 已处理的高度 LatestNumber int64 `json:"latest_number" gorm:"column:latest_number"` // 区块链的最新高度 CreateTime time.Time `json:"create_time" gorm:"column:create_time"` LogTime time.Time `json:"log_time" gorm:"column:log_time"` }
type CreateTask ¶
type CreateTask interface {
GetLastBlockNumber(v *config.BlockConfig) error
}
type NodeInfo ¶
type NodeInfo struct { Id int64 `json:"id" gorm:"column:id"` Ip string `json:"ip" gorm:"column:ip"` // ip Host string `json:"host" gorm:"column:host"` // host NodeId string `json:"node_id" gorm:"column:node_id"` // 节点的唯一标识 Info string `json:"info" gorm:"column:info"` // 采集节点的配置信息 ,一个json 对象 如: CreateTime time.Time `json:"create_time" gorm:"column:create_time"` }
type NodeSource ¶
type NodeSource struct { Id int64 `json:"id" gorm:"column:id"` BlockChain int64 `json:"block_chain" gorm:"column:block_chain"` // 公链code TxHash string `json:"tx_hash" gorm:"column:tx_hash"` BlockHash string `json:"block_hash" gorm:"column:block_hash"` BlockNumber string `json:"block_number" gorm:"column:block_number"` SourceType int8 `json:"source_type" gorm:"column:source_type"` // 任务类型 1: 交易 2:区块 3.收据 CreateTime time.Time `json:"create_time" gorm:"column:create_time"` }
type NodeTask ¶
type NodeTask struct { NodeId string `json:"node_id" gorm:"column:node_id"` // 节点的唯一标识 BlockNumber string `json:"block_number" gorm:"column:block_number"` // 区块高度 BlockHash string `json:"block_hash" gorm:"column:block_hash"` // 区块hash TxHash string `json:"tx_hash" gorm:"column:tx_hash"` // 交易hash TaskType int8 `json:"task_type" gorm:"column:task_type"` // 0:保留 1:同步Tx 2:同步Block 3:同步收据 BlockChain int64 `json:"block_chain" gorm:"column:block_chain"` // 公链code, 默认:100 (etc) TaskStatus int `json:"task_status" gorm:"column:task_status"` // 0: 初始 1: 成功. 2: 失败. 3: 执行中 其他:重试次数 CreateTime time.Time `json:"create_time" gorm:"column:create_time"` LogTime time.Time `json:"log_time" gorm:"column:log_time"` Id int64 `json:"id" gorm:"column:id"` }
Click to show internal directories.
Click to hide internal directories.