grace

package
v0.0.0-...-a1c8074 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	context.Context

	Serve(Service)
	Start(Routine)
}

type Group

type Group struct {
	context.Context
	// contains filtered or unexported fields
}

func NewContext

func NewContext(ctx context.Context) *Group

func (*Group) Serve

func (g *Group) Serve(svc Service)

func (*Group) Shutdown

func (g *Group) Shutdown()

func (*Group) Start

func (g *Group) Start(fn Routine)

func (*Group) Wait

func (g *Group) Wait() error

type Routine

type Routine func() error

type Service

type Service interface {
	Run() error
	Shutdown() error
}

Jump to

Keyboard shortcuts

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