Categorygithub.com/metal-toolbox/ctrl
repositorypackage
1.1.1
Repository: https://github.com/metal-toolbox/ctrl.git
Documentation: pkg.go.dev

# README

Controller library

This library provides a wrapper to enable Controllers interface with NATS and abstract away dealing with retrieving a Condition, execute the registered handler and publish status updates.

It covers,

  • Interfacing with Jetstream, KV and dealing with keep alive sematics
  • Listening for Conditions on either NATS directly or through an HTTPs endpoint provided by the Orchestator API
  • Publishes the first status before executing the Controller handler method
  • Invokes the Controller handler, passing it a Task object (Controllers don't know and don't care about Conditions)
  • Covers up for any failures or panics in the controller Handler
  • Collect trace telemetry and metrics for Conditions handled

Projects using ctrl

This Controller ctrl library is imported by Controllers interfacing with the Condition Orchestrator.