core

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AWSMasterAMIs = map[string]string{
	"ap-northeast-1": "ami-907fa690",
	"ap-southeast-1": "ami-b4a79de6",
	"eu-central-1":   "ami-e8635bf5",
	"eu-west-1":      "ami-0fd0ae78",
	"sa-east-1":      "ami-f9f675e4",
	"us-east-1":      "ami-f57b8f9e",
	"us-west-1":      "ami-87b643c3",
	"cn-north-1":     "ami-3abf2203",
	"ap-southeast-2": "ami-1bb9c221",
	"us-west-2":      "ami-33566d03",
}

Functions

func RunCustomDeployment

func RunCustomDeployment(core *Core, component *models.Component) error

Types

type Action

type Action struct {
	Status *models.ActionStatus
	// contains filtered or unexported fields
}

func (*Action) Async

func (a *Action) Async() error

func (*Action) Now

func (a *Action) Now() error

type Apps

type Apps struct {
	Collection
}

func (*Apps) Create

func (c *Apps) Create(m *models.App) error

func (*Apps) Delete

func (c *Apps) Delete(id *int64, m *models.App) *Action

type CapacityService

type CapacityService struct {
	// contains filtered or unexported fields
}

func (*CapacityService) Perform

func (s *CapacityService) Perform() error

type CloudAccounts

type CloudAccounts struct {
	Collection
}

func (*CloudAccounts) Create

func (c *CloudAccounts) Create(m *models.CloudAccount) error

func (*CloudAccounts) Delete

func (c *CloudAccounts) Delete(id *int64, m *models.CloudAccount) error

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

func (*Collection) Create

func (c *Collection) Create(m models.Model) error

func (*Collection) Delete

func (c *Collection) Delete(id *int64, m models.Model) error

func (*Collection) Get

func (c *Collection) Get(id *int64, m models.Model) error

func (*Collection) GetWithIncludes

func (c *Collection) GetWithIncludes(id *int64, m models.Model, includes []string) error

func (*Collection) Update

func (c *Collection) Update(id *int64, oldM models.Model, m models.Model) error

type Components

type Components struct {
	Collection
}

func (*Components) Delete

func (c *Components) Delete(id *int64, m *models.Component) *Action

func (*Components) Deploy

func (c *Components) Deploy(id *int64, m *models.Component) *Action

type Core

type Core struct {
	Settings

	Log *logrus.Logger

	DB *DB

	CloudAccounts    *CloudAccounts
	Kubes            *Kubes
	Apps             *Apps
	Components       *Components
	Releases         *Releases
	Instances        *Instances
	Volumes          *Volumes
	PrivateImageKeys *PrivateImageKeys
	Entrypoints      *Entrypoints
	Nodes            *Nodes

	Actions map[string]*Action
	// contains filtered or unexported fields
}

func (*Core) Initialize

func (c *Core) Initialize()

NOTE this used to be core.New(), but due to how we load in values from the cli package, I needed to first actually initialize a Core struct and then configure.

func (*Core) K8S

func (c *Core) K8S(m *models.Kube) guber.Client

func (*Core) NewAPIClient

func (c *Core) NewAPIClient() *client.Client

func (*Core) SetResourceActionStatus

func (c *Core) SetResourceActionStatus(m models.Model)

type DB

type DB struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func (*DB) Create

func (db *DB) Create(m models.Model) error

func (*DB) Delete

func (db *DB) Delete(m models.Model) error

func (*DB) Find

func (db *DB) Find(out interface{}, where ...interface{}) error

func (*DB) First

func (db *DB) First(out interface{}, where ...interface{}) error

func (*DB) Preload

func (db *DB) Preload(column string, conditions ...interface{}) *DB

func (*DB) Save

func (db *DB) Save(m models.Model) error

func (*DB) Where

func (db *DB) Where(query interface{}, args ...interface{}) *DB

type Entrypoints

type Entrypoints struct {
	Collection
}

func (*Entrypoints) Create

func (c *Entrypoints) Create(m *models.Entrypoint) error

func (*Entrypoints) Delete

func (c *Entrypoints) Delete(id *int64, m *models.Entrypoint) *Action

