Ai
1 Star 0 Fork 0

SasukeBo/go-micro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
watcher.go 480 Bytes
一键复制 编辑 原始数据 按行查看 历史
汪波 提交于 2023-02-23 10:27 +08:00 . fix: 替换包名
package vault
import (
"errors"
"gitee.com/sasukebo/go-micro/v4/config/source"
"github.com/hashicorp/vault/api"
)
type watcher struct {
c *api.Client
exit chan bool
}
func newWatcher(c *api.Client) *watcher {
return &watcher{
c: c,
exit: make(chan bool),
}
}
func (w *watcher) Next() (*source.ChangeSet, error) {
<-w.exit
return nil, errors.New("url watcher stopped")
}
func (w *watcher) Stop() error {
select {
case <-w.exit:
default:
}
return nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sasukebo/go-micro.git
git@gitee.com:sasukebo/go-micro.git
sasukebo
go-micro
go-micro
6e18eb58b836

搜索帮助