setup

package
v0.0.0-...-6caa50c Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package setup contains common wiring/setup code used by all services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadO11y

func LoadO11y(version, mode string, cli CLI) (context.Context, func(context.Context), error)

func LoadTxManager

func LoadTxManager(ctx context.Context, cli CLI, sys *system.System) (*db.TxManager, error)

Types

type CLI

type CLI struct {
	AdminAddr string `env:"ADMIN_ADDR" default:":8001" help:"The address for the admin api to listen on"`

	O11yStatsd           string        `` /* 127-byte string literal not displayed */
	O11yHoneycombEnabled bool          `name:"o11y-honeycomb" env:"O11Y_HONEYCOMB" default:"true" help:"Send traces to honeycomb"`
	O11yHoneycombDataset string        `name:"o11y-honeycomb-dataset" env:"O11Y_HONEYCOMB_DATASET" default:"execution"`
	O11yHoneycombKey     secret.String `name:"o11y-honeycomb-key" env:"O11Y_HONEYCOMB_KEY"`
	O11yFormat           string        `name:"o11y-format" env:"O11Y_FORMAT" enum:"json,color,text" default:"json" help:"Format used for stderr logging"`
	O11yRollbarToken     secret.String `name:"o11y-rollbar-token" env:"O11Y_ROLLBAR_TOKEN"`
	O11yRollbarEnv       string        `name:"o11y-rollbar-env" env:"O11Y_ROLLBAR_ENV" default:"production"`

	DBHost     string        `env:"DB_HOST" default:"ex-service-template.db.infra.circleci.com"`
	DBPort     int           `env:"DB_PORT" default:"5432"`
	DBUser     string        `env:"DB_USER" default:"ex-service-template"`
	DBPassword secret.String `env:"DB_PASSWORD"`
	DBName     string        `env:"DB_NAME" default:"ex-service-template"`
	DBSSL      bool          `env:"DB_SSL" name:"db-ssl" default:"true"`
}

Jump to

Keyboard shortcuts

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