Documentation ¶
Index ¶
- Constants
- Variables
- func NewServiceFromImage(image dckr.Image) db.Service
- type Pier
- func (p *Pier) BuildService(userID int64, buildDir string) (db.Service, error)
- func (p *Pier) DownStreamContainerFile(volumeID string, fileLocation string, limits def.LimitConfig, ...) error
- func (p *Pier) ImportImage(userID int64, imageFilePath string) (db.Service, error)
- func (p *Pier) InitiateSwarmMode(listenAddr string, advertiseAddr string) (string, error)
- func (p *Pier) LeaveIfInSwarmMode() error
- func (p *Pier) ListFiles(volumeID db.VolumeID, filePath string, limits def.LimitConfig, ...) ([]VolumeItem, error)
- func (p *Pier) RemoveJob(userID int64, jobID db.JobID) (db.Job, error)
- func (p *Pier) RunService(userID int64, id db.ServiceID, inputPID string, limits def.LimitConfig, ...) (db.Job, error)
- func (p *Pier) SetDockerConnection(config def.DockerConfig, internalServicesFolder string) error
- func (p *Pier) WaitAndRemoveVolume(id dckr.VolumeID) error
- type VolumeItem
Constants ¶
const GefImageTag = "gef"
GefImageTag tag for all images created by the GEF
const GefSrvLabelPrefix = "eudat.gef.service."
GefSrvLabelPrefix is the prefix identifying GEF related labels
const InternalImagePrefix = "internal_"
InternalImagePrefix prefix for internal images
const ServiceImagePrefix = "service_"
ServiceImagePrefix prefix for GEF service images
Variables ¶
var JobTimeOutAndRemovalError = "Job execution timeout exceeded and container removal failed"
var JobTimeOutError = "Job execution timeout exceeded"
Functions ¶
Types ¶
type Pier ¶
type Pier struct {
// contains filtered or unexported fields
}
Pier is a master struct for gef-docker abstractions
func (*Pier) BuildService ¶
BuildService builds a services based on the content of the provided folder
func (*Pier) DownStreamContainerFile ¶
func (p *Pier) DownStreamContainerFile(volumeID string, fileLocation string, limits def.LimitConfig, timeouts def.TimeoutConfig, w http.ResponseWriter) error
DownStreamContainerFile exported
func (*Pier) ImportImage ¶
ImportImage installs a docker tar file as a docker image
func (*Pier) InitiateSwarmMode ¶
InitiateSwarmMode switches a node to the Swarm Mode
func (*Pier) LeaveIfInSwarmMode ¶
LeaveIfInSwarmMode deactivates the Swarm Mode, if it was on
func (*Pier) ListFiles ¶
func (p *Pier) ListFiles(volumeID db.VolumeID, filePath string, limits def.LimitConfig, timeouts def.TimeoutConfig) ([]VolumeItem, error)
ListFiles exported
func (*Pier) RunService ¶
func (p *Pier) RunService(userID int64, id db.ServiceID, inputPID string, limits def.LimitConfig, timeouts def.TimeoutConfig) (db.Job, error)
RunService exported
func (*Pier) SetDockerConnection ¶
func (p *Pier) SetDockerConnection(config def.DockerConfig, internalServicesFolder string) error
SetDockerConnection instantiates the docker client and sets the pier's docker connection
type VolumeItem ¶
type VolumeItem struct { Name string `json:"name"` Size int64 `json:"size"` Modified time.Time `json:"modified"` IsFolder bool `json:"isFolder"` Path string `json:"path"` FolderTree []VolumeItem `json:"folderTree"` }
VolumeItem describes a folder content