Documentation ¶
Overview ¶
Package service is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package service is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBeaconChainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBeaconChainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconChainClient) error
- func RegisterBeaconChainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBeaconChainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconChainServer) error
- func RegisterBeaconChainServer(s *grpc.Server, srv BeaconChainServer)
- func RegisterEventsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsClient) error
- func RegisterEventsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServer) error
- func RegisterEventsServer(s *grpc.Server, srv EventsServer)
- type BeaconChainClient
- type BeaconChainServer
- type EventsClient
- type EventsServer
- type Events_StreamEventsClient
- type Events_StreamEventsServer
- type UnimplementedBeaconChainServer
- func (*UnimplementedBeaconChainServer) GetForkSchedule(context.Context, *emptypb.Empty) (*v1.ForkScheduleResponse, error)
- func (*UnimplementedBeaconChainServer) GetSpec(context.Context, *emptypb.Empty) (*v1.SpecResponse, error)
- func (*UnimplementedBeaconChainServer) GetWeakSubjectivity(context.Context, *emptypb.Empty) (*v1.WeakSubjectivityResponse, error)
- func (*UnimplementedBeaconChainServer) ListPoolAttesterSlashings(context.Context, *emptypb.Empty) (*v1.AttesterSlashingsPoolResponse, error)
- func (*UnimplementedBeaconChainServer) ListPoolProposerSlashings(context.Context, *emptypb.Empty) (*v1.ProposerSlashingPoolResponse, error)
- func (*UnimplementedBeaconChainServer) SubmitAttesterSlashing(context.Context, *v1.AttesterSlashing) (*emptypb.Empty, error)
- func (*UnimplementedBeaconChainServer) SubmitProposerSlashing(context.Context, *v1.ProposerSlashing) (*emptypb.Empty, error)
- type UnimplementedEventsServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_eth_service_beacon_chain_service_proto protoreflect.FileDescriptor
var File_proto_eth_service_events_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBeaconChainHandler ¶
func RegisterBeaconChainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBeaconChainHandler registers the http handlers for service BeaconChain to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBeaconChainHandlerClient ¶
func RegisterBeaconChainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconChainClient) error
RegisterBeaconChainHandlerClient registers the http handlers for service BeaconChain to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconChainClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconChainClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BeaconChainClient" to call the correct interceptors.
func RegisterBeaconChainHandlerFromEndpoint ¶
func RegisterBeaconChainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBeaconChainHandlerFromEndpoint is same as RegisterBeaconChainHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBeaconChainHandlerServer ¶
func RegisterBeaconChainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconChainServer) error
RegisterBeaconChainHandlerServer registers the http handlers for service BeaconChain to "mux". UnaryRPC :call BeaconChainServer 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 RegisterBeaconChainHandlerFromEndpoint instead.
func RegisterBeaconChainServer ¶
func RegisterBeaconChainServer(s *grpc.Server, srv BeaconChainServer)
func RegisterEventsHandler ¶
RegisterEventsHandler registers the http handlers for service Events to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventsHandlerClient ¶
func RegisterEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsClient) error
RegisterEventsHandlerClient registers the http handlers for service Events to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventsClient" to call the correct interceptors.
func RegisterEventsHandlerFromEndpoint ¶
func RegisterEventsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventsHandlerFromEndpoint is same as RegisterEventsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventsHandlerServer ¶
func RegisterEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServer) error
RegisterEventsHandlerServer registers the http handlers for service Events to "mux". UnaryRPC :call EventsServer 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 RegisterEventsHandlerFromEndpoint instead.
func RegisterEventsServer ¶
func RegisterEventsServer(s *grpc.Server, srv EventsServer)
Types ¶
type BeaconChainClient ¶
type BeaconChainClient interface { // Deprecated: Do not use. GetWeakSubjectivity(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.WeakSubjectivityResponse, error) ListPoolAttesterSlashings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.AttesterSlashingsPoolResponse, error) SubmitAttesterSlashing(ctx context.Context, in *v1.AttesterSlashing, opts ...grpc.CallOption) (*emptypb.Empty, error) ListPoolProposerSlashings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.ProposerSlashingPoolResponse, error) SubmitProposerSlashing(ctx context.Context, in *v1.ProposerSlashing, opts ...grpc.CallOption) (*emptypb.Empty, error) GetForkSchedule(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.ForkScheduleResponse, error) GetSpec(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.SpecResponse, error) }
BeaconChainClient is the client API for BeaconChain service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBeaconChainClient ¶
func NewBeaconChainClient(cc grpc.ClientConnInterface) BeaconChainClient
type BeaconChainServer ¶
type BeaconChainServer interface { // Deprecated: Do not use. GetWeakSubjectivity(context.Context, *emptypb.Empty) (*v1.WeakSubjectivityResponse, error) ListPoolAttesterSlashings(context.Context, *emptypb.Empty) (*v1.AttesterSlashingsPoolResponse, error) SubmitAttesterSlashing(context.Context, *v1.AttesterSlashing) (*emptypb.Empty, error) ListPoolProposerSlashings(context.Context, *emptypb.Empty) (*v1.ProposerSlashingPoolResponse, error) SubmitProposerSlashing(context.Context, *v1.ProposerSlashing) (*emptypb.Empty, error) GetForkSchedule(context.Context, *emptypb.Empty) (*v1.ForkScheduleResponse, error) GetSpec(context.Context, *emptypb.Empty) (*v1.SpecResponse, error) }
BeaconChainServer is the server API for BeaconChain service.
type EventsClient ¶
type EventsClient interface {
StreamEvents(ctx context.Context, in *v1.StreamEventsRequest, opts ...grpc.CallOption) (Events_StreamEventsClient, error)
}
EventsClient is the client API for Events service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventsClient ¶
func NewEventsClient(cc grpc.ClientConnInterface) EventsClient
type EventsServer ¶
type EventsServer interface {
StreamEvents(*v1.StreamEventsRequest, Events_StreamEventsServer) error
}
EventsServer is the server API for Events service.
type Events_StreamEventsClient ¶
type Events_StreamEventsClient interface { Recv() (*gateway.EventSource, error) grpc.ClientStream }
type Events_StreamEventsServer ¶
type Events_StreamEventsServer interface { Send(*gateway.EventSource) error grpc.ServerStream }
type UnimplementedBeaconChainServer ¶
type UnimplementedBeaconChainServer struct { }
UnimplementedBeaconChainServer can be embedded to have forward compatible implementations.
func (*UnimplementedBeaconChainServer) GetForkSchedule ¶
func (*UnimplementedBeaconChainServer) GetForkSchedule(context.Context, *emptypb.Empty) (*v1.ForkScheduleResponse, error)
func (*UnimplementedBeaconChainServer) GetSpec ¶
func (*UnimplementedBeaconChainServer) GetSpec(context.Context, *emptypb.Empty) (*v1.SpecResponse, error)
func (*UnimplementedBeaconChainServer) GetWeakSubjectivity ¶
func (*UnimplementedBeaconChainServer) GetWeakSubjectivity(context.Context, *emptypb.Empty) (*v1.WeakSubjectivityResponse, error)
func (*UnimplementedBeaconChainServer) ListPoolAttesterSlashings ¶
func (*UnimplementedBeaconChainServer) ListPoolAttesterSlashings(context.Context, *emptypb.Empty) (*v1.AttesterSlashingsPoolResponse, error)
func (*UnimplementedBeaconChainServer) ListPoolProposerSlashings ¶
func (*UnimplementedBeaconChainServer) ListPoolProposerSlashings(context.Context, *emptypb.Empty) (*v1.ProposerSlashingPoolResponse, error)
func (*UnimplementedBeaconChainServer) SubmitAttesterSlashing ¶
func (*UnimplementedBeaconChainServer) SubmitAttesterSlashing(context.Context, *v1.AttesterSlashing) (*emptypb.Empty, error)
func (*UnimplementedBeaconChainServer) SubmitProposerSlashing ¶
func (*UnimplementedBeaconChainServer) SubmitProposerSlashing(context.Context, *v1.ProposerSlashing) (*emptypb.Empty, error)
type UnimplementedEventsServer ¶
type UnimplementedEventsServer struct { }
UnimplementedEventsServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventsServer) StreamEvents ¶
func (*UnimplementedEventsServer) StreamEvents(*v1.StreamEventsRequest, Events_StreamEventsServer) error