MCPcopy Create free account
hub / github.com/PacktPublishing/System-Programming-Essentials-with-Go / CacheServer

Struct CacheServer

ch13/server.go:20–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18const replicationHeader = "X-Replication-Request"
19
20type CacheServer struct {
21 cache *Cache
22 peers []string
23 hashRing *HashRing
24 mu sync.Mutex
25}
26
27func NewCacheServer(peers []string) *CacheServer {
28 cs := &CacheServer{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected