graceful

package
v0.0.0-...-e027c79 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GraceSIG = newG()

GraceSIG ...

Functions

func SetLog

func SetLog(logger Logger)

SetLog resets logger. NOTE:

the logger is best to implement LoggerWithFlusher interface

Types

type IProcess

type IProcess interface {
	AfterShutdown()
}

IProcess 接口,提供给关闭后行为

type Logger

type Logger interface {
	// Infof logs a message using INFO as log level.
	Infof(format string, v ...interface{})
	// Errorf logs a message using ERROR as log level.
	Errorf(format string, v ...interface{})
}

Logger logger interface

type LoggerWithFlusher

type LoggerWithFlusher interface {
	Logger
	// Flush writes any buffered log to the underlying io.Writer.
	Flush() error
}

LoggerWithFlusher logger interface with flusher

Jump to

Keyboard shortcuts

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