Library for structuring Golang applications into components
Switch branches/tags
Nothing to show
Clone or download
progrium doc updates
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Latest commit 232356d Nov 9, 2017

README.md

gliderlabs/com

A component-oriented approach to building Golang applications

GoDoc CircleCI Go Report Card Slack Email Updates

Concept

We want to see a world with great "building blocks" where you can quickly build whatever you want. Traditional "composability" is not enough, they need to integrate and hook into each other.

This library provides the core mechanisms needed to build out a modular and extensible component architecture for your application, which also extend into an ecosystem of "drop-in" reusable components.

There are two parts to this package that are designed to work with each other:

  • An object registry for interface-based extension points and dependency injection
  • A configuration API for settings, disabling objects, and picking interface backends

Example application

See the example wiki app repo.

After building out reusable components, a simple wiki with GitHub authentication could be put together in ~200 lines of Go as a single component.

Using com

For now, see GoDocs, the example application, and the components in stdcom.

Dependencies

Good libraries should have minimal dependencies. Here are the ones com uses and for what:

  • github.com/spf13/afero (plugins, config tests)
  • github.com/spf13/viper (config, config/viper)

License

BSD