package
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Sep 11, 2017
License: BSD-3-Clause
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 18
Opens a new window with list of known importers.
Documentation
¶
Add should be called in init func of an implementing Function.
func RegisteredFunctions() []string
RegisteredFunctions returns a slice of the names of every function registered.
Creator defines the init structure for a Function.
type ErrNotFound struct {
Name string
}
ErrNotFound gives the details of the failed function
Function has a single defined function to serve the purpose of apply logic to a message in order to return
a message.
GetFunction looks up a function by name and then init's it with the provided map.
returns ErrNotFound if the provided name was not registered.
type Mock struct {
ApplyCount int
Err error
}
Mock can be used in tests to track whether Function.Apply was called
and test for expected errors.
Apply fulfills the Function interface for use in tests.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.