Documentation ¶
Index ¶
Constants ¶
View Source
const ( STREAM_NAME = "rules" RULE_SUBJECT = "rule.>" )
View Source
const (
RULE_PREFIX = "rules" // => rules:id {..}
)
Variables ¶
View Source
var STREAM_SUBJECTS = []string{ RULE_SUBJECT, }
Functions ¶
func FmtSubjectKey ¶ added in v0.1.2
Types ¶
type RuleRepo ¶
type RuleRepo interface { Name() string Get(id string) (*rules.Rule, error) Save(rule *rules.Rule) error Expire(id string, ttl int64) error Remove(id string) error RemoveAll() error Each(skip int, limit int, fn func(rule *rules.Rule)) error Count() int Active() int Close() }
func NewDiskRuleRepo ¶
func NewInMemoryRuleRepo ¶
func NewInMemoryRuleRepo() RuleRepo
func NewJetstreamRuleRepo ¶
func NewPostgresRuleRepo ¶
func NewRedisRuleRepo ¶
Click to show internal directories.
Click to hide internal directories.