Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultParsableRPCInput(input json.RawMessage) parser.RPCInput
- func HashURL(url string) string
- type BaseMessage
- func (bm *BaseMessage) AppendHeader(metadata []pairingtypes.Metadata)
- func (bm *BaseMessage) DisableErrorHandling()
- func (bm *BaseMessage) GetDisableErrorHandling() bool
- func (bm BaseMessage) GetHeaders() []pairingtypes.Metadata
- func (bm *BaseMessage) SetLatestBlockWithHeader(latestBlock uint64, modifyContent bool) (done bool)
- type Connector
- type CustomParsingMessage
- type DefaultRPCInput
- type GRPCConnector
Constants ¶
View Source
const ( LavaErrorCode = 555 InternalErrorString = "Internal Error" )
View Source
const ( ParallelConnectionsFlag = "parallel-connections" GRPCUseTls = "use-tls" GRPCAllowInsecureConnection = "allow-insecure-connection" MaximumNumberOfParallelConnectionsAttempts = 10 MaxCallRecvMsgSize = 1024 * 1024 * 32 // setting receive size to 32mb instead of 4mb default )
Variables ¶
View Source
var NumberOfParallelConnections uint = 10
Functions ¶
func DefaultParsableRPCInput ¶
Types ¶
type BaseMessage ¶
type BaseMessage struct { Headers []pairingtypes.Metadata LatestBlockHeaderSetter *spectypes.ParseDirective // contains filtered or unexported fields }
func (*BaseMessage) AppendHeader ¶
func (bm *BaseMessage) AppendHeader(metadata []pairingtypes.Metadata)
appends only headers that do not exist
func (*BaseMessage) DisableErrorHandling ¶
func (bm *BaseMessage) DisableErrorHandling()
func (*BaseMessage) GetDisableErrorHandling ¶
func (bm *BaseMessage) GetDisableErrorHandling() bool
func (BaseMessage) GetHeaders ¶
func (bm BaseMessage) GetHeaders() []pairingtypes.Metadata
func (*BaseMessage) SetLatestBlockWithHeader ¶
func (bm *BaseMessage) SetLatestBlockWithHeader(latestBlock uint64, modifyContent bool) (done bool)
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func (*Connector) GetUrlHash ¶
getting hashed url from connection. this is never changed. so its not locked.
type CustomParsingMessage ¶
type DefaultRPCInput ¶
type DefaultRPCInput struct { Result json.RawMessage BaseMessage }
func (DefaultRPCInput) GetID ¶ added in v2.4.0
func (dri DefaultRPCInput) GetID() json.RawMessage
func (DefaultRPCInput) GetMethod ¶
func (dri DefaultRPCInput) GetMethod() string
func (DefaultRPCInput) GetParams ¶
func (dri DefaultRPCInput) GetParams() interface{}
func (DefaultRPCInput) GetResult ¶
func (dri DefaultRPCInput) GetResult() json.RawMessage
func (DefaultRPCInput) ParseBlock ¶
func (dri DefaultRPCInput) ParseBlock(inp string) (int64, error)
type GRPCConnector ¶
type GRPCConnector struct {
// contains filtered or unexported fields
}
func NewGRPCConnector ¶
func (*GRPCConnector) Close ¶
func (connector *GRPCConnector) Close()
func (*GRPCConnector) GetRpc ¶
func (connector *GRPCConnector) GetRpc(ctx context.Context, block bool) (*grpc.ClientConn, error)
func (*GRPCConnector) ReturnRpc ¶
func (connector *GRPCConnector) ReturnRpc(rpc *grpc.ClientConn)
Directories ¶
Path | Synopsis |
---|---|
package rpcclient implements bi-directional JSON-RPC 2.0 on multiple transports.
|
package rpcclient implements bi-directional JSON-RPC 2.0 on multiple transports. |
Click to show internal directories.
Click to hide internal directories.