Documentation
¶
Index ¶
- func NewServiceHandler(store store.Store, peerManager p2p.P2PRPC, logger logging.EventLogger) (http.Handler, error)
- func RegisterCustomHTTPEndpoints(mux *http.ServeMux)
- type HealthServer
- type P2PServer
- type StoreServer
- func (s *StoreServer) GetBlock(ctx context.Context, req *connect.Request[pb.GetBlockRequest]) (*connect.Response[pb.GetBlockResponse], error)
- func (s *StoreServer) GetMetadata(ctx context.Context, req *connect.Request[pb.GetMetadataRequest]) (*connect.Response[pb.GetMetadataResponse], error)
- func (s *StoreServer) GetState(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetStateResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServiceHandler ¶
func NewServiceHandler(store store.Store, peerManager p2p.P2PRPC, logger logging.EventLogger) (http.Handler, error)
NewServiceHandler creates a new HTTP handler for Store, P2P and Health services
func RegisterCustomHTTPEndpoints ¶
RegisterCustomHTTPEndpoints is the designated place to add new, non-gRPC, plain HTTP handlers. Additional custom HTTP endpoints can be registered on the mux here.
Types ¶
type HealthServer ¶
type HealthServer struct{}
HealthServer implements the HealthService defined in the proto file
func NewHealthServer ¶
func NewHealthServer() *HealthServer
NewHealthServer creates a new HealthServer instance
type P2PServer ¶
type P2PServer struct {
// contains filtered or unexported fields
}
P2PServer implements the P2PService defined in the proto file
func NewP2PServer ¶
NewP2PServer creates a new P2PServer instance
type StoreServer ¶
type StoreServer struct {
// contains filtered or unexported fields
}
StoreServer implements the StoreService defined in the proto file
func NewStoreServer ¶
func NewStoreServer(store store.Store, logger logging.EventLogger) *StoreServer
NewStoreServer creates a new StoreServer instance
func (*StoreServer) GetBlock ¶
func (s *StoreServer) GetBlock( ctx context.Context, req *connect.Request[pb.GetBlockRequest], ) (*connect.Response[pb.GetBlockResponse], error)
GetBlock implements the GetBlock RPC method
func (*StoreServer) GetMetadata ¶
func (s *StoreServer) GetMetadata( ctx context.Context, req *connect.Request[pb.GetMetadataRequest], ) (*connect.Response[pb.GetMetadataResponse], error)
GetMetadata implements the GetMetadata RPC method