service

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Name string

	User  string
	Group string

	PidFile string
	LogFile string

	SigINT chan os.Signal
	SigHUP chan os.Signal

	BindFn   func() (err error)
	ServeFn  func() (err error)
	StopFn   func() (err error)
	ReloadFn func() (err error)

	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Service) Cleanup

func (s *Service) Cleanup() (err error)

func (*Service) HandleSIGHUP

func (s *Service) HandleSIGHUP()

func (*Service) HandleSIGINT

func (s *Service) HandleSIGINT()

func (*Service) IsRunning

func (s *Service) IsRunning() (running bool)

func (*Service) LogError

func (s *Service) LogError(err error)

func (*Service) LogErrorF

func (s *Service) LogErrorF(format string, argv ...interface{})

func (*Service) LogInfoF

func (s *Service) LogInfoF(format string, argv ...interface{})

func (*Service) SendSignal

func (s *Service) SendSignal(sig syscall.Signal) (err error)

func (*Service) Start

func (s *Service) Start() (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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