internal

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceFunc

type ServiceFunc func(ctx context.Context) error

type ServiceOptions

type ServiceOptions struct {
	// 服务名称(用来代码中打印日志之类的)
	Name string
	// 给用户看的服务名称
	DisplayName string
	// 给用户看到服务描述信息
	Description string

	// 是否自动启用
	DefaultAction osservice.ServiceAction

	// 日志记录器
	Logger *logger.Logger
	ErrLog *logger.Logger
	// 服务操作函数,需要用户实现
	StartFunc   ServiceFunc
	StopFunc    ServiceFunc
	RestartFunc ServiceFunc
}

type ServiceOption func(opts *ServiceOptions) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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