avm

package
v0.0.43 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrAlreadyStarted = "already started"
	ErrAlreadyStopped = "already stopped"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SSP

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

SSP is a Start-Stop Protector. It protects anything from multiple starts, multiple stops and simultaneous start-stops. This is a helper object which provides convenient access to functions used to protect starting and stopping procedures from stupid users.

func NewSSP

func NewSSP() (ssp *SSP)

func (*SSP) BeginStart

func (ssp *SSP) BeginStart() (err error)

func (*SSP) BeginStop

func (ssp *SSP) BeginStop() (err error)

func (*SSP) CompleteStart

func (ssp *SSP) CompleteStart()

func (*SSP) CompleteStop

func (ssp *SSP) CompleteStop()

func (*SSP) Lock

func (ssp *SSP) Lock()

func (*SSP) Unlock

func (ssp *SSP) Unlock()

Jump to

Keyboard shortcuts

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