inmemory

package
v6.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorOutOfBounds error = errors.New("out of bounds")

ErrorOutOfBounds err

Functions

This section is empty.

Types

type AtomicInt64Slice

type AtomicInt64Slice []int64

AtomicInt64Slice var

func NewAtomicInt64Slice

func NewAtomicInt64Slice(size int64) (AtomicInt64Slice, error)

NewAtomicInt64Slice create slice

func (AtomicInt64Slice) FetchAndClearAll

func (a AtomicInt64Slice) FetchAndClearAll() []int64

FetchAndClearAll returns all and reset

func (AtomicInt64Slice) FetchAndClearOne

func (a AtomicInt64Slice) FetchAndClearOne(index int) (int64, error)

FetchAndClearOne returns previous and reset

func (AtomicInt64Slice) Incr

func (a AtomicInt64Slice) Incr(index int)

Incr increments inx count

func (AtomicInt64Slice) ReadAll

func (a AtomicInt64Slice) ReadAll() []int64

ReadAll loads all the values and places them into a new slice to be returned

type TelemetryStorage

type TelemetryStorage struct {
	// contains filtered or unexported fields
}

TelemetryStorage In Memory Telemetry Storage struct

func NewTelemetryStorage

func NewTelemetryStorage() (*TelemetryStorage, error)

NewTelemetryStorage builds in memory telemetry storage

func (*TelemetryStorage) AddTag

func (i *TelemetryStorage) AddTag(tag string)

AddTag adds particular tag

func (*TelemetryStorage) GetBURTimeouts

func (i *TelemetryStorage) GetBURTimeouts() int64

GetBURTimeouts gets timedouts data

func (*TelemetryStorage) GetEventsStats

func (i *TelemetryStorage) GetEventsStats(dataType int) int64

GetEventsStats gets events by type

func (*TelemetryStorage) GetImpressionsStats

func (i *TelemetryStorage) GetImpressionsStats(dataType int) int64

GetImpressionsStats gets impressions by type

func (*TelemetryStorage) GetLastSynchronization

func (i *TelemetryStorage) GetLastSynchronization() dtos.LastSynchronization

GetLastSynchronization gets last synchronization stats for fetchers and recorders

func (*TelemetryStorage) GetNonReadyUsages

func (i *TelemetryStorage) GetNonReadyUsages() int64

GetNonReadyUsages gets non usages on ready

func (*TelemetryStorage) GetSessionLength

func (i *TelemetryStorage) GetSessionLength() int64

GetSessionLength gets session duration

func (*TelemetryStorage) PeekHTTPErrors

func (i *TelemetryStorage) PeekHTTPErrors(resource int) map[int]int

PeekHTTPErrors returns a copy of the currently registered latencies for a specific API resource

func (*TelemetryStorage) PeekHTTPLatencies

func (i *TelemetryStorage) PeekHTTPLatencies(resource int) []int64

PeekHTTPLatencies returns a copy of the currently registered latencies for a specific API resource

func (*TelemetryStorage) PopAuthRejections

func (i *TelemetryStorage) PopAuthRejections() int64

PopAuthRejections gets total amount of auth rejections

func (*TelemetryStorage) PopExceptions

func (i *TelemetryStorage) PopExceptions() dtos.MethodExceptions

PopExceptions gets and clears method exceptions

func (*TelemetryStorage) PopHTTPErrors

func (i *TelemetryStorage) PopHTTPErrors() dtos.HTTPErrors

PopHTTPErrors gets http errors

func (*TelemetryStorage) PopHTTPLatencies

func (i *TelemetryStorage) PopHTTPLatencies() dtos.HTTPLatencies

PopHTTPLatencies gets http latencies

func (*TelemetryStorage) PopLatencies

func (i *TelemetryStorage) PopLatencies() dtos.MethodLatencies

PopLatencies gets and clears method latencies

func (*TelemetryStorage) PopStreamingEvents

func (i *TelemetryStorage) PopStreamingEvents() []dtos.StreamingEvent

PopStreamingEvents gets streamingEvents data

func (*TelemetryStorage) PopTags

func (i *TelemetryStorage) PopTags() []string

PopTags gets total amount of tags

func (*TelemetryStorage) PopTokenRefreshes

func (i *TelemetryStorage) PopTokenRefreshes() int64

PopTokenRefreshes gets total amount of token refreshes

func (*TelemetryStorage) PopUpdatesFromSSE

func (i *TelemetryStorage) PopUpdatesFromSSE() dtos.UpdatesFromSSE

PopUpdatesFromSSE gets and clears updatesFromSSE

func (*TelemetryStorage) RecordAuthRejections

func (i *TelemetryStorage) RecordAuthRejections()

RecordAuthRejections records auth rejections

func (*TelemetryStorage) RecordBURTimeout

func (i *TelemetryStorage) RecordBURTimeout()

RecordBURTimeout records bur timeodout

func (*TelemetryStorage) RecordConfigData

func (i *TelemetryStorage) RecordConfigData(configData dtos.Config) error

RecordConfigData no-op

func (*TelemetryStorage) RecordEventsStats

func (i *TelemetryStorage) RecordEventsStats(dataType int, count int64)

RecordEventsStats recirds events by type

func (*TelemetryStorage) RecordException

func (i *TelemetryStorage) RecordException(method string)

RecordException stores exceptions for method

func (*TelemetryStorage) RecordImpressionsStats

func (i *TelemetryStorage) RecordImpressionsStats(dataType int, count int64)

RecordImpressionsStats records impressions by type

func (*TelemetryStorage) RecordLatency

func (i *TelemetryStorage) RecordLatency(method string, latency time.Duration)

RecordLatency stores latency for method

func (*TelemetryStorage) RecordNonReadyUsage

func (i *TelemetryStorage) RecordNonReadyUsage()

RecordNonReadyUsage records non ready usage

func (*TelemetryStorage) RecordSessionLength

func (i *TelemetryStorage) RecordSessionLength(session int64)

RecordSessionLength records session length

func (*TelemetryStorage) RecordStreamingEvent

func (i *TelemetryStorage) RecordStreamingEvent(event *dtos.StreamingEvent)

RecordStreamingEvent appends new streaming event

func (*TelemetryStorage) RecordSuccessfulSync

func (i *TelemetryStorage) RecordSuccessfulSync(resource int, when time.Time)

RecordSuccessfulSync records sync for resource

func (*TelemetryStorage) RecordSyncError

func (i *TelemetryStorage) RecordSyncError(resource int, status int)

RecordSyncError records http error

func (*TelemetryStorage) RecordSyncLatency

func (i *TelemetryStorage) RecordSyncLatency(resource int, latency time.Duration)

RecordSyncLatency records http error

func (*TelemetryStorage) RecordTokenRefreshes

func (i *TelemetryStorage) RecordTokenRefreshes()

RecordTokenRefreshes records token

func (*TelemetryStorage) RecordUniqueKeys

func (i *TelemetryStorage) RecordUniqueKeys(uniques dtos.Uniques) error

func (*TelemetryStorage) RecordUpdatesFromSSE

func (i *TelemetryStorage) RecordUpdatesFromSSE(updateType int)

RecordUpdatesFromSSE records updates from sse by type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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