Documentation
¶
Overview ¶
Package clg provides the specification of a CLG service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Collection ¶
type Collection struct {
// Public.
List []Service
Divide Service
Greater Service
Input Service
IsBetween Service
IsGreater Service
IsLesser Service
Lesser Service
Multiply Service
Output Service
PassThroughFloat64 Service
PassThroughString Service
ReadInformationSequence Service
ReadSeparator Service
Round Service
Subtract Service
Sum Service
// contains filtered or unexported fields
}
Collection is the object bundling all CLGs.
func NewCollection ¶
func NewCollection(config CollectionConfig) (*Collection, error)
NewCollection creates a new configured CLG Collection.
func (*Collection) Boot ¶
func (c *Collection) Boot()
func (*Collection) Shutdown ¶
func (c *Collection) Shutdown()
type CollectionConfig ¶
type CollectionConfig struct {
// Dependencies.
EventCollection *event.Collection
IDService id.Service
IndexService index.Service
OutputCollection *output.Collection
PeerCollection *peer.Collection
RandomService random.Service
}
CollectionConfig represents the configuration used to create a new CLG collection.
func DefaultCollectionConfig ¶
func DefaultCollectionConfig() CollectionConfig
DefaultCollectionConfig provides a default configuration to create a new CLG collection by best effort.
type Service ¶
type Service interface {
// Action returns the CLG's calculation function which implements the CLG's
// actual business logic.
Action() interface{}
// Boot initializes and starts the whole CLG like booting a machine. The call
// to Boot blocks until the CLG is completely initialized, so you might want
// to call it in a separate goroutine.
Boot()
// Metadata returns a copy of the CLG's metadata. Metadata can be information
// like service name, service kind, service ID or the like.
Metadata() map[string]string
// Shutdown ends all processes of the CLG like shutting down a machine. The
// call to Shutdown blocks until the CLG is completely shut down, so you might
// want to call it in a separate goroutine.
Shutdown()
}
Service represents the CLGs that are interacting with each other within the neural network. Each CLG is registered in the neural network. From there signals are dispatched across queues in a dynamic fashion until some useful calculation took place.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package divide implements github.com/the-anna-project/clg.Service and provides the mathematical operation of division.
|
Package divide implements github.com/the-anna-project/clg.Service and provides the mathematical operation of division. |
|
Package greater implements github.com/the-anna-project/clg.Service provides a method to identify which of the given numbers is greater than the other.
|
Package greater implements github.com/the-anna-project/clg.Service provides a method to identify which of the given numbers is greater than the other. |
|
Package input implements github.com/the-anna-project/clg.Service and provides the entry to the neural network.
|
Package input implements github.com/the-anna-project/clg.Service and provides the entry to the neural network. |
|
is
|
|
|
between
Package between implements github.com/the-anna-project/clg.Service and provides a method to identify if a given number is between a given range.
|
Package between implements github.com/the-anna-project/clg.Service and provides a method to identify if a given number is between a given range. |
|
greater
Package greater implements github.com/the-anna-project/clg.Service and provides a method to identify if the first given number is greater than the later.
|
Package greater implements github.com/the-anna-project/clg.Service and provides a method to identify if the first given number is greater than the later. |
|
lesser
Package lesser implements github.com/the-anna-project/clg.Service and provides a method to identify if the first given number is lesser than the later.
|
Package lesser implements github.com/the-anna-project/clg.Service and provides a method to identify if the first given number is lesser than the later. |
|
Package lesser implements github.com/the-anna-project/clg.Service and provides a method to identify which of the given numbers is lesser than the other.
|
Package lesser implements github.com/the-anna-project/clg.Service and provides a method to identify which of the given numbers is lesser than the other. |
|
Package multiply implements github.com/the-anna-project/clg.Service and provides the mathematical operation of multiplication.
|
Package multiply implements github.com/the-anna-project/clg.Service and provides the mathematical operation of multiplication. |
|
Package output implements github.com/the-anna-project/clg.Service and provides one of the two very special CLGs.
|
Package output implements github.com/the-anna-project/clg.Service and provides one of the two very special CLGs. |
|
pass
|
|
|
through/float64
Package float64 implements github.com/the-anna-project/clg.Service and provides a method to pass through the received float64 argument as it is.
|
Package float64 implements github.com/the-anna-project/clg.Service and provides a method to pass through the received float64 argument as it is. |
|
through/string
Package string implements github.com/the-anna-project/clg.Service and provides a method to pass through the received string argument as it is.
|
Package string implements github.com/the-anna-project/clg.Service and provides a method to pass through the received string argument as it is. |
|
read
|
|
|
information/sequence
Package sequence implements github.com/the-anna-project/clg.Service and provides functionality to read the information sequence stored under a provided information ID.
|
Package sequence implements github.com/the-anna-project/clg.Service and provides functionality to read the information sequence stored under a provided information ID. |
|
separator
Package separator implements github.com/the-anna-project/clg.Service and provides functionality to provide a separator stored as peer value of a specific information peer.
|
Package separator implements github.com/the-anna-project/clg.Service and provides functionality to provide a separator stored as peer value of a specific information peer. |
|
Package round implements github.com/the-anna-project/clg.Service and provides a method to round the given number using the given precision.
|
Package round implements github.com/the-anna-project/clg.Service and provides a method to round the given number using the given precision. |
|
Package subtract implements github.com/the-anna-project/clg.Service and provides the mathematical operation of subtraction.
|
Package subtract implements github.com/the-anna-project/clg.Service and provides the mathematical operation of subtraction. |
|
Package sum implements github.com/the-anna-project/clg.Service and provides the mathematical operation of addition.
|
Package sum implements github.com/the-anna-project/clg.Service and provides the mathematical operation of addition. |
Click to show internal directories.
Click to hide internal directories.