Created
September 29, 2018 04:08
-
-
Save grepory/164abe56bcb56663d8f72f4b3160620e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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