config

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Map = new(ConfMap)

Functions

func LoadFile

func LoadFile(filename string) (err error)

Types

type ConfMap

type ConfMap struct {
	Debug  bool         `hcl:"debug"`
	Env    string       `hcl:"env"`
	Grpc   GrpcConfig   `hcl:"grpc,block"`
	Redis  RedisConfig  `hcl:"redis,block"`
	Sentry SentryConfig `hcl:"sentry,block"`
}

type GrpcConfig

type GrpcConfig struct {
	Host string `hcl:"host"`
	Port int    `hcl:"port"`
}

type RedisConfig

type RedisConfig struct {
	Cluster      bool     `hcl:"cluster"`
	MasterName   string   `hcl:"master_name"`
	Addr         string   `hcl:"addr"`
	Sentinels    []string `hcl:"sentinels"`
	Pass         string   `hcl:"pass"`
	SentinelPass string   `hcl:"sentinel_pass"`
}

type SentryConfig

type SentryConfig struct {
	Enabled bool   `hcl:"enabled"`
	Dsn     string `hcl:"dsn"`
}

Jump to

Keyboard shortcuts

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