iris

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionNameAssetDetail = "sync_iris_asset_detail"
)
View Source
const (
	CollectionNameBlock = "sync_iris_block"
)
View Source
const (
	CollectionNameIrisTx = "sync_iris_tx"
)
View Source
const (
	CollectionNameSyncTask = "sync_iris_task"
)

Variables

View Source
var (
	TagDistributionReward = dtags.Reward
)

Functions

This section is empty.

Types

type ActualFee

type ActualFee struct {
	Denom  string  `json:"denom"`
	Amount float64 `json:"amount"`
}

type AssetCreateGateway added in v1.2.0

type AssetCreateGateway = asset.MsgCreateGateway

type AssetEditGateWay added in v1.2.0

type AssetEditGateWay = asset.MsgEditGateway

type AssetEditToken added in v1.2.0

type AssetEditToken = asset.MsgEditToken

type AssetIssueToken added in v1.2.0

type AssetIssueToken = asset.MsgIssueToken

type AssetMintToken added in v1.2.0

type AssetMintToken = asset.MsgMintToken

type AssetTransferGatewayOwner added in v1.2.0

type AssetTransferGatewayOwner = asset.MsgTransferGatewayOwner

type AssetTransferTokenOwner added in v1.2.0

type AssetTransferTokenOwner = asset.MsgTransferTokenOwner

type Block

type Block struct {
	Height     int64 `bson:"height"`
	CreateTime int64 `bson:"create_time"`
}

type Coin

type Coin struct {
	Denom  string  `bson:"denom" json:"denom"`
	Amount float64 `bson:"amount" json:"amount"`
}

type Coins

type Coins []*Coin

type DocTxMsg added in v1.2.0

type DocTxMsg struct {
	Type string `bson:"type"`
	Msg  Msg    `bson:"msg"`
}

type Fee

type Fee struct {
	Amount Coins `bson:"amount" json:"amount"`
	Gas    int64 `bson:"gas" json:"gas"`
}

type IrisAssetDetail

type IrisAssetDetail struct {
	From        string `bson:"from"`
	To          string `bson:"to"`
	CoinAmount  string `bson:"coin_amount"`
	CoinUnit    string `bson:"coin_unit"`
	Trigger     string `bson:"trigger"`
	Subject     string `bson:"subject"`
	Description string `bson:"description"`
	Timestamp   string `bson:"timestamp"`
	Height      int64  `bson:"height"`
	TxHash      string `bson:"tx_hash"`
	Ext         string `bson:"ext"`
}

func (IrisAssetDetail) Name

func (d IrisAssetDetail) Name() string

func (IrisAssetDetail) PkKvPair

func (d IrisAssetDetail) PkKvPair() map[string]interface{}

type IrisTx

type IrisTx struct {
	Time      time.Time         `json:"time" bson:"time"`
	Height    int64             `json:"height" bson:"height"`
	TxHash    string            `json:"tx_hash" bson:"tx_hash"`
	From      string            `json:"from" bson:"from"`
	To        string            `json:"to" bson:"to"`
	Initiator string            `json:"initiator" bson:"initiator"`
	Amount    []*Coin           `json:"amount" bson:"amount"`
	Type      string            `json:"type" bson:"type"`
	Fee       *Fee              `json:"fee" bson:"fee"`
	ActualFee *ActualFee        `json:"actual_fee" bson:"actual_fee"`
	Memo      string            `json:"memo" bson:"memo"`
	Status    string            `json:"status" bson:"status"`
	Code      uint32            `json:"code" bson:"code"`
	Log       string            `json:"log" bson:"log"`
	Tags      map[string]string `json:"tags" bson:"tags"`
	Msgs      []DocTxMsg        `bson:"msgs"`
}

func (IrisTx) Name

func (d IrisTx) Name() string

func (IrisTx) PkKvPair

func (d IrisTx) PkKvPair() map[string]interface{}

type KVPair

type KVPair = types.KVPair

type Msg added in v1.2.0

type Msg interface {
	Type() string
	BuildMsg(msg interface{})
}

type MsgBeginRedelegate

type MsgBeginRedelegate = stake.MsgBeginRedelegate

type MsgBurn

type MsgBurn = bank.MsgBurn

type MsgDeposit

type MsgDeposit = gov.MsgDeposit

type MsgRequestRand added in v1.2.0

type MsgRequestRand = rand.MsgRequestRand

type MsgSetMemoRegexp added in v1.2.0

type MsgSetMemoRegexp = bank.MsgSetMemoRegexp

type MsgSetWithdrawAddress

type MsgSetWithdrawAddress = dtypes.MsgSetWithdrawAddress

type MsgStakeBeginUnbonding

type MsgStakeBeginUnbonding = stake.MsgBeginUnbonding

type MsgStakeCreate

type MsgStakeCreate = stake.MsgCreateValidator

type MsgStakeDelegate

type MsgStakeDelegate = stake.MsgDelegate

type MsgStakeEdit

type MsgStakeEdit = stake.MsgEditValidator

type MsgSubmitProposal

type MsgSubmitProposal = gov.MsgSubmitProposal

type MsgSubmitSoftwareUpgradeProposal

type MsgSubmitSoftwareUpgradeProposal = gov.MsgSubmitSoftwareUpgradeProposal

type MsgSubmitTaxUsageProposal

type MsgSubmitTaxUsageProposal = gov.MsgSubmitCommunityTaxUsageProposal

type MsgSubmitTokenAdditionProposal added in v1.2.0

type MsgSubmitTokenAdditionProposal = gov.MsgSubmitTokenAdditionProposal

type MsgTransfer

type MsgTransfer = bank.MsgSend

type MsgUnjail

type MsgUnjail = slashing.MsgUnjail

type MsgVote

type MsgVote = gov.MsgVote

type MsgWithdrawDelegatorReward

type MsgWithdrawDelegatorReward = distribution.MsgWithdrawDelegatorReward

type SdkCoins

type SdkCoins = types.Coins

type SyncTask

type SyncTask struct {
	ID             bson.ObjectId `bson:"_id"`
	StartHeight    int64         `bson:"start_height"`     // task start height
	EndHeight      int64         `bson:"end_height"`       // task end height
	CurrentHeight  int64         `bson:"current_height"`   // task current height
	Status         string        `bson:"status"`           // task status
	WorkerId       string        `bson:"worker_id"`        // worker id
	WorkerLogs     []WorkerLog   `bson:"worker_logs"`      // worker logs
	LastUpdateTime int64         `bson:"last_update_time"` // unix timestamp
}

func (SyncTask) GetExecutableTask

func (d SyncTask) GetExecutableTask(maxWorkerSleepTime int64) ([]SyncTask, error)

func (SyncTask) GetMaxBlockHeight

func (d SyncTask) GetMaxBlockHeight() (int64, error)

get max block height in sync task

func (SyncTask) GetTaskById

func (d SyncTask) GetTaskById(id bson.ObjectId) (SyncTask, error)

func (SyncTask) GetTaskByIdAndWorker

func (d SyncTask) GetTaskByIdAndWorker(id bson.ObjectId, worker string) (SyncTask, error)

func (SyncTask) Name

func (d SyncTask) Name() string

func (SyncTask) PkKvPair

func (d SyncTask) PkKvPair() map[string]interface{}

func (SyncTask) QueryAll

func (d SyncTask) QueryAll(status []string, taskType string) ([]SyncTask, error)

query record by status

func (SyncTask) TakeOverTask

func (d SyncTask) TakeOverTask(task SyncTask, workerId string) error

take over a task update status, worker_id, worker_logs and last_update_time

func (SyncTask) UpdateLastUpdateTime

func (d SyncTask) UpdateLastUpdateTime(task SyncTask) error

update task last update time

type WorkerLog

type WorkerLog struct {
	WorkerId  string    `bson:"worker_id"`  // worker id
	BeginTime time.Time `bson:"begin_time"` // time which worker begin handle this task
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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