daemon

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// 日志级别.
	CRITICAL = logger.CriticalLevel
	ERROR    = logger.ErrorLevel
	WARN     = logger.WarningLevel
	NOTICE   = logger.NoticeLevel
	INFO     = logger.InfoLevel
	DEBUG    = logger.DebugLevel
)

Variables

View Source
var (
	Signal = flag.String("s", "", "send `signal` to a master process: stop, restart, status")

	// bifrost配置.
	AuthConf = &Config{}

	// 日志文件.
	Logf    *os.File
	Stdoutf *os.File
)

Functions

func ListenSignal

func ListenSignal(sigChan chan<- int)

func Log

func Log(level logger.LogLevel, message string, a ...interface{})

Log, 日志记录函数 参数:

level: 日志级别对象
message: 需记录的日志信息字符串

func PathExists

func PathExists(path string) (bool, error)

PathExists, 判断文件路径是否存在函数 参数:

path: 待判断的文件路径字符串

返回值:

true: 存在; false: 不存在
错误

func Restart

func Restart() error

Restart, 守护进程 restart 方法函数 返回值:

错误

func ServerRun

func ServerRun() error

func Start

func Start() (err error)

Start, 守护进程 start 方法函数 返回值:

错误

func Status

func Status() (int, error)

Status, 守护进程 status 方法函数 返回值:

错误

func Stop

func Stop() error

Stop, 守护进程 stop 方法函数 返回值:

错误

Types

type Config

type Config struct {
	AuthService *service.AuthService `yaml:"AuthService"`
	LogConfig   `yaml:"LogConfig"`
}

Config, bifrost配置文件结构体,定义bifrost配置信息.

type LogConfig

type LogConfig struct {
	LogDir string          `yaml:"logDir"`
	Level  logger.LogLevel `yaml:"level"`
}

LogConfig, bifrost日志信息结构体,定义日志目录、日志级别.

func (LogConfig) IsDebugLvl

func (l LogConfig) IsDebugLvl() bool

Jump to

Keyboard shortcuts

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