cache

package
v0.0.0-...-46fbbb1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	// DialConnectionTimeout defines timeout for connecting to redis server.
	DialConnectionTimeout = 5 * time.Second
	// DialReadTimeout defines timeout for reading command.
	DialReadTimeout = 5 * time.Second
	// DialWriteTimeout defines timeout for writing command.
	DialWriteTimeout = 5 * time.Second
)
View Source
const (
	// ClientKindRedis represents redis cache kind.
	ClientKindRedis = "Redis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	data.Reader
	data.Writer
}

Client for caching data.

func GetClient

func GetClient(config *v1alpha1.Cache) (Client, error)

GetClient is a cache client factory method. Init cache client based on the config provided.

func NewRedisClient

func NewRedisClient(c *v1alpha1.Cache) Client

NewRedisClient news a Redis cache client based on the provided configurations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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