caching

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachNewCachingMiddleware

func AttachNewCachingMiddleware(props MiddlewareProps)

func ComputeCacheKey

func ComputeCacheKey(tableName string, keys map[string]types.AttributeValue, serializer Serializer) (string, error)

Types

type JSONSerializer added in v1.2.0

type JSONSerializer = serializer.JSONSerializer

type MiddlewareProps

type MiddlewareProps struct {
	AwsConfig     *aws.Config
	CacheName     string
	MomentoClient momento.CacheClient
	WritebackType WritebackType
	Serializer    Serializer
}

type MsgPackSerializer added in v1.2.0

type MsgPackSerializer = serializer.MsgPackSerializer

type Serializer added in v1.2.0

type Serializer interface {
	Name() string
	Serialize(item map[string]types.AttributeValue) ([]byte, error)
	Deserialize(data []byte) (map[string]types.AttributeValue, error)
}

Serializer defines the methods for serializing and deserializing data.

type WritebackType

type WritebackType string
const (
	SYNCHRONOUS  WritebackType = "SYNCHRONOUS"
	ASYNCHRONOUS WritebackType = "ASYNCHRONOUS"
	DISABLED     WritebackType = "DISABLED"
)

Jump to

Keyboard shortcuts

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