Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CriteriaConnection ¶
type CriteriaConnection struct { New *connection.QueryOptions `json:"new"` Old *connection.QueryOptions `json:"old"` }
func (*CriteriaConnection) Match ¶
func (c *CriteriaConnection) Match(i interface{}) bool
type CriteriaEvent ¶
type CriteriaEvent struct { New *event.QueryOptions `json:"new"` Old *event.QueryOptions `json:"old"` }
func (*CriteriaEvent) Match ¶
func (c *CriteriaEvent) Match(i interface{}) bool
type CriteriaObject ¶
type CriteriaObject struct { New *object.QueryOptions `json:"new"` Old *object.QueryOptions `json:"old"` }
func (*CriteriaObject) Match ¶
func (c *CriteriaObject) Match(i interface{}) bool
type CriteriaReaction ¶
type CriteriaReaction struct { New *reaction.QueryOptions `json:"new"` Old *reaction.QueryOptions `json:"old"` }
func (*CriteriaReaction) Match ¶
func (c *CriteriaReaction) Match(i interface{}) bool
type Matcher ¶
type Matcher interface {
Match(c interface{}) bool
}
Matcher determines if a given state-change should trigger the Rule.
type QueryOptions ¶
QueryOptions to narrow-down Rule queries.
type Recipient ¶
type Recipient struct { Query Query `json:"query"` Templates Templates `json:"templates"` URN string `json:"urn"` }
Recipient is an abstract description of how to lookup users and template the messaging as well as meta-information.
type Rule ¶
type Rule struct { Active bool Criteria Matcher Deleted bool Ecosystem sns.Platform ID uint64 Name string Recipients Recipients Type Type CreatedAt time.Time UpdatedAt time.Time }
Rule is a data container to parametrise Pipelines.
type Service ¶
type Service interface { service.Lifecycle Put(namespace string, r *Rule) (*Rule, error) Query(namespace string, opts QueryOptions) (List, error) }
Service for rule interactions.
func PostgresService ¶
PostgresService returns a Postgres based Service implementation.
type ServiceMiddleware ¶
ServiceMiddleware is a chainable behaviour modifier for Service.
func InstrumentServiceMiddleware ¶
func InstrumentServiceMiddleware( component, store string, errCount kitmetrics.Counter, opCount kitmetrics.Counter, opLatency *prometheus.HistogramVec, ) ServiceMiddleware
InstrumentServiceMiddleware observes key aspects of Service operations and exposes Prometheus metrics.
Click to show internal directories.
Click to hide internal directories.