Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct {
// contains filtered or unexported fields
}
Constraint is a struct representing a constraint that should be applied to the metadata of for example a Message
func (Constraint) Field ¶
func (c Constraint) Field() string
Field returns the metadata string field
type Matcher ¶
type Matcher interface { // Iterate calls the callback for each constraint Iterate(callback func(constraint Constraint)) }
Matcher is a struct used to register constraints that should be applied to the metadata of for example a Message
func NewMatcher ¶
func NewMatcher() Matcher
NewMatcher return a new Matcher instance without any constraints
type Metadata ¶
type Metadata interface { // Value returns the value associated with this context for key, or nil // if no value is associated with key. Successive calls to Value with // the same key returns the same result. Value(key string) interface{} // AsMap return the Metadata as a map[string]interface{} AsMap() map[string]interface{} }
Metadata is an immutable map[string]interface{} implementation
func UnmarshalJSON ¶
UnmarshalJSON unmarshals the provided json into a Metadata instance
type Operator ¶
type Operator string
Operator represents a operation for a constraint
const ( // Equals is a mathematical symbol used to indicate equality. // It is also a Drama/Science fiction film from 2015. Equals Operator = "=" // GreaterThan is a mathematical symbol that denotes an inequality between two values. // It is typically placed between the two values being compared and signals that the first number is greater than the second number. GreaterThan Operator = ">" // GreaterThanEquals is a mathematical symbol that denotes an inequality between two values. // It is typically placed between the two values being compared and signals that the first number is greater than or equal to the second number. GreaterThanEquals Operator = ">=" // LowerThan is a mathematical symbol that denotes an inequality between two values. // It is typically placed between the two values being compared and signals that the first number is less than the second number. LowerThan Operator = "<" // LowerThanEquals is a mathematical symbol that denotes an inequality between two values. // It is typically placed between the two values being compared and signals that the first number is less than or equal to the second number. LowerThanEquals Operator = "<=" // NotEquals is a mathematical symbol that denotes an inequality between two values. // It is typically placed between the two values being compared and signals that the first number is not equal the second number. NotEquals Operator = "!=" )
Click to show internal directories.
Click to hide internal directories.