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