redis

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 8 Imported by: ? modules, 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

Overview

Package redis implements the storage interface with Redis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for Redis

func GetClient

func GetClient(config ClientConfig) (*Client, error)

GetClient returns a Redis client

func (Client) GetExperimentResult

func (cl Client) GetExperimentResult(namespace, experiment string) (*base.ExperimentResult, error)

GetExperimentResult returns an experiment result. See storage.Interface

func (Client) GetMetrics

func (cl Client) GetMetrics(applicationName string, version int, signature string) (*storage.VersionMetrics, error)

GetMetrics returns all metrics for an app/version. See storage.Inferface

func (Client) SetExperimentResult

func (cl Client) SetExperimentResult(namespace, experiment string, data *base.ExperimentResult) error

SetExperimentResult records an experiment result. See storage.Inferface

func (Client) SetMetric

func (cl Client) SetMetric(applicationName string, version int, signature, metric, user, transaction string, metricValue float64) error

SetMetric records a metric value; see storage.Interface

func (Client) SetUser

func (cl Client) SetUser(applicationName string, version int, signature, user string) error

SetUser records the name of a user. See storage.Inferface

type ClientConfig

type ClientConfig struct {
	Address  *string `json:"address,omitempty"`
	Username *string `json:"username,omitempty"`
	Password *string `json:"password,omitempty"`
	DB       *int    `json:"db,omitempty"`
}

ClientConfig is configurable properties of a new BadgerDB client

Jump to

Keyboard shortcuts

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