func (*Entrypoints) RemovePort

func (c *Entrypoints) RemovePort(id *int64, m *models.Entrypoint, elbPort int) error

func (*Entrypoints) SetPort

func (c *Entrypoints) SetPort(id *int64, m *models.Entrypoint, elbPort int, instancePort int) error

type InstanceObserver

type InstanceObserver struct {
	// contains filtered or unexported fields
}

func (*InstanceObserver) Perform

func (s *InstanceObserver) Perform() error

type Instances

type Instances struct {
	Collection
}

func (*Instances) CreateVolumes

func (c *Instances) CreateVolumes(id *int64, m *models.Instance) error

func (*Instances) Delete

func (c *Instances) Delete(id *int64, m *models.Instance) *Action

func (*Instances) Log

func (c *Instances) Log(m *models.Instance) (string, error)

func (*Instances) Start

func (c *Instances) Start(id *int64, m *models.Instance) *Action

func (*Instances) Stop

func (c *Instances) Stop(id *int64, m *models.Instance) *Action

type KubeScaler

type KubeScaler struct {
	// contains filtered or unexported fields
}

func (*KubeScaler) Scale

func (s *KubeScaler) Scale() error

type Kubes

type Kubes struct {
	Collection
}

func (*Kubes) Create

func (c *Kubes) Create(m *models.Kube) error

func (*Kubes) Delete

func (c *Kubes) Delete(id *int64, m *models.Kube) *Action

type NodeObserver

type NodeObserver struct {
	// contains filtered or unexported fields
}

func (*NodeObserver) Perform

func (s *NodeObserver) Perform() error

type NodeSynchronizer

type NodeSynchronizer struct {
	// contains filtered or unexported fields
}

func (*NodeSynchronizer) Perform

func (s *NodeSynchronizer) Perform() error

type Nodes

type Nodes struct {
	Collection
}

func (*Nodes) Create

func (c *Nodes) Create(m *models.Node) error

func (*Nodes) Delete

func (c *Nodes) Delete(id *int64, m *models.Node) *Action

type PodNotFoundError

type PodNotFoundError struct {
	InstanceID *int64
}

func (*PodNotFoundError) Error

func (err *PodNotFoundError) Error() string

type Port

type Port struct {
	*models.Port
	// contains filtered or unexported fields
}

type PrivateImageKeys

type PrivateImageKeys struct {
	Collection
}

func (*PrivateImageKeys) Create

type RecurringService

type RecurringService struct {
	// contains filtered or unexported fields
}

func (*RecurringService) Run

func (s *RecurringService) Run()

type Releases

type Releases struct {
	Collection
}

func (*Releases) Create

func (c *Releases) Create(m *models.Release) error

type RepeatedActionError

type RepeatedActionError struct {
	ResourceID string
}

func (*RepeatedActionError) Error

func (err *RepeatedActionError) Error() string

type Service

type Service interface {
	Perform() error
}

type ServiceSet

type ServiceSet struct {
	// contains filtered or unexported fields
}

func NewServiceSet

func NewServiceSet(core *Core, component *models.Component, release *models.Release, baseName string, labelSelector map[string]string, portFilter func(*models.Port) bool) (*ServiceSet, error)

type Settings added in v0.8.2

type Settings struct {
	PsqlHost      string `json:"psql_host"`
	PsqlDb        string `json:"psql_db"`
	PsqlUser      string `json:"psql_user"`
	PsqlPass      string `json:"psql_pass"`
	HTTPPort      string `json:"http_port"`
	HTTPBasicUser string `json:"http_basic_user"`
	HTTPBasicPass string `json:"http_basic_pass"`
	LogPath       string `json:"log_file"`
	LogLevel      string `json:"log_level"`
}

type Volumes

type Volumes struct {
	Collection
}

func (*Volumes) Delete

func (c *Volumes) Delete(id *int64, m *models.Volume) *Action

func (*Volumes) Provision

func (c *Volumes) Provision(id *int64, m *models.Volume) *Action

func (*Volumes) Resize

func (c *Volumes) Resize(id *int64, m *models.Volume) *Action

Resize the Volume

Jump to

Keyboard shortcuts

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