conf

package
v0.0.0-...-33fa9ae 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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Address      string `yaml:"address"`
	Password     string `yaml:"password"`
	DialTimeout  int    `yaml:"dial_timeout"`
	ReadTimeout  int    `yaml:"read_timeout"`
	WriteTimeout int    `yaml:"write_timeout"`
	PoolSize     int    `yaml:"pool_size"`
}

type Common

type Common struct {
	IsRelease bool   `yaml:"is_release"`
	LogLevel  int    `yaml:"log_level"`
	CPUs      int    `yaml:"cpus"`
	LogPath   string `yaml:"log_path"`
	LogFile   string `yaml:"log_file"`
	AppFile   string `yaml:"app_file"`
}

type Config

type Config struct {
	Cmn         *Common      `yaml:"common"`
	Server      *WebServer   `yaml:"server"`
	DB          *Database    `yaml:"database"`
	Cache       *Cache       `yaml:"cache"`
	OpenTracing *Opentracing `yaml:"tracing"`
	Metric      *Metrics     `yaml:"metric"`
}

func Setup

func Setup(c string) (*Config, error)

type Database

type Database struct {
	IsDebug  bool   `yaml:"is_debug"`
	Dsn      string `yaml:"dsn"`
	SqlFile  string `yaml:"sql_log"`
	IdleConn int    `yaml:"idle_conn"`
	MaxConn  int    `yaml:"max_conn"`
	LifeTime int    `yaml:"lifeTime"`
}

type Metrics

type Metrics struct {
	IsOnline bool          `yaml:"is_online"`
	FreqSec  time.Duration `yaml:"freq_sec"`
	Address  string        `yaml:"address"`
}

type Opentracing

type Opentracing struct {
	IsOnline    bool   `yaml:"is_online"`
	Type        string `yaml:"type"`
	ServiceName string `yaml:"service_name"`
	Address     string `yaml:"address"`
}

type Session

type Session struct {
	Type     string `yaml:"type"`
	Server   string `yaml:"server"`
	Password string `yaml:"password"`
}

type WebServer

type WebServer struct {
	AppName   string   `yaml:"app"`
	Addr      string   `yaml:"address"`
	DomainApi string   `yaml:"domain_api"`
	Origins   []string `yaml:"origins"`
}

Jump to

Keyboard shortcuts

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