ctx

package
v0.0.0-...-077b43f Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 12 Imported by: 29

Documentation

Overview

Package ctx provides configurations loading and exporting that is shared across gafka project.

Index

Constants

View Source
const (
	DefaultConfig = `` /* 470-byte string literal not displayed */

)

Variables

View Source
var (
	ErrInvalidZone = errors.New("Invalid zone")
)

Functions

func Alias

func Alias(cmd string) (alias string, present bool)

func Aliases

func Aliases() []string

func AliasesWithValue

func AliasesWithValue() map[string]string

func CurrentUserIsRoot

func CurrentUserIsRoot() bool

func DefaultZone

func DefaultZone() string

func EsDefaultZone

func EsDefaultZone() string

func ExtractLoadAvg1m

func ExtractLoadAvg1m(line string) (float64, error)

func Hostname

func Hostname() string

func KafkaHome

func KafkaHome() string

func LoadConfig

func LoadConfig(fn string)

func LoadFromHome

func LoadFromHome()

func LocalIP

func LocalIP() (net.IP, error)

LocalIP tries to determine a non-loopback address for the local machine

func LogLevel

func LogLevel() string

func LookupIpPort

func LookupIpPort(ip, port string) []string

func NamedZoneZkAddrs

func NamedZoneZkAddrs(zone string) string

func NumCPU

func NumCPU() int

func NumCPUStr

func NumCPUStr() string

func ReverseDnsLookup

func ReverseDnsLookup(ip string, port int) (string, bool)

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 Zone

func Zone(z string) *zone

func ZoneZkAddrs

func ZoneZkAddrs(zone string) (zkAddrs string)

func Zones

func Zones() map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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