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
- 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) Lookup(ctx context.Context, name string) ([]Rule, error)
- func (s *Store) LookupByID(ctx context.Context, id ksuid.KSUID) (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 ¶
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 NewAggRule ¶
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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.