runtime

package
v0.4.32 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithGracefulStopFunc

func WithGracefulStopFunc(gracefulStopFunc func()) option

func WithNumCPU

func WithNumCPU(numCPU int) option

func WithRLimitEnabled

func WithRLimitEnabled() option

func WithRunFunc

func WithRunFunc(runFunc func()) option

Types

type Hooks

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

func (*Hooks) Init

func (h *Hooks) Init() func()

func (*Hooks) OnStarted

func (h *Hooks) OnStarted() func()

func (*Hooks) OnStarting

func (h *Hooks) OnStarting() func()

func (*Hooks) OnStopped

func (h *Hooks) OnStopped() func()

func (*Hooks) SetInit

func (h *Hooks) SetInit(hook func())

func (*Hooks) SetOnStarted

func (h *Hooks) SetOnStarted(hook func())

func (*Hooks) SetOnStarting

func (h *Hooks) SetOnStarting(hook func())

func (*Hooks) SetOnStopped

func (h *Hooks) SetOnStopped(hook func())

type Runtime

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

func New

func New(opts ...option) *Runtime

func (*Runtime) AddRunFunc

func (r *Runtime) AddRunFunc(runFunc func())

func (Runtime) Run

func (r Runtime) Run(forever ...bool)

func (*Runtime) Shutdown added in v0.4.26

func (r *Runtime) Shutdown()

Jump to

Keyboard shortcuts

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