Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bradfitz/gomemcache
/ functions
Functions
80 in github.com/bradfitz/gomemcache
⨍
Functions
80
◇
Types & classes
10
↓ 11 callers
Method
Get
Get gets the item for the given key. ErrCacheMiss is returned for a memcache cache miss. The key must be at most 250 bytes in length.
memcache/memcache.go:335
↓ 9 callers
Method
String
()
memcache/selector.go:57
↓ 9 callers
Method
reply
(msg string)
memcache/fakeserver_test.go:83
↓ 8 callers
Method
Close
Close closes any open connections. It returns the first error encountered closing connections, but always closes all connections. After Close, the C
memcache/memcache.go:836
↓ 8 callers
Method
Set
Set writes the given item, unconditionally.
memcache/memcache.go:602
↓ 7 callers
Method
onItem
(item *Item, fn func(*Client, *bufio.ReadWriter, *Item) error)
memcache/memcache.go:313
↓ 6 callers
Method
populateOne
(rw *bufio.ReadWriter, verb string, item *Item)
memcache/memcache.go:665
↓ 6 callers
Method
withAddrRw
(addr net.Addr, fn func(*conn) error)
memcache/memcache.go:367
↓ 5 callers
Function
New
New returns a memcache client using the provided server(s) with equal weight. If a server is listed multiple times, it gets a proportional amount of w
memcache/memcache.go:122
↓ 4 callers
Method
Add
Add writes the given item, if no value already exists for its key. ErrNotStored is returned if that condition is not met.
memcache/memcache.go:612
↓ 4 callers
Method
Error
()
memcache/memcache.go:265
↓ 4 callers
Function
testWithClient
(t *testing.T, c *Client)
memcache/memcache_test.go:171
↓ 4 callers
Method
withKeyAddr
(key string, fn func(net.Addr) error)
memcache/memcache.go:356
↓ 3 callers
Method
Increment
Increment atomically increments key by delta. The return value is the new value after being incremented or an error. If the value didn't exist in memc
memcache/memcache.go:792
↓ 3 callers
Method
PickServer
PickServer returns the server address that a given item should be shared onto.
memcache/selector.go:34
↓ 3 callers
Function
cut
Similar to strings.Cut in Go 1.18, but sep can only be 1 byte.
memcache/memcache.go:594
↓ 3 callers
Method
extendDeadline
()
memcache/memcache.go:199
↓ 3 callers
Method
getConn
(addr net.Addr)
memcache/memcache.go:293
↓ 3 callers
Function
legalKey
(key string)
memcache/memcache.go:90
↓ 3 callers
Method
netTimeout
()
memcache/memcache.go:244
↓ 3 callers
Function
scanGetResponseLine
scanGetResponseLine populates it and returns the declared size of the item. It does not read the bytes of the item.
memcache/memcache.go:552
↓ 3 callers
Method
withKeyRw
(key string, fn func(*conn) error)
memcache/memcache.go:376
↓ 2 callers
Method
Append
Append appends the given item to the existing item, if a value already exists for its key. ErrNotStored is returned if that condition is not met.
memcache/memcache.go:632
↓ 2 callers
Method
CompareAndSwap
CompareAndSwap writes the given item that was previously returned by Get, if the value was neither modified or evicted between the Get and the Compare
memcache/memcache.go:657
↓ 2 callers
Method
Delete
Delete deletes the item with the provided key. The error ErrCacheMiss is returned if the item didn't already exist in the cache.
memcache/memcache.go:740
↓ 2 callers
Method
Each
(func(net.Addr) error)
memcache/selector.go:35
↓ 2 callers
Method
Network
()
memcache/selector.go:56
↓ 2 callers
Method
Prepend
Prepend prepends the given item to the existing item, if a value already exists for its key. ErrNotStored is returned if that condition is not met.
memcache/memcache.go:642
↓ 2 callers
Method
Replace
Replace writes the given item, but only if the server *does* already hold data for this key
memcache/memcache.go:622
↓ 2 callers
Method
SetServers
SetServers changes a ServerList's set of servers at runtime and is safe for concurrent use by multiple goroutines. Each server is given equal weight.
memcache/selector.go:68
↓ 2 callers
Function
benchPickServer
(b *testing.B, servers ...string)
memcache/selector_test.go:30
↓ 2 callers
Function
computeExpTime
(n int64)
memcache/fakeserver_test.go:280
↓ 2 callers
Method
condRelease
condRelease releases this connection if the error pointed to by err is nil (not an error) or is only a protocol level error (e.g. a cache miss). The
memcache/memcache.go:207
↓ 2 callers
Method
getFromAddr
(addr net.Addr, keys []string, cb func(*Item))
memcache/memcache.go:382
↓ 2 callers
Method
incrDecr
(verb, key string, delta uint64)
memcache/memcache.go:806
↓ 2 callers
Function
mustSetF
(t *testing.T, c *Client)
memcache/memcache_test.go:163
↓ 2 callers
Function
newStaticAddr
(a net.Addr)
memcache/selector.go:49
↓ 2 callers
Function
parseGetResponse
parseGetResponse reads a GET response from r and calls cb for each read and allocated Item
memcache/memcache.go:517
↓ 2 callers
Function
writeExpectf
(rw *bufio.ReadWriter, expect []byte, format string, args ...interface{})
memcache/memcache.go:718
↓ 2 callers
Function
writeReadLine
(rw *bufio.ReadWriter, format string, args ...interface{})
memcache/memcache.go:706
↓ 1 callers
Method
Decrement
Decrement atomically decrements key by delta. The return value is the new value after being decremented or an error. If the value didn't exist in memc
memcache/memcache.go:802
↓ 1 callers
Method
DeleteAll
DeleteAll deletes all items in the cache.
memcache/memcache.go:747
↓ 1 callers
Method
GetMulti
GetMulti is a batch version of Get. The returned map from keys to items may have fewer elements than the input slice, due to memcache cache misses. Ea
memcache/memcache.go:478
↓ 1 callers
Function
NewFromSelector
NewFromSelector returns a new Client using the provided ServerSelector.
memcache/memcache.go:129
↓ 1 callers
Method
PickServer
(key string)
memcache/selector.go:114
↓ 1 callers
Method
Ping
Ping checks all instances if they are alive. Returns error if any of them is down.
memcache/memcache.go:783
↓ 1 callers
Method
Serve
(l net.Listener)
memcache/fakeserver_test.go:47
↓ 1 callers
Method
Touch
Touch updates the expiry for the given key. The seconds parameter is either a Unix timestamp or, if seconds is less than 1 month, the number of second
memcache/memcache.go:350
↓ 1 callers
Method
dial
(addr net.Addr)
memcache/memcache.go:269
↓ 1 callers
Method
getAndTouchFromAddr
(addr net.Addr, key string, expiration int32, cb func(*Item))
memcache/memcache.go:765
↓ 1 callers
Method
getFreeConn
(addr net.Addr)
memcache/memcache.go:229
↓ 1 callers
Method
handleRequestLine
(line string)
memcache/fakeserver_test.go:96
↓ 1 callers
Method
maxIdleConns
()
memcache/memcache.go:251
↓ 1 callers
Method
putFreeConn
(addr net.Addr, cn *conn)
memcache/memcache.go:215
↓ 1 callers
Method
release
release returns this connection back to the client's free pool
memcache/memcache.go:195
↓ 1 callers
Function
resumableError
arbitrary buffered channel size, for readability resumableError returns true if err is only a protocol-level cache error. This is used to determine wh
memcache/memcache.go:82
↓ 1 callers
Method
serve
()
memcache/fakeserver_test.go:65
↓ 1 callers
Function
testTouchWithClient
(t *testing.T, c *Client)
memcache/memcache_test.go:351
↓ 1 callers
Function
testingKey
(s string)
memcache/fakecerts_test.go:62
↓ 1 callers
Method
touchFromAddr
(addr net.Addr, keys []string, expiration int32)
memcache/memcache.go:447
Function
BenchmarkOnItem
(b *testing.B)
memcache/memcache_test.go:398
Function
BenchmarkPickServer
(b *testing.B)
memcache/selector_test.go:21
Function
BenchmarkPickServer_Single
(b *testing.B)
memcache/selector_test.go:26
Function
BenchmarkScanGetResponseLine
(b *testing.B)
memcache/memcache_test.go:428
Method
Each
Each iterates over each server calling the given function
memcache/selector.go:93
Method
FlushAll
()
memcache/memcache.go:329
Method
GetAndTouch
Get and Touch the item with the provided key. The error ErrCacheMiss is returned if the item didn't already exist in the cache.
memcache/memcache.go:755
Function
TestFakeServer
(t *testing.T)
memcache/memcache_test.go:78
Function
TestLocalhost
(t *testing.T)
memcache/memcache_test.go:43
Function
TestScanGetResponseLine
(t *testing.T)
memcache/memcache_test.go:439
Function
TestTLS
(t *testing.T)
memcache/memcache_test.go:92
Function
TestUnixSocket
Run the memcached binary as a child process and connect to its unix socket.
memcache/memcache_test.go:56
Method
add
(rw *bufio.ReadWriter, item *Item)
memcache/memcache.go:616
Method
append
(rw *bufio.ReadWriter, item *Item)
memcache/memcache.go:636
Method
cas
(rw *bufio.ReadWriter, item *Item)
memcache/memcache.go:661
Method
flushAllFromAddr
flushAllFromAddr send the flush_all command to the given addr
memcache/memcache.go:399
Method
ping
ping sends the version command to the given addr
memcache/memcache.go:423
Method
prepend
(rw *bufio.ReadWriter, item *Item)
memcache/memcache.go:646
Method
replace
(rw *bufio.ReadWriter, item *Item)
memcache/memcache.go:626
Method
set
(rw *bufio.ReadWriter, item *Item)
memcache/memcache.go:606