Agents - craterdog/go-component-framework GitHub Wiki
Overview
Higher level programming tasks often require "tried and true" mechanisms for
interacting with and manipulating data. The agent
package provides classes
that help with some of these common tasks:
Encoder
- An encoder is used for encoding and decoding bytes using various encoding mechanisms.Generator
- A generator is used for generating cryptographically secure random values.Controller
- A controller is used for implementing state table driven processing of events.Iterator[V]
- An iterator is used for traversing sequences of values of typeV
.Collator[V]
- A collator is used for ranking two values of typeV
.Sorter[V]
- A sorter is used for sorting a sequence of values of typeV
using a collator.
To view the details of a particular agent class type click on the links listed in the side bar in the upper right corner ↗️ of this page.
Class Model
The following UML diagram shows the ClassLike
interfaces (shown in blue)
that are defined for each agent class. The ClassLike
interfaces define
the constructors that are used to create new instances of each class type.
The agent
package itself defines global functions (shown in violet) for
accessing each class interface. The global functions are the only concrete
functions defined in the package—everything else is either an abstract type or
an interface. This is in accordance with the Crater Dog Coding Conventions
defined
here.