Skip to content

Instantly share code, notes, and snippets.

@grepory
Created September 29, 2018 04:08
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 grepory/164abe56bcb56663d8f72f4b3160620e to your computer and use it in GitHub Desktop.
Save grepory/164abe56bcb56663d8f72f4b3160620e to your computer and use it in GitHub Desktop.
package storage
type Store struct {
client *clientv3.Cient
}
func (s *Store) Get(key string, out interface{}) {
resp, _ := s.client.Get(context.TODO(), key)
proto.Unmarshal(resp.Kvs[0].Value, out.(proto.Message))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment