server

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoveryCaller added in v1.13.12

func RecoveryCaller(proc string, rec any, data ...any)

func RunNbr added in v1.10.9

func RunNbr(max uint8, chk FunCheck, run FunRun) bool

func RunTick added in v1.10.9

func RunTick(ctx context.Context, tick, max time.Duration, chk FunCheck, run FunRun) bool

Types

type FunCheck added in v1.10.9

type FunCheck func() bool

type FunRun added in v1.10.9

type FunRun func()

type FuncAction added in v1.13.13

type FuncAction func(ctx context.Context) error

type FuncTicker added in v1.13.13

type FuncTicker func(ctx context.Context, tck *time.Ticker) error

type Server

type Server interface {
	// Start is used to start the server
	Start(ctx context.Context) error

	// Stop is used to stop the server
	Stop(ctx context.Context) error

	// Restart is used to restart the server
	Restart(ctx context.Context) error

	// IsRunning return true if the server is currently running
	IsRunning() bool

	//Uptime return the duration since last launch
	Uptime() time.Duration
}

type WaitNotify

type WaitNotify interface {
	StartWaitNotify(ctx context.Context)
	StopWaitNotify()
}

Directories

Path Synopsis
runner

Jump to

Keyboard shortcuts

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