gg_stoppable

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: BSD-3-Clause Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ShutdownCallback

type ShutdownCallback func() error

type Stoppable

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

Stoppable object

func NewStoppable

func NewStoppable() *Stoppable

func (*Stoppable) AddStopOperation

func (instance *Stoppable) AddStopOperation(name string, callback ShutdownCallback) *Stoppable

func (*Stoppable) GetName

func (instance *Stoppable) GetName() string

func (*Stoppable) IsJoined

func (instance *Stoppable) IsJoined() bool

func (*Stoppable) IsStopped

func (instance *Stoppable) IsStopped() bool

func (*Stoppable) ItemId

func (instance *Stoppable) ItemId() string

func (*Stoppable) Join

func (instance *Stoppable) Join()

func (*Stoppable) JoinTimeout

func (instance *Stoppable) JoinTimeout(d time.Duration)

func (*Stoppable) OnStart

func (instance *Stoppable) OnStart(f func())

func (*Stoppable) OnStop

func (instance *Stoppable) OnStop(f func())

func (*Stoppable) OperationsName

func (instance *Stoppable) OperationsName() []string

func (*Stoppable) SetLogger

func (instance *Stoppable) SetLogger(logger gg_.ILogger) *Stoppable

func (*Stoppable) SetName

func (instance *Stoppable) SetName(name string) *Stoppable

func (*Stoppable) Start

func (instance *Stoppable) Start() bool

func (*Stoppable) Stop

func (instance *Stoppable) Stop() bool

func (*Stoppable) String

func (instance *Stoppable) String() string

Jump to

Keyboard shortcuts

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