Documentation
¶
Index ¶
- Constants
- type BlockCache
- type RPCClient
- func (w *RPCClient) ChainGetBlock(ctx context.Context, hash string) (*dto.Block, error)
- func (w *RPCClient) ChainGetBlockHash(ctx context.Context, num uint64) (string, error)
- func (w *RPCClient) ChainGetHeader(ctx context.Context, hash string) (dto.Mapped, error)
- func (w *RPCClient) ChainSubscribeJustifications(ctx context.Context) (chan *dto.RPCFrame, chan error)
- func (w *RPCClient) ChainSubscribeNewHead(ctx context.Context) (chan *dto.RPCFrame, chan error)
- func (w *RPCClient) FindExtrinsicsBlock(ctx context.Context, blockHash string, extrinsic string, limit int) (*dto.Block, error)
- func (w *RPCClient) GetAliveServer(kind string) string
- func (w *RPCClient) GetOrCreateConnection(ctx context.Context) (*WSMessageBroker, error)
- func (w *RPCClient) NewConnectionContext(ctx context.Context, name string) context.Context
- func (w *RPCClient) RawRequest(msg string) (*dto.RPCFrame, error)
- func (w *RPCClient) ReleaseConnection(ctx context.Context)
- func (w *RPCClient) StateGetMetadata(ctx context.Context) (string, error)
- func (w *RPCClient) StateGetStorage(ctx context.Context, request *decoder.StorageRequest, blockHash string) (string, error)
- func (w *RPCClient) WithConnection(ctx context.Context, server string, do func(*websocket.Conn) error) error
- type WSMessageBroker
- type WSMessageBrokerFrame
Constants ¶
View Source
const ( ServerKindWS = "websocket" ServerKindRPC = "http" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockCache ¶
type BlockCache struct {
// contains filtered or unexported fields
}
func (*BlockCache) Add ¶
func (cache *BlockCache) Add(block dto.Block)
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func NewRPCClient ¶
func (*RPCClient) ChainGetBlock ¶
TODO: rewrite
func (*RPCClient) ChainGetBlockHash ¶
func (*RPCClient) ChainGetHeader ¶
func (*RPCClient) ChainSubscribeJustifications ¶
func (*RPCClient) ChainSubscribeNewHead ¶
func (*RPCClient) FindExtrinsicsBlock ¶
func (*RPCClient) GetAliveServer ¶
func (*RPCClient) GetOrCreateConnection ¶
func (w *RPCClient) GetOrCreateConnection(ctx context.Context) (*WSMessageBroker, error)
func (*RPCClient) NewConnectionContext ¶
Returns context that can be used later for RPC requests
func (*RPCClient) ReleaseConnection ¶
func (*RPCClient) StateGetMetadata ¶
func (*RPCClient) StateGetStorage ¶
type WSMessageBroker ¶
type WSMessageBroker struct {
// contains filtered or unexported fields
}
func NewWSMessageBroker ¶
type WSMessageBrokerFrame ¶
Click to show internal directories.
Click to hide internal directories.