app

package
v1.17.10 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App service

func New

func New(service factory.ServiceFactory, opts ...Option) *App

New init new service app

func (*App) Run

func (a *App) Run()

Run start app

func (*App) Shutdown added in v1.17.10

func (a *App) Shutdown()

Shutdown graceful shutdown all server, panic if there is still a process running when the request exceed given timeout in context

type Option added in v1.17.10

type Option func(*App)

Option app option

func SetManualShutdown added in v1.17.10

func SetManualShutdown() Option

SetManualShutdown set manual shutdown app with app.Shutdown()

func SetQuitSignalTrigger added in v1.17.10

func SetQuitSignalTrigger(quitSignalTriggers []os.Signal) Option

SetQuitSignalTrigger option

func SetShutdownTimeout added in v1.17.10

func SetShutdownTimeout(shutdownTimeout time.Duration) Option

SetShutdownTimeout set timeout for graceful shutdown

Jump to

Keyboard shortcuts

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