setup

package
v0.0.0-...-d595cb9 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(ctx context.Context, config interface{}) (*serverenv.ServerEnv, error)

Setup runs common initialization code for all servers. See SetupWith.

func SetupWith

func SetupWith(ctx context.Context, config interface{}, l envconfig.Lookuper) (*serverenv.ServerEnv, error)

SetupWith processes the given configuration using envconfig. It is responsible for establishing database connections, resolving secrets, and accessing app configs. The provided interface must implement the various interfaces.

Types

type DatabaseConfigProvider

type DatabaseConfigProvider interface {
	DatabaseConfig() *database.Config
}

DatabaseConfigProvider ensures that the environment config can provide a DB config. All binaries in this application connect to the database via the same method.

Jump to

Keyboard shortcuts

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