analyticsservice

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SdkVersion string = "0.1.26"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticsService

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

AnalyticsService provides a way to cache and send analytics to the server

func NewAnalyticsService

func NewAnalyticsService(timeout time.Duration, logger logger.Logger, seenTargetsMaxSize int, seenTargetsClearingSchedule time.Duration) *AnalyticsService

NewAnalyticsService creates and starts a analytics service to send data to the client

func (*AnalyticsService) PushToQueue

func (as *AnalyticsService) PushToQueue(featureConfig *rest.FeatureConfig, target *evaluation.Target, variation *rest.Variation)

PushToQueue is used to queue analytics data to send to the server

func (*AnalyticsService) Start

func (as *AnalyticsService) Start(ctx context.Context, client metricsclient.ClientWithResponsesInterface, environmentID string)

Start starts the client and timer to send analytics

type SafeAnalyticsCache added in v0.1.21

type SafeAnalyticsCache[K comparable, V any] interface {
	// contains filtered or unexported methods
}

SafeAnalyticsCache is a type that provides thread safe access to maps used by analytics

type SafeSeenTargetsCache added in v0.1.25

type SafeSeenTargetsCache[K comparable, V any] interface {
	SafeAnalyticsCache[K, V]
	// contains filtered or unexported methods
}

SafeSeenTargetsCache extends SafeAnalyticsCache and adds behavior specific to seen targets

Jump to

Keyboard shortcuts

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