bind

package
v0.0.0-...-5650998 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2014 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package bind provides interfaces and types for use when binding an app to a service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	// GetIp returns the app ip.
	GetIp() string

	// GetName returns the app name.
	GetName() string

	// GetUnits returns the app units.
	GetUnits() []Unit

	// InstanceEnv returns the app enviroment variables.
	InstanceEnv(string) map[string]EnvVar

	// SetEnvs adds enviroment variables in the app.
	SetEnvs([]EnvVar, bool) error

	// UnsetEnvs removes the given enviroment variables from the app.
	UnsetEnvs([]string, bool) error
}

type Binder

type Binder interface {
	// BindApp makes the bind between the binder and an app.
	BindApp(App) error

	// BindUnit makes the bind between the binder and an unit.
	BindUnit(App, Unit) (map[string]string, error)

	// UnbindApp makes the unbind between the binder and an app.
	UnbindApp(App) error

	// UnbindUnit makes the unbind between the binder and an unit.
	UnbindUnit(Unit) error
}

type EnvVar

type EnvVar struct {
	Name         string
	Value        string
	Public       bool
	InstanceName string
}

EnvVar represents a environment variable for an app.

type Unit

type Unit interface {
	// GetIp returns the unit ip.
	GetIp() string
}

Jump to

Keyboard shortcuts

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