Documentation
¶
Index ¶
- func BatchGet(ctx context.Context, props *BatchGetRequest) (*BatchGetResponse, *BatchGetError)
- func BatchSet(ctx context.Context, props *BatchSetRequest) (*BatchSetResponse, *BatchSetError)
- func BatchSetIfNotExists(ctx context.Context, props *BatchSetIfNotExistsRequest) (*BatchSetIfNotExistsResponse, *BatchSetIfNotExistsError)
- func CreateErrorMapping(keys []momento.Key, err error) map[momento.Key]error
- func ExtractKeys(items Items) []momento.Key
- type BatchDeleteError
- type BatchDeleteRequest
- type BatchGetError
- type BatchGetRequest
- type BatchGetResponse
- type BatchSetError
- type BatchSetIfNotExistsError
- type BatchSetIfNotExistsNotStored
- type BatchSetIfNotExistsRequest
- type BatchSetIfNotExistsResponse
- type BatchSetIfNotExistsStored
- type BatchSetItem
- type BatchSetRequest
- type BatchSetResponse
- type Items
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchGet ¶ added in v1.5.0
func BatchGet(ctx context.Context, props *BatchGetRequest) (*BatchGetResponse, *BatchGetError)
BatchGet gets a slice of keys from the cache, returning a map from failing cache keys to their specific errors.
func BatchSet ¶ added in v1.10.0
func BatchSet(ctx context.Context, props *BatchSetRequest) (*BatchSetResponse, *BatchSetError)
BatchSet sets a slice of keys to the cache, returning a map from failing cache keys to their specific errors.
func BatchSetIfNotExists ¶ added in v1.11.0
func BatchSetIfNotExists(ctx context.Context, props *BatchSetIfNotExistsRequest) (*BatchSetIfNotExistsResponse, *BatchSetIfNotExistsError)
BatchSetIfNotExists will set the key-value pairs ONLY if all keys don't already exist
func CreateErrorMapping ¶ added in v1.11.0
func ExtractKeys ¶ added in v1.11.0
Types ¶
type BatchDeleteError ¶
type BatchDeleteError struct {
// contains filtered or unexported fields
}
BatchDeleteError contains a map associating failing cache keys with their specific errors. It may be necessary to use a type assertion to access the errors:
errors := (err.(*BatchDeleteError)).Errors()
func BatchDelete ¶
func BatchDelete(ctx context.Context, props *BatchDeleteRequest) *BatchDeleteError
BatchDelete deletes a slice of keys from the cache, returning a map from failing cache keys to their specific errors.
func (*BatchDeleteError) Error ¶
func (e *BatchDeleteError) Error() string
type BatchDeleteRequest ¶
type BatchGetError ¶ added in v1.5.0
type BatchGetError struct {
// contains filtered or unexported fields
}
BatchGetError contains a map associating failing cache keys with their specific errors. It may be necessary to use a type assertion to access the errors:
errors := (err.(*BatchGetError)).Errors()
func (*BatchGetError) Error ¶ added in v1.5.0
func (e *BatchGetError) Error() string
type BatchGetRequest ¶ added in v1.5.0
type BatchGetResponse ¶ added in v1.5.0
type BatchGetResponse struct {
// contains filtered or unexported fields
}
BatchGetResponse contains a map associating successful get responses with their cache keys.
func (*BatchGetResponse) Responses ¶ added in v1.5.0
func (e *BatchGetResponse) Responses() map[momento.Value]responses.GetResponse
type BatchSetError ¶ added in v1.10.0
type BatchSetError struct {
// contains filtered or unexported fields
}
BatchSetError contains a map associating failing cache keys with their specific errors. It may be necessary to use a type assertion to access the errors:
errors := (err.(*BatchSetError)).Errors()
func (*BatchSetError) Error ¶ added in v1.10.0
func (e *BatchSetError) Error() string
type BatchSetIfNotExistsError ¶ added in v1.11.0
type BatchSetIfNotExistsError struct {
// contains filtered or unexported fields
}
BatchSetIfNotExistsError contains a map associating failing cache keys with their specific errors. Errors may be related to keys already existing or batch set failing. It may be necessary to use a type assertion to access the errors:
errors := (err.(*BatchSetIfNotExistsError)).Errors()
func (*BatchSetIfNotExistsError) Error ¶ added in v1.11.0
func (e *BatchSetIfNotExistsError) Error() string
type BatchSetIfNotExistsNotStored ¶ added in v1.11.0
type BatchSetIfNotExistsNotStored struct{}
BatchSetIfNotExistsNotStored indicates a successful set request where the value was already present.
type BatchSetIfNotExistsRequest ¶ added in v1.11.0
type BatchSetIfNotExistsRequest struct {
Client momento.CacheClient
CacheName string
Items []BatchSetItem
MaxConcurrentSets int
// timeout for individual requests, defaults to 10 seconds
RequestTimeout *time.Duration
}
type BatchSetIfNotExistsResponse ¶ added in v1.11.0
type BatchSetIfNotExistsResponse interface {
// contains filtered or unexported methods
}
BatchSetIfNotExistsResponse is the base response type for a BatchSetIfNotExists request
type BatchSetIfNotExistsStored ¶ added in v1.11.0
type BatchSetIfNotExistsStored struct {
// contains filtered or unexported fields
}
BatchSetIfNotExistsStored indicates a successful set request where the value was stored.
func (BatchSetIfNotExistsStored) Responses ¶ added in v1.11.0
func (e BatchSetIfNotExistsStored) Responses() map[momento.Value]responses.SetResponse
type BatchSetItem ¶ added in v1.10.0
type BatchSetRequest ¶ added in v1.10.0
type BatchSetRequest struct {
Client momento.CacheClient
CacheName string
Items []BatchSetItem
MaxConcurrentSets int
// timeout for individual requests, defaults to 10 seconds
RequestTimeout *time.Duration
}
type BatchSetResponse ¶ added in v1.10.0
type BatchSetResponse struct {
// contains filtered or unexported fields
}
BatchSetResponse contains a map associating successful set responses with their cache keys.
func (*BatchSetResponse) Responses ¶ added in v1.10.0
func (e *BatchSetResponse) Responses() map[momento.Value]responses.SetResponse
type Items ¶ added in v1.11.0
type Items []BatchSetItem