Documentation ¶
Index ¶
- Constants
- Variables
- type Pipeline
- func (p *Pipeline) Dedupe(i *event.Incident) bool
- func (p *Pipeline) GetIndex() *event.Index
- func (p *Pipeline) GetTracker() *Tracker
- func (p *Pipeline) ListIncidents() []*event.Incident
- func (p *Pipeline) PassEvent(e *event.Event)
- func (p *Pipeline) PassIncident(in *event.Incident)
- func (p *Pipeline) Pause()
- func (p *Pipeline) PutIncident(in *event.Incident)
- func (p *Pipeline) Refresh(conf *config.AppConfig)
- func (p *Pipeline) RemovePolicy(name string)
- func (p *Pipeline) Start()
- func (p *Pipeline) Unpause()
- func (p *Pipeline) UpdateConfig(f func(c *config.AppConfig) error, u *config.User) error
- func (p *Pipeline) ViewConfig(f func(c *config.AppConfig))
- type QueryFunc
- type Tracker
- func (t *Tracker) GetIncidentResolver(i *event.Incident) chan *event.Incident
- func (t *Tracker) GetStats() *TrackerReport
- func (t *Tracker) GetTag(tag string) []string
- func (t *Tracker) ListTags() []string
- func (t *Tracker) Query(f QueryFunc)
- func (t *Tracker) QueryAsync(f QueryFunc)
- func (t *Tracker) RemoveTag(tag, key string)
- func (t *Tracker) Start()
- func (t *Tracker) Started() bool
- func (t *Tracker) TagTimes(tag string) map[string]time.Time
- func (t *Tracker) TrackEvent(e *event.Event)
- func (t *Tracker) TrackIncident(i *event.Incident)
- type TrackerReport
Constants ¶
const (
INTERNAL_TAG_NAME = "INTERNAL"
)
const (
KEEP_ALIVE_INTERNAL_TAG = "KeepAlive"
)
Variables ¶
var (
DefaultKeepAliveCheckTime = 1 * time.Minute
)
var (
EMPTY_SUB_SERVICE = ""
)
Functions ¶
This section is empty.
Types ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline
func NewPipeline ¶
func NewPipeline() *Pipeline
NewPipeline returns a pipeline that is empty of any configuation but will still pass events though
func (*Pipeline) GetTracker ¶
GetTracker returns the pipeline's tracker
func (*Pipeline) ListIncidents ¶
func (*Pipeline) PassIncident ¶ added in v0.15.0
ProcessIncident relays the incident into the pipeline for processing
func (*Pipeline) Pause ¶ added in v0.15.0
func (p *Pipeline) Pause()
Pause stops the pipeline and buffers incomming events
func (*Pipeline) PutIncident ¶
func (*Pipeline) Refresh ¶ added in v0.15.0
refresh load all config params that don't require a restart
func (*Pipeline) RemovePolicy ¶ added in v0.15.0
RemovePolicy will stop and remove the policy if it exists
func (*Pipeline) Start ¶
func (p *Pipeline) Start()
Start consumes events as they are sent to the pipeline
func (*Pipeline) Unpause ¶ added in v0.15.0
func (p *Pipeline) Unpause()
Unpause restarts the pipeline and runs the buffered events through the pipeline
func (*Pipeline) UpdateConfig ¶ added in v0.15.0
UpdateConfig gives access to a copy ofthe pipeline, if no error is returned fron the closure, the pipeline will be refreshed with the given app config
func (*Pipeline) ViewConfig ¶ added in v0.15.0
ViewConfig gives access to a read only copy of the current config through a closure
type QueryFunc ¶
type QueryFunc func(t *Tracker)
An function that is given access to the tracker without locks
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Provides stat tracking for events
func (*Tracker) GetIncidentResolver ¶ added in v0.15.0
func (*Tracker) GetStats ¶
func (t *Tracker) GetStats() *TrackerReport
return a report of the current state of the tracker
func (*Tracker) QueryAsync ¶ added in v0.15.0
QueryAsync exicutes the given QueryFunc asyncronously
func (*Tracker) Start ¶
func (t *Tracker) Start()
Start the tracker. This should be done in it's own goroutine
func (*Tracker) TrackEvent ¶
Process the stats for a given event
func (*Tracker) TrackIncident ¶ added in v0.15.0
TrackIncident will allow the tracker to keep state about an incident
type TrackerReport ¶
type TrackerReport struct { Total uint64 `json:"total_events"` CountByTag map[string]map[string]uint64 `json:"count_by_tag"` LastSeenByTag map[string]map[string]int64 `json:"last_seen_by_tag"` }
holds information about the current state of an event tracker
func NewReport ¶
func NewReport() *TrackerReport