Merge branch 'v3' into dag
This commit is contained in:
commit
fa817c707b
2
.github/workflows/dependabot-automerge.yml
vendored
2
.github/workflows/dependabot-automerge.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
steps:
|
||||
- name: metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v1.3.1
|
||||
uses: dependabot/fetch-metadata@v1.3.3
|
||||
with:
|
||||
github-token: "${{ secrets.TOKEN }}"
|
||||
- name: merge
|
||||
|
@ -301,11 +301,11 @@ func TestWatcher(t *testing.T) {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
for {
|
||||
ch, err := wc.Next()
|
||||
_, err := wc.Next()
|
||||
if err != nil {
|
||||
t.Fatal("unexpected err", err)
|
||||
}
|
||||
t.Logf("changes %#+v", ch.Service)
|
||||
// t.Logf("changes %#+v", ch.Service)
|
||||
wc.Stop()
|
||||
wg.Done()
|
||||
return
|
||||
|
@ -34,6 +34,8 @@ type Options struct {
|
||||
Addrs []string
|
||||
// Wrappers store wrapper that called before actual functions
|
||||
// Wrappers []Wrapper
|
||||
// Timeout specifies timeout duration for all operations
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
// NewOptions creates options struct
|
||||
@ -110,6 +112,13 @@ func Tracer(t tracer.Tracer) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// Timeout sets the timeout
|
||||
func Timeout(td time.Duration) Option {
|
||||
return func(o *Options) {
|
||||
o.Timeout = td
|
||||
}
|
||||
}
|
||||
|
||||
// Addrs contains the addresses or other connection information of the backing storage.
|
||||
// For example, an etcd implementation would contain the nodes of the cluster.
|
||||
// A SQL implementation could contain one or more connection strings.
|
||||
|
Loading…
Reference in New Issue
Block a user