MCPcopy
hub / github.com/olric-data/olric / Put

Method Put

client.go:161–161  ·  view source on GitHub ↗

Put sets the value for the given key. It overwrites any previous value for that key, and it's thread-safe. The key has to be a string. value type is arbitrary. It is safe to modify the contents of the arguments after Put returns but not before.

(ctx context.Context, key string, value interface{}, options ...PutOption)

Source from the content-addressed store, hash-verified

159 // that key, and it's thread-safe. The key has to be a string. value type is arbitrary.
160 // It is safe to modify the contents of the arguments after Put returns but not before.
161 Put(ctx context.Context, key string, value interface{}, options ...PutOption) error
162
163 // Get gets the value for the given key. It returns ErrKeyNotFound if the DB
164 // does not contain the key. It's thread-safe. It is safe to modify the contents

Callers 15

TestClusterClient_PutFunction · 0.95
TestClusterClient_GetFunction · 0.95
TestClusterClient_DeleteFunction · 0.95
TestClusterClient_DecrFunction · 0.95
TestClusterClient_ExpireFunction · 0.95
TestClusterClient_Put_ExFunction · 0.95
TestClusterClient_Put_PXFunction · 0.95
TestClusterClient_Put_NXFunction · 0.95

Implementers 2

ClusterDMapcluster_client.go
EmbeddedDMapembedded_client.go

Calls

no outgoing calls

Tested by 15

TestClusterClient_PutFunction · 0.76
TestClusterClient_GetFunction · 0.76
TestClusterClient_DeleteFunction · 0.76
TestClusterClient_DecrFunction · 0.76
TestClusterClient_ExpireFunction · 0.76
TestClusterClient_Put_ExFunction · 0.76
TestClusterClient_Put_PXFunction · 0.76
TestClusterClient_Put_NXFunction · 0.76