bridge_activity_matcher

package
v1.6.28 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MIGRATION_DIRECOTRY = "projection/bridge_activity/bridge_activity_matcher/migrations"
)

Variables

View Source
var (
	NewBridgePendingActivitiesView = view.NewBridgePendingActivitiesView
	NewBridgeActivitiesView        = view.NewBridgeActivitiesView
	NewPgxConnPool                 = func(config *pg.PgxConnPoolConfig, logger applogger.Logger) (rdb.Conn, error) {
		return pg.NewPgxConnPool(config, logger)
	}
)

Functions

This section is empty.

Types

type BridgeActivityMatcher

type BridgeActivityMatcher struct {
	projection_usecase.Base
	// contains filtered or unexported fields
}

func New

func New(
	config Config,
	logger applogger.Logger,
	rdbConn rdb.Conn,
	migrationHelper migrationhelper.MigrationHelper,
) *BridgeActivityMatcher

func (*BridgeActivityMatcher) Config

func (cronJob *BridgeActivityMatcher) Config() *Config

func (*BridgeActivityMatcher) Exec

func (cronJob *BridgeActivityMatcher) Exec() error

func (*BridgeActivityMatcher) HandleIncoming

func (cronJob *BridgeActivityMatcher) HandleIncoming(
	rows []view.BridgePendingActivityReadRow,
	bridgePendingActivities view.BridgePendingActivities,
) error

func (*BridgeActivityMatcher) HandleOutgoing

func (cronJob *BridgeActivityMatcher) HandleOutgoing(
	rows []view.BridgePendingActivityReadRow,
	bridgePendingActivities view.BridgePendingActivities,
) error

func (*BridgeActivityMatcher) Id

func (cronJob *BridgeActivityMatcher) Id() string

func (*BridgeActivityMatcher) Interval

func (cronJob *BridgeActivityMatcher) Interval() time.Duration

func (*BridgeActivityMatcher) OnInit

func (cronJob *BridgeActivityMatcher) OnInit() error

type Config

type Config struct {
	Interval           time.Duration             `mapstructure:"interval"`
	CounterpartyChains []CounterpartyChainConfig `mapstructure:"counterparty_chains"`
}

func ConfigFromInterface added in v1.3.1

func ConfigFromInterface(data interface{}) (Config, error)

type CounterpartyChainConfig added in v1.3.4

type CounterpartyChainConfig struct {
	Name     string                     `mapstructure:"name"`
	Database CounterpartyDatabaseConfig `mapstructure:"database"`
}

type CounterpartyDatabaseConfig added in v1.3.4

type CounterpartyDatabaseConfig struct {
	SSL                 bool          `mapstructure:"ssl"`
	Host                string        `mapstructure:"host"`
	Port                int32         `mapstructure:"port"`
	Username            string        `mapstructure:"username"`
	PasswordEnv         string        `mapstructure:"password_env"`
	Name                string        `mapstructure:"name"`
	Schema              string        `mapstructure:"schema"`
	MaxConns            int32         `mapstructure:"pool_max_conns"`
	MinConns            int32         `mapstructure:"pool_min_conns"`
	MaxConnLifeTime     time.Duration `mapstructure:"pool_max_conn_lifetime"`
	MaxConnIdleTime     time.Duration `mapstructure:"pool_max_conn_idle_time"`
	HealthCheckInterval time.Duration `mapstructure:"pool_health_check_interval"`
}

Jump to

Keyboard shortcuts

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