config

package
v0.0.0-...-bfb58f9 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr        string `split_words:"true" ,default:"0.0.0.0:8080"`
	MetricsListenAddr string `split_words:"true" ,default:"0.0.0.0:8081"`
	ModelDir          string `split_words:"true" ,required:"true"`
	LogFormat         string `default:"json" ,split_words:"true"`
	LogOutput         io.Writer
}

func FromEnv

func FromEnv() (*Config, error)

type Option

type Option func(cfg *Config)

func WithListenAddress

func WithListenAddress(addr string) Option

func WithLogFormat

func WithLogFormat(logFormat string) Option

func WithLogOutput

func WithLogOutput(w io.Writer) Option

func WithMetricsAddress

func WithMetricsAddress(addr string) Option

func WithModelDir

func WithModelDir(dir string) Option

Jump to

Keyboard shortcuts

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