Skip to content

Instantly share code, notes, and snippets.

@anandkunal
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anandkunal/2b656aa141ad45e6be82 to your computer and use it in GitHub Desktop.
Save anandkunal/2b656aa141ad45e6be82 to your computer and use it in GitHub Desktop.
type (
RPC struct {
cache map[string]string
requests *Requests
mu *sync.RWMutex
}
CacheItem struct {
Key string
Value string
}
Requests struct {
Get uint64
Put uint64
Delete uint64
Clear uint64
}
)
var (
NotFoundError = errors.New("Cache key not found")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment