bind

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 1 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 AddInstanceArgs

type AddInstanceArgs struct {
	Envs          []ServiceEnvVar
	Writer        io.Writer
	ShouldRestart bool
}

type App

type App interface {
	// GetAddresses returns the app addresses.
	GetAddresses() ([]string, error)

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

	// GetUUID returns the App v4 UUID
	GetUUID() (string, error)

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

	// AddInstance adds an instance to the application.
	AddInstance(args AddInstanceArgs) error

	// RemoveInstance removes an instance from the application.
	RemoveInstance(args RemoveInstanceArgs) error
}

type EnvVar

type EnvVar struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Public bool   `json:"public"`
}

EnvVar represents a environment variable for an app.

type RemoveInstanceArgs

type RemoveInstanceArgs struct {
	ServiceName   string
	InstanceName  string
	Writer        io.Writer
	ShouldRestart bool
}

type ServiceEnvVar

type ServiceEnvVar struct {
	EnvVar       `bson:",inline"`
	ServiceName  string `json:"-"`
	InstanceName string `json:"-"`
}

type SetEnvArgs

type SetEnvArgs struct {
	Envs          []EnvVar
	Writer        io.Writer
	ShouldRestart bool
}

type Unit

type Unit interface {
	GetID() string
	GetIp() string
}

Unit represents an application unit to be used in binds.

type UnsetEnvArgs

type UnsetEnvArgs struct {
	VariableNames []string
	Writer        io.Writer
	ShouldRestart bool
}

Jump to

Keyboard shortcuts

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