config

package
v0.0.0-...-a0cf74a Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(log logger.Logger, cfg *Config) (*neo4j.DriverWithContext, error)

Types

type Config

type Config struct {
	Neo4jDb commconf.Neo4jConfig

	PostgresConfig      commconf.PostgresConfig
	PostgresAsyncConfig commconf.PostgresAsyncConfig

	AirbytePostgresDb struct {
		Host            string `env:"DB_AIRBYTE_HOST,required"`
		Port            int    `env:"DB_AIRBYTE_PORT,required"`
		Pwd             string `env:"DB_AIRBYTE_PWD,required,unset"`
		User            string `env:"DB_AIRBYTE_USER,required"`
		MaxConn         int    `env:"DB_AIRBYTE_MAX_CONN"`
		MaxIdleConn     int    `env:"DB_AIRBYTE_MAX_IDLE_CONN"`
		ConnMaxLifetime int    `env:"DB_AIRBYTE_CONN_MAX_LIFETIME"`
		Name            string `env:"DB_AIRBYTE_NAME,required"`
	}
	SyncCustomerOsData struct {
		TimeoutAfterTaskRun int `env:"TIMEOUT_AFTER_TASK_RUN_SEC" envDefault:"60"`
		BatchSize           int `env:"SYNC_CUSTOMER_OS_DATA_BATCH_SIZE" envDefault:"10"`
	}

	GrpcClientConfig commconf.GrpcClientConfig
	Logger           logger.Config
	Service          struct {
		CustomerOsWebhooksAPI    string `env:"CUSTOMER_OS_WEBHOOKS_API,required"`
		CustomerOsWebhooksAPIKey string `env:"CUSTOMER_OS_WEBHOOKS_API_KEY,required"`
	}
	Jaeger tracing.Config
}

func Load

func Load() *Config

type Context

type Context struct {
	Schema string
}

type RawDataStoreDB

type RawDataStoreDB struct {
	CreationMutex sync.Mutex
	// contains filtered or unexported fields
}

func InitPoolManager

func InitPoolManager(cfg *Config) *RawDataStoreDB

func (*RawDataStoreDB) CreateDBHandler

func (s *RawDataStoreDB) CreateDBHandler(ctx *Context) *gorm.DB

func (*RawDataStoreDB) GetDBHandler

func (s *RawDataStoreDB) GetDBHandler(ctx *Context) *gorm.DB

Jump to

Keyboard shortcuts

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