Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.46 KB

File metadata and controls

30 lines (21 loc) · 1.46 KB

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.