setup

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package setup provides common logic for configuring the various services.

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 AuthorizedAppConfigProvider

type AuthorizedAppConfigProvider interface {
	AuthorizedAppConfig() *authorizedapp.Config
}

AuthorizedAppConfigProvider signals that the config provided knows how to configure authorized apps.

type BlobstoreConfigProvider

type BlobstoreConfigProvider interface {
	BlobstoreConfig() *storage.Config
}

BlobstoreConfigProvider provides the information about current storage configuration.

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.

type KeyManagerConfigProvider

type KeyManagerConfigProvider interface {
	KeyManagerConfig() *keys.Config
}

KeyManagerConfigProvider is a marker interface indicating the key manager should be installed.

type ObservabilityExporterConfigProvider

type ObservabilityExporterConfigProvider interface {
	ObservabilityExporterConfig() *observability.Config
}

ObservabilityExporterConfigProvider signals that the config knows how to configure an observability exporter.

type SecretManagerConfigProvider

type SecretManagerConfigProvider interface {
	SecretManagerConfig() *secrets.Config
}

SecretManagerConfigProvider signals that the config knows how to configure a secret manager.

Jump to

Keyboard shortcuts

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