mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-21 22:33:27 +00:00
Add support for namespace mutations
Adds support for: Get, Create, Update, Delete Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
c83b649301
commit
57baf34f5a
10
vendor/golang.org/x/sync/errgroup/errgroup.go
generated
vendored
10
vendor/golang.org/x/sync/errgroup/errgroup.go
generated
vendored
@ -20,7 +20,7 @@ type token struct{}
|
||||
// A zero Group is valid, has no limit on the number of active goroutines,
|
||||
// and does not cancel on error.
|
||||
type Group struct {
|
||||
cancel func()
|
||||
cancel func(error)
|
||||
|
||||
wg sync.WaitGroup
|
||||
|
||||
@ -43,7 +43,7 @@ func (g *Group) done() {
|
||||
// returns a non-nil error or the first time Wait returns, whichever occurs
|
||||
// first.
|
||||
func WithContext(ctx context.Context) (*Group, context.Context) {
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
ctx, cancel := withCancelCause(ctx)
|
||||
return &Group{cancel: cancel}, ctx
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ func WithContext(ctx context.Context) (*Group, context.Context) {
|
||||
func (g *Group) Wait() error {
|
||||
g.wg.Wait()
|
||||
if g.cancel != nil {
|
||||
g.cancel()
|
||||
g.cancel(g.err)
|
||||
}
|
||||
return g.err
|
||||
}
|
||||
@ -76,7 +76,7 @@ func (g *Group) Go(f func() error) {
|
||||
g.errOnce.Do(func() {
|
||||
g.err = err
|
||||
if g.cancel != nil {
|
||||
g.cancel()
|
||||
g.cancel(g.err)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -105,7 +105,7 @@ func (g *Group) TryGo(f func() error) bool {
|
||||
g.errOnce.Do(func() {
|
||||
g.err = err
|
||||
if g.cancel != nil {
|
||||
g.cancel()
|
||||
g.cancel(g.err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user