Documentation ¶
Index ¶
- Variables
- func Equivalent(a, b Rule) bool
- func ObjectName(ruleID, id ksuid.KSUID) string
- func ObjectPath(path *storage.URI, ruleID, id ksuid.KSUID) *storage.URI
- func Serialize(r interface{}) ([]byte, error)
- type AddRule
- type AggRule
- type Combiner
- type DeleteRule
- type FieldRule
- type Filter
- type Map
- type Object
- type ObjectRules
- type Rule
- type Store
- func (s *Store) Add(ctx context.Context, rule Rule) error
- func (s *Store) All(ctx context.Context) ([]Rule, error)
- func (s *Store) Delete(ctx context.Context, id ksuid.KSUID) (Rule, error)
- func (s *Store) IDs(ctx context.Context) ([]ksuid.KSUID, error)
- func (s *Store) LookupByID(ctx context.Context, id ksuid.KSUID) (Rule, error)
- func (s *Store) LookupByRef(ctx context.Context, ref string) ([]Rule, error)
- func (s *Store) Names(ctx context.Context) ([]string, error)
- type TypeRule
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRetriesExceeded = fmt.Errorf("config journal unavailable after %d attempts", maxRetries) ErrNoSuchRule = errors.New("no such rule") )
View Source
var MaxSpan = extent.NewGenericFromOrder(*zed.NewUint64(0), *zed.NewUint64(math.MaxUint64), order.Asc)
View Source
var RuleTypes = []interface{}{ AddRule{}, DeleteRule{}, FieldRule{}, TypeRule{}, AggRule{}, }
Functions ¶
func Equivalent ¶
Equivalent returns true if the two rules create the same index object.
func ObjectName ¶
func ObjectPath ¶ added in v0.32.0
Types ¶
type AggRule ¶
type AggRule struct { Ts nano.Ts `zed:"ts"` ID ksuid.KSUID `zed:"id"` Name string `zed:"name"` Script string `zed:"script"` }
func (*AggRule) CreateTime ¶
type DeleteRule ¶
type FieldRule ¶
type FieldRule struct { Ts nano.Ts `zed:"ts"` ID ksuid.KSUID `zed:"id"` Name string `zed:"name"` Fields field.List `zed:"fields,omitempty"` }
func NewFieldRule ¶
func (*FieldRule) CreateTime ¶
type Filter ¶ added in v0.32.0
type Filter struct {
// contains filtered or unexported fields
}
type Map ¶
type Map map[ksuid.KSUID]ObjectRules
type ObjectRules ¶
func (ObjectRules) Missing ¶
func (o ObjectRules) Missing(rules []Rule) []Rule
func (ObjectRules) Rules ¶ added in v0.32.0
func (o ObjectRules) Rules() []Rule
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func CreateStore ¶
func (*Store) LookupByID ¶
func (*Store) LookupByRef ¶ added in v1.3.0
LookupByRef returns the rules that match the passed ref string. ref can be either a rule's Name or ID in alphanumeric base62 encoding.
type TypeRule ¶
type TypeRule struct { Ts nano.Ts `zed:"ts"` ID ksuid.KSUID `zed:"id"` Name string `zed:"name"` Type string `zed:"type"` }
func (*TypeRule) CreateTime ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.