Documentation ¶
Index ¶
- type ChainListener
- type ChainMessage
- type ChainParser
- type GrpcChainListener
- type GrpcChainParser
- func (apip *GrpcChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, ...)
- func (apip *GrpcChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
- func (apip *GrpcChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
- func (apip *GrpcChainParser) SetSpec(spec spectypes.Spec)
- type JsonRPCChainListener
- type JsonRPCChainParser
- func (apip *JsonRPCChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, ...)
- func (apip *JsonRPCChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
- func (apip *JsonRPCChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
- func (apip *JsonRPCChainParser) SetSpec(spec spectypes.Spec)
- type RelaySender
- type RestChainListener
- type RestChainParser
- func (apip *RestChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, ...)
- func (apip *RestChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
- func (apip *RestChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
- func (apip *RestChainParser) SetSpec(spec spectypes.Spec)
- type TendermintChainParser
- func (apip *TendermintChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, ...)
- func (apip *TendermintChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
- func (apip *TendermintChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
- func (apip *TendermintChainParser) SetSpec(spec spectypes.Spec)
- type TendermintRpcChainListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainListener ¶
type ChainListener interface {
Serve()
}
func NewChainListener ¶
func NewChainListener(ctx context.Context, listenEndpoint *lavasession.RPCEndpoint, relaySender RelaySender) (ChainListener, error)
type ChainMessage ¶
type ChainMessage interface { GetServiceApi() *spectypes.ServiceApi GetInterface() *spectypes.ApiInterface RequestedBlock() int64 }
type ChainParser ¶
type ChainParser interface { ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error) // has to be thread safe SetSpec(spec spectypes.Spec) // has to be thread safe DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, blockDistanceForFinalizedData uint32) }
this is an interface for parsing and generating messages of the supported APIType it checks for the existence of the method in the spec, and formats the message
func NewChainParser ¶
func NewChainParser(apiInterface string) (chainParser ChainParser, err error)
type GrpcChainListener ¶
type GrpcChainListener struct{}
func NewGrpcChainListener ¶
func NewGrpcChainListener(ctx context.Context, listenEndpoint *lavasession.RPCEndpoint, relaySender RelaySender) (chainListener *GrpcChainListener)
func (*GrpcChainListener) Serve ¶
func (apil *GrpcChainListener) Serve()
type GrpcChainParser ¶
type GrpcChainParser struct{}
func NewGrpcChainParser ¶
func NewGrpcChainParser() (chainParser *GrpcChainParser, err error)
func (*GrpcChainParser) ChainBlockStats ¶
func (apip *GrpcChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, blockDistanceForFinalizedData uint32)
func (*GrpcChainParser) DataReliabilityParams ¶
func (apip *GrpcChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
func (*GrpcChainParser) ParseMsg ¶
func (apip *GrpcChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
func (*GrpcChainParser) SetSpec ¶
func (apip *GrpcChainParser) SetSpec(spec spectypes.Spec)
type JsonRPCChainListener ¶
type JsonRPCChainListener struct{}
func NewJrpcChainListener ¶
func NewJrpcChainListener(ctx context.Context, listenEndpoint *lavasession.RPCEndpoint, relaySender RelaySender) (chainListener *JsonRPCChainListener)
func (*JsonRPCChainListener) Serve ¶
func (apil *JsonRPCChainListener) Serve()
type JsonRPCChainParser ¶
type JsonRPCChainParser struct{}
func NewJrpcChainParser ¶
func NewJrpcChainParser() (chainParser *JsonRPCChainParser, err error)
func (*JsonRPCChainParser) ChainBlockStats ¶
func (apip *JsonRPCChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, blockDistanceForFinalizedData uint32)
func (*JsonRPCChainParser) DataReliabilityParams ¶
func (apip *JsonRPCChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
func (*JsonRPCChainParser) ParseMsg ¶
func (apip *JsonRPCChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
func (*JsonRPCChainParser) SetSpec ¶
func (apip *JsonRPCChainParser) SetSpec(spec spectypes.Spec)
type RelaySender ¶
type RelaySender interface { SendRelay( ctx context.Context, url string, req string, connectionType string, dappID string, ) (*pairingtypes.RelayReply, *pairingtypes.Relayer_RelaySubscribeClient, error) }
type RestChainListener ¶
type RestChainListener struct{}
func NewRestChainListener ¶
func NewRestChainListener(ctx context.Context, listenEndpoint *lavasession.RPCEndpoint, relaySender RelaySender) (chainListener *RestChainListener)
func (*RestChainListener) Serve ¶
func (apil *RestChainListener) Serve()
type RestChainParser ¶
type RestChainParser struct{}
func NewRestChainParser ¶
func NewRestChainParser() (chainParser *RestChainParser, err error)
func (*RestChainParser) ChainBlockStats ¶
func (apip *RestChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, blockDistanceForFinalizedData uint32)
func (*RestChainParser) DataReliabilityParams ¶
func (apip *RestChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
func (*RestChainParser) ParseMsg ¶
func (apip *RestChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
func (*RestChainParser) SetSpec ¶
func (apip *RestChainParser) SetSpec(spec spectypes.Spec)
type TendermintChainParser ¶
type TendermintChainParser struct{}
func NewTendermintRpcChainParser ¶
func NewTendermintRpcChainParser() (chainParser *TendermintChainParser, err error)
func (*TendermintChainParser) ChainBlockStats ¶
func (apip *TendermintChainParser) ChainBlockStats() (allowedBlockLagForQosSync int64, averageBlockTime time.Duration, blockDistanceForFinalizedData uint32)
func (*TendermintChainParser) DataReliabilityParams ¶
func (apip *TendermintChainParser) DataReliabilityParams() (enabled bool, dataReliabilityThreshold uint32)
func (*TendermintChainParser) ParseMsg ¶
func (apip *TendermintChainParser) ParseMsg(url string, data []byte, connectionType string) (ChainMessage, error)
func (*TendermintChainParser) SetSpec ¶
func (apip *TendermintChainParser) SetSpec(spec spectypes.Spec)
type TendermintRpcChainListener ¶
type TendermintRpcChainListener struct{}
func NewTendermintRpcChainListener ¶
func NewTendermintRpcChainListener(ctx context.Context, listenEndpoint *lavasession.RPCEndpoint, relaySender RelaySender) (chainListener *TendermintRpcChainListener)
func (*TendermintRpcChainListener) Serve ¶
func (apil *TendermintRpcChainListener) Serve()
Click to show internal directories.
Click to hide internal directories.