config

package
v0.0.0-...-f737b9d Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MongoDBRepo = "mongodb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config[C any] interface {
	LoadConfig(name string) (C, error)
}

type Coordinator

type Coordinator struct {
	RescheduleInProgressTasksAfter time.Duration `mapstructure:"RESCHEDULE_IN_PROGRESS_TASKS_AFTER"`
	CheckForTasksToRescheduleEvery time.Duration `mapstructure:"CHECK_FOR_TASKS_TO_RESCHEDULE_EVERY"`
	AutoFlushTasksEvery            time.Duration `mapstructure:"AUTO_FLUSH_TASKS_EVERY"`
	RepoType                       string
	GrpcPort                       int `mapstructure:"GRPC_PORT"`
}

func (*Coordinator) LoadConfig

func (cfg *Coordinator) LoadConfig(name string) (*Coordinator, error)

type MongoDB

type MongoDB struct {
	URI    string `mapstructure:"URI"`
	DBName string `mapstructure:"DB_NAME"`
}

func (*MongoDB) LoadConfig

func (cfg *MongoDB) LoadConfig(name string) (*MongoDB, error)

type RabbitMQ

type RabbitMQ struct {
	URL              string `mapstructure:"URL"`
	QueueName        string `mapstructure:"QUEUE_NAME"`
	EventsBufferSize int    `mapstructure:"EVENTS_BUFFER_SIZE"`
}

func (*RabbitMQ) LoadConfig

func (cfg *RabbitMQ) LoadConfig(name string) (*RabbitMQ, error)

Jump to

Keyboard shortcuts

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