stores

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventFlushCount = 100000 // decreasing this reduces memory utilization, but also performance
)

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Name   string `json:"name,omitempty"`
	Weight uint64 `json:"weight,omitempty"`
}

type DirectlyFollowsRelation

type DirectlyFollowsRelation struct {
	From   string `json:"from,omitempty"`
	To     string `json:"to,omitempty"`
	Weight uint64 `json:"weight,omitempty"`
}

type EventStore

type EventStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewEventStore

func NewEventStore(storage storage.Storage) *EventStore

func (*EventStore) Append

func (es *EventStore) Append(event *events.Event) error

func (*EventStore) Close

func (es *EventStore) Close()

func (*EventStore) GetBinCount

func (es *EventStore) GetBinCount() (map[string]uint64, error)

func (*EventStore) GetCount

func (es *EventStore) GetCount() uint64

func (*EventStore) GetLast

func (es *EventStore) GetLast(count int) ([]events.Event, error)

type KvStore

type KvStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewKvStore

func NewKvStore(storage storage.Storage) *KvStore

func (*KvStore) Close

func (kv *KvStore) Close()

func (*KvStore) Get

func (kv *KvStore) Get(key []byte) ([]byte, error)

func (*KvStore) Increment

func (kv *KvStore) Increment(key []byte) (uint64, error)

func (*KvStore) Set

func (kv *KvStore) Set(key []byte, value []byte) error

type SbarStore

type SbarStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSbarStore

func NewSbarStore(store storage.Storage) (*SbarStore, error)

func (*SbarStore) Close

func (kv *SbarStore) Close()

func (*SbarStore) CountActivities

func (kv *SbarStore) CountActivities() int

func (*SbarStore) CountDfRelations

func (kv *SbarStore) CountDfRelations() int

func (*SbarStore) CountStartActivities

func (kv *SbarStore) CountStartActivities() int

func (*SbarStore) DailyCountOfActivities

func (kv *SbarStore) DailyCountOfActivities(activities []string) (map[string]map[string]uint64, error)

func (*SbarStore) GetActivities

func (kv *SbarStore) GetActivities() []Activity

func (*SbarStore) GetDfRelations

func (kv *SbarStore) GetDfRelations() []DirectlyFollowsRelation

func (*SbarStore) GetDfRelationsWithinTimewindow

func (kv *SbarStore) GetDfRelationsWithinTimewindow(dfRelations [][]string, start time.Time, end time.Time) ([]DirectlyFollowsRelation, error)

func (*SbarStore) GetLastActivityForCase

func (kv *SbarStore) GetLastActivityForCase(caseId string) (string, error)

func (*SbarStore) RecordActivity

func (kv *SbarStore) RecordActivity(activity string, timestamp time.Time) error

func (*SbarStore) RecordActivityForCase

func (kv *SbarStore) RecordActivityForCase(activity string, caseId string, timestamp time.Time) error

func (*SbarStore) RecordDirectlyFollowsRelation

func (kv *SbarStore) RecordDirectlyFollowsRelation(from string, to string, timestamp time.Time) error

func (*SbarStore) RecordStartActivity

func (kv *SbarStore) RecordStartActivity(key string)

Jump to

Keyboard shortcuts

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