const (
CONFIG_FILE = "/tmp/goeasyops.config"
REGISTRY_DEFAULT = "localhost:5000"
)
const (
BUILD_NUMBER = 1 // replaceme
BUILD_DESCRIPTION = "not set" //replaceme
BUILD_TIMESTAMP = 1 //replaceme
BUILD_REPOSITORY_ID = 1 // replaceme
BUILD_ARTEFACT_ID = 1 // replaceme
BUILD_REPOSITORY = "not set" // replaceme
BUILD_COMMIT = "not set" // replaceme
)
var (
XXdoappinfo = ImmediatePara("ge_info", "print application build number", doappinfo)
)
func ContextWithBuilder() bool
func Datacenter() bool
func DebugAuth() bool
func DebugSignature() bool
func DebugfContext(format string, args ...interface{})
print context debug stuff
func DebugfRPC(format string, args ...interface{})
print context debug stuff
func DefaultTimeout() time.Duration
default timeout for new contexts
func ENV(name, description string) *env_var
func EnabledExperiments() []string
func GetClientRegistryAddress() string
get registry address as per -registry parameter, or if -registry_resolver is set, use that
func GetContextBuilderVersion() int
this is for testing purposes to mock the parameter -ge_context_with_builder
func GetEnvContext() string
get a serialised context from environment variable GE_CTX
func GetInstanceID() string
func GetPid() uint64
func GetRegistryAddress() string
get registry address as per -registry parameter
func GetYACloudDir() string
usually returns /opt/yacloud/current
func ImmediatePara(name string, desc string, f func()) *impara
func IsDebugRPCClient() bool
func IsDebugRPCServer() bool
func IsEasyopsFlag(name string) bool
is this a flag defined and used by go-easyops?
func IsStandalone() bool
func LocalRegistrationDir() string
func OptEnvString(para, envname string) string
if (para != "") { return para }, else return os.GetEnv(envname)
func PrintDefaults()
func PrintUsage()
func RandomString(n int) string
copy of "utils", but avoiding import cycle
func SetClientRegistryAddress(reg string)
programmatically override -registry_resolver flag
func SetContextBuilderVersion(version int)
this is for testing purposes to mock the parameter -ge_context_with_builder
func SetDatacenter(b bool)
for testing purposes to mock parameter -AD_started_by_auto_deployer
func SetDebugContext()
func SetEnvContext(s string)
this is for testing purposes to mock the environment variable GE_CTX
func SourceCodePath() string
returns the sourceode path from which main() was compiled into this binary