chainproxy

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LavaErrorCode       = 555
	InternalErrorString = "Internal Error"
)
View Source
const (
	DialTimeout                                = 500 * time.Millisecond
	ParallelConnectionsFlag                    = "parallel-connections"
	MaximumNumberOfParallelConnectionsAttempts = 10
)

Variables

View Source
var ErrFailedToConvertMessage = sdkerrors.New("RPC error", 1000, "failed to convert a message")
View Source
var NumberOfParallelConnections uint = 10

Functions

func ConvertErrorToRPCError added in v0.5.0

func ConvertErrorToRPCError(errString string, code int) *tenderminttypes.RPCError

func ConvertToTendermintError added in v0.5.1

func ConvertToTendermintError(errString string, inputInfo []byte) string

func DescriptorSourceFromServer added in v0.5.0

func DescriptorSourceFromServer(refClient *grpcreflect.Client) grpcurl.DescriptorSource

func GetTendermintRPCError added in v0.5.0

func GetTendermintRPCError(jsonError *rpcclient.JsonError) (*tenderminttypes.RPCError, error)

func IdFromRawMessage added in v0.5.0

func IdFromRawMessage(rawID json.RawMessage) (jsonrpcId, error)

func ParseSymbol added in v0.5.0

func ParseSymbol(svcAndMethod string) (string, string)

func ReflectionSupport added in v0.5.0

func ReflectionSupport(err error) error

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

func NewConnector

func NewConnector(ctx context.Context, nConns uint, addr string) *Connector

func (*Connector) Close

func (connector *Connector) Close()

func (*Connector) GetRpc

func (connector *Connector) GetRpc(ctx context.Context, block bool) (*rpcclient.Client, error)

func (*Connector) ReturnRpc

func (connector *Connector) ReturnRpc(rpc *rpcclient.Client)

type GRPCConnector

type GRPCConnector struct {
	// contains filtered or unexported fields
}

func NewGRPCConnector

func NewGRPCConnector(ctx context.Context, nConns uint, addr string) *GRPCConnector

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)

type GrpcMessage added in v0.5.0

type GrpcMessage struct {
	Msg  []byte
	Path string
}

func (GrpcMessage) GetParams added in v0.5.0

func (cp GrpcMessage) GetParams() interface{}

func (GrpcMessage) GetResult added in v0.5.0

func (cp GrpcMessage) GetResult() json.RawMessage

func (GrpcMessage) ParseBlock added in v0.5.0

func (cp GrpcMessage) ParseBlock(inp string) (int64, error)

type JSONRPCIntID added in v0.5.0

type JSONRPCIntID int

JSONRPCIntID a wrapper for JSON-RPC integer IDs

func (JSONRPCIntID) String added in v0.5.0

func (id JSONRPCIntID) String() string

type JSONRPCStringID added in v0.5.0

type JSONRPCStringID string

JSONRPCStringID a wrapper for JSON-RPC string IDs

func (JSONRPCStringID) String added in v0.5.0

func (id JSONRPCStringID) String() string

type JsonrpcMessage added in v0.5.0

type JsonrpcMessage struct {
	Version string               `json:"jsonrpc,omitempty"`
	ID      json.RawMessage      `json:"id,omitempty"`
	Method  string               `json:"method,omitempty"`
	Params  interface{}          `json:"params,omitempty"`
	Error   *rpcclient.JsonError `json:"error,omitempty"`
	Result  json.RawMessage      `json:"result,omitempty"`
}

func ConvertJsonRPCMsg added in v0.5.0

func ConvertJsonRPCMsg(rpcMsg *rpcclient.JsonrpcMessage) (*JsonrpcMessage, error)

func ParseJsonRPCMsg added in v0.5.0

func ParseJsonRPCMsg(data []byte) (msgRet *JsonrpcMessage, err error)

func (JsonrpcMessage) GetParams added in v0.5.0

func (cp JsonrpcMessage) GetParams() interface{}

func (JsonrpcMessage) GetResult added in v0.5.0

func (cp JsonrpcMessage) GetResult() json.RawMessage

func (JsonrpcMessage) ParseBlock added in v0.5.0

func (cp JsonrpcMessage) ParseBlock(inp string) (int64, error)

type RPCResponse added in v0.5.0

type RPCResponse struct {
	JSONRPC string                    `json:"jsonrpc"`
	ID      jsonrpcId                 `json:"id,omitempty"`
	Result  json.RawMessage           `json:"result,omitempty"`
	Error   *tenderminttypes.RPCError `json:"error,omitempty"`
}

func ConvertTendermintMsg added in v0.5.0

func ConvertTendermintMsg(rpcMsg *rpcclient.JsonrpcMessage) (*RPCResponse, error)

type RestMessage added in v0.5.0

type RestMessage struct {
	Msg  []byte
	Path string
}

func (RestMessage) GetParams added in v0.5.0

func (cp RestMessage) GetParams() interface{}

func (RestMessage) GetResult added in v0.5.0

func (cp RestMessage) GetResult() json.RawMessage

func (RestMessage) ParseBlock added in v0.5.0

func (cp RestMessage) ParseBlock(inp string) (int64, error)

type ServerSource added in v0.5.0

type ServerSource struct {
	Client *grpcreflect.Client
}

func (ServerSource) AllExtensionsForType added in v0.5.0

func (ss ServerSource) AllExtensionsForType(typeName string) ([]*desc.FieldDescriptor, error)

func (ServerSource) FindSymbol added in v0.5.0

func (ss ServerSource) FindSymbol(fullyQualifiedName string) (desc.Descriptor, error)

func (ServerSource) ListServices added in v0.5.0

func (ss ServerSource) ListServices() ([]string, error)

type TendermintrpcMessage added in v0.5.0

type TendermintrpcMessage struct {
	JsonrpcMessage
	Path string
}

func (TendermintrpcMessage) GetParams added in v0.5.0

func (cp TendermintrpcMessage) GetParams() interface{}

func (TendermintrpcMessage) GetResult added in v0.5.0

func (cp TendermintrpcMessage) GetResult() json.RawMessage

func (TendermintrpcMessage) ParseBlock added in v0.5.0

func (cp TendermintrpcMessage) ParseBlock(inp string) (int64, error)

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.
Ibc
thirdparty_utils/cosmos/tx/config/v1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
thirdparty_utils/cosmos/tx/signing/v1beta1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
thirdparty_utils/cosmos/tx/v1beta1
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.
thirdparty_utils/cosmwasm_types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/ibc/apps/29-fee/types
Package types is a reverse proxy.
Package types is a reverse proxy.
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/ibc/apps/transfer/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/ibc/core/channel/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/ibc/core/client/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/ibc/core/connection/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/juno/mint/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/epochs/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/gamm/types
Package types is a reverse proxy.
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/incentives/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/lockup/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/mint/types
Package types is a reverse proxy.
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/superfluid/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/tokenfactory/types
Package types is a reverse proxy.
Package types is a reverse proxy.
thirdparty_utils/osmosis_protobufs/twap/types
Package queryproto is a reverse proxy.
Package queryproto is a reverse proxy.
thirdparty_utils/osmosis_protobufs/txfees/types
Package types is a reverse proxy.
Package types is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL