Documentation ¶
Index ¶
- type Event
- type InMemory
- func (a *InMemory) Audit(source string, eventType string, identity string, contextID string, ...)
- func (a *InMemory) Close() error
- func (a *InMemory) Event(e *Event)
- func (a *InMemory) Find(source, eventType string) *Event
- func (a *InMemory) Get(idx int) *Event
- func (a *InMemory) GetAll() []*Event
- func (a *InMemory) Len() int
- func (a *InMemory) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Identity string ContextID string Source string EventType string RaftIndex uint64 Message string }
Event provides a default impl of Event
type InMemory ¶
InMemory is ahelper Auditor to keep events in memory
func NewInMemory ¶
func NewInMemory() *InMemory
NewInMemory creates new Auditor that captures events in memory
func (*InMemory) Audit ¶
func (a *InMemory) Audit( source string, eventType string, identity string, contextID string, raftIndex uint64, message string, )
Audit interface impl
func (*InMemory) Close ¶
Close closes the auditor After this, auditor cannot track new audit events However, the events audited before calling Close() can still be queried
func (*InMemory) Get ¶
Get returns the item at specified idx in the slice Ordering in audit events may not work as expected when multiple go-routines are appending events Use this method with caution
Click to show internal directories.
Click to hide internal directories.