Documentation ¶
Overview ¶
Package node is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux)
- func RegisterNodeService(clientCtx client.Context, server gogogrpc.Server)
- func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error
- func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error
- func RegisterServiceServer(s grpc1.Server, srv ServiceServer)
- type QueryChainIDRequest
- func (*QueryChainIDRequest) Descriptor() ([]byte, []int)
- func (m *QueryChainIDRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryChainIDRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryChainIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryChainIDRequest) ProtoMessage()
- func (m *QueryChainIDRequest) Reset()
- func (m *QueryChainIDRequest) Size() (n int)
- func (m *QueryChainIDRequest) String() string
- func (m *QueryChainIDRequest) Unmarshal(dAtA []byte) error
- func (m *QueryChainIDRequest) XXX_DiscardUnknown()
- func (m *QueryChainIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryChainIDRequest) XXX_Merge(src proto.Message)
- func (m *QueryChainIDRequest) XXX_Size() int
- func (m *QueryChainIDRequest) XXX_Unmarshal(b []byte) error
- type QueryChainIDResponse
- func (*QueryChainIDResponse) Descriptor() ([]byte, []int)
- func (m *QueryChainIDResponse) GetChainID() string
- func (m *QueryChainIDResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryChainIDResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryChainIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryChainIDResponse) ProtoMessage()
- func (m *QueryChainIDResponse) Reset()
- func (m *QueryChainIDResponse) Size() (n int)
- func (m *QueryChainIDResponse) String() string
- func (m *QueryChainIDResponse) Unmarshal(dAtA []byte) error
- func (m *QueryChainIDResponse) XXX_DiscardUnknown()
- func (m *QueryChainIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryChainIDResponse) XXX_Merge(src proto.Message)
- func (m *QueryChainIDResponse) XXX_Size() int
- func (m *QueryChainIDResponse) XXX_Unmarshal(b []byte) error
- type QueryEVMValidatorsRequest
- func (*QueryEVMValidatorsRequest) Descriptor() ([]byte, []int)
- func (m *QueryEVMValidatorsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryEVMValidatorsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEVMValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEVMValidatorsRequest) ProtoMessage()
- func (m *QueryEVMValidatorsRequest) Reset()
- func (m *QueryEVMValidatorsRequest) Size() (n int)
- func (m *QueryEVMValidatorsRequest) String() string
- func (m *QueryEVMValidatorsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryEVMValidatorsRequest) XXX_DiscardUnknown()
- func (m *QueryEVMValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEVMValidatorsRequest) XXX_Merge(src proto.Message)
- func (m *QueryEVMValidatorsRequest) XXX_Size() int
- func (m *QueryEVMValidatorsRequest) XXX_Unmarshal(b []byte) error
- type QueryEVMValidatorsResponse
- func (*QueryEVMValidatorsResponse) Descriptor() ([]byte, []int)
- func (m *QueryEVMValidatorsResponse) GetBlockHeight() int64
- func (m *QueryEVMValidatorsResponse) GetValidators() []ValidatorMinimal
- func (m *QueryEVMValidatorsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryEVMValidatorsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEVMValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEVMValidatorsResponse) ProtoMessage()
- func (m *QueryEVMValidatorsResponse) Reset()
- func (m *QueryEVMValidatorsResponse) Size() (n int)
- func (m *QueryEVMValidatorsResponse) String() string
- func (m *QueryEVMValidatorsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryEVMValidatorsResponse) XXX_DiscardUnknown()
- func (m *QueryEVMValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEVMValidatorsResponse) XXX_Merge(src proto.Message)
- func (m *QueryEVMValidatorsResponse) XXX_Size() int
- func (m *QueryEVMValidatorsResponse) XXX_Unmarshal(b []byte) error
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type ValidatorMinimal
- func (*ValidatorMinimal) Descriptor() ([]byte, []int)
- func (m *ValidatorMinimal) GetAddress() string
- func (m *ValidatorMinimal) GetVotingPower() int64
- func (m *ValidatorMinimal) Marshal() (dAtA []byte, err error)
- func (m *ValidatorMinimal) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorMinimal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorMinimal) ProtoMessage()
- func (m *ValidatorMinimal) Reset()
- func (m *ValidatorMinimal) Size() (n int)
- func (m *ValidatorMinimal) String() string
- func (m *ValidatorMinimal) Unmarshal(dAtA []byte) error
- func (m *ValidatorMinimal) XXX_DiscardUnknown()
- func (m *ValidatorMinimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorMinimal) XXX_Merge(src proto.Message)
- func (m *ValidatorMinimal) XXX_Size() int
- func (m *ValidatorMinimal) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterGRPCGatewayRoutes ¶
func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux)
RegisterGRPCGatewayRoutes mounts the node gRPC service's GRPC-gateway routes on the given mux object.
func RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the provided gRPC router.
func RegisterServiceHandler ¶
func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterServiceHandler registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterServiceHandlerClient ¶
func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error
RegisterServiceHandlerClient registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServiceClient" to call the correct interceptors.
func RegisterServiceHandlerFromEndpoint ¶
func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterServiceHandlerServer ¶
func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error
RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead.
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc1.Server, srv ServiceServer)
Types ¶
type QueryChainIDRequest ¶
type QueryChainIDRequest struct { }
QueryChainIDRequest is request type for the Service/ChainID RPC method.
func (*QueryChainIDRequest) Descriptor ¶
func (*QueryChainIDRequest) Descriptor() ([]byte, []int)
func (*QueryChainIDRequest) Marshal ¶
func (m *QueryChainIDRequest) Marshal() (dAtA []byte, err error)
func (*QueryChainIDRequest) MarshalTo ¶
func (m *QueryChainIDRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryChainIDRequest) MarshalToSizedBuffer ¶
func (m *QueryChainIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryChainIDRequest) ProtoMessage ¶
func (*QueryChainIDRequest) ProtoMessage()
func (*QueryChainIDRequest) Reset ¶
func (m *QueryChainIDRequest) Reset()
func (*QueryChainIDRequest) Size ¶
func (m *QueryChainIDRequest) Size() (n int)
func (*QueryChainIDRequest) String ¶
func (m *QueryChainIDRequest) String() string
func (*QueryChainIDRequest) Unmarshal ¶
func (m *QueryChainIDRequest) Unmarshal(dAtA []byte) error
func (*QueryChainIDRequest) XXX_DiscardUnknown ¶
func (m *QueryChainIDRequest) XXX_DiscardUnknown()
func (*QueryChainIDRequest) XXX_Marshal ¶
func (m *QueryChainIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryChainIDRequest) XXX_Merge ¶
func (m *QueryChainIDRequest) XXX_Merge(src proto.Message)
func (*QueryChainIDRequest) XXX_Size ¶
func (m *QueryChainIDRequest) XXX_Size() int
func (*QueryChainIDRequest) XXX_Unmarshal ¶
func (m *QueryChainIDRequest) XXX_Unmarshal(b []byte) error
type QueryChainIDResponse ¶
type QueryChainIDResponse struct {
ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
}
QueryChainIDResponse is response type for the Service/ChainID RPC method.
func (*QueryChainIDResponse) Descriptor ¶
func (*QueryChainIDResponse) Descriptor() ([]byte, []int)
func (*QueryChainIDResponse) GetChainID ¶
func (m *QueryChainIDResponse) GetChainID() string
func (*QueryChainIDResponse) Marshal ¶
func (m *QueryChainIDResponse) Marshal() (dAtA []byte, err error)
func (*QueryChainIDResponse) MarshalTo ¶
func (m *QueryChainIDResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryChainIDResponse) MarshalToSizedBuffer ¶
func (m *QueryChainIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryChainIDResponse) ProtoMessage ¶
func (*QueryChainIDResponse) ProtoMessage()
func (*QueryChainIDResponse) Reset ¶
func (m *QueryChainIDResponse) Reset()
func (*QueryChainIDResponse) Size ¶
func (m *QueryChainIDResponse) Size() (n int)
func (*QueryChainIDResponse) String ¶
func (m *QueryChainIDResponse) String() string
func (*QueryChainIDResponse) Unmarshal ¶
func (m *QueryChainIDResponse) Unmarshal(dAtA []byte) error
func (*QueryChainIDResponse) XXX_DiscardUnknown ¶
func (m *QueryChainIDResponse) XXX_DiscardUnknown()
func (*QueryChainIDResponse) XXX_Marshal ¶
func (m *QueryChainIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryChainIDResponse) XXX_Merge ¶
func (m *QueryChainIDResponse) XXX_Merge(src proto.Message)
func (*QueryChainIDResponse) XXX_Size ¶
func (m *QueryChainIDResponse) XXX_Size() int
func (*QueryChainIDResponse) XXX_Unmarshal ¶
func (m *QueryChainIDResponse) XXX_Unmarshal(b []byte) error
type QueryEVMValidatorsRequest ¶
type QueryEVMValidatorsRequest struct { }
QueryEVMValidatorsRequest is request type for the Service/EVMValidators RPC method.
func (*QueryEVMValidatorsRequest) Descriptor ¶
func (*QueryEVMValidatorsRequest) Descriptor() ([]byte, []int)
func (*QueryEVMValidatorsRequest) Marshal ¶
func (m *QueryEVMValidatorsRequest) Marshal() (dAtA []byte, err error)
func (*QueryEVMValidatorsRequest) MarshalTo ¶
func (m *QueryEVMValidatorsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryEVMValidatorsRequest) MarshalToSizedBuffer ¶
func (m *QueryEVMValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEVMValidatorsRequest) ProtoMessage ¶
func (*QueryEVMValidatorsRequest) ProtoMessage()
func (*QueryEVMValidatorsRequest) Reset ¶
func (m *QueryEVMValidatorsRequest) Reset()
func (*QueryEVMValidatorsRequest) Size ¶
func (m *QueryEVMValidatorsRequest) Size() (n int)
func (*QueryEVMValidatorsRequest) String ¶
func (m *QueryEVMValidatorsRequest) String() string
func (*QueryEVMValidatorsRequest) Unmarshal ¶
func (m *QueryEVMValidatorsRequest) Unmarshal(dAtA []byte) error
func (*QueryEVMValidatorsRequest) XXX_DiscardUnknown ¶
func (m *QueryEVMValidatorsRequest) XXX_DiscardUnknown()
func (*QueryEVMValidatorsRequest) XXX_Marshal ¶
func (m *QueryEVMValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEVMValidatorsRequest) XXX_Merge ¶
func (m *QueryEVMValidatorsRequest) XXX_Merge(src proto.Message)
func (*QueryEVMValidatorsRequest) XXX_Size ¶
func (m *QueryEVMValidatorsRequest) XXX_Size() int
func (*QueryEVMValidatorsRequest) XXX_Unmarshal ¶
func (m *QueryEVMValidatorsRequest) XXX_Unmarshal(b []byte) error
type QueryEVMValidatorsResponse ¶
type QueryEVMValidatorsResponse struct { // BlockHeight is the latest block height BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Validators is list of validator's addresss and voting power Validators []ValidatorMinimal `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"` }
QueryEVMValidatorsResponse is response type for the Service/EVMValidators RPC method.
func (*QueryEVMValidatorsResponse) Descriptor ¶
func (*QueryEVMValidatorsResponse) Descriptor() ([]byte, []int)
func (*QueryEVMValidatorsResponse) GetBlockHeight ¶
func (m *QueryEVMValidatorsResponse) GetBlockHeight() int64
func (*QueryEVMValidatorsResponse) GetValidators ¶
func (m *QueryEVMValidatorsResponse) GetValidators() []ValidatorMinimal
func (*QueryEVMValidatorsResponse) Marshal ¶
func (m *QueryEVMValidatorsResponse) Marshal() (dAtA []byte, err error)
func (*QueryEVMValidatorsResponse) MarshalTo ¶
func (m *QueryEVMValidatorsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryEVMValidatorsResponse) MarshalToSizedBuffer ¶
func (m *QueryEVMValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEVMValidatorsResponse) ProtoMessage ¶
func (*QueryEVMValidatorsResponse) ProtoMessage()
func (*QueryEVMValidatorsResponse) Reset ¶
func (m *QueryEVMValidatorsResponse) Reset()
func (*QueryEVMValidatorsResponse) Size ¶
func (m *QueryEVMValidatorsResponse) Size() (n int)
func (*QueryEVMValidatorsResponse) String ¶
func (m *QueryEVMValidatorsResponse) String() string
func (*QueryEVMValidatorsResponse) Unmarshal ¶
func (m *QueryEVMValidatorsResponse) Unmarshal(dAtA []byte) error
func (*QueryEVMValidatorsResponse) XXX_DiscardUnknown ¶
func (m *QueryEVMValidatorsResponse) XXX_DiscardUnknown()
func (*QueryEVMValidatorsResponse) XXX_Marshal ¶
func (m *QueryEVMValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEVMValidatorsResponse) XXX_Merge ¶
func (m *QueryEVMValidatorsResponse) XXX_Merge(src proto.Message)
func (*QueryEVMValidatorsResponse) XXX_Size ¶
func (m *QueryEVMValidatorsResponse) XXX_Size() int
func (*QueryEVMValidatorsResponse) XXX_Unmarshal ¶
func (m *QueryEVMValidatorsResponse) XXX_Unmarshal(b []byte) error
type ServiceClient ¶
type ServiceClient interface { // ChainID queries the chain ID of this node ChainID(ctx context.Context, in *QueryChainIDRequest, opts ...grpc.CallOption) (*QueryChainIDResponse, error) // EVMValidators queries current list of validator's address and power EVMValidators(ctx context.Context, in *QueryEVMValidatorsRequest, opts ...grpc.CallOption) (*QueryEVMValidatorsResponse, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc1.ClientConn) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // ChainID queries the chain ID of this node ChainID(context.Context, *QueryChainIDRequest) (*QueryChainIDResponse, error) // EVMValidators queries current list of validator's address and power EVMValidators(context.Context, *QueryEVMValidatorsRequest) (*QueryEVMValidatorsResponse, error) }
ServiceServer is the server API for Service service.
func NewQueryServer ¶
func NewQueryServer(clientCtx client.Context) ServiceServer
NewQueryServer returns new queryServer from provided client.Context
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) ChainID ¶
func (*UnimplementedServiceServer) ChainID(ctx context.Context, req *QueryChainIDRequest) (*QueryChainIDResponse, error)
func (*UnimplementedServiceServer) EVMValidators ¶
func (*UnimplementedServiceServer) EVMValidators(ctx context.Context, req *QueryEVMValidatorsRequest) (*QueryEVMValidatorsResponse, error)
type ValidatorMinimal ¶
type ValidatorMinimal struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` VotingPower int64 `protobuf:"varint,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` }
ValidatorMinimal is the data structure for storing validator's address and voting power
func (*ValidatorMinimal) Descriptor ¶
func (*ValidatorMinimal) Descriptor() ([]byte, []int)
func (*ValidatorMinimal) GetAddress ¶
func (m *ValidatorMinimal) GetAddress() string
func (*ValidatorMinimal) GetVotingPower ¶
func (m *ValidatorMinimal) GetVotingPower() int64
func (*ValidatorMinimal) Marshal ¶
func (m *ValidatorMinimal) Marshal() (dAtA []byte, err error)
func (*ValidatorMinimal) MarshalToSizedBuffer ¶
func (m *ValidatorMinimal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorMinimal) ProtoMessage ¶
func (*ValidatorMinimal) ProtoMessage()
func (*ValidatorMinimal) Reset ¶
func (m *ValidatorMinimal) Reset()
func (*ValidatorMinimal) Size ¶
func (m *ValidatorMinimal) Size() (n int)
func (*ValidatorMinimal) String ¶
func (m *ValidatorMinimal) String() string
func (*ValidatorMinimal) Unmarshal ¶
func (m *ValidatorMinimal) Unmarshal(dAtA []byte) error
func (*ValidatorMinimal) XXX_DiscardUnknown ¶
func (m *ValidatorMinimal) XXX_DiscardUnknown()
func (*ValidatorMinimal) XXX_Marshal ¶
func (m *ValidatorMinimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorMinimal) XXX_Merge ¶
func (m *ValidatorMinimal) XXX_Merge(src proto.Message)
func (*ValidatorMinimal) XXX_Size ¶
func (m *ValidatorMinimal) XXX_Size() int
func (*ValidatorMinimal) XXX_Unmarshal ¶
func (m *ValidatorMinimal) XXX_Unmarshal(b []byte) error