dependencyinjection

package
v0.0.0-...-9cf9cea 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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const AdminDBConnectionPoolInstanceName = "admin_db_connection_pool_instance"
View Source
const CrashTrackerInstanceName = "crash_tracker_instance"
View Source
const DistributionAccountResolverInstanceName = "distribution_account_resolver_instance"
View Source
const EmailClientInstanceName = "email_client_instance"
View Source
const HorizonClientInstanceName = "horizon_client_instance"
View Source
const LedgerNumberTrackerInstanceName = "ledger_number_tracker_instance"
View Source
const MtnDBConnectionPoolInstanceName = "mtn_db_connection_pool_instance"
View Source
const SMSClientInstanceName = "sms_client_instance"
View Source
const SignatureServiceInstanceName = "signature_service_instance"
View Source
const TSSDBConnectionPoolInstanceName = "tss_db_connection_pool_instance"
View Source
const TxSubmitterEngineInstanceName = "tx_submitter_engine_instance"

Variables

This section is empty.

Functions

func CleanupInstanceByKey

func CleanupInstanceByKey(ctx context.Context, instanceName string)

CleanupInstanceByKey removes a service instance from the store by key and test if it is closeable, in which case, its Close() method is called.

func CleanupInstanceByValue

func CleanupInstanceByValue(ctx context.Context, instance interface{})

CleanupInstanceByValue removes a service instance from the store by value and checks if it is closeable, in which case, its Close() method is called.

func ClearInstancesTestHelper

func ClearInstancesTestHelper(t *testing.T)

func GetInstance

func GetInstance(instanceName string) (interface{}, bool)

GetInstance retrieves a service instance by name from the store.

func NewAdminDBConnectionPool

func NewAdminDBConnectionPool(ctx context.Context, opts DBConnectionPoolOptions) (db.DBConnectionPool, error)

NewAdminDBConnectionPool creates a new admin db connection pool instance, or retrives an instance that was already created before.

func NewAnchorPlatformAPIService

func NewAnchorPlatformAPIService(anchorPlatformBasePlatformURL, anchorPlatformOutgoingJWTSecret string) (anchorplatform.AnchorPlatformAPIServiceInterface, error)

func NewCrashTracker

NewCrashTracker creates a new crash tracker instance, or retrives a instance that was already created before.

func NewDistributionAccountResolver

NewDistributionAccountResolver creates a new distribution account resolver instance, or retrieves an instance that was already created before.

func NewEmailClient

func NewEmailClient(opts EmailClientOptions) (message.MessengerClient, error)

NewEmailClient creates a new email client instance, or retrives a instance that was already created before.

func NewHorizonClient

func NewHorizonClient(ctx context.Context, horizonURL string) (horizonclient.ClientInterface, error)

NewHorizonClient creates a new horizon client instance, or retrives an instance that was already created before.

func NewLedgerNumberTracker

func NewLedgerNumberTracker(ctx context.Context, horizonClient horizonclient.ClientInterface) (preconditions.LedgerNumberTracker, error)

NewLedgerNumberTracker creates a new ledger number tracker instance, or retrives an instance that was already created before.

func NewMtnDBConnectionPool

func NewMtnDBConnectionPool(ctx context.Context, opts DBConnectionPoolOptions) (db.DBConnectionPool, error)

NewMtnDBConnectionPool creates a new multitenant db connection pool instance, or retrives an instance that was already created before. The multitenant db connection pool is used to connect to the tenant's databases based on the tenant found in the context.

func NewSMSClient

func NewSMSClient(opts SMSClientOptions) (message.MessengerClient, error)

NewSMSClient creates a new SMS client instance, or retrives a instance that was already created before.

func NewSignatureService

NewSignatureService creates a new signature service instance, or retrieves an instance that was already created before.

func NewTSSDBConnectionPool

func NewTSSDBConnectionPool(ctx context.Context, opts DBConnectionPoolOptions) (db.DBConnectionPool, error)

NewTSSDBConnectionPool creates a new TSS db connection pool instance, or retrives a instance that was already created before.

func NewTxSubmitterEngine

func NewTxSubmitterEngine(ctx context.Context, opts TxSubmitterEngineOptions) (engine.SubmitterEngine, error)

NewTxSubmitterEngine creates a new ledger number tracker instance, or retrives an instance that was already created before.

func SetInstance

func SetInstance(instanceName string, instance interface{})

SetInstance adds a new service instance to the store.

Types

type DBConnectionPoolOptions

type DBConnectionPoolOptions struct {
	DatabaseURL    string
	MonitorService monitor.MonitorServiceInterface
}

type EmailClientOptions

type EmailClientOptions struct {
	EmailType        message.MessengerType
	MessengerOptions *message.MessengerOptions
}

type SMSClientOptions

type SMSClientOptions struct {
	SMSType          message.MessengerType
	MessengerOptions *message.MessengerOptions
}

type TxSubmitterEngineOptions

type TxSubmitterEngineOptions struct {
	HorizonURL              string
	SignatureServiceOptions signing.SignatureServiceOptions
	MaxBaseFee              int
}

Jump to

Keyboard shortcuts

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