services

package
v0.0.0-...-773e820 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlatformKubernetes    = "kubernetes"
	PlatformDockerCompose = "docker-compose"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvVar

type EnvVar struct {
	Name   Name
	Values map[Environment]string
}

EnvVar type

type EnvVars

type EnvVars []*EnvVar

EnvVars type

type Environment

type Environment string

Environment type

type KubernetesPlatform

type KubernetesPlatform struct {
	Services Services
	BuildDir string
	Env      Environment
}

func MakeKubernetesPlatform

func MakeKubernetesPlatform(buildDir, env, pathToServicesFile, pathToSecretsFile, pathToEnvFile string) (*KubernetesPlatform, error)

MakeKubernetesPlatform constructor

func (*KubernetesPlatform) Run

func (k8s *KubernetesPlatform) Run(serviceNames ...Name) error

Run service in kubernetes platform

func (*KubernetesPlatform) Setup

func (k8s *KubernetesPlatform) Setup(serviceNames ...Name) error

type Name

type Name string

Name of service

type Platform

type Platform interface {
	// Setup services
	Setup(...Name) error
	Run(...Name) error
}

Platform is component for creating required artifacts and interacting with specific platform

func MakePlatform

func MakePlatform(platform, buildDir, env, pathToServicesFile, pathToSecretsFile, pathToEnvFile string) (Platform, error)

MakePlatform returns specific platform

type Secret

type Secret struct {
	Name Name
	Data map[string]string
}

Secret type

type Secrets

type Secrets []*Secret

Secrets type

type Service

type Service struct {
	Name      Name     `json:"name"`
	Project   string   `json:"project"`
	Source    string   `json:"source"`
	Image     string   `json:"image"`
	IsPublic  bool     `json:"isPublic"`
	Subscribe []Name   `json:"subscribe"`
	Require   Services `json:"require"`
	Secrets   Secrets  `json:"secrets"`
	EnvVars   EnvVars  `json:"env"`
}

Service represents service configuration

type Services

type Services []*Service

Services type

func (*Services) LoadEnvVars

func (s *Services) LoadEnvVars(envVars map[string]interface{})

func (*Services) LoadSecrets

func (s *Services) LoadSecrets(secrets map[string]interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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