txn_service

package
v0.0.0-...-076bdcc Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileTransactionLogger

type FileTransactionLogger struct {
}

func NewFileTransactionLogger

func NewFileTransactionLogger(filePath string) (*FileTransactionLogger, error)

func (*FileTransactionLogger) Close

func (l *FileTransactionLogger) Close()

func (*FileTransactionLogger) HandleTransactions

func (l *FileTransactionLogger) HandleTransactions() <-chan error

func (*FileTransactionLogger) ReadTransactions

func (l *FileTransactionLogger) ReadTransactions() (<-chan *apitypes.Transaction, <-chan error)

func (*FileTransactionLogger) WriteTransaction

func (l *FileTransactionLogger) WriteTransaction(*apitypes.Transaction)

type PostgresTransactionLogger

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

func NewPostgresTransactionLogger

func NewPostgresTransactionLogger(postgresUrl string) (*PostgresTransactionLogger, error)

func (*PostgresTransactionLogger) Close

func (l *PostgresTransactionLogger) Close()

func (*PostgresTransactionLogger) HandleTransactions

func (l *PostgresTransactionLogger) HandleTransactions() <-chan error

func (*PostgresTransactionLogger) ReadTransactions

func (l *PostgresTransactionLogger) ReadTransactions() (<-chan *apitypes.Transaction, <-chan error)

func (*PostgresTransactionLogger) WriteTransaction

func (l *PostgresTransactionLogger) WriteTransaction(transact *apitypes.Transaction)

type TransactionLogger

type TransactionLogger interface {
	ReadTransactions() (<-chan *apitypes.Transaction, <-chan error)
	WriteTransaction(*apitypes.Transaction)
	HandleTransactions() <-chan error
	Close()
}

type TransactionService

type TransactionService struct {
	TransactionLogger
	AllowUnauthorized bool
}

func NewTransactionService

func NewTransactionService(logger TransactionLogger, allowUnauthorized bool) *TransactionService

Jump to

Keyboard shortcuts

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