application

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 19 Imported by: 1

README

Stellar Application Service

The Stellar application service provides a simple way of launching container workloads.

Format

Stellar applications are represented in JSON format for portability and interoperatbility.

{
    "name": "example-application",
    "labels": [
        "env=prod",
        "region=us-east"
    ],
    "services": [
        {
            "name": "redis",
            "image": "docker.io/library/redis:alpine",
            "process": {
                "uid": 0,
                "gid": 0,
                "args": ["redis-server"]
            },
            "labels": [
                "env=prod"
            ],
            "network": true,
            "mounts": [
                {
                    "type": "bind",
                    "source": "/mnt/data",
                    "destination": "/data",
                    "options": ["rbind"]
                }
            ]
        },
        {
            "name": "processor",
            "image": "docker.io/ehazlett/processor:alpine",
            "process": {
                "args": ["--debug"],
                "env": ["PROCS=4"]
            },
            "resources": {
                "cpu": 0.1,
                "memory": 128
            },
            "network": true
        },
        {
            "name": "ui",
            "image": "docker.io/ehazlett/ui:alpine",
            "network": true,
            "instances": 4,
	    "endpoints": [
                {
                    "service": "ui",
                    "protocol": "http",
                    "host": "example.com",
                    "port": 8080,
                    "tls": false
                }
            ]

        }
    ]
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApplicationNotFound = errors.New("application not found")
)

Functions

func New

func New(cfg *stellar.Config, agent *element.Agent) (*service, error)

Types

type AppSorter

type AppSorter []*api.App

func (AppSorter) Len

func (a AppSorter) Len() int

func (AppSorter) Less

func (a AppSorter) Less(i, j int) bool

func (AppSorter) Swap

func (a AppSorter) Swap(i, j int)

type UpdateEvent added in v0.2.0

type UpdateEvent struct {
	Application string
	Action      string
}

UpdateEvent is the event published when an application is updated

Jump to

Keyboard shortcuts

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