Documentation
¶
Overview ¶
Package txpool is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterTxPoolReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTxPoolReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TxPoolReaderClient) error
- func RegisterTxPoolReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTxPoolReaderServer(s *grpc.Server, srv TxPoolReaderServer)
- type AccountNonceTxPool
- func (*AccountNonceTxPool) Descriptor() ([]byte, []int)
- func (m *AccountNonceTxPool) GetAccountNonceTxPool() map[string]*NonceTx
- func (*AccountNonceTxPool) ProtoMessage()
- func (m *AccountNonceTxPool) Reset()
- func (m *AccountNonceTxPool) String() string
- func (m *AccountNonceTxPool) XXX_DiscardUnknown()
- func (m *AccountNonceTxPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountNonceTxPool) XXX_Merge(src proto.Message)
- func (m *AccountNonceTxPool) XXX_Size() int
- func (m *AccountNonceTxPool) XXX_Unmarshal(b []byte) error
- type AccountNonceTxStringPool
- func (*AccountNonceTxStringPool) Descriptor() ([]byte, []int)
- func (m *AccountNonceTxStringPool) GetAccountNonceTxStringPool() map[string]*NonceTxString
- func (*AccountNonceTxStringPool) ProtoMessage()
- func (m *AccountNonceTxStringPool) Reset()
- func (m *AccountNonceTxStringPool) String() string
- func (m *AccountNonceTxStringPool) XXX_DiscardUnknown()
- func (m *AccountNonceTxStringPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountNonceTxStringPool) XXX_Merge(src proto.Message)
- func (m *AccountNonceTxStringPool) XXX_Size() int
- func (m *AccountNonceTxStringPool) XXX_Unmarshal(b []byte) error
- type Dump
- func (*Dump) Descriptor() ([]byte, []int)
- func (m *Dump) GetDump() map[string]*common.RpcTransaction
- func (*Dump) ProtoMessage()
- func (m *Dump) Reset()
- func (m *Dump) String() string
- func (m *Dump) XXX_DiscardUnknown()
- func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Dump) XXX_Merge(src proto.Message)
- func (m *Dump) XXX_Size() int
- func (m *Dump) XXX_Unmarshal(b []byte) error
- type NonceTx
- func (*NonceTx) Descriptor() ([]byte, []int)
- func (m *NonceTx) GetNonceTx() map[string]*common.RpcTransaction
- func (*NonceTx) ProtoMessage()
- func (m *NonceTx) Reset()
- func (m *NonceTx) String() string
- func (m *NonceTx) XXX_DiscardUnknown()
- func (m *NonceTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NonceTx) XXX_Merge(src proto.Message)
- func (m *NonceTx) XXX_Size() int
- func (m *NonceTx) XXX_Unmarshal(b []byte) error
- type NonceTxString
- func (*NonceTxString) Descriptor() ([]byte, []int)
- func (m *NonceTxString) GetTxString() map[string]string
- func (*NonceTxString) ProtoMessage()
- func (m *NonceTxString) Reset()
- func (m *NonceTxString) String() string
- func (m *NonceTxString) XXX_DiscardUnknown()
- func (m *NonceTxString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NonceTxString) XXX_Merge(src proto.Message)
- func (m *NonceTxString) XXX_Size() int
- func (m *NonceTxString) XXX_Unmarshal(b []byte) error
- type StatusInfo
- func (*StatusInfo) Descriptor() ([]byte, []int)
- func (m *StatusInfo) GetStatus() map[string]uint64
- func (*StatusInfo) ProtoMessage()
- func (m *StatusInfo) Reset()
- func (m *StatusInfo) String() string
- func (m *StatusInfo) XXX_DiscardUnknown()
- func (m *StatusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatusInfo) XXX_Merge(src proto.Message)
- func (m *StatusInfo) XXX_Size() int
- func (m *StatusInfo) XXX_Unmarshal(b []byte) error
- type TxPool
- func (*TxPool) Descriptor() ([]byte, []int)
- func (m *TxPool) GetPendingTxPool() *AccountNonceTxPool
- func (m *TxPool) GetQueuedTxPool() *AccountNonceTxPool
- func (*TxPool) ProtoMessage()
- func (m *TxPool) Reset()
- func (m *TxPool) String() string
- func (m *TxPool) XXX_DiscardUnknown()
- func (m *TxPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxPool) XXX_Merge(src proto.Message)
- func (m *TxPool) XXX_Size() int
- func (m *TxPool) XXX_Unmarshal(b []byte) error
- type TxPoolReaderClient
- type TxPoolReaderServer
- type TxStringPool
- func (*TxStringPool) Descriptor() ([]byte, []int)
- func (m *TxStringPool) GetPendingTxStringPool() *AccountNonceTxStringPool
- func (m *TxStringPool) GetQueuedTxStringPool() *AccountNonceTxStringPool
- func (*TxStringPool) ProtoMessage()
- func (m *TxStringPool) Reset()
- func (m *TxStringPool) String() string
- func (m *TxStringPool) XXX_DiscardUnknown()
- func (m *TxStringPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxStringPool) XXX_Merge(src proto.Message)
- func (m *TxStringPool) XXX_Size() int
- func (m *TxStringPool) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTxPoolReaderHandler ¶
func RegisterTxPoolReaderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTxPoolReaderHandler registers the http handlers for service TxPoolReader to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTxPoolReaderHandlerClient ¶
func RegisterTxPoolReaderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TxPoolReaderClient) error
RegisterTxPoolReaderHandlerClient registers the http handlers for service TxPoolReader to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TxPoolReaderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TxPoolReaderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TxPoolReaderClient" to call the correct interceptors.
func RegisterTxPoolReaderHandlerFromEndpoint ¶
func RegisterTxPoolReaderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTxPoolReaderHandlerFromEndpoint is same as RegisterTxPoolReaderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTxPoolReaderServer ¶
func RegisterTxPoolReaderServer(s *grpc.Server, srv TxPoolReaderServer)
Types ¶
type AccountNonceTxPool ¶
type AccountNonceTxPool struct {
AccountNonceTxPool map[string]*NonceTx `` /* 177-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
account -> NonceTxPool
func (*AccountNonceTxPool) Descriptor ¶
func (*AccountNonceTxPool) Descriptor() ([]byte, []int)
func (*AccountNonceTxPool) GetAccountNonceTxPool ¶
func (m *AccountNonceTxPool) GetAccountNonceTxPool() map[string]*NonceTx
func (*AccountNonceTxPool) ProtoMessage ¶
func (*AccountNonceTxPool) ProtoMessage()
func (*AccountNonceTxPool) Reset ¶
func (m *AccountNonceTxPool) Reset()
func (*AccountNonceTxPool) String ¶
func (m *AccountNonceTxPool) String() string
func (*AccountNonceTxPool) XXX_DiscardUnknown ¶
func (m *AccountNonceTxPool) XXX_DiscardUnknown()
func (*AccountNonceTxPool) XXX_Marshal ¶
func (m *AccountNonceTxPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountNonceTxPool) XXX_Merge ¶
func (m *AccountNonceTxPool) XXX_Merge(src proto.Message)
func (*AccountNonceTxPool) XXX_Size ¶
func (m *AccountNonceTxPool) XXX_Size() int
func (*AccountNonceTxPool) XXX_Unmarshal ¶
func (m *AccountNonceTxPool) XXX_Unmarshal(b []byte) error
type AccountNonceTxStringPool ¶
type AccountNonceTxStringPool struct {
AccountNonceTxStringPool map[string]*NonceTxString `` /* 189-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*AccountNonceTxStringPool) Descriptor ¶
func (*AccountNonceTxStringPool) Descriptor() ([]byte, []int)
func (*AccountNonceTxStringPool) GetAccountNonceTxStringPool ¶
func (m *AccountNonceTxStringPool) GetAccountNonceTxStringPool() map[string]*NonceTxString
func (*AccountNonceTxStringPool) ProtoMessage ¶
func (*AccountNonceTxStringPool) ProtoMessage()
func (*AccountNonceTxStringPool) Reset ¶
func (m *AccountNonceTxStringPool) Reset()
func (*AccountNonceTxStringPool) String ¶
func (m *AccountNonceTxStringPool) String() string
func (*AccountNonceTxStringPool) XXX_DiscardUnknown ¶
func (m *AccountNonceTxStringPool) XXX_DiscardUnknown()
func (*AccountNonceTxStringPool) XXX_Marshal ¶
func (m *AccountNonceTxStringPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountNonceTxStringPool) XXX_Merge ¶
func (m *AccountNonceTxStringPool) XXX_Merge(src proto.Message)
func (*AccountNonceTxStringPool) XXX_Size ¶
func (m *AccountNonceTxStringPool) XXX_Size() int
func (*AccountNonceTxStringPool) XXX_Unmarshal ¶
func (m *AccountNonceTxStringPool) XXX_Unmarshal(b []byte) error
type Dump ¶
type Dump struct {
Dump map[string]*common.RpcTransaction `` /* 149-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Dump) Descriptor ¶
func (*Dump) ProtoMessage ¶
func (*Dump) ProtoMessage()
func (*Dump) XXX_DiscardUnknown ¶
func (m *Dump) XXX_DiscardUnknown()
func (*Dump) XXX_Unmarshal ¶
type NonceTx ¶
type NonceTx struct {
NonceTx map[string]*common.RpcTransaction `` /* 155-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
NonceTxPool nonce -> Txs
func (*NonceTx) Descriptor ¶
func (*NonceTx) GetNonceTx ¶
func (m *NonceTx) GetNonceTx() map[string]*common.RpcTransaction
func (*NonceTx) ProtoMessage ¶
func (*NonceTx) ProtoMessage()
func (*NonceTx) XXX_DiscardUnknown ¶
func (m *NonceTx) XXX_DiscardUnknown()
func (*NonceTx) XXX_Marshal ¶
func (*NonceTx) XXX_Unmarshal ¶
type NonceTxString ¶
type NonceTxString struct {
TxString map[string]string `` /* 157-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*NonceTxString) Descriptor ¶
func (*NonceTxString) Descriptor() ([]byte, []int)
func (*NonceTxString) GetTxString ¶
func (m *NonceTxString) GetTxString() map[string]string
func (*NonceTxString) ProtoMessage ¶
func (*NonceTxString) ProtoMessage()
func (*NonceTxString) Reset ¶
func (m *NonceTxString) Reset()
func (*NonceTxString) String ¶
func (m *NonceTxString) String() string
func (*NonceTxString) XXX_DiscardUnknown ¶
func (m *NonceTxString) XXX_DiscardUnknown()
func (*NonceTxString) XXX_Marshal ¶
func (m *NonceTxString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NonceTxString) XXX_Merge ¶
func (m *NonceTxString) XXX_Merge(src proto.Message)
func (*NonceTxString) XXX_Size ¶
func (m *NonceTxString) XXX_Size() int
func (*NonceTxString) XXX_Unmarshal ¶
func (m *NonceTxString) XXX_Unmarshal(b []byte) error
type StatusInfo ¶
type StatusInfo struct {
Status map[string]uint64 `` /* 154-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*StatusInfo) Descriptor ¶
func (*StatusInfo) Descriptor() ([]byte, []int)
func (*StatusInfo) GetStatus ¶
func (m *StatusInfo) GetStatus() map[string]uint64
func (*StatusInfo) ProtoMessage ¶
func (*StatusInfo) ProtoMessage()
func (*StatusInfo) Reset ¶
func (m *StatusInfo) Reset()
func (*StatusInfo) String ¶
func (m *StatusInfo) String() string
func (*StatusInfo) XXX_DiscardUnknown ¶
func (m *StatusInfo) XXX_DiscardUnknown()
func (*StatusInfo) XXX_Marshal ¶
func (m *StatusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatusInfo) XXX_Merge ¶
func (m *StatusInfo) XXX_Merge(src proto.Message)
func (*StatusInfo) XXX_Size ¶
func (m *StatusInfo) XXX_Size() int
func (*StatusInfo) XXX_Unmarshal ¶
func (m *StatusInfo) XXX_Unmarshal(b []byte) error
type TxPool ¶
type TxPool struct {
// map<string,Accounts> txPool = 1;
PendingTxPool *AccountNonceTxPool `protobuf:"bytes,1,opt,name=pendingTxPool,proto3" json:"pendingTxPool,omitempty"`
QueuedTxPool *AccountNonceTxPool `protobuf:"bytes,2,opt,name=queuedTxPool,proto3" json:"queuedTxPool,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*TxPool) Descriptor ¶
func (*TxPool) GetPendingTxPool ¶
func (m *TxPool) GetPendingTxPool() *AccountNonceTxPool
func (*TxPool) GetQueuedTxPool ¶
func (m *TxPool) GetQueuedTxPool() *AccountNonceTxPool
func (*TxPool) ProtoMessage ¶
func (*TxPool) ProtoMessage()
func (*TxPool) XXX_DiscardUnknown ¶
func (m *TxPool) XXX_DiscardUnknown()
func (*TxPool) XXX_Marshal ¶
func (*TxPool) XXX_Unmarshal ¶
type TxPoolReaderClient ¶
type TxPoolReaderClient interface {
Content(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TxPool, error)
// Status returns the number of pending and queued transaction in the pool.
Status(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*StatusInfo, error)
// inspect retrieves the content of the transaction pool and flattens it into an
// easily inspectable list.
Inspect(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TxStringPool, error)
}
TxPoolReaderClient is the client API for TxPoolReader service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTxPoolReaderClient ¶
func NewTxPoolReaderClient(cc *grpc.ClientConn) TxPoolReaderClient
type TxPoolReaderServer ¶
type TxPoolReaderServer interface {
Content(context.Context, *empty.Empty) (*TxPool, error)
// Status returns the number of pending and queued transaction in the pool.
Status(context.Context, *empty.Empty) (*StatusInfo, error)
// inspect retrieves the content of the transaction pool and flattens it into an
// easily inspectable list.
Inspect(context.Context, *empty.Empty) (*TxStringPool, error)
}
TxPoolReaderServer is the server API for TxPoolReader service.
type TxStringPool ¶
type TxStringPool struct {
PendingTxStringPool *AccountNonceTxStringPool `protobuf:"bytes,1,opt,name=pendingTxStringPool,proto3" json:"pendingTxStringPool,omitempty"`
QueuedTxStringPool *AccountNonceTxStringPool `protobuf:"bytes,2,opt,name=queuedTxStringPool,proto3" json:"queuedTxStringPool,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*TxStringPool) Descriptor ¶
func (*TxStringPool) Descriptor() ([]byte, []int)
func (*TxStringPool) GetPendingTxStringPool ¶
func (m *TxStringPool) GetPendingTxStringPool() *AccountNonceTxStringPool
func (*TxStringPool) GetQueuedTxStringPool ¶
func (m *TxStringPool) GetQueuedTxStringPool() *AccountNonceTxStringPool
func (*TxStringPool) ProtoMessage ¶
func (*TxStringPool) ProtoMessage()
func (*TxStringPool) Reset ¶
func (m *TxStringPool) Reset()
func (*TxStringPool) String ¶
func (m *TxStringPool) String() string
func (*TxStringPool) XXX_DiscardUnknown ¶
func (m *TxStringPool) XXX_DiscardUnknown()
func (*TxStringPool) XXX_Marshal ¶
func (m *TxStringPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxStringPool) XXX_Merge ¶
func (m *TxStringPool) XXX_Merge(src proto.Message)
func (*TxStringPool) XXX_Size ¶
func (m *TxStringPool) XXX_Size() int
func (*TxStringPool) XXX_Unmarshal ¶
func (m *TxStringPool) XXX_Unmarshal(b []byte) error