WIP: flow rewrite #138

Draft
vtolstov wants to merge 3 commits from dag into v3
3 changed files with 12 additions and 3 deletions
Showing only changes of commit fa817c707b - Show all commits

View File

@ -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

View File

@ -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

View File

@ -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.