fw_service

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 5 Imported by: 0

README

fw_service

run fw or other http program as system service inline

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAsService

func RunAsService(name string, displayName string, description string, start func(), stop func())

RunAsService 以服务形式运行 封装 github.com/kardianos/service 提供 install, uninstall, start, stop 命令, 用于管理服务 只需在 main 函数中调用 RunAsService start传入的函数会在服务启动时执行(即你真实的启动代码) 支持windows,linux, 参考 github.com/kardianos/service

Types

type FWService

type FWService struct {
	// contains filtered or unexported fields
}

func (*FWService) Start

func (F *FWService) Start(s service.Service) error

func (*FWService) Stop

func (F *FWService) Stop(s service.Service) error

Jump to

Keyboard shortcuts

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