Documentation ¶
Overview ¶
Package queryproto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type QueryClient
- type QueryServer
- type RecoveredSinceDowntimeOfLengthRequest
- func (*RecoveredSinceDowntimeOfLengthRequest) Descriptor() ([]byte, []int)
- func (m *RecoveredSinceDowntimeOfLengthRequest) GetDowntime() types.Downtime
- func (m *RecoveredSinceDowntimeOfLengthRequest) GetRecovery() time.Duration
- func (m *RecoveredSinceDowntimeOfLengthRequest) Marshal() (dAtA []byte, err error)
- func (m *RecoveredSinceDowntimeOfLengthRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *RecoveredSinceDowntimeOfLengthRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RecoveredSinceDowntimeOfLengthRequest) ProtoMessage()
- func (m *RecoveredSinceDowntimeOfLengthRequest) Reset()
- func (m *RecoveredSinceDowntimeOfLengthRequest) Size() (n int)
- func (m *RecoveredSinceDowntimeOfLengthRequest) String() string
- func (m *RecoveredSinceDowntimeOfLengthRequest) Unmarshal(dAtA []byte) error
- func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_DiscardUnknown()
- func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Merge(src proto.Message)
- func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Size() int
- func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Unmarshal(b []byte) error
- type RecoveredSinceDowntimeOfLengthResponse
- func (*RecoveredSinceDowntimeOfLengthResponse) Descriptor() ([]byte, []int)
- func (m *RecoveredSinceDowntimeOfLengthResponse) GetSuccesfullyRecovered() bool
- func (m *RecoveredSinceDowntimeOfLengthResponse) Marshal() (dAtA []byte, err error)
- func (m *RecoveredSinceDowntimeOfLengthResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *RecoveredSinceDowntimeOfLengthResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RecoveredSinceDowntimeOfLengthResponse) ProtoMessage()
- func (m *RecoveredSinceDowntimeOfLengthResponse) Reset()
- func (m *RecoveredSinceDowntimeOfLengthResponse) Size() (n int)
- func (m *RecoveredSinceDowntimeOfLengthResponse) String() string
- func (m *RecoveredSinceDowntimeOfLengthResponse) Unmarshal(dAtA []byte) error
- func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_DiscardUnknown()
- func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Merge(src proto.Message)
- func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Size() int
- func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedQueryServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer 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 RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type QueryClient ¶
type QueryClient interface {
RecoveredSinceDowntimeOfLength(ctx context.Context, in *RecoveredSinceDowntimeOfLengthRequest, opts ...grpc.CallOption) (*RecoveredSinceDowntimeOfLengthResponse, error)
}
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryServer ¶
type QueryServer interface {
RecoveredSinceDowntimeOfLength(context.Context, *RecoveredSinceDowntimeOfLengthRequest) (*RecoveredSinceDowntimeOfLengthResponse, error)
}
QueryServer is the server API for Query service.
type RecoveredSinceDowntimeOfLengthRequest ¶
type RecoveredSinceDowntimeOfLengthRequest struct { Downtime types.Downtime `` /* 134-byte string literal not displayed */ Recovery time.Duration `protobuf:"bytes,2,opt,name=recovery,proto3,stdduration" json:"recovery" yaml:"recovery_duration"` }
Query for has it been at least $RECOVERY_DURATION units of time, since the chain has been down for $DOWNTIME_DURATION.
func (*RecoveredSinceDowntimeOfLengthRequest) Descriptor ¶
func (*RecoveredSinceDowntimeOfLengthRequest) Descriptor() ([]byte, []int)
func (*RecoveredSinceDowntimeOfLengthRequest) GetDowntime ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) GetDowntime() types.Downtime
func (*RecoveredSinceDowntimeOfLengthRequest) GetRecovery ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) GetRecovery() time.Duration
func (*RecoveredSinceDowntimeOfLengthRequest) Marshal ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) Marshal() (dAtA []byte, err error)
func (*RecoveredSinceDowntimeOfLengthRequest) MarshalTo ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) MarshalTo(dAtA []byte) (int, error)
func (*RecoveredSinceDowntimeOfLengthRequest) MarshalToSizedBuffer ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RecoveredSinceDowntimeOfLengthRequest) ProtoMessage ¶
func (*RecoveredSinceDowntimeOfLengthRequest) ProtoMessage()
func (*RecoveredSinceDowntimeOfLengthRequest) Reset ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) Reset()
func (*RecoveredSinceDowntimeOfLengthRequest) Size ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) Size() (n int)
func (*RecoveredSinceDowntimeOfLengthRequest) String ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) String() string
func (*RecoveredSinceDowntimeOfLengthRequest) Unmarshal ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) Unmarshal(dAtA []byte) error
func (*RecoveredSinceDowntimeOfLengthRequest) XXX_DiscardUnknown ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_DiscardUnknown()
func (*RecoveredSinceDowntimeOfLengthRequest) XXX_Marshal ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RecoveredSinceDowntimeOfLengthRequest) XXX_Merge ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Merge(src proto.Message)
func (*RecoveredSinceDowntimeOfLengthRequest) XXX_Size ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Size() int
func (*RecoveredSinceDowntimeOfLengthRequest) XXX_Unmarshal ¶
func (m *RecoveredSinceDowntimeOfLengthRequest) XXX_Unmarshal(b []byte) error
type RecoveredSinceDowntimeOfLengthResponse ¶
type RecoveredSinceDowntimeOfLengthResponse struct {
SuccesfullyRecovered bool `protobuf:"varint,1,opt,name=succesfully_recovered,json=succesfullyRecovered,proto3" json:"succesfully_recovered,omitempty"`
}
func (*RecoveredSinceDowntimeOfLengthResponse) Descriptor ¶
func (*RecoveredSinceDowntimeOfLengthResponse) Descriptor() ([]byte, []int)
func (*RecoveredSinceDowntimeOfLengthResponse) GetSuccesfullyRecovered ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) GetSuccesfullyRecovered() bool
func (*RecoveredSinceDowntimeOfLengthResponse) Marshal ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) Marshal() (dAtA []byte, err error)
func (*RecoveredSinceDowntimeOfLengthResponse) MarshalTo ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) MarshalTo(dAtA []byte) (int, error)
func (*RecoveredSinceDowntimeOfLengthResponse) MarshalToSizedBuffer ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RecoveredSinceDowntimeOfLengthResponse) ProtoMessage ¶
func (*RecoveredSinceDowntimeOfLengthResponse) ProtoMessage()
func (*RecoveredSinceDowntimeOfLengthResponse) Reset ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) Reset()
func (*RecoveredSinceDowntimeOfLengthResponse) Size ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) Size() (n int)
func (*RecoveredSinceDowntimeOfLengthResponse) String ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) String() string
func (*RecoveredSinceDowntimeOfLengthResponse) Unmarshal ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) Unmarshal(dAtA []byte) error
func (*RecoveredSinceDowntimeOfLengthResponse) XXX_DiscardUnknown ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_DiscardUnknown()
func (*RecoveredSinceDowntimeOfLengthResponse) XXX_Marshal ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RecoveredSinceDowntimeOfLengthResponse) XXX_Merge ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Merge(src proto.Message)
func (*RecoveredSinceDowntimeOfLengthResponse) XXX_Size ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Size() int
func (*RecoveredSinceDowntimeOfLengthResponse) XXX_Unmarshal ¶
func (m *RecoveredSinceDowntimeOfLengthResponse) XXX_Unmarshal(b []byte) error
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) RecoveredSinceDowntimeOfLength ¶
func (*UnimplementedQueryServer) RecoveredSinceDowntimeOfLength(ctx context.Context, req *RecoveredSinceDowntimeOfLengthRequest) (*RecoveredSinceDowntimeOfLengthResponse, error)