Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Workgroup provides a mechanism for controlling the lifetime of a set of related goroutines

License

Notifications You must be signed in to change notification settings

kkkmmu/workgroup

Heptio Workgroup

Maintainers: Heptio

Build Status

godoc

Overview

Workgroup is a small utility to manage the lifetime of a set of related goroutines.

Examples

http.Serve

var g workgroup.Group
g.Add(func(stop <-chan struct{}) error {
	l, err := net.Listen("tcp", ":80") // listen on port 80
 if err != nil {
 return err
 }
 go func() {
 <-stop // close listener on stop request
 l.Close()
 }()
 return http.Serve(l, mux)
})
g.Run()

Related work

workgroup.Group is heavily inspired by prior art including oklog's run.Group and Gustavo Niemeyer's tomb packages.

Contributing

Thanks for taking the time to join our community and start contributing!

Bug reports are most welcome, but with the exception of #5, this project is closed.

  • Please familiarize yourself with the Code of Conduct before contributing.
  • See CONTRIBUTING.md for information about setting up your environment, the workflow that we expect, and instructions on the developer certificate of origin that we require.

Changelog

See the list of releases to find out about feature changes.

About

Workgroup provides a mechanism for controlling the lifetime of a set of related goroutines

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /