Beispiel #1
0
func init() {
	transport.RegisterTransport("http", &client.HttpTransport{})
	defaultTransport.Set("http")

	daemon.AddDaemonExtension(&httpcmd.Daemon{})
	cmd.AddCommandExtension((&daemoncmd.Command{"http://127.0.0.1:43273"}).RegisterLocal, true)

	ctx := ctrcmd.CommandContext{Transport: &defaultTransport.TransportFlag, Insecure: &insecure}
	cmd.AddCommandExtension(ctx.RegisterLocal, true)
	cmd.AddCommandExtension(ctx.RegisterRemote, false)

	cmd.AddCommandExtension(gitcmd.RegisterInitRepo, true)
	cmd.AddCommandExtension((&gitcmd.CommandContext{&defaultTransport.TransportFlag}).RegisterCreateRepo, false)

	sshcmd.AddPermissionCommand(git.ResourceTypeRepository, &gitcmd.PermissionCommandContext{})

	cmd.AddCommandExtension(sshcmd.RegisterAuthorizedKeys, true)
	cmd.AddCommandExtension((&sshcmd.CommandContext{Transport: &defaultTransport.TransportFlag}).RegisterAddKeys, false)

	cmd.AddCommandExtension(cleancmd.RegisterCleanup, true)
	cmd.AddCommandExtension(initcmd.RegisterInit, true)
	cmd.AddCommandExtension(routercmd.RegisterRouter, true)

	jobs.AddJobExtension(cjobs.NewContainerExtension())
	jobs.AddJobExtension(gitjobs.NewGitExtension())
	jobs.AddJobExtension(sshjobs.NewSshExtension())

	http.AddHttpExtension(&chttp.HttpExtension{})
	http.AddHttpExtension(&githttp.HttpExtension{})
	http.AddHttpExtension(&sshhttp.HttpExtension{})
}
Beispiel #2
0
func init() {
	cmd.AddInitializer(git.InitializeData, cmd.ForDaemon)

	http.AddHttpExtension(githttp.Routes)

	cmd.AddCommandExtension(registerRemote, false)
	cmd.AddCommandExtension(registerLocal, true)

	sshcmd.AddPermissionCommand(git.ResourceTypeRepository, &handler)
}
Beispiel #3
0
func init() {
	a := &gitcmd.Command{&defaultTransport.TransportFlag}
	cmd.AddCommandExtension(a.RegisterCreateRepo, false)

	cmd.AddCommandExtension(sshcmd.RegisterAuthorizedKeys, true)
	b := &sshcmd.Command{&defaultTransport.TransportFlag}
	cmd.AddCommandExtension(b.RegisterAddKeys, false)

	http.AddHttpExtension(&chttp.HttpExtension{})
	http.AddHttpExtension(&githttp.HttpExtension{})
	http.AddHttpExtension(&sshhttp.HttpExtension{})
}
Beispiel #4
0
func init() {
	transport.RegisterTransport("http", &client.HttpTransport{})
	defaultTransport.Set("http")

	ctx := ctrcmd.CommandContext{Transport: &defaultTransport.TransportFlag, Insecure: &insecure}
	cmd.AddCommandExtension(ctx.RegisterLocal, true)
	cmd.AddCommandExtension(ctx.RegisterRemote, false)

	a := &gitcmd.CommandContext{&defaultTransport.TransportFlag}
	cmd.AddCommandExtension(a.RegisterCreateRepo, false)

	sshcmd.AddPermissionCommand(git.ResourceTypeRepository, &gitcmd.PermissionCommandContext{})

	cmd.AddCommandExtension(sshcmd.RegisterAuthorizedKeys, true)
	b := &sshcmd.CommandContext{Transport: &defaultTransport.TransportFlag}
	cmd.AddCommandExtension(b.RegisterAddKeys, false)

	http.AddHttpExtension(&chttp.HttpExtension{})
	http.AddHttpExtension(&githttp.HttpExtension{})
	http.AddHttpExtension(&sshhttp.HttpExtension{})
}
Beispiel #5
0
func init() {
	cmd.AddCommandExtension(func(parent *cobra.Command) {
		idlerCmd := &cobra.Command{
			Use:   "idler-daemon",
			Short: "(local) A daemon that monitors container traffic and makes idle/unidle decisions",
			Run:   startIdler,
		}
		idlerCmd.PersistentFlags().StringVarP(&hostIp, "host-ip", "H", guessHostIp(), "IP address to listen for traffic on")
		idlerCmd.PersistentFlags().IntVarP(&idleTimeout, "idle-timeout", "T", 60, "Set the number of minutes of inactivity before an application is idled")
		if parent.Flags().Lookup("docker-socket") == nil {
			panic("Flag docker-socket is not defined")
		}
		parent.AddCommand(idlerCmd)
	}, true)
}
Beispiel #6
0
func init() {
	cmd.AddCommandExtension(gitcmd.RegisterInitRepo, true)
	a := &gitcmd.Command{&defaultTransport.TransportFlag}
	cmd.AddCommandExtension(a.RegisterCreateRepo, false)

	cmd.AddCommandExtension(sshcmd.RegisterAuthorizedKeys, true)
	b := &sshcmd.Command{&defaultTransport.TransportFlag}
	cmd.AddCommandExtension(b.RegisterAddKeys, false)

	cmd.AddCommandExtension(cleancmd.RegisterCleanup, true)
	cmd.AddCommandExtension(initcmd.RegisterInit, true)
	cmd.AddCommandExtension(routercmd.RegisterRouter, true)

	jobs.AddJobExtension(cjobs.NewContainerExtension())
	jobs.AddJobExtension(gitjobs.NewGitExtension())
	jobs.AddJobExtension(sshjobs.NewSshExtension())

	http.AddHttpExtension(&chttp.HttpExtension{})
	http.AddHttpExtension(&githttp.HttpExtension{})
	http.AddHttpExtension(&sshhttp.HttpExtension{})
}
Beispiel #7
0
func init() {
	http.AddHttpExtension(&sshhttp.HttpExtension{})
	cmd.AddCommandExtension(registerLocal, true)
	cmd.AddCommandExtension(registerRemote, false)
}