redis

package
v0.0.0-...-bc12874 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package redis implements the redis related operations to support Skia perf, specifically for the query UI. It includes two types of methods:

  1. The methods to interact with the Redis instances management on GCP. Those are done by using cloud.google.com/go/redis/apiv1
  2. TODO(wenbinzhang) The methods to interact with the Redis data on an Redis instance. Those are done by using github.com/redis/go-redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

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

RedisClient implements RedisWrapper

func NewRedisClient

func NewRedisClient(ctx context.Context, gcpClient *gcp_redis.CloudRedisClient, traceStore *tracestore.TraceStore, tilesToCache int) *RedisClient

Create a new Redisclient.

func (*RedisClient) ListRedisInstances

func (r *RedisClient) ListRedisInstances(ctx context.Context, parent string) []*rpb.Instance

List all Redis instances based on the parent string, which is like "projects/{project}/locations/{location}"

func (*RedisClient) RefreshCachedQueries

func (r *RedisClient) RefreshCachedQueries(ctx context.Context, instance *rpb.Instance)

Routine to update the cache for skia perf query UI.

func (*RedisClient) StartRefreshRoutine

func (r *RedisClient) StartRefreshRoutine(ctx context.Context, refreshPeriod time.Duration, config *redis_client.RedisConfig)

Start a routine to periodically access the Redis instance.

type RedisWrapper

type RedisWrapper interface {
	StartRefreshRoutine(context.Context, time.Duration, *config.InstanceConfig) error
	ListRedisInstances(context.Context, string) []*rpb.Instance
}

RedisWrapper define the interfaces for Redis related operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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