Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type All ¶
type All struct { }
All passes all messages. Configuration example
- "stream.Broadcast": Filter: "filter.All"
type JSON ¶
type JSON struct {
// contains filtered or unexported fields
}
JSON allows filtering of JSON messages by looking at certain fields. Note that this filter is quite expensive due to JSON marshaling and regexp testing of every message passing through it. Configuration example
- "stream.Broadcast": Filter: "filter.JSON" FilterReject: "command" : "state\d\..*" FilterAccept: "args/results[0]value" : "true" "args/results[1]" : "true" "command" : "state\d\..*"
FormatReject defines fields that will cause a message to be rejected if the given regular expression matches. Rejects are checked before Accepts. Field paths can be defined in a format accepted by shared.MarshalMap.Path.
FormatAccept defines fields that will cause a message to be rejected if the given regular expression does not match. Field paths can be defined in a format accepted by shared.MarshalMap.Path.
type None ¶
type None struct { }
None blocks all messages. Configuration example
- "stream.Broadcast": Filter: "filter.None"
type RegExp ¶
type RegExp struct {
// contains filtered or unexported fields
}
RegExp allows filtering messages using regular expressions. Configuration example
- "stream.Broadcast": Filter: "filter.RegExp" FilterExpression: "\d+-.*" FilterExpressionNot: "\d+-.*"
FilterExpression defines the regular expression used for matching the message payload. If the expression matches, the message is passed.
FilterExpressionNot defines a negated regular expression used for matching the message payload. If the expression matches, the message is blocked.
type Stream ¶ added in v0.4.0
type Stream struct {
// contains filtered or unexported fields
}
Stream filters messages by stream based on a black and a whitelist. The blacklist is checked first. Configuration example
- "stream.Broadcast": Filter: "filter.Stream" FilterBlockStreams:
- "foo" FilterOnlyStreams:
- "test1"
- "test2"
FilterBlockStreams sets a list of streams that are blocked. If a message's stream is not in that list, the OnlyStreams list is tested. This list ist empty by default.
FilterOnlyStreams sets a list of streams that may pass. Messages from streams that are not in this list are blocked unless the list is empty. By default this list is empty.