Documentation ¶
Index ¶
- type Call
- type Client
- func (c Client) ABCIInfo(context.Context) (*ctypes.ResultABCIInfo, error)
- func (c Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (c Client) ABCIQueryWithOptions(_ context.Context, path string, data bytes.HexBytes, ...) (*ctypes.ResultABCIQuery, error)
- func (c Client) Block(_ context.Context, height *int64) (*ctypes.ResultBlock, error)
- func (c Client) BlockByHash(_ context.Context, hash []byte) (*ctypes.ResultBlock, error)
- func (c Client) BlockchainInfo(_ context.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
- func (c Client) BroadcastEvidence(_ context.Context, ev types.Evidence) (*ctypes.ResultBroadcastEvidence, error)
- func (c Client) BroadcastTxAsync(_ context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c Client) BroadcastTxCommit(_ context.Context, tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (c Client) BroadcastTxSync(_ context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c Client) CheckTx(_ context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
- func (c Client) Commit(_ context.Context, height *int64) (*ctypes.ResultCommit, error)
- func (c Client) ConsensusParams(_ context.Context, height *int64) (*ctypes.ResultConsensusParams, error)
- func (c Client) ConsensusState(_ context.Context) (*ctypes.ResultConsensusState, error)
- func (c Client) DialPeers(_ context.Context, peers []string, persistent, unconditional, private bool) (*ctypes.ResultDialPeers, error)
- func (c Client) DialSeeds(_ context.Context, seeds []string) (*ctypes.ResultDialSeeds, error)
- func (c Client) DumpConsensusState(_ context.Context) (*ctypes.ResultDumpConsensusState, error)
- func (c Client) Genesis(context.Context) (*ctypes.ResultGenesis, error)
- func (c Client) Health(_ context.Context) (*ctypes.ResultHealth, error)
- func (c Client) NetInfo(_ context.Context) (*ctypes.ResultNetInfo, error)
- func (c Client) Status(context.Context) (*ctypes.ResultStatus, error)
- func (c Client) Validators(_ context.Context, height *int64, page, perPage *int) (*ctypes.ResultValidators, error)
- type StatusMock
- type StatusRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
Call is used by recorders to save a call and response. It can also be used to configure mock responses.
func (Call) GetResponse ¶
GetResponse will generate the appropriate response for us, when using the Call struct to configure a Mock handler.
When configuring a response, if only one of Response or Error is set then that will always be returned. If both are set, then we return Response if the Args match the set args, Error otherwise.
type Client ¶
type Client struct { client.ABCIClient client.SignClient client.HistoryClient client.StatusClient client.EventsClient client.EvidenceClient client.MempoolClient service.Service // contains filtered or unexported fields }
Client wraps arbitrary implementations of the various interfaces.
func (Client) ABCIQueryWithOptions ¶
func (Client) BlockByHash ¶
func (Client) BlockchainInfo ¶
func (Client) BroadcastEvidence ¶
func (Client) BroadcastTxAsync ¶
func (Client) BroadcastTxCommit ¶
func (Client) BroadcastTxSync ¶
func (Client) ConsensusParams ¶
func (Client) ConsensusState ¶
func (Client) DumpConsensusState ¶
func (Client) Validators ¶
type StatusMock ¶
type StatusMock struct {
Call
}
StatusMock returns the result specified by the Call.
func (*StatusMock) Status ¶
func (m *StatusMock) Status(context.Context) (*ctypes.ResultStatus, error)
type StatusRecorder ¶
type StatusRecorder struct { Client client.StatusClient Calls []Call }
StatusRecorder can wrap another type (StatusMock, full client) and record the status calls.
func NewStatusRecorder ¶
func NewStatusRecorder(client client.StatusClient) *StatusRecorder
func (*StatusRecorder) Status ¶
func (r *StatusRecorder) Status(ctx context.Context) (*ctypes.ResultStatus, error)
Click to show internal directories.
Click to hide internal directories.