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" )
Click to show internal directories.
Click to hide internal directories.