Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Now = time.Now
View Source
var SpacesEntryFieldSplitter = EntryFieldSplitterFunc(func(v string, limit int) ([]string, error) { return reEntryFieldSplitterSpaces.Split(v, limit), nil })
Functions ¶
This section is empty.
Types ¶
type EntryFieldSplitterFunc ¶
type EntryScanner ¶
func NewCSVEntryScanner ¶
func NewCSVEntryScanner(r *csv.Reader, timeField int, timeParser TimeParserFunc) EntryScanner
func NewGenericEntryScanner ¶
func NewGenericEntryScanner(s *bufio.Scanner, fieldSplitter EntryFieldSplitterFunc, fieldsLimit int, timeField int, timeParser TimeParserFunc) EntryScanner
type EntryWriter ¶
func NewDiscardEntryWriter ¶
func NewDiscardEntryWriter() EntryWriter
func NewEntryFieldWriter ¶
func NewEntryFieldWriter(w io.Writer, field int) EntryWriter
func NewEntryWriter ¶
func NewEntryWriter(w io.Writer) EntryWriter
type PolicySelection ¶
type PolicySelection struct {
// contains filtered or unexported fields
}
func NewPolicySelection ¶
func NewPolicySelection(spec *PolicySpec, evictions EntryWriter) *PolicySelection
func (*PolicySelection) Entries ¶
func (p *PolicySelection) Entries() []*Entry
func (*PolicySelection) EvaluateEntry ¶
func (p *PolicySelection) EvaluateEntry(e *Entry) (bool, error)
type PolicySelectionSet ¶
type PolicySelectionSet struct {
// contains filtered or unexported fields
}
func NewPolicySelectionSet ¶
func NewPolicySelectionSet(specs []*PolicySpec, evictions EntryWriter) *PolicySelectionSet
func (*PolicySelectionSet) Entries ¶
func (p *PolicySelectionSet) Entries() []*Entry
func (*PolicySelectionSet) EvaluateEntry ¶
func (p *PolicySelectionSet) EvaluateEntry(e *Entry) (bool, error)
type PolicySpec ¶
type PolicySpec struct {
// contains filtered or unexported fields
}
func ParsePolicySpecString ¶
func ParsePolicySpecString(defaultName string, raw string) (*PolicySpec, error)
func (*PolicySpec) MatchEntry ¶
func (ps *PolicySpec) MatchEntry(e *Entry) (bool, error)
func (*PolicySpec) String ¶
func (ps *PolicySpec) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.