Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SliceGitTemplate = template.Must(template.New("githost.slice").Parse(`[Unit]
Description=Git Host slice
[Slice]
CPUAccounting=yes
MemoryAccounting=yes
MemoryLimit=512M
Slice=user.slice
[Install]
WantedBy=user.service`))
View Source
var UnitGitHostTemplate = template.Must(template.New("githost.service").Parse(`[Unit]
Description=Git host
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
Slice=githost.slice
ExecStartPre=- /bin/sh -c '/usr/bin/docker inspect -format="Removing old geard-githost" "geard-githost" 2>/dev/null && /usr/bin/docker rm "geard-githost"'
ExecStart=/usr/bin/docker run --name "geard-githost" -v /var/lib/containers/git:/var/lib/containers/git:rw -v /etc:/host_etc:ro -a stdout -a stderr --rm "ccoleman/geard-githost"
ExecStop=/usr/bin/docker stop "geard-githost"
Restart=on-failure`))
Functions ¶
func InitializeRepository ¶
func InitializeRepository(repositoryId git.RepoIdentifier, repositoryURL string) error
func InitializeServices ¶
func InitializeServices() error
func NewGitExtension ¶
func NewGitExtension() jobs.JobExtension
Return a job extension that casts requests directly to jobs TODO: Move implementation out of request object and into a
specific package
Types ¶
Click to show internal directories.
Click to hide internal directories.