config

package
v0.0.0-...-d6038a4 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C struct {
	AppName  string `env:"APP_NAME" default:"relay"`
	Listen   string `env:"LISTEN" default:"0.0.0.0" usage:"network listen address"`
	Port     int    `env:"PORT" default:"3334" usage:"port to listen on"` // PORT is used by heroku
	Pprof    bool   `env:"PPROF" default:"false" usage:"enable pprof on 127.0.0.1:6060"`
	MemLimit int64  `env:"MEM_LIMIT" default:"250000000" usage:"set memory limit, default is 250Mb"`
}

C is the configuration for a relay. Note that it is absolutely minimal. More complex configurations should generally be stored in the database, where APIs make them easy to modify.

func New

func New() (c *C)

Directories

Path Synopsis
Package keyvalue provides tools to convert any config struct using go-simpler/env struct tagged configuration structures into a sortable slice of key-values, and a printer to render them as a bash shell script to set the variables from a configuration file.
Package keyvalue provides tools to convert any config struct using go-simpler/env struct tagged configuration structures into a sortable slice of key-values, and a printer to render them as a bash shell script to set the variables from a configuration file.

Jump to

Keyboard shortcuts

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