closes

package
v2.1.41 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MQPriority     = 100
	GormPriority   = 500
	MongoPriority  = 501
	RedisPriority  = 510
	AliLogPriority = 2000
)

Variables

This section is empty.

Functions

func AddShutdown

func AddShutdown(c ...ModuleClose)

AddShutdown 增加程序结束时需要关闭的服务

func Close

func Close()

Close 按照优先级调用关闭方法

func SignalClose

func SignalClose()

SignalClose 监听信号阻塞关闭

Types

type ModuleClose

type ModuleClose struct {
	Name     string
	Priority int
	Func     func()
}

Jump to

Keyboard shortcuts

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