service

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOperating = errors.New("service is operating")
	ErrStarted   = errors.New("service is started")
	ErrStopped   = errors.New("service is stopped")
)

Functions

This section is empty.

Types

type BaseService

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

func NewBaseService

func NewBaseService(service Service, name string) *BaseService

func (*BaseService) Name

func (bs *BaseService) Name() string

func (*BaseService) OnStart

func (bs *BaseService) OnStart() error

func (*BaseService) OnStop

func (bs *BaseService) OnStop() error

func (*BaseService) Start

func (bs *BaseService) Start() error

func (*BaseService) Started

func (bs *BaseService) Started() bool

func (*BaseService) Stop

func (bs *BaseService) Stop() error

type Service

type Service interface {
	Start() error
	OnStart() error
	Stop() error
	OnStop() error
	Started() bool
	Name() string
}

Jump to

Keyboard shortcuts

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