txsvc

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainTransactor

type BlockchainTransactor interface {
	Status(ctx context.Context) (*adminTypes.Status, error)
	BroadcastTx(ctx context.Context, tx []byte, sync uint8) (*cmtCoreTypes.ResultBroadcastTx, error)
	TxQuery(ctx context.Context, hash []byte, prove bool) (*cmtCoreTypes.ResultTx, error)
}

type EngineReader

type EngineReader interface {
	Procedure(ctx context.Context, tx sql.DB, options *common.ExecutionData) (*sql.ResultSet, error)
	GetSchema(ctx context.Context, dbid string) (*common.Schema, error)
	ListDatasets(ctx context.Context, owner []byte) ([]*coreTypes.DatasetIdentifier, error)
	Execute(ctx context.Context, tx sql.DB, dbid string, query string, values map[string]any) (*sql.ResultSet, error)
}

type NodeApplication

type NodeApplication interface {
	AccountInfo(ctx context.Context, identifier []byte, getUncommitted bool) (balance *big.Int, nonce int64, err error)
	Price(ctx context.Context, tx *transactions.Transaction) (*big.Int, error)
}

type Service

type Service struct {
	txpb.UnimplementedTxServiceServer
	// contains filtered or unexported fields
}

func NewService

func NewService(db sql.ReadTxMaker, engine EngineReader,
	chainClient BlockchainTransactor, nodeApp NodeApplication, opts ...TxSvcOpt) *Service

func (*Service) Broadcast

func (*Service) Call

func (s *Service) Call(ctx context.Context, req *txpb.CallRequest) (*txpb.CallResponse, error)

func (*Service) ChainInfo

func (*Service) EstimatePrice

func (*Service) GetAccount

func (*Service) GetSchema

func (*Service) ListDatabases

func (*Service) Ping

func (s *Service) Ping(ctx context.Context, req *txpb.PingRequest) (*txpb.PingResponse, error)

func (*Service) Query

func (s *Service) Query(ctx context.Context, req *txpb.QueryRequest) (*txpb.QueryResponse, error)

func (*Service) TxQuery

func (s *Service) TxQuery(ctx context.Context, req *txpb.TxQueryRequest) (*txpb.TxQueryResponse, error)

type TxSvcOpt

type TxSvcOpt func(*Service)

func WithLogger

func WithLogger(logger log.Logger) TxSvcOpt

Jump to

Keyboard shortcuts

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