Initial support for Mesos Containerizer
This commit is contained in:
parent
ac40251f00
commit
d7efa913b1
3 changed files with 47 additions and 2 deletions
27
container.go
27
container.go
|
@ -22,7 +22,6 @@ type Container interface {
|
|||
Build() *aurora.Container
|
||||
}
|
||||
|
||||
// TODO(rdelvalle): Implement Mesos container builder
|
||||
type MesosContainer struct {
|
||||
container *aurora.MesosContainer
|
||||
}
|
||||
|
@ -48,3 +47,29 @@ func (c DockerContainer) AddParameter(name, value string) DockerContainer {
|
|||
c.container.Parameters = append(c.container.Parameters, &aurora.DockerParameter{name, value})
|
||||
return c
|
||||
}
|
||||
|
||||
func NewMesosContainer() MesosContainer {
|
||||
return MesosContainer{container: aurora.NewMesosContainer()}
|
||||
}
|
||||
|
||||
func (c MesosContainer) Build() *aurora.Container {
|
||||
return &aurora.Container{Mesos: c.container}
|
||||
}
|
||||
|
||||
func (c MesosContainer) DockerImage(name, tag string) MesosContainer {
|
||||
if c.container.Image == nil {
|
||||
c.container.Image = aurora.NewImage()
|
||||
}
|
||||
|
||||
c.container.Image.Docker = &aurora.DockerImage{name, tag}
|
||||
return c
|
||||
}
|
||||
|
||||
func (c MesosContainer) AppcImage(name, imageId string) MesosContainer {
|
||||
if c.container.Image == nil {
|
||||
c.container.Image = aurora.NewImage()
|
||||
}
|
||||
|
||||
c.container.Image.Appc = &aurora.AppcImage{name, imageId}
|
||||
return c
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue