Documentation ¶
Index ¶
- Constants
- type AdminLogic
- type DeployLogic
- type EnvironmentLogic
- type EnvironmentResourceGetter
- type HealthLogic
- 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 L0HealthLogic
- 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) UpdateLoadBalancerCrossZone(loadBalancerID string, crossZone bool) (*models.LoadBalancer, error)
- func (l *L0LoadBalancerLogic) UpdateLoadBalancerHealthCheck(loadBalancerID string, healthCheck models.HealthCheck) (*models.LoadBalancer, error)
- func (l *L0LoadBalancerLogic) UpdateLoadBalancerIdleTimeout(loadBalancerID string, idleTimeout int) (*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) GetEnvironmentServices(environmentID string) ([]*models.Service, error)
- func (this *L0ServiceLogic) GetService(serviceID string) (*models.Service, error)
- func (this *L0ServiceLogic) GetServiceLogs(serviceID, start, end 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) (string, error)
- func (this *L0TaskLogic) DeleteTask(taskID string) error
- func (this *L0TaskLogic) GetEnvironmentTasks(environmentID string) ([]*models.Task, error)
- func (this *L0TaskLogic) GetTask(taskID string) (*models.Task, error)
- func (this *L0TaskLogic) GetTaskLogs(taskID, start, end string, tail int) ([]*models.LogFile, error)
- func (this *L0TaskLogic) ListTasks() ([]*models.TaskSummary, error)
- type LoadBalancerLogic
- type Logic
- type ServiceLogic
- type TagJanitor
- 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 HealthLogic ¶ added in v0.10.7
type HealthLogic interface{}
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 L0HealthLogic ¶ added in v0.10.7
type L0HealthLogic struct {
Logic
}
func NewL0HealthLogic ¶ added in v0.10.7
func NewL0HealthLogic(l Logic) *L0HealthLogic
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) UpdateLoadBalancerCrossZone ¶ added in v0.11.0
func (l *L0LoadBalancerLogic) UpdateLoadBalancerCrossZone(loadBalancerID string, crossZone bool) (*models.LoadBalancer, error)
func (*L0LoadBalancerLogic) UpdateLoadBalancerHealthCheck ¶
func (l *L0LoadBalancerLogic) UpdateLoadBalancerHealthCheck(loadBalancerID string, healthCheck models.HealthCheck) (*models.LoadBalancer, error)
func (*L0LoadBalancerLogic) UpdateLoadBalancerIdleTimeout ¶ added in v0.10.7
func (l *L0LoadBalancerLogic) UpdateLoadBalancerIdleTimeout(loadBalancerID string, idleTimeout int) (*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) GetEnvironmentServices ¶ added in v0.10.4
func (this *L0ServiceLogic) GetEnvironmentServices(environmentID string) ([]*models.Service, 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) (string, error)
func (*L0TaskLogic) DeleteTask ¶
func (this *L0TaskLogic) DeleteTask(taskID string) error
func (*L0TaskLogic) GetEnvironmentTasks ¶ added in v0.10.4
func (this *L0TaskLogic) GetEnvironmentTasks(environmentID string) ([]*models.Task, 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) UpdateLoadBalancerIdleTimeout(loadBalancerID string, idleTimeout int) (*models.LoadBalancer, error) UpdateLoadBalancerCrossZone(loadBalancerID string, crossZone bool) (*models.LoadBalancer, error) }
type Logic ¶
type ServiceLogic ¶
type ServiceLogic interface { ListServices() ([]models.ServiceSummary, error) GetService(serviceID string) (*models.Service, error) GetEnvironmentServices(environmentID 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, start, end string, tail int) ([]*models.LogFile, error) }
type TagJanitor ¶ added in v0.10.3
func NewTagJanitor ¶ added in v0.10.3
func NewTagJanitor(taskLogic TaskLogic, tagStore tag_store.TagStore) *TagJanitor
func (*TagJanitor) Run ¶ added in v0.10.3
func (t *TagJanitor) Run()
type TaskLogic ¶
type TaskLogic interface { CreateTask(models.CreateTaskRequest) (string, error) ListTasks() ([]*models.TaskSummary, error) GetTask(string) (*models.Task, error) GetEnvironmentTasks(environmentID string) ([]*models.Task, error) DeleteTask(string) error GetTaskLogs(string, string, string, int) ([]*models.LogFile, error) }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_logic is a generated GoMock package.
|
Package mock_logic is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.