txpool

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package txpool is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

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) Descriptor() ([]byte, []int)

func (*Dump) GetDump

func (m *Dump) GetDump() map[string]*common.RpcTransaction

func (*Dump) ProtoMessage

func (*Dump) ProtoMessage()

func (*Dump) Reset

func (m *Dump) Reset()

func (*Dump) String

func (m *Dump) String() string

func (*Dump) XXX_DiscardUnknown

func (m *Dump) XXX_DiscardUnknown()

func (*Dump) XXX_Marshal

func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Dump) XXX_Merge

func (m *Dump) XXX_Merge(src proto.Message)

func (*Dump) XXX_Size

func (m *Dump) XXX_Size() int

func (*Dump) XXX_Unmarshal

func (m *Dump) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*NonceTx) GetNonceTx

func (m *NonceTx) GetNonceTx() map[string]*common.RpcTransaction

func (*NonceTx) ProtoMessage

func (*NonceTx) ProtoMessage()

func (*NonceTx) Reset

func (m *NonceTx) Reset()

func (*NonceTx) String

func (m *NonceTx) String() string

func (*NonceTx) XXX_DiscardUnknown

func (m *NonceTx) XXX_DiscardUnknown()

func (*NonceTx) XXX_Marshal

func (m *NonceTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NonceTx) XXX_Merge

func (m *NonceTx) XXX_Merge(src proto.Message)

func (*NonceTx) XXX_Size

func (m *NonceTx) XXX_Size() int

func (*NonceTx) XXX_Unmarshal

func (m *NonceTx) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*TxPool) GetPendingTxPool

func (m *TxPool) GetPendingTxPool() *AccountNonceTxPool

func (*TxPool) GetQueuedTxPool

func (m *TxPool) GetQueuedTxPool() *AccountNonceTxPool

func (*TxPool) ProtoMessage

func (*TxPool) ProtoMessage()

func (*TxPool) Reset

func (m *TxPool) Reset()

func (*TxPool) String

func (m *TxPool) String() string

func (*TxPool) XXX_DiscardUnknown

func (m *TxPool) XXX_DiscardUnknown()

func (*TxPool) XXX_Marshal

func (m *TxPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxPool) XXX_Merge

func (m *TxPool) XXX_Merge(src proto.Message)

func (*TxPool) XXX_Size

func (m *TxPool) XXX_Size() int

func (*TxPool) XXX_Unmarshal

func (m *TxPool) XXX_Unmarshal(b []byte) error

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

Jump to

Keyboard shortcuts

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