config

package
v0.0.0-...-fd6c416 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: GPL-3.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Reader = Map{
	Prefixes: map[string]int{},
}

Reader all loaded config

Functions

func Load

func Load(opt *Opt)

Load load config

Types

type ClusterInfo

type ClusterInfo struct {
	IsMain   bool
	Name     string
	Nodes    []string
	Prefixes []string
}

ClusterInfo struct

type Map

type Map struct {
	Clusters []ClusterInfo
	Prefixes map[string]int
	Port     int

	Pool      PoolConfig
	MainIndex int
}

Map struct

type Opt

type Opt struct {
	Type      string // json, etcd, consul
	File      string
	Path      string
	Host      string
	EtcdAddr  string
	ConsulKey string
}

Opt config option struct

type PoolConfig

type PoolConfig struct {
	MaxCap  int
	InitCap int
}

PoolConfig struct

Jump to

Keyboard shortcuts

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