distributed

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheOptions

type CacheOptions struct {
	Replication int
	TTL         time.Duration
	Consistency string
	Compression bool
}

type DistributedCache

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

func NewDistributedCache

func NewDistributedCache(
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
	natsConn *nats.Conn,
	options CacheOptions,
) (*DistributedCache, error)

func (*DistributedCache) Get

func (dc *DistributedCache) Get(
	ctx context.Context,
	key string,
) ([]byte, error)

func (*DistributedCache) Set

func (dc *DistributedCache) Set(
	ctx context.Context,
	key string,
	value []byte,
	ttl time.Duration,
) error

Jump to

Keyboard shortcuts

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