service

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

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

Group is a container for managing a bunch of services.

func (*Group) Add

func (g *Group) Add(services ...Service)

func (*Group) Shutdown

func (g *Group) Shutdown(ctx context.Context)

Shutdown terminates a group of services.

func (*Group) Start

func (g *Group) Start()

Start starts each service in the group.

type RunnableService

type RunnableService interface {
	Service

	Run()
	Shutdown(ctx context.Context) error
}

RunnableService defines a service that can be run.

type Service

type Service interface{}

Service defines a generic service.

Jump to

Keyboard shortcuts

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