clientv3: include a context in Client
Useful for clean up tasks
This commit is contained in:
@ -46,7 +46,7 @@ func lockCommandFunc(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
func lockUntilSignal(c *clientv3.Client, lockname string) error {
|
||||
m := concurrency.NewMutex(context.TODO(), c, lockname)
|
||||
m := concurrency.NewMutex(c, lockname)
|
||||
ctx, cancel := context.WithCancel(context.TODO())
|
||||
|
||||
// unlock in case of ordinary shutdown
|
||||
|
Reference in New Issue
Block a user