Documentation
¶
Index ¶
- func BlocksToApi(blocks map[protocol.BlockType]protocol.Block) *dshackle.ChainEvent
- func ChainStatusToApi(status protocol.AvailabilityStatus) *dshackle.ChainEvent
- func HeadToApi(head protocol.Block) *dshackle.ChainEvent
- func LabelsToApi(labels []upstreams.AggregatedLabels) *dshackle.ChainEvent
- func LowerBoundsToApi(lowerBounds []protocol.LowerBoundData) *dshackle.ChainEvent
- func NewServer(appCtx *server_ctx.ApplicationServerContext, serverConfig *config.ServerConfig, ...) (*grpc.Server, error)
- func SubMethodsToApi(methods []string) *dshackle.ChainEvent
- func SubscribeChainStatus(upstreamSupervisor upstreams.UpstreamSupervisor, ...) error
- func SubscribeChainStatusWithResync(upstreamSupervisor upstreams.UpstreamSupervisor, ...) error
- func SupportedMethodsToApi(methods []string) *dshackle.ChainEvent
- type GrpcAuthService
- type GrpcBlockchainService
- func (s *GrpcBlockchainService) NativeCall(request *dshackle.NativeCallRequest, ...) error
- func (s *GrpcBlockchainService) NativeSubscribe(request *dshackle.NativeSubscribeRequest, ...) error
- func (s *GrpcBlockchainService) SubscribeChainStatus(request *dshackle.SubscribeChainStatusRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlocksToApi ¶
func ChainStatusToApi ¶
func ChainStatusToApi(status protocol.AvailabilityStatus) *dshackle.ChainEvent
func LabelsToApi ¶
func LabelsToApi(labels []upstreams.AggregatedLabels) *dshackle.ChainEvent
func LowerBoundsToApi ¶
func LowerBoundsToApi(lowerBounds []protocol.LowerBoundData) *dshackle.ChainEvent
func NewServer ¶
func NewServer(appCtx *server_ctx.ApplicationServerContext, serverConfig *config.ServerConfig, baseOptions ...grpc.ServerOption) (*grpc.Server, error)
NewServer builds the dshackle grpc.Server: the emerald blockchain/auth services and default reflection (which advertises only the registered services). baseOptions carry the shared transport options (tls). The chain ingress runs as a separate server (internal/server/grpc_ingress) and never shares options, codecs or auth with this one.
func SubMethodsToApi ¶
func SubMethodsToApi(methods []string) *dshackle.ChainEvent
func SubscribeChainStatus ¶
func SubscribeChainStatus( upstreamSupervisor upstreams.UpstreamSupervisor, stream dshackle.Blockchain_SubscribeChainStatusServer, ) error
func SubscribeChainStatusWithResync ¶
func SubscribeChainStatusWithResync( upstreamSupervisor upstreams.UpstreamSupervisor, stream dshackle.Blockchain_SubscribeChainStatusServer, resyncInterval time.Duration, ) error
SubscribeChainStatusWithResync is SubscribeChainStatus with a caller-chosen state-resync interval; tests use it to shrink the wait.
func SupportedMethodsToApi ¶
func SupportedMethodsToApi(methods []string) *dshackle.ChainEvent
Types ¶
type GrpcAuthService ¶
type GrpcAuthService struct {
dshackle.UnimplementedAuthServer
// contains filtered or unexported fields
}
func NewGrpcAuthService ¶
func NewGrpcAuthService(grpcAuthConfig *config.GrpcAuthConfig) (*GrpcAuthService, *grpcSessionAuth, error)
func (*GrpcAuthService) Authenticate ¶
func (s *GrpcAuthService) Authenticate(_ context.Context, request *dshackle.AuthRequest) (*dshackle.AuthResponse, error)
type GrpcBlockchainService ¶
type GrpcBlockchainService struct {
dshackle.UnimplementedBlockchainServer
// contains filtered or unexported fields
}
func NewGrpcBlockchainService ¶
func NewGrpcBlockchainService( appCtx *server_ctx.ApplicationServerContext, sessionAuth *grpcSessionAuth, signer signature.ResponseSigner, ) *GrpcBlockchainService
func (*GrpcBlockchainService) NativeCall ¶
func (s *GrpcBlockchainService) NativeCall(request *dshackle.NativeCallRequest, stream dshackle.Blockchain_NativeCallServer) error
func (*GrpcBlockchainService) NativeSubscribe ¶
func (s *GrpcBlockchainService) NativeSubscribe(request *dshackle.NativeSubscribeRequest, stream dshackle.Blockchain_NativeSubscribeServer) error
func (*GrpcBlockchainService) SubscribeChainStatus ¶
func (s *GrpcBlockchainService) SubscribeChainStatus(request *dshackle.SubscribeChainStatusRequest, stream dshackle.Blockchain_SubscribeChainStatusServer) error
Source Files
¶
- chain_event_mapper.go
- grpc_auth.go
- grpc_blockchain.go
- json_rpc_result_stream.go
- native_call_adapter.go
- native_call_adapter_grpc.go
- native_call_adapter_jsonrpc.go
- native_call_adapter_rest.go
- native_subscribe_adapter.go
- native_subscribe_adapter_grpc.go
- native_subscribe_adapter_jsonrpc.go
- reply_signature.go
- selector_mapper.go
- server.go
- sub_chain_status.go
Click to show internal directories.
Click to hide internal directories.