iris

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 12 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 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 Delegation

type Delegation = stake.Delegation

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"`
	Tags      map[string]string `json:"tags" bson:"tags"`
}

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 MsgBeginRedelegate

type MsgBeginRedelegate = stake.MsgBeginRedelegate

type MsgBurn

type MsgBurn = bank.MsgBurn

type MsgDeposit

type MsgDeposit = gov.MsgDeposit

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.MsgSubmitTxTaxUsageProposal

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 Proposal

type Proposal = gov.Proposal

type SdkCoins

type SdkCoins = types.Coins

type SdkVote

type SdkVote = gov.Vote

type StakeValidator

type StakeValidator = stake.Validator

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 UnbondingDelegation

type UnbondingDelegation = stake.UnbondingDelegation

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
}

Jump to

Keyboard shortcuts

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