adapters

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMongoClient

func CreateMongoClient(ctx context.Context, mongoConfig MongoConfig) *mongo.Client

func CreatePostgresClient

func CreatePostgresClient(ctx context.Context, postgresConfig PostgresConfig) *gorm.DB

func CreateRedisClient added in v0.3.10

func CreateRedisClient(ctx context.Context, redisConfig RedisConfig) *redis.Client

func CreateSentry added in v0.3.0

func CreateSentry(sentryConfig SentryConfig) error

func NewKafkaConn added in v0.3.2

func NewKafkaConn(cfg *config.Config) (*kafka.Conn, error)

func NewLauncher added in v0.5.10

func NewLauncher(launcherConfig LauncherConfig) *launcher.Launcher

Types

type Adapter

type Adapter interface {
	CreateClient(ctx context.Context, options *models.DBOptions) interface{}
}

type LauncherConfig added in v0.5.10

type LauncherConfig struct {
	ServiceName string
	AccessToken string
}

type MongoConfig added in v0.5.10

type MongoConfig struct {
	URI         string
	MaxPoolSize uint64
	MinPoolSize uint64
	RetryWrites bool
}

type PostgresConfig added in v0.5.10

type PostgresConfig struct {
	URL      string
	Host     string
	Port     int
	DB       string
	User     string
	Password string
}

type RedisConfig added in v0.5.10

type RedisConfig struct {
	Addr string
	DB   int
}

type SentryConfig added in v0.5.10

type SentryConfig struct {
	DSN              string
	Env              string
	TracesSampleRate float64
}

Jump to

Keyboard shortcuts

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