Documentation ¶
Index ¶
- Constants
- Variables
- func FullVersion() string
- func SafeParseInt(s string, d int) int
- func SafeParseUint64(s string, d uint64) uint64
- type BoltStore
- func (store *BoltStore) All() (events []*Event, err error)
- func (store *BoltStore) Close() error
- func (store *BoltStore) Find(ids ...ID) (events []*Event, err error)
- func (store *BoltStore) Get(id ID) (*Event, error)
- func (store *BoltStore) NextId() ID
- func (store *BoltStore) Save(event *Event) error
- func (store *BoltStore) Search(q string) (events []*Event, err error)
- type Event
- type ID
- type IdGenerator
- type KeyError
- type MemoryStore
- func (store *MemoryStore) All() (events []*Event, err error)
- func (store *MemoryStore) Close() error
- func (store *MemoryStore) Find(ids ...ID) (events []*Event, err error)
- func (store *MemoryStore) Get(id ID) (event *Event, err error)
- func (store *MemoryStore) NextId() ID
- func (store *MemoryStore) Save(event *Event) error
- func (store *MemoryStore) Search(q string) (events []*Event, err error)
- type Metrics
- func (m *Metrics) Counter(subsystem, name string) prometheus.Counter
- func (m *Metrics) CounterVec(subsystem, name string) *prometheus.CounterVec
- func (m *Metrics) Gauge(subsystem, name string) prometheus.Gauge
- func (m *Metrics) GaugeVec(subsystem, name string) *prometheus.GaugeVec
- func (m *Metrics) Handler() http.Handler
- func (m *Metrics) NewCounter(subsystem, name, help string) prometheus.Counter
- func (m *Metrics) NewCounterFunc(subsystem, name, help string, f func() float64) prometheus.CounterFunc
- func (m *Metrics) NewCounterVec(subsystem, name, help string, labels []string) *prometheus.CounterVec
- func (m *Metrics) NewGauge(subsystem, name, help string) prometheus.Gauge
- func (m *Metrics) NewGaugeFunc(subsystem, name, help string, f func() float64) prometheus.GaugeFunc
- func (m *Metrics) NewGaugeVec(subsystem, name, help string, labels []string) *prometheus.GaugeVec
- func (m *Metrics) NewSummary(subsystem, name, help string) prometheus.Summary
- func (m *Metrics) NewSummaryVec(subsystem, name, help string, labels []string) *prometheus.SummaryVec
- func (m *Metrics) Run(addr string)
- func (m *Metrics) Summary(subsystem, name string) prometheus.Summary
- func (m *Metrics) SummaryVec(subsystem, name string) *prometheus.SummaryVec
- type Options
- type Server
- func (s *Server) AddRoute(method, path string, handler http.Handler)
- func (s *Server) CloseHandler() httprouter.Handle
- func (s *Server) CreateHandler() httprouter.Handle
- func (s *Server) IndexHandler() httprouter.Handle
- func (s *Server) ListenAndServe()
- func (s *Server) SearchHandler() httprouter.Handle
- func (s *Server) Shutdown()
- type State
- type Store
- type URI
Constants ¶
View Source
const (
// Default SEV Level
DefaultSEVLevel = 3
)
Variables ¶
View Source
var ( // Version release version Version = "0.0.1" // Build will be overwritten automatically by the build system Build = "dev" // GitCommit will be overwritten automatically by the build system GitCommit = "HEAD" )
View Source
var DefObjectives = map[float64]float64{
0.50: 0.05,
0.90: 0.01,
0.95: 0.005,
0.99: 0.001,
}
DefObjectives ...
View Source
var (
ErrNotExist = errors.New("key does not exist")
)
Functions ¶
func FullVersion ¶
func FullVersion() string
FullVersion returns the full version, build and commit hash
Types ¶
type Event ¶
type Event struct { sync.RWMutex ID ID `json:"id"` Title string `json:"title"` Summary string `json:"summary"` RootCause string `json:"root_cause"` AffectedAreas []string `json:"affected_areas"` Tags []string `json:"tags"` Level int `json:"level"` State State `json:"state"` CreatedAt time.Time `json:"created"` MitigatedAt time.Time `json:"mitigated"` FixedAt time.Time `json:"fixed"` ClosedAt time.Time `json:"closed"` }
Event ...
type IdGenerator ¶
func (*IdGenerator) Next ¶
func (id *IdGenerator) Next() ID
type MemoryStore ¶
func (*MemoryStore) All ¶
func (store *MemoryStore) All() (events []*Event, err error)
func (*MemoryStore) Close ¶
func (store *MemoryStore) Close() error
func (*MemoryStore) NextId ¶
func (store *MemoryStore) NextId() ID
func (*MemoryStore) Save ¶
func (store *MemoryStore) Save(event *Event) error
type Metrics ¶
Metrics ...
func InitMetrics ¶
func (*Metrics) Counter ¶
func (m *Metrics) Counter(subsystem, name string) prometheus.Counter
Counter ...
func (*Metrics) CounterVec ¶
func (m *Metrics) CounterVec(subsystem, name string) *prometheus.CounterVec
CounterVec ...
func (*Metrics) GaugeVec ¶
func (m *Metrics) GaugeVec(subsystem, name string) *prometheus.GaugeVec
GaugeVec ...
func (*Metrics) NewCounter ¶
func (m *Metrics) NewCounter(subsystem, name, help string) prometheus.Counter
NewCounter ...
func (*Metrics) NewCounterFunc ¶
func (m *Metrics) NewCounterFunc(subsystem, name, help string, f func() float64) prometheus.CounterFunc
NewCounterFunc ...
func (*Metrics) NewCounterVec ¶
func (m *Metrics) NewCounterVec(subsystem, name, help string, labels []string) *prometheus.CounterVec
NewCounterVec ...
func (*Metrics) NewGauge ¶
func (m *Metrics) NewGauge(subsystem, name, help string) prometheus.Gauge
NewGauge ...
func (*Metrics) NewGaugeFunc ¶
func (m *Metrics) NewGaugeFunc(subsystem, name, help string, f func() float64) prometheus.GaugeFunc
NewGaugeFunc ...
func (*Metrics) NewGaugeVec ¶
func (m *Metrics) NewGaugeVec(subsystem, name, help string, labels []string) *prometheus.GaugeVec
NewGaugeVec ...
func (*Metrics) NewSummary ¶
func (m *Metrics) NewSummary(subsystem, name, help string) prometheus.Summary
NewSummary ...
func (*Metrics) NewSummaryVec ¶
func (m *Metrics) NewSummaryVec(subsystem, name, help string, labels []string) *prometheus.SummaryVec
NewSummaryVec ...
func (*Metrics) Summary ¶
func (m *Metrics) Summary(subsystem, name string) prometheus.Summary
Summary ...
func (*Metrics) SummaryVec ¶
func (m *Metrics) SummaryVec(subsystem, name string) *prometheus.SummaryVec
SummaryVec ...
type State ¶
type State int
State ...
const ( STATE_CREATED State STATE_MITIGATED STATE_FIXED STATE_CLOSED )
func ParseState ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Storm.
|
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Storm. |
gob
Package gob contains a codec to encode and decode entities in Gob format
|
Package gob contains a codec to encode and decode entities in Gob format |
json
Package json contains a codec to encode and decode entities in JSON format
|
Package json contains a codec to encode and decode entities in JSON format |
msgpack
Package msgpack contains a codec to encode and decode entities in msgpack format
|
Package msgpack contains a codec to encode and decode entities in msgpack format |
Click to show internal directories.
Click to hide internal directories.