proxy.golang.org : github.com/lann/cookoo
Basic commands for Cookoo. Cookoo is a Chain-of-Command (CoCo) framework for writing applications. A chain of command framework works as follows: * A "route" is constructed as a chain of commands -- a series of single-purpose tasks that are run in sequence. * An application is composed of one or more routes. * Commands in a route communicate using a Context. * An application Router is used to receive a route name and then execute the appropriate chain of commands. To create a new Cookoo application, use cookoo.Cookoo(). This will configure and create a new registry, request router, and context. From there, use the Registry to build chains of commands, and then use the Router to execute chains of commands. Example: Unlike other CoCo implementations (like Pronto.js or Fortissimo), Cookoo commands are just functions. Interrupts: There are four types of interrupts that you may wish to return: - FatalError: This will stop the route immediately. - RecoverableError: This will allow the route to continue moving. - Stop: This will stop the current request, but not as an error. - Reroute: This will stop executing the current route, and switch to executing another route. To learn how to write Cookoo applications, you may wish to examine the small Skunk application: https://github.com/technosophos/skunk.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/lann/cookoo
License: MIT
Latest release: over 11 years ago
First release: over 11 years ago
Namespace: github.com/lann
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago