Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flower

flower (flow er) is a package that provides an idiomatic, simple and an expressive way of defining how services (goroutines) should be started and gracefully closed.

Go Reference Build Status Coverage Status Go Report Card

Features

  • Simple API
  • Uses context.Context
  • Hookable functions (e.g. BeforeServiceStart)
  • Configurable panic recovery

Installing

go get -u github.com/advbet/flower

Concept

The key concept comes from flower's ServiceGroup structure. It is a unit that is composed out of many services (goroutines). Within a service group, all goroutines start/close nondeterministically. However, the order of service groups are respected; each service group will start only after the previous group has started, and will close only when the superseding service group is closed. See _example for more details.

Important

Project is still in experimental phase, breaking changes may happen.

About

A package that provides an idiomatic, simple way of defining how goroutines should be started and gracefully closed.

Resources

Stars

7 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages