Documentation ¶
Index ¶
- Constants
- type AdminLogic
- type DeployLogic
- type EnvironmentLogic
- type EnvironmentResourceGetter
- type JobJanitor
- type JobLogic
- type L0AdminLogic
- type L0DeployLogic
- type L0EnvironmentLogic
- func (e *L0EnvironmentLogic) CanCreateEnvironment(req models.CreateEnvironmentRequest) (bool, error)
- func (e *L0EnvironmentLogic) CreateEnvironment(req models.CreateEnvironmentRequest) (*models.Environment, error)
- func (e *L0EnvironmentLogic) CreateEnvironmentLink(sourceEnvironmentID, destEnvironmentID string) error
- func (e *L0EnvironmentLogic) DeleteEnvironment(environmentID string) error
- func (e *L0EnvironmentLogic) DeleteEnvironmentLink(sourceEnvironmentID, destEnvironmentID string) error
- func (e *L0EnvironmentLogic) GetEnvironment(environmentID string) (*models.Environment, error)
- func (e *L0EnvironmentLogic) ListEnvironments() ([]*models.EnvironmentSummary, error)
- func (e *L0EnvironmentLogic) UpdateEnvironment(environmentID string, minClusterCount int) (*models.Environment, error)
- type L0JobLogic
- type L0LoadBalancerLogic
- func (l *L0LoadBalancerLogic) CreateLoadBalancer(req models.CreateLoadBalancerRequest) (*models.LoadBalancer, error)
- func (l *L0LoadBalancerLogic) DeleteLoadBalancer(loadBalancerID string) error
- func (l *L0LoadBalancerLogic) GetLoadBalancer(loadBalancerID string) (*models.LoadBalancer, error)
- func (l *L0LoadBalancerLogic) ListLoadBalancers() ([]*models.LoadBalancerSummary, error)
- func (l *L0LoadBalancerLogic) UpdateLoadBalancerHealthCheck(loadBalancerID string, healthCheck models.HealthCheck) (*models.LoadBalancer, error)
- func (l *L0LoadBalancerLogic) UpdateLoadBalancerPorts(loadBalancerID string, ports []models.Port) (*models.LoadBalancer, error)
- type L0ServiceLogic
- func (this *L0ServiceLogic) CreateService(req models.CreateServiceRequest) (*models.Service, error)
- func (this *L0ServiceLogic) DeleteService(serviceID string) error
- func (this *L0ServiceLogic) GetService(serviceID string) (*models.Service, error)
- func (this *L0ServiceLogic) GetServiceLogs(serviceID string, tail int) ([]*models.LogFile, error)
- func (this *L0ServiceLogic) ListServices() ([]*models.ServiceSummary, error)
- func (this *L0ServiceLogic) ScaleService(serviceID string, size int) (*models.Service, error)
- func (this *L0ServiceLogic) UpdateService(serviceID string, req models.UpdateServiceRequest) (*models.Service, error)
- type L0TaskLogic
- func (this *L0TaskLogic) CreateTask(req models.CreateTaskRequest) (*models.Task, error)
- func (this *L0TaskLogic) DeleteTask(taskID string) error
- func (this *L0TaskLogic) GetTask(taskID string) (*models.Task, error)
- func (this *L0TaskLogic) GetTaskLogs(taskID string, tail int) ([]*models.LogFile, error)
- func (this *L0TaskLogic) ListTasks() ([]*models.TaskSummary, error)
- type LoadBalancerLogic
- type Logic
- type ServiceLogic
- type TaskLogic
Constants ¶
View Source
const ( JOB_LIFETIME = time.Hour * 1 JANITOR_SLEEP_DURATION = time.Minute * 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminLogic ¶
type AdminLogic interface { RunEnvironmentScaler(string) (*models.ScalerRunInfo, error) UpdateSQL() error }
type DeployLogic ¶
type EnvironmentLogic ¶
type EnvironmentLogic interface { ListEnvironments() ([]*models.EnvironmentSummary, error) GetEnvironment(id string) (*models.Environment, error) DeleteEnvironment(id string) error CanCreateEnvironment(req models.CreateEnvironmentRequest) (bool, error) CreateEnvironment(req models.CreateEnvironmentRequest) (*models.Environment, error) UpdateEnvironment(id string, minClusterCount int) (*models.Environment, error) CreateEnvironmentLink(sourceEnvironmentID, destEnvironmentID string) error DeleteEnvironmentLink(sourceEnvironmentID, destEnvironmentID string) error }
type EnvironmentResourceGetter ¶
type EnvironmentResourceGetter struct { ServiceLogic ServiceLogic TaskLogic TaskLogic DeployLogic DeployLogic JobLogic JobLogic // contains filtered or unexported fields }
func NewEnvironmentResourceGetter ¶
func NewEnvironmentResourceGetter(s ServiceLogic, t TaskLogic, d DeployLogic, j JobLogic) *EnvironmentResourceGetter
func (*EnvironmentResourceGetter) GetConsumers ¶
func (c *EnvironmentResourceGetter) GetConsumers(environmentID string) ([]resource.ResourceConsumer, error)
type JobJanitor ¶
func NewJobJanitor ¶
func NewJobJanitor(jobLogic JobLogic) *JobJanitor
func (*JobJanitor) Run ¶
func (this *JobJanitor) Run()
type L0AdminLogic ¶
type L0AdminLogic struct {
Logic
}
func NewL0AdminLogic ¶
func NewL0AdminLogic(l Logic) *L0AdminLogic
func (*L0AdminLogic) RunEnvironmentScaler ¶
func (a *L0AdminLogic) RunEnvironmentScaler(environmentID string) (*models.ScalerRunInfo, error)
func (*L0AdminLogic) UpdateSQL ¶
func (a *L0AdminLogic) UpdateSQL() error
type L0DeployLogic ¶
type L0DeployLogic struct {
Logic
}
func NewL0DeployLogic ¶
func NewL0DeployLogic(lgc Logic) *L0DeployLogic
func (*L0DeployLogic) CreateDeploy ¶
func (d *L0DeployLogic) CreateDeploy(req models.CreateDeployRequest) (*models.Deploy, error)
func (*L0DeployLogic) DeleteDeploy ¶
func (d *L0DeployLogic) DeleteDeploy(deployID string) error
func (*L0DeployLogic) GetDeploy ¶
func (d *L0DeployLogic) GetDeploy(deployID string) (*models.Deploy, error)
func (*L0DeployLogic) ListDeploys ¶
func (d *L0DeployLogic) ListDeploys() ([]*models.DeploySummary, error)
type L0EnvironmentLogic ¶
type L0EnvironmentLogic struct {
Logic
}
func NewL0EnvironmentLogic ¶
func NewL0EnvironmentLogic(logic Logic) *L0EnvironmentLogic
func (*L0EnvironmentLogic) CanCreateEnvironment ¶
func (e *L0EnvironmentLogic) CanCreateEnvironment(req models.CreateEnvironmentRequest) (bool, error)
func (*L0EnvironmentLogic) CreateEnvironment ¶
func (e *L0EnvironmentLogic) CreateEnvironment(req models.CreateEnvironmentRequest) (*models.Environment, error)
func (*L0EnvironmentLogic) CreateEnvironmentLink ¶
func (e *L0EnvironmentLogic) CreateEnvironmentLink(sourceEnvironmentID, destEnvironmentID string) error
func (*L0EnvironmentLogic) DeleteEnvironment ¶
func (e *L0EnvironmentLogic) DeleteEnvironment(environmentID string) error
func (*L0EnvironmentLogic) DeleteEnvironmentLink ¶
func (e *L0EnvironmentLogic) DeleteEnvironmentLink(sourceEnvironmentID, destEnvironmentID string) error
func (*L0EnvironmentLogic) GetEnvironment ¶
func (e *L0EnvironmentLogic) GetEnvironment(environmentID string) (*models.Environment, error)
func (*L0EnvironmentLogic) ListEnvironments ¶
func (e *L0EnvironmentLogic) ListEnvironments() ([]*models.EnvironmentSummary, error)
func (*L0EnvironmentLogic) UpdateEnvironment ¶
func (e *L0EnvironmentLogic) UpdateEnvironment(environmentID string, minClusterCount int) (*models.Environment, error)
type L0JobLogic ¶
type L0JobLogic struct { Logic TaskLogic TaskLogic DeployLogic DeployLogic }
func NewL0JobLogic ¶
func NewL0JobLogic(logic Logic, taskLogic TaskLogic, deployLogic DeployLogic) *L0JobLogic
func (*L0JobLogic) Delete ¶
func (this *L0JobLogic) Delete(jobID string) error
type L0LoadBalancerLogic ¶
type L0LoadBalancerLogic struct {
Logic
}
func NewL0LoadBalancerLogic ¶
func NewL0LoadBalancerLogic(logic Logic) *L0LoadBalancerLogic
func (*L0LoadBalancerLogic) CreateLoadBalancer ¶
func (l *L0LoadBalancerLogic) CreateLoadBalancer(req models.CreateLoadBalancerRequest) (*models.LoadBalancer, error)
func (*L0LoadBalancerLogic) DeleteLoadBalancer ¶
func (l *L0LoadBalancerLogic) DeleteLoadBalancer(loadBalancerID string) error
func (*L0LoadBalancerLogic) GetLoadBalancer ¶
func (l *L0LoadBalancerLogic) GetLoadBalancer(loadBalancerID string) (*models.LoadBalancer, error)
func (*L0LoadBalancerLogic) ListLoadBalancers ¶
func (l *L0LoadBalancerLogic) ListLoadBalancers() ([]*models.LoadBalancerSummary, error)
func (*L0LoadBalancerLogic) UpdateLoadBalancerHealthCheck ¶
func (l *L0LoadBalancerLogic) UpdateLoadBalancerHealthCheck(loadBalancerID string, healthCheck models.HealthCheck) (*models.LoadBalancer, error)
func (*L0LoadBalancerLogic) UpdateLoadBalancerPorts ¶
func (l *L0LoadBalancerLogic) UpdateLoadBalancerPorts(loadBalancerID string, ports []models.Port) (*models.LoadBalancer, error)
type L0ServiceLogic ¶
type L0ServiceLogic struct {
Logic
}
func NewL0ServiceLogic ¶
func NewL0ServiceLogic(logic Logic) *L0ServiceLogic
func (*L0ServiceLogic) CreateService ¶
func (this *L0ServiceLogic) CreateService(req models.CreateServiceRequest) (*models.Service, error)
func (*L0ServiceLogic) DeleteService ¶
func (this *L0ServiceLogic) DeleteService(serviceID string) error
func (*L0ServiceLogic) GetService ¶
func (this *L0ServiceLogic) GetService(serviceID string) (*models.Service, error)
func (*L0ServiceLogic) GetServiceLogs ¶
func (*L0ServiceLogic) ListServices ¶
func (this *L0ServiceLogic) ListServices() ([]*models.ServiceSummary, error)
func (*L0ServiceLogic) ScaleService ¶
func (*L0ServiceLogic) UpdateService ¶
func (this *L0ServiceLogic) UpdateService(serviceID string, req models.UpdateServiceRequest) (*models.Service, error)
type L0TaskLogic ¶
type L0TaskLogic struct {
Logic
}
func NewL0TaskLogic ¶
func NewL0TaskLogic(logic Logic) *L0TaskLogic
func (*L0TaskLogic) CreateTask ¶
func (this *L0TaskLogic) CreateTask(req models.CreateTaskRequest) (*models.Task, error)
func (*L0TaskLogic) DeleteTask ¶
func (this *L0TaskLogic) DeleteTask(taskID string) error
func (*L0TaskLogic) GetTaskLogs ¶
func (*L0TaskLogic) ListTasks ¶
func (this *L0TaskLogic) ListTasks() ([]*models.TaskSummary, error)
type LoadBalancerLogic ¶
type LoadBalancerLogic interface { ListLoadBalancers() ([]*models.LoadBalancerSummary, error) GetLoadBalancer(loadBalancerID string) (*models.LoadBalancer, error) DeleteLoadBalancer(loadBalancerID string) error CreateLoadBalancer(req models.CreateLoadBalancerRequest) (*models.LoadBalancer, error) UpdateLoadBalancerPorts(loadBalancerID string, ports []models.Port) (*models.LoadBalancer, error) UpdateLoadBalancerHealthCheck(loadBalancerID string, healthCheck models.HealthCheck) (*models.LoadBalancer, error) }
type Logic ¶
type ServiceLogic ¶
type ServiceLogic interface { ListServices() ([]*models.ServiceSummary, error) GetService(serviceID string) (*models.Service, error) CreateService(req models.CreateServiceRequest) (*models.Service, error) DeleteService(serviceID string) error UpdateService(serviceID string, req models.UpdateServiceRequest) (*models.Service, error) ScaleService(serviceID string, size int) (*models.Service, error) GetServiceLogs(serviceID string, tail int) ([]*models.LogFile, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.