[skip ci] Add comment for EmbedEtcdKV (#12964)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
pull/12452/head
shaoyue 2021-12-08 15:11:33 +08:00 committed by GitHub
parent 42b161ae95
commit 34fadc9ab6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,7 @@ func NewEmbededEtcdKV(cfg *embed.Config, rootPath string) (*EmbedEtcdKV, error)
return kv, nil
}
// Close closes the embedded etcd
func (kv *EmbedEtcdKV) Close() {
kv.closeOnce.Do(func() {
kv.client.Close()
@ -73,6 +74,7 @@ func (kv *EmbedEtcdKV) Close() {
}
// GetPath returns the full path by given key
func (kv *EmbedEtcdKV) GetPath(key string) string {
return path.Join(kv.rootPath, key)
}