Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouterFromMap ¶
NewRouterFromMap : Makes a new instance of this module from a map of arguments (for deserialization support)
Types ¶
type DefaultRouter ¶
type DefaultRouter struct {
// Internal
RecentBuffer
Patches []api.Patch
// CheckContent - Check if incoming messages are for the contentKey
CheckContent bool
// CheckChannels - Check if incoming messages are for any of the channel keys
CheckChannels bool
// CheckProfiles - Check if incoming messages are for any of the profile keys
CheckProfiles bool
// ForwardConsumedContent - Should node forward consumed messages that matched contentKey
ForwardConsumedContent bool
// ForwardConsumedContent - Should node forward consumed messages that matched a channel key
ForwardConsumedChannels bool
// ForwardConsumedProfile - Should node forward consumed messages that matched a profile key
ForwardConsumedProfiles bool
// ForwardUnknownContent - Should node forward non-consumed messages that matched contentKey
ForwardUnknownContent bool
// ForwardUnknownContent - Should node forward non-consumed messages that matched a channel key
ForwardUnknownChannels bool
// ForwardUnknownProfile - Should node forward non-consumed messages that matched a profile key
ForwardUnknownProfiles bool
}
DefaultRouter - The Default router makes no changes at all,
every message is sent out on the same channel it came in on, and non-channel messages are consumed but not forwarded
func NewDefaultRouter ¶
func NewDefaultRouter() *DefaultRouter
NewDefaultRouter - returns a new instance of DefaultRouter
func (*DefaultRouter) GetPatches ¶
func (r *DefaultRouter) GetPatches() []api.Patch
GetPatches : Returns an array with the mappings of incoming channels to destination channels
func (*DefaultRouter) MarshalJSON ¶
func (r *DefaultRouter) MarshalJSON() (b []byte, e error)
MarshalJSON : Create a serialized JSON blob out of the config of this router
func (*DefaultRouter) Patch ¶
func (r *DefaultRouter) Patch(patch api.Patch)
Patch : Redirect messages from one input to different outputs
type RecentBuffer ¶
type RecentBuffer struct {
// contains filtered or unexported fields
}
RecentBuffer - Used for tracking recently seen messages
func (*RecentBuffer) SeenRecently ¶
func (r *RecentBuffer) SeenRecently(nonce []byte) bool
SeenRecently : Returns whether this message should be filtered out by loop detection
Click to show internal directories.
Click to hide internal directories.