Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceFunc ¶
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
Click to show internal directories.
Click to hide internal directories.