service

package
v4.0.0-...-ae7b6de Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: GPL-3.0, Apache-2.0 Imports: 20 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var File_proto_eth_service_beacon_chain_service_proto protoreflect.FileDescriptor
View Source
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

func RegisterEventsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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.

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) GetSpec

func (*UnimplementedBeaconChainServer) GetWeakSubjectivity

func (*UnimplementedBeaconChainServer) ListPoolAttesterSlashings

func (*UnimplementedBeaconChainServer) ListPoolProposerSlashings

func (*UnimplementedBeaconChainServer) SubmitAttesterSlashing

func (*UnimplementedBeaconChainServer) SubmitProposerSlashing

type UnimplementedEventsServer

type UnimplementedEventsServer struct {
}

UnimplementedEventsServer can be embedded to have forward compatible implementations.

func (*UnimplementedEventsServer) StreamEvents

Jump to

Keyboard shortcuts

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