swarm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetworkJoined = errors.New("Had joined the network")
View Source
var ErrNetworkNoUnlinkable = errors.New("No network could be unlinking")
View Source
var ErrNetworkNotFound = errors.New("Network not found")
View Source
var ErrServiceNotFound = errors.New("Not found service")

Functions

func CreateOverlay

func CreateOverlay(datasource *models.DataSource) (string, error)

func FindNetworkByName

func FindNetworkByName(name string) (string, error)

func ListDataSources

func ListDataSources() []models.DataSource

func ListOverlays

func ListOverlays() ([]types.NetworkResource, error)

func RemoveApp

func RemoveApp(app *models.Application) error

func RemoveDataSource

func RemoveDataSource(datasource *models.DataSource) error

func RemoveOverlay

func RemoveOverlay(datasource *models.DataSource) error

func RemoveService

func RemoveService(service SwarmService) error

func RetrievePort

func RetrievePort(serviceID string) (uint32, error)

func RetrieveServiceID

func RetrieveServiceID(name string) (string, error)

func RetrieveServiceVersion

func RetrieveServiceVersion(serviceID string) (*swarm.Version, error)

func UpdateAppService

func UpdateAppService(app *models.Application) error

func UpdateDataSource

func UpdateDataSource(dataSource *models.DataSource) error

func UpdateService

func UpdateService(service SwarmService, portConfig []swarm.PortConfig, networkConfig []swarm.NetworkAttachmentConfig, image string, envs []string) error

Types

type Container

type Container struct {
	State      string `json:"state"`
	Image      string `json:"image,omitempty"`
	VersionTag string `json:"versionTag, omitempty"`
	CreatedAt  string `json:"createdAt"`
}

func ListContainers

func ListContainers(service SwarmService) ([]Container, error)

func ListNodes

func ListNodes(app *models.Application) ([]Container, error)

type SwarmService

type SwarmService interface {
	SwarmServiceName() string
	SwarmInstances() int
}

type UpstreamConfig

type UpstreamConfig struct {
	Port uint32 `json:"port"`
}

Serialize to /upstreams/:appName

Jump to

Keyboard shortcuts

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