Documentation ¶
Index ¶
- Variables
- type ClientOpt
- type FeedPacket
- type FeedType
- type MPS
- type Remote
- func (r *Remote) FeedBlockedTxHash(hashes []common.Hash) error
- func (r *Remote) FeedChainConfig(config *params.ChainConfig) error
- func (r *Remote) FeedNewTx(txsWithSender TxsWithSender) error
- func (r *Remote) FeedResponse(id int, ok bool, msg string) error
- func (r *Remote) RecvLoop() error
- func (r *Remote) Serve(cfg *params.ChainConfig) error
- func (r *Remote) Stop()
- type RequestPacket
- type ResponsePacket
- type Topic
- type TxsWithSender
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnClosed = errors.New("ws conn closed")
Functions ¶
This section is empty.
Types ¶
type FeedPacket ¶
FeedPacket is the packet sent to mps client
type MPS ¶
type MPS struct {
// contains filtered or unexported fields
}
MPS (Message Pushing Service) is designed to be used as a service embedded into go-ethereum.
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
Remote represents one conn instance
func (*Remote) FeedBlockedTxHash ¶
FeedBlockedTxHash relay new blocked tx hash to clients
func (*Remote) FeedChainConfig ¶
func (r *Remote) FeedChainConfig(config *params.ChainConfig) error
func (*Remote) FeedNewTx ¶
func (r *Remote) FeedNewTx(txsWithSender TxsWithSender) error
FeedNewTx relay new tx event to clients
func (*Remote) FeedResponse ¶
FeedResponse respond to client requests
type RequestPacket ¶
type ResponsePacket ¶
type Topic ¶
type Topic string
const ( TopicNewTx Topic = "newTx" TopicBlockedTxHashes = "blockedTxHashes" )
type TxsWithSender ¶
type TxsWithSender struct { Txs types.Transactions `json:"txs"` Senders []*common.Address `json:"senders"` }
TxsWithSender is a wrapper of transactions and their senders, used to send txs packet to mps client
Click to show internal directories.
Click to hide internal directories.