dargo

package module
v0.0.0-...-86ac259 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2017 License: AGPL-3.0 Imports: 15 Imported by: 0

README

dargo

Deploy apps directly to docker.

GoDoc

Why?

Inspired from Kelsey Hightower's presentation at dotGo 2016 of Kargo library, I wanted also be able to deploy applications directly to Docker Swarm

Usage

Check out the example app in example. It's as simple as:

package main

import (
	"fmt"

	"github.com/brimstone/dargo"
)

func main() {
	dargo.DeployAndExit(dargo.DeployOptions{
		Tags: []string{"hello-dargo"},
	})
	fmt.Println("Hello world!")
}

Documentation

Overview

Package dargo enables applications to deploy themselves to a Docker engine.

Index

Examples

Constants

This section is empty.

Variables

View Source
var Enable bool

Enable determines if we should deploy when Deploy() is called

Functions

func Deploy

func Deploy(o DeployOptions) error

Deploy deploys to the Docker engine reachable via environment variables and defaults.

func DeployAndExit

func DeployAndExit(o DeployOptions)

DeployAndExit checks to see if we're Enabled, then calls Deploy, logging Fatal errors, then exiting

Example
package main

import (
	"fmt"

	"github.com/brimstone/dargo"
)

func main() {
	dargo.DeployAndExit(dargo.DeployOptions{
		Tags: []string{"hello-dargo"},
	})

	fmt.Println("Hello world!")
}
Output:

Types

type DeployOptions

type DeployOptions struct {
	Tags       []string
	Foreground bool
}

DeployOptions control attributes about the resulting Docker Image

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL