Documentation ¶
Overview ¶
Package ctx provides configurations loading and exporting that is shared across gafka project.
Index ¶
- Constants
- Variables
- func Alias(cmd string) (alias string, present bool)
- func Aliases() []string
- func AliasesWithValue() map[string]string
- func CurrentUserIsRoot() bool
- func DefaultZone() string
- func EsDefaultZone() string
- func ExtractLoadAvg1m(line string) (float64, error)
- func Hostname() string
- func KafkaHome() string
- func LoadConfig(fn string)
- func LoadFromHome()
- func LocalIP() (net.IP, error)
- func LogLevel() string
- func LookupIpPort(ip, port string) []string
- func NamedZoneZkAddrs(zone string) string
- func NumCPU() int
- func NumCPUStr() string
- func ReverseDnsLookup(ip string, port int) (string, bool)
- func SortedZones() []string
- func UpgradeCenter() string
- func ZkDefaultZone() string
- func Zone(z string) *zone
- func ZoneZkAddrs(zone string) (zkAddrs string)
- func Zones() map[string]string
Constants ¶
View Source
const (
DefaultConfig = `` /* 470-byte string literal not displayed */
)
Variables ¶
View Source
var (
ErrInvalidZone = errors.New("Invalid zone")
)
Functions ¶
func AliasesWithValue ¶
func CurrentUserIsRoot ¶
func CurrentUserIsRoot() bool
func DefaultZone ¶
func DefaultZone() string
func EsDefaultZone ¶
func EsDefaultZone() string
func ExtractLoadAvg1m ¶
func LoadConfig ¶
func LoadConfig(fn string)
func LoadFromHome ¶
func LoadFromHome()
func LookupIpPort ¶
func NamedZoneZkAddrs ¶
func SortedZones ¶
func SortedZones() []string
func UpgradeCenter ¶
func UpgradeCenter() string
UpgradeCenter return the uri where to fetch gk/kguard/kateway/.gafka.cf files.
func ZkDefaultZone ¶
func ZkDefaultZone() string
func ZoneZkAddrs ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.