Added volume.Creater interface and simple HostPath implementation
This commit is contained in:
@@ -18,6 +18,7 @@ package volume
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"os"
|
||||
"path"
|
||||
)
|
||||
@@ -65,6 +66,12 @@ type Recycler interface {
|
||||
Recycle() error
|
||||
}
|
||||
|
||||
// Create adds a new resource in the storage provider and creates a PersistentVolume for the new resource.
|
||||
// Calls to Create should block until complete.
|
||||
type Creater interface {
|
||||
Create() (*api.PersistentVolume, error)
|
||||
}
|
||||
|
||||
// Delete removes the resource from the underlying storage provider. Calls to this method should block until
|
||||
// the deletion is complete. Any error returned indicates the volume has failed to be reclaimed.
|
||||
// A nil return indicates success.
|
||||
|
Reference in New Issue
Block a user