Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/lease/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ type boskosClient interface {
Metric(rtype string) (common.Metric, error)
}

var ErrNotFound = boskos.ErrNotFound
var (
// ErrNotFound is returned when no resources of the requested type are currently available.
ErrNotFound = boskos.ErrNotFound
// ErrTypeNotFound is returned when the requested resource type does not exist.
ErrTypeNotFound = boskos.ErrTypeNotFound
)

type Metrics struct {
Free, Leased int
Expand Down Expand Up @@ -68,6 +73,7 @@ func NewClient(owner, url, username string, passwordGetter func() []byte, retrie
if err != nil {
return nil, err
}
c.DistinguishNotFoundVsTypeNotFound = true
return newClient(c, retries, acquireTimeout), nil
}

Expand Down