conf

package
v0.0.0-...-3d2851a Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2016 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tags                    = make(map[string]*Group)
	DEFAULE_TIMEOUT  uint64 = 10000
	DEFAULT_PROTOCOL        = "http"
	DEFAULT_MAXRETRY uint   = 1
)
View Source
var (
	Globals = &Config{}
)

Functions

func BuildURI

func BuildURI(tagName string, path string) string

func GetAdminPort

func GetAdminPort() int

func GetOpenDomainWhitelist

func GetOpenDomainWhitelist() []string

func GetPort

func GetPort() int

func GetReferrerWhiteList

func GetReferrerWhiteList() []string

func IsOpenAdmin

func IsOpenAdmin() bool

func IsOpenDomainWhitelist

func IsOpenDomainWhitelist() bool

func IsOpenReferrer

func IsOpenReferrer() bool

Types

type Config

type Config struct {
	Port                  int
	IsOpenReferrer        bool
	ReferrerWhiteList     []string
	IsOpenDomainWhitelist bool
	DomainWhitelist       []string
	IsOpenAdmin           bool
	AdminPort             int
}

type Group

type Group struct {
	Timeout  uint64
	Protocol string
	Balance  string
	MaxRetry uint
	Host     string
	Machines *[]*Machine
}

type Machine

type Machine struct {
	Host     string
	Port     int
	Enable   bool
	FailTime int
}

Jump to

Keyboard shortcuts

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