libs

package
v0.0.0-...-fa8434e Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceColor = 34
	DebugColor = 36
	InfoColor  = 32
	WarnColor  = 33
	ErrorColor = 91
	FatalColor = 35
)
View Source
const (
	ServerTag = " [ SERVE ] |%s| - "
	TraceTag  = " [ TRACE ] |%s| - %s:%d: "
	DebugTag  = " [ DEBUG ] |%s| - %s:%d: "
	InfoTag   = " [ INFO  ] |%s| - %s:%d: "
	WarnTag   = " [ WARN  ] |%s| - %s:%d: "
	ErrorTag  = " [ ERROR ] |%s| - %s:%d: "
	FatalTag  = " [ FATAL ] |%s| - %s:%d: "
	ColorTag  = "\x1b[%dm%s\x1b[0m"
)

Variables

This section is empty.

Functions

func GetTimeFormat

func GetTimeFormat() string

func InitGlobalLog

func InitGlobalLog()

func InitWsServer

func InitWsServer(g *ClientGroup, port int, httpsEnable bool,
	crtPath string, keyPath string)

func LoadLoggerModule

func LoadLoggerModule(logLevel string, toFile bool, logPath, logErrorPath string)

func ReleaseLoggerModule

func ReleaseLoggerModule()

Types

type ClientGroup

type ClientGroup struct {
	// contains filtered or unexported fields
}

func NewClientGroup

func NewClientGroup(natsUrls []string) *ClientGroup

func (*ClientGroup) Run

func (g *ClientGroup) Run()

type LogLevel

type LogLevel = int
const (
	TRACE LogLevel = iota
	DEBUG
	INFO
	WARN
	ERROR
	FATAL
)

type Logging

type Logging struct {
	Level LogLevel
	// contains filtered or unexported fields
}
var (
	Log Logging
)

func (*Logging) Debug

func (logging *Logging) Debug(v ...interface{})

func (*Logging) Debugf

func (logging *Logging) Debugf(format string, v ...interface{})

func (*Logging) Error

func (logging *Logging) Error(v ...interface{})

func (*Logging) Errorf

func (logging *Logging) Errorf(format string, v ...interface{})

func (*Logging) Fatal

func (logging *Logging) Fatal(v ...interface{})

func (*Logging) Fatalf

func (logging *Logging) Fatalf(format string, v ...interface{})

func (*Logging) Info

func (logging *Logging) Info(v ...interface{})

func (*Logging) Infof

func (logging *Logging) Infof(format string, v ...interface{})

func (*Logging) Trace

func (logging *Logging) Trace(v ...interface{})

func (*Logging) Tracef

func (logging *Logging) Tracef(format string, v ...interface{})

func (*Logging) Warn

func (logging *Logging) Warn(v ...interface{})

func (*Logging) Warnf

func (logging *Logging) Warnf(format string, v ...interface{})

type MediaRequest

type MediaRequest struct {
	Method string  `json:"method"`
	Params jsonMap `json:"params"`
}

type MediaServer

type MediaServer struct {
	Id   string `json:"id"`
	Area string `json:"area"`
	Host string `json:"host"`
	Name string `json:"name"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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