events

package
v0.0.0-...-0dfd57a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Service events stores and manipulates timeseries data.

Index

Constants

View Source
const (
	StatusSingular   = "singular"
	StatusInProgress = "in_progress"
	StatusStarted    = "started"
	StatusEnded      = "ended"
)

Variables

View Source
var MessageEventNotFound = sarif.Message{
	Action: "event/notfound",
	Text:   "No event found.",
}
View Source
var Module = &services.Module{
	Name:        "events",
	Version:     "1.0",
	NewInstance: NewService,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	RecordedActions map[string]bool `json:"recorded_actions"`
}

type Dependencies

type Dependencies struct {
	Config services.Config
	Client sarif.Client
}

type Event

type Event struct {
	Id int64 `json:"-"`

	Time   time.Time              `json:"time,omitempty"`
	Value  float64                `json:"value"`
	Action string                 `json:"action,omitempty"`
	Source string                 `json:"source,omitempty"`
	Text   string                 `json:"text,omitempty"`
	Meta   map[string]interface{} `json:"meta,omitempty"`
}

func (Event) Key

func (e Event) Key() string

func (Event) String

func (e Event) String() string

type Service

type Service struct {
	sarif.Client
	Store *store.Store
	// contains filtered or unexported fields
}

func NewService

func NewService(deps *Dependencies) *Service

func (*Service) Enable

func (s *Service) Enable() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL