Add support for out of capacity error message
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
package provisioner
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
"net"
|
||||
|
||||
"github.com/play-with-docker/play-with-docker/pwd/types"
|
||||
)
|
||||
|
||||
var OutOfCapacityError = errors.New("OutOfCapacity")
|
||||
|
||||
func OutOfCapacity(e error) bool {
|
||||
return e == OutOfCapacityError
|
||||
}
|
||||
|
||||
type InstanceProvisionerApi interface {
|
||||
InstanceNew(session *types.Session, conf types.InstanceConfig) (*types.Instance, error)
|
||||
InstanceDelete(session *types.Session, instance *types.Instance) error
|
||||
|
||||
Reference in New Issue
Block a user