Documentation
¶
Index ¶
- Constants
- type ApplyDiffRequest
- type ApplyDiffResponse
- type Change
- type ChangeKind
- type ChangesRequest
- type ChangesResponse
- type CleanupRequest
- type CleanupResponse
- type CreateRequest
- type CreateResponse
- type DiffRequest
- type DiffResponse
- type DiffSizeRequest
- type DiffSizeResponse
- type Driver
- type ExistsRequest
- type ExistsResponse
- type GetMetadataRequest
- type GetMetadataResponse
- type GetRequest
- type GetResponse
- type Handler
- type InitRequest
- type InitResponse
- type PutRequest
- type PutResponse
- type RemoveRequest
- type RemoveResponse
- type StatusRequest
- type StatusResponse
Constants ¶
const (
// DefaultDockerRootDirectory is the default directory where graph drivers will be created.
DefaultDockerRootDirectory = "/var/lib/docker/graph"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyDiffRequest ¶
ApplyDiffRequest is the structure that docker's applyDiff requests are deserialized to.
type ApplyDiffResponse ¶
ApplyDiffResponse is the structure that docker's applyDiff responses are serialized to.
func CallApplyDiff ¶
func CallApplyDiff(url string, client *http.Client, req ApplyDiffRequest) (*ApplyDiffResponse, error)
CallApplyDiff is the raw call to the Graphdriver.ApplyDiff method
type Change ¶
type Change struct { Path string Kind ChangeKind }
Change is the structure that docker's individual changes are serialized to.
type ChangeKind ¶
type ChangeKind int
ChangeKind represents the type of change mage
const ( // Modified is a ChangeKind used when an item has been modified Modified ChangeKind = iota // Added is a ChangeKind used when an item has been added Added // Deleted is a ChangeKind used when an item has been deleted Deleted )
type ChangesRequest ¶
ChangesRequest is the structure that docker's changes requests are deserialized to.
type ChangesResponse ¶
ChangesResponse is the structure that docker's changes responses are serialized to.
func CallChanges ¶
func CallChanges(url string, client *http.Client, req ChangesRequest) (*ChangesResponse, error)
CallChanges is the raw call to the Graphdriver.Changes method
type CleanupRequest ¶
type CleanupRequest struct{}
CleanupRequest is the structure that docker's cleanup requests are deserialized to.
type CleanupResponse ¶
type CleanupResponse struct {
Err string
}
CleanupResponse is the structure that docker's cleanup responses are serialized to.
func CallCleanup ¶
func CallCleanup(url string, client *http.Client, req CleanupRequest) (*CleanupResponse, error)
CallCleanup is the raw call to the Graphdriver.Cleanup method
type CreateRequest ¶
type CreateRequest struct { ID string Parent string MountLabel string StorageOpt map[string]string }
CreateRequest is the structure that docker's create requests are deserialized to.
type CreateResponse ¶
type CreateResponse struct {
Err string
}
CreateResponse is the strucutre that docker's create responses are serialized to.
func CallCreate ¶
func CallCreate(url string, client *http.Client, req CreateRequest) (*CreateResponse, error)
CallCreate is the raw call to the Graphdriver.Create method
func CallCreateReadWrite ¶
func CallCreateReadWrite(url string, client *http.Client, req CreateRequest) (*CreateResponse, error)
CallCreateReadWrite is the raw call to the Graphdriver.CreateReadWrite method
type DiffRequest ¶
DiffRequest is the structure that docker's diff requests are deserialized to.
type DiffResponse ¶
type DiffResponse struct {
Stream io.ReadCloser // TAR STREAM
}
DiffResponse is the structure that docker's diff responses are serialized to.
func CallDiff ¶
func CallDiff(url string, client *http.Client, req DiffRequest) (*DiffResponse, error)
CallDiff is the raw call to the Graphdriver.Diff method
type DiffSizeRequest ¶
DiffSizeRequest is the structure that docker's diffSize requests are deserialized to.
type DiffSizeResponse ¶
DiffSizeResponse is the structure that docker's diffSize responses are serialized to.
func CallDiffSize ¶
func CallDiffSize(url string, client *http.Client, req DiffSizeRequest) (*DiffSizeResponse, error)
CallDiffSize is the raw call to the Graphdriver.CallDiffSize method
type Driver ¶
type Driver interface { Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) error Create(id, parent, mountlabel string, storageOpt map[string]string) error CreateReadWrite(id, parent, mountlabel string, storageOpt map[string]string) error Remove(id string) error Get(id, mountLabel string) (string, error) Put(id string) error Exists(id string) bool Status() [][2]string GetMetadata(id string) (map[string]string, error) Cleanup() error Diff(id, parent string) io.ReadCloser Changes(id, parent string) ([]Change, error) ApplyDiff(id, parent string, archive io.Reader) (int64, error) DiffSize(id, parent string) (int64, error) }
Driver represent the interface a driver must fulfill.
type ExistsRequest ¶
type ExistsRequest struct {
ID string
}
ExistsRequest is the structure that docker's exists requests are deserialized to.
type ExistsResponse ¶
type ExistsResponse struct {
Exists bool
}
ExistsResponse is the structure that docker's exists responses are serialized to.
func CallExists ¶
func CallExists(url string, client *http.Client, req ExistsRequest) (*ExistsResponse, error)
CallExists is the raw call to the Graphdriver.Exists method
type GetMetadataRequest ¶
type GetMetadataRequest struct {
ID string
}
GetMetadataRequest is the structure that docker's getMetadata requests are deserialized to.
type GetMetadataResponse ¶
GetMetadataResponse is the structure that docker's getMetadata responses are serialized to.
func CallGetMetadata ¶
func CallGetMetadata(url string, client *http.Client, req GetMetadataRequest) (*GetMetadataResponse, error)
CallGetMetadata is the raw call to the Graphdriver.GetMetadata method
type GetRequest ¶
GetRequest is the structure that docker's get requests are deserialized to.
type GetResponse ¶
GetResponse is the strucutre that docker's remove responses are serialized to.
func CallGet ¶
func CallGet(url string, client *http.Client, req GetRequest) (*GetResponse, error)
CallGet is the raw call to the Graphdriver.Get method
type Handler ¶
Handler forwards requests and responses between the docker daemon and the plugin.
func NewHandler ¶
NewHandler initializes the request handler with a driver implementation.
type InitRequest ¶
type InitRequest struct { Home string Options []string `json:"Opts"` UIDMaps []idtools.IDMap `json:"UIDMaps"` GIDMaps []idtools.IDMap `json:"GIDMaps"` }
InitRequest is the structure that docker's init requests are deserialized to.
type InitResponse ¶
type InitResponse struct {
Err string
}
InitResponse is the strucutre that docker's init responses are serialized to.
func CallInit ¶
func CallInit(url string, client *http.Client, req InitRequest) (*InitResponse, error)
CallInit is the raw call to the Graphdriver.Init method
type PutRequest ¶
type PutRequest struct {
ID string
}
PutRequest is the structure that docker's put requests are deserialized to.
type PutResponse ¶
type PutResponse struct {
Err string
}
PutResponse is the strucutre that docker's put responses are serialized to.
func CallPut ¶
func CallPut(url string, client *http.Client, req PutRequest) (*PutResponse, error)
CallPut is the raw call to the Graphdriver.Put method
type RemoveRequest ¶
type RemoveRequest struct {
ID string
}
RemoveRequest is the structure that docker's remove requests are deserialized to.
type RemoveResponse ¶
type RemoveResponse struct {
Err string
}
RemoveResponse is the strucutre that docker's remove responses are serialized to.
func CallRemove ¶
func CallRemove(url string, client *http.Client, req RemoveRequest) (*RemoveResponse, error)
CallRemove is the raw call to the Graphdriver.Remove method
type StatusRequest ¶
type StatusRequest struct{}
StatusRequest is the structure that docker's status requests are deserialized to.
type StatusResponse ¶
type StatusResponse struct {
Status [][2]string
}
StatusResponse is the structure that docker's status responses are serialized to.
func CallStatus ¶
func CallStatus(url string, client *http.Client, req StatusRequest) (*StatusResponse, error)
CallStatus is the raw call to the Graphdriver.Status method