expose

package
v0.0.0-...-48ca1cc Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expose

type Expose struct {
	// contains filtered or unexported fields
}

Expose represents a connection to the aeris.cd server

func NewExposeFromConf

func NewExposeFromConf() (Expose, error)

NewExposeFromConf loads the aeris.cd config from aeriscloud and returns an Expose struct

func (Expose) Add

func (expose Expose) Add(name string, port int) error

Add exposes a container on the service

func (Expose) ContainerHost

func (expose Expose) ContainerHost(name string) string

ContainerHost slugifies the container's name and append docker

func (Expose) Delete

func (expose Expose) Delete(name string) error

Delete un-exposes (is that a word?) a container from the service

func (Expose) List

func (expose Expose) List(owned bool) (HostList, error)

List lists currently exposed services

func (Expose) UserURL

func (expose Expose) UserURL(name string) string

UserURL creates the full url for a container

type Host

type Host struct {
	Mapping  string `json:"mapping"`
	Hostname string `json:"hostname"`
	Status   int    `json:"status"`
}

Host is an exposed service with its status

type HostList

type HostList []Host

HostList is a list of exposed host

func (HostList) Find

func (el HostList) Find(name string) (Host, bool)

Find finds a service in a list of exposes hosts

type Service

type Service struct {
	Service string `json:"service"`
	Port    int    `json:"port"`
}

Service is a local docker service

Jump to

Keyboard shortcuts

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