Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorType(err error) protos.XuperMessage_ErrorType
- type AsyncMsgHandle
- type Event
- func (e *Event) GetBlock(ctx xctx.XContext, request *protos.XuperMessage) (*lpb.InternalBlock, error)
- func (e *Event) PostTx(ctx xctx.XContext, chain common.Chain, tx *lpb.Transaction) error
- func (e *Event) SendBlock(ctx xctx.XContext, chain common.Chain, in *lpb.InternalBlock) error
- func (e *Event) Start()
- func (e *Event) Stop()
- func (e *Event) Subscriber() error
Constants ¶
View Source
const (
// DefMsgChanBufSize 默认消息队列buf大小
DefMsgChanBufSize = 50000
)
Variables ¶
View Source
var ( // ErrBlockChainNameEmpty is returned when blockchain name is empty ErrBlockChainNameEmpty = errors.New("validation error: validatePostTx TxStatus.Bcname can't be null") // ErrTxNil is returned when tx is nil ErrTxNil = errors.New("validation error: validatePostTx TxStatus.Tx can't be null") // ErrBlockIDNil is returned when blockid is nil ErrBlockIDNil = errors.New("validation error: validateSendBlock Block.Blockid can't be null") // ErrBlockNil is returned when block is nil ErrBlockNil = errors.New("validation error: validateSendBlock Block.Block can't be null") // ErrTxInvalid is returned when tx invaild ErrTxInvalid = errors.New("validation error: tx info is invaild") )
Functions ¶
func ErrorType ¶
func ErrorType(err error) protos.XuperMessage_ErrorType
Types ¶
type AsyncMsgHandle ¶
type AsyncMsgHandle func(xctx.XContext, *protos.XuperMessage)
AsyncMsgHandle 异步消息处理handle类型
Click to show internal directories.
Click to hide internal directories.