config

package
v0.0.0-...-3dd0aef Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Configuration

type Configuration struct {
	Env   string `envconfig:"env"`
	Redis Redis  `envconfig:"redis"`
	Db    Db     `envconfig:"db"`
}

func Get

func Get() Configuration

type Db

type Db struct {
	Dsn         string `envconfig:"dsn"`
	MaxIdle     int    `envconfig:"max_idle" default:"5"`
	MaxOpen     int    `envconfig:"max_open" default:"10"`
	MaxLifetime int    `envconfig:"max_lifetime" default:"3"`
}

type Redis

type Redis struct {
	Dsn        string   `envconfig:"dsn"`
	Topics     []string `envconfig:"topics"`
	MaxIdle    int      `envconfig:"max_idle" default:"10"`
	MaxTimeout int      `envconfig:"max_timeout" default:"240"`
}

Jump to

Keyboard shortcuts

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