factory

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionConfig

type TransactionConfig struct {
	// TimeOracleSource specifies the source type for the time oracle.
	TimeOracleSource txn.SourceType

	// LockerSource specifies the source type for the locker.
	LockerSource txn.SourceType

	// OracleURL is the URL of the oracle.
	OracleURL string

	// Options is a map of additional options.
	Options map[string]string

	// DatastoreList is a list of datastores to be added to the transaction.
	DatastoreList []txn.Datastorer

	// GlobalDatastore is the global datastore to be added to the transaction.
	GlobalDatastore txn.Datastorer

	// LocalLocker is the local locker instance.
	LocalLocker locker.Locker
}

type TransactionFactory

type TransactionFactory struct {

	// TimeOracleSource is the source type for the time oracle.
	TimeOracleSource txn.SourceType
	// LockerSource is the source type for the locker.
	LockerSource txn.SourceType
	// contains filtered or unexported fields
}

TransactionFactory represents a factory for creating transactions.

func NewTransactionFactory

func NewTransactionFactory(config *TransactionConfig) (*TransactionFactory, error)

NewTransactionFactory creates a new TransactionFactory object.

func (*TransactionFactory) NewTransaction

func (t *TransactionFactory) NewTransaction() *txn.Transaction

NewTransaction creates a new Transaction object.

Jump to

Keyboard shortcuts

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