common

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoginUrl    = "http://%s:7717/v2.2/login"
	LogUrl      = "http://%s:7717/v2.2/logs_upload"
	LogInterval = int(time.Hour * 1)
	LastFile    = "/var/log/datera/last"
	LogFiltered = "/var/log/datera/dlogs.tar.gz"
)
View Source
const (
	ReqName = "req"
	TraceId = "tid"
)

Variables

View Source
var (
	EndLogging = make(chan bool)
)

Functions

func Debug

func Debug(ctxt context.Context, s interface{})

func Debugf

func Debugf(ctxt context.Context, s string, args ...interface{})

func Error

func Error(ctxt context.Context, s interface{})

func Errorf

func Errorf(ctxt context.Context, s string, args ...interface{})

func ExecC

func ExecC(ctxt context.Context, name string, arg ...string) *exec.Cmd

func Fatal

func Fatal(ctxt context.Context, s interface{})

func Fatalf

func Fatalf(ctxt context.Context, s string, args ...interface{})

func GenId

func GenId() string

func Info

func Info(ctxt context.Context, s interface{})

func Infof

func Infof(ctxt context.Context, s string, args ...interface{})

func LogUploadDaemon

func LogUploadDaemon(ip, username, password, file string, interval int) error

func MkCtxt

func MkCtxt(reqName string) context.Context

func PanicErr

func PanicErr(err error)

func Prettify added in v1.1.3

func Prettify(v interface{}) string

func Tsprint

func Tsprint(s string, m map[string]string) (string, error)

func Unpack

func Unpack(b []byte, m *map[string]interface{}) error

func Warning

func Warning(ctxt context.Context, s interface{})

func Warningf

func Warningf(ctxt context.Context, s string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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