Documentation ¶
Index ¶
- Constants
- func GetServiceStartTimeout() time.Duration
- type DockerOps
- func (d *DockerOps) CheckDockerVersion(requiredVersion string) (bool, error)
- func (d *DockerOps) DeleteInternalVolume(volName string)
- func (d *DockerOps) GetSwarmInfo() (nodeID string, addr string, isManager bool, err error)
- func (d *DockerOps) GetSwarmLeader() (string, error)
- func (d *DockerOps) GetSwarmManagers() ([]swarm.Peer, error)
- func (d *DockerOps) IsSwarmLeader(nodeID string) (bool, error)
- func (d *DockerOps) ListVolumesFromInternalVol() ([]string, error)
- func (d *DockerOps) ListVolumesFromServices() ([]string, error)
- func (d *DockerOps) LoadFileServerImage()
- func (d *DockerOps) StartSMBServer(volName string) (int, string, bool)
- func (d *DockerOps) StopSMBServer(volName string) (int, string, bool)
- func (d *DockerOps) VolumeCreate(volumeDriver string, volName string, options map[string]string) error
- func (d *DockerOps) VolumeInspect(volName string) error
- func (d *DockerOps) VolumeRemove(volName string) error
Constants ¶
const ( // Default username for all accessing Samba server mounts SambaUsername = "vfile" // Default password for all accessing Samba server mounts SambaPassword = "vfile" )FileShareName = "vfileshare" FileSharePath = "/vfilepath"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerOps ¶
type DockerOps struct {
Dockerd *dockerClient.Client
}
DockerOps is the interface for docker host related operations
func NewDockerOps ¶
func NewDockerOps() *DockerOps
func (*DockerOps) CheckDockerVersion ¶
CheckDockerVersion - Return the version of docker on current node
func (*DockerOps) DeleteInternalVolume ¶
DeleteVolume - delete the internal volume
func (*DockerOps) GetSwarmInfo ¶
GetSwarmInfo - returns the node ID and node IP address in swarm cluster also returns if this node is a manager or not
func (*DockerOps) GetSwarmLeader ¶
GetSwarmLeader - return the IP address of the swarm leader this function can only be executed successfully on a swarm manager node
func (*DockerOps) GetSwarmManagers ¶
GetSwarmManagers - return all the managers according to local docker info
func (*DockerOps) IsSwarmLeader ¶
IsSwarmLeader - check if nodeID is a swarm leader or not this function can only be executed successfully on a swarm manager node
func (*DockerOps) ListVolumesFromInternalVol ¶
ListVolumesFromInternalVol - List vFile volumes according to current internal volumes
func (*DockerOps) ListVolumesFromServices ¶
ListVolumesFromServices - List vFile volumes according to current docker services
func (*DockerOps) LoadFileServerImage ¶
func (d *DockerOps) LoadFileServerImage()
loadFileServerImage - Load the file server image present in the plugin to Docker images
func (*DockerOps) StartSMBServer ¶
StartSMBServer - Start SMB server Input - Name of the volume for which SMB has to be started Output
int: The overlay network port number on which the newly created SMB server listens. This port is opened on every host VM in the swarm. string: Name of the SMB service started bool: Indicated success/failure of the function. If false, ignore other output values.
func (*DockerOps) StopSMBServer ¶
StopSMBServer - Stop SMB server The return values are just to maintain parity with StartSMBServer() as both these functions are passed to a nested function as args. Input
volName: Name of the volume for which the SMB service has to be stopped.
Output
int: Port number on which the SMB server is listening. Set this to 0 as cleanup. string: Name of the SMB service. Set to empty. bool: The result of the operation. True if the service was successfully stopped.
func (*DockerOps) VolumeCreate ¶
func (d *DockerOps) VolumeCreate(volumeDriver string, volName string, options map[string]string) error
VolumeCreate - create volume from docker host with specific volume driver
func (*DockerOps) VolumeInspect ¶
VolumeInspect - inspect volume from docker host, if failed, return error
func (*DockerOps) VolumeRemove ¶
VolumeCreate - remove volume from docker host with specific volume driver