Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRPCConsumerCobraCommand() *cobra.Command
- func CreateTestRPCConsumerCobraCommand() *cobra.Command
- func ParseEndpoints(viper_endpoints *viper.Viper, geolocation uint64) (endpoints []*lavasession.RPCEndpoint, err error)
- type ConsumerStateTrackerInf
- type ConsumerTxSender
- type RPCConsumer
- type RPCConsumerServer
Constants ¶
View Source
const (
MaxRelayRetries = 4
)
Variables ¶
View Source
var ( Yaml_config_properties = []string{"network-address", "chain-id", "api-interface"} DefaultRPCConsumerFileName = "rpcconsumer.yml" )
Functions ¶
func ParseEndpoints ¶
func ParseEndpoints(viper_endpoints *viper.Viper, geolocation uint64) (endpoints []*lavasession.RPCEndpoint, err error)
Types ¶
type ConsumerStateTrackerInf ¶
type ConsumerStateTrackerInf interface { RegisterConsumerSessionManagerForPairingUpdates(ctx context.Context, consumerSessionManager *lavasession.ConsumerSessionManager) RegisterChainParserForSpecUpdates(ctx context.Context, chainParser chainlib.ChainParser, chainID string) error RegisterFinalizationConsensusForUpdates(context.Context, *lavaprotocol.FinalizationConsensus) TxConflictDetection(ctx context.Context, finalizationConflict *conflicttypes.FinalizationConflict, responseConflict *conflicttypes.ResponseConflict, sameProviderConflict *conflicttypes.FinalizationConflict) error }
type ConsumerTxSender ¶
type ConsumerTxSender interface {
TxConflictDetection(ctx context.Context, finalizationConflict *conflicttypes.FinalizationConflict, responseConflict *conflicttypes.ResponseConflict, sameProviderConflict *conflicttypes.FinalizationConflict) error
}
type RPCConsumer ¶
type RPCConsumer struct {
// contains filtered or unexported fields
}
func (*RPCConsumer) Start ¶
func (rpcc *RPCConsumer) Start(ctx context.Context, txFactory tx.Factory, clientCtx client.Context, rpcEndpoints []*lavasession.RPCEndpoint, requiredResponses int, vrf_sk vrf.PrivateKey, cache *performance.Cache) (err error)
spawns a new RPCConsumer server with all it's processes and internals ready for communications
type RPCConsumerServer ¶
type RPCConsumerServer struct { VrfSk vrf.PrivateKey // contains filtered or unexported fields }
implements Relay Sender interfaced and uses an ChainListener to get it called
func (*RPCConsumerServer) SendRelay ¶
func (rpccs *RPCConsumerServer) SendRelay( ctx context.Context, url string, req string, connectionType string, dappID string, analytics *metrics.RelayMetrics, ) (relayReply *pairingtypes.RelayReply, relayServer *pairingtypes.Relayer_RelaySubscribeClient, errRet error)
func (*RPCConsumerServer) ServeRPCRequests ¶
func (rpccs *RPCConsumerServer) ServeRPCRequests(ctx context.Context, listenEndpoint *lavasession.RPCEndpoint, consumerStateTracker ConsumerStateTrackerInf, chainParser chainlib.ChainParser, finalizationConsensus *lavaprotocol.FinalizationConsensus, consumerSessionManager *lavasession.ConsumerSessionManager, requiredResponses int, privKey *btcec.PrivateKey, vrfSk vrf.PrivateKey, lavaChainID string, cache *performance.Cache, ) (err error)
Click to show internal directories.
Click to hide internal directories.