srv

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(app App)

Main server main

func PrintDefaultCommand added in v1.0.14

func PrintDefaultCommand(out io.Writer)

func PrintDefaultOptions added in v1.0.14

func PrintDefaultOptions(out io.Writer)

func PrintDefaultUsage added in v1.0.27

func PrintDefaultUsage(app App)

func Wait added in v1.0.9

func Wait(app App)

Wait wait signal for reload or shutdown the app

Types

type App

type App interface {
	// Name app/service name
	Name() string

	// DisplayName app/service display name
	DisplayName() string

	// Description app/service description
	Description() string

	// Version app version
	Version() string

	// Usage print command line usage
	Usage()

	// Init initialize the app
	Init()

	// Reload reload the app
	Reload()

	// Run run the app
	Run()

	// Shutdown shutdown the app
	Shutdown()

	// Wait wait signal for reload or shutdown
	Wait()
}

type Cmd added in v1.0.13

type Cmd interface {
	// Flag set custom options
	Flag()

	// Exec execute optional command
	// Windows only: 'install' 'remove' 'start' 'stop' 'debug'
	Exec(cmd string)
}

Jump to

Keyboard shortcuts

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