gg_stoppable

package
v0.2.85 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: BSD-3-Clause Imports: 10 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) GetSleep added in v0.2.40

func (instance *Stoppable) GetSleep() time.Duration

func (*Stoppable) GetTimeout added in v0.2.40

func (instance *Stoppable) GetTimeout() time.Duration

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 func() gg_.ILogger) *Stoppable

func (*Stoppable) SetName

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

func (*Stoppable) SetSleep added in v0.2.40

func (instance *Stoppable) SetSleep(value time.Duration) *Stoppable

func (*Stoppable) SetTimeout added in v0.2.40

func (instance *Stoppable) SetTimeout(value time.Duration) *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