appconn

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0, UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Overview

Package appconn manages the connection of Tendermint to the application layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsensus

func NewConsensus(appConn abcicli.Client) *consensus

func NewMempool

func NewMempool(appConn abcicli.Client) *mempool

func NewMulti

func NewMulti(clientCreator ClientCreator) *multi

Make all necessary abci connections to the application

func NewQuery

func NewQuery(appConn abcicli.Client) *query

Types

type AppConns

type AppConns interface {
	service.Service

	Mempool() Mempool
	Consensus() Consensus
	Query() Query
}

Tendermint's interface to the application consists of multiple connections

func NewAppConns

func NewAppConns(clientCreator ClientCreator) AppConns

type ClientCreator

type ClientCreator interface {
	NewABCIClient() (abcicli.Client, error)
}

NewABCIClient returns newly connected client

type Consensus

type Consensus interface {
	SetResponseCallback(abcicli.Callback)
	Error() error

	InitChainSync(abci.RequestInitChain) (abci.ResponseInitChain, error)

	BeginBlockSync(abci.RequestBeginBlock) (abci.ResponseBeginBlock, error)
	DeliverTxAsync(abci.RequestDeliverTx) *abcicli.ReqRes
	EndBlockSync(abci.RequestEndBlock) (abci.ResponseEndBlock, error)
	CommitSync() (abci.ResponseCommit, error)
}

type Mempool

type Mempool interface {
	SetResponseCallback(abcicli.Callback)
	Error() error

	CheckTxAsync(abci.RequestCheckTx) *abcicli.ReqRes

	FlushAsync() *abcicli.ReqRes
	FlushSync() error
}

type Query

type Query interface {
	Error() error

	EchoSync(string) (abci.ResponseEcho, error)
	InfoSync(abci.RequestInfo) (abci.ResponseInfo, error)
	QuerySync(abci.RequestQuery) (abci.ResponseQuery, error)
}

Jump to

Keyboard shortcuts

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