elasticsearch

package
v0.0.0-...-1c5d739 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOCKER_ENDPOINT string = "unix:///var/run/docker.sock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPlaneDao

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

func NewControlPlaneDao

func NewControlPlaneDao(hostName string, port int, rpcPort int) (*ControlPlaneDao, error)

Create a elastic search control center data access object

func NewControlSvc

func NewControlSvc(hostName string, port int, facade *facade.Facade, backupsPath string, rpcPort int) (*ControlPlaneDao, error)

func (*ControlPlaneDao) Action

func (this *ControlPlaneDao) Action(request dao.AttachRequest, unused *int) error

func (*ControlPlaneDao) AddService

func (this *ControlPlaneDao) AddService(svc service.Service, serviceId *string) error

AddService adds a new service. Returns an error if service already exists.

func (*ControlPlaneDao) AssignIPs

func (this *ControlPlaneDao) AssignIPs(assignmentRequest addressassignment.AssignmentRequest, _ *int) error

assign an IP address to a service (and all its child services) containing non default AddressResourceConfig

func (*ControlPlaneDao) AsyncBackup

func (dao *ControlPlaneDao) AsyncBackup(backupRequest model.BackupRequest, filename *string) (err error)

AsyncBackup is the same as backup, but asynchronous

func (*ControlPlaneDao) AsyncRestore

func (dao *ControlPlaneDao) AsyncRestore(restoreRequest model.RestoreRequest, unused *int) (err error)

AsyncRestore is the same as restore, but asynchronous.

func (*ControlPlaneDao) Backup

func (dao *ControlPlaneDao) Backup(backupRequest model.BackupRequest, filename *string) (err error)

Backup takes a backup of the full application stack and returns the filename that it is written to.

func (*ControlPlaneDao) BackupStatus

func (dao *ControlPlaneDao) BackupStatus(_ model.EntityRequest, status *string) (err error)

BackupStatus returns the current status of the backup or restore that is running.

func (*ControlPlaneDao) CloneService

func (this *ControlPlaneDao) CloneService(request dao.ServiceCloneRequest, clonedServiceId *string) error

CloneService clones a service. Returns an error if given serviceID is not found.

func (*ControlPlaneDao) DeleteSnapshot

func (dao *ControlPlaneDao) DeleteSnapshot(snapshotID string, _ *int) (err error)

DeleteSnapshot deletes a single snapshot

func (*ControlPlaneDao) DeleteSnapshots

func (dao *ControlPlaneDao) DeleteSnapshots(serviceID string, _ *int) (err error)

DeleteSnapshots deletes all snapshots for a service

func (*ControlPlaneDao) DeployService

func (this *ControlPlaneDao) DeployService(request dao.ServiceDeploymentRequest, serviceID *string) (err error)

func (*ControlPlaneDao) FindChildService

func (this *ControlPlaneDao) FindChildService(request dao.FindChildRequest, service *service.Service) error

func (*ControlPlaneDao) GetBackupEstimate

func (dao *ControlPlaneDao) GetBackupEstimate(backupRequest model.BackupRequest, backupEstimate *model.BackupEstimate) (err error)

func (*ControlPlaneDao) GetHostMemoryStats

func (dao *ControlPlaneDao) GetHostMemoryStats(req dao.MetricRequest, stats *metrics.MemoryUsageStats) error

func (*ControlPlaneDao) GetInstanceMemoryStats

func (dao *ControlPlaneDao) GetInstanceMemoryStats(req dao.MetricRequest, stats *[]metrics.MemoryUsageStats) error

func (*ControlPlaneDao) GetRunningServices

func (this *ControlPlaneDao) GetRunningServices(request dao.EntityRequest, allRunningServices *[]dao.RunningService) (err error)

func (*ControlPlaneDao) GetRunningServicesForHost

func (this *ControlPlaneDao) GetRunningServicesForHost(hostID string, services *[]dao.RunningService) error

func (*ControlPlaneDao) GetRunningServicesForService

func (this *ControlPlaneDao) GetRunningServicesForService(serviceID string, services *[]dao.RunningService) error

func (*ControlPlaneDao) GetService

func (this *ControlPlaneDao) GetService(id string, myService *service.Service) error

GetService gets a service.

func (*ControlPlaneDao) GetServiceList

func (this *ControlPlaneDao) GetServiceList(serviceID string, services *[]service.Service) error

func (*ControlPlaneDao) GetServiceLogs

func (this *ControlPlaneDao) GetServiceLogs(serviceID string, logs *string) error

func (*ControlPlaneDao) GetServiceMemoryStats

func (dao *ControlPlaneDao) GetServiceMemoryStats(req dao.MetricRequest, stats *metrics.MemoryUsageStats) error

func (*ControlPlaneDao) GetServiceStateLogs

func (this *ControlPlaneDao) GetServiceStateLogs(request dao.ServiceStateRequest, logs *string) error

func (*ControlPlaneDao) GetServiceStatus

func (this *ControlPlaneDao) GetServiceStatus(serviceID string, status *[]service.Instance) error

func (*ControlPlaneDao) GetSnapshotByServiceIDAndTag

func (dao *ControlPlaneDao) GetSnapshotByServiceIDAndTag(request model.SnapshotByTagRequest, snapshot *model.SnapshotInfo) (err error)

GetSnapshotByServiceIDAndTag Gets the snapshot from a specific service with a specific tag

func (*ControlPlaneDao) GetTenantIDs

func (this *ControlPlaneDao) GetTenantIDs(unused struct{}, tenantIDs *[]string) error

Get a list of tenant IDs

func (*ControlPlaneDao) ListBackups

func (dao *ControlPlaneDao) ListBackups(dirpath string, files *[]model.BackupFile) (err error)

ListBackups returns the list of backups

func (*ControlPlaneDao) ListSnapshots

func (dao *ControlPlaneDao) ListSnapshots(serviceID string, snapshots *[]model.SnapshotInfo) (err error)

ListSnapshots returns a list of all snapshots for a service

func (*ControlPlaneDao) MigrateServices

func (this *ControlPlaneDao) MigrateServices(request dao.ServiceMigrationRequest, unused *int) error

func (*ControlPlaneDao) PauseService

func (this *ControlPlaneDao) PauseService(request dao.ScheduleServiceRequest, affected *int) (err error)

pause the provided service

func (*ControlPlaneDao) ReadyDFS

func (dao *ControlPlaneDao) ReadyDFS(serviceID string, _ *int) (err error)

ReadyDFS locks until it receives notice that the dfs is idle

func (*ControlPlaneDao) RebalanceService

func (this *ControlPlaneDao) RebalanceService(request dao.ScheduleServiceRequest, affected *int) (err error)

rebalance the provided service

func (*ControlPlaneDao) RemoveService

func (this *ControlPlaneDao) RemoveService(id string, unused *int) error

func (*ControlPlaneDao) RemoveSnapshotTag

func (dao *ControlPlaneDao) RemoveSnapshotTag(request model.SnapshotByTagRequest, snapshotID *string) (err error)

RemoveSnapshotTag removes a tag from an existing snapshot

func (*ControlPlaneDao) RepairRegistry

func (dao *ControlPlaneDao) RepairRegistry(_ model.EntityRequest, _ *int) (err error)

RepairRegistry will try to recover the latest image of all service images from the docker registry and save it to the index.

func (*ControlPlaneDao) ResetRegistry

func (dao *ControlPlaneDao) ResetRegistry(_ model.EntityRequest, _ *int) (err error)

ResetRegistry prompts all images to be pushed back into the docker registry

func (*ControlPlaneDao) RestartService

func (this *ControlPlaneDao) RestartService(request dao.ScheduleServiceRequest, affected *int) (err error)

restart the provided service

func (*ControlPlaneDao) Restore

func (dao *ControlPlaneDao) Restore(restoreRequest model.RestoreRequest, _ *int) (err error)

Restore restores the full application stack from a backup file.

func (*ControlPlaneDao) Rollback

func (dao *ControlPlaneDao) Rollback(req model.RollbackRequest, _ *int) (err error)

Rollback reverts a single application to a particular state

func (*ControlPlaneDao) Snapshot

func (dao *ControlPlaneDao) Snapshot(req model.SnapshotRequest, snapshotID *string) (err error)

Snapshot captures the current state of a single application

func (*ControlPlaneDao) StartService

func (this *ControlPlaneDao) StartService(request dao.ScheduleServiceRequest, affected *int) (err error)

start the provided service

func (*ControlPlaneDao) StopRunningInstance

func (this *ControlPlaneDao) StopRunningInstance(request dao.HostServiceRequest, unused *int) error

func (*ControlPlaneDao) StopService

func (this *ControlPlaneDao) StopService(request dao.ScheduleServiceRequest, affected *int) (err error)

stop the provided service

func (*ControlPlaneDao) TagSnapshot

func (dao *ControlPlaneDao) TagSnapshot(request model.TagSnapshotRequest, _ *int) error

TagSnapshot adds a tag to an existing snapshot

func (*ControlPlaneDao) UpdateService

func (this *ControlPlaneDao) UpdateService(svc service.Service, unused *int) error

func (*ControlPlaneDao) WaitService

func (this *ControlPlaneDao) WaitService(request dao.WaitServiceRequest, _ *int) (err error)

WaitService waits for the given service IDs to reach a particular state

type InProgress

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

InProgress prompts which backup is currently backing up or restoring

func (*InProgress) GetProgress

func (p *InProgress) GetProgress() (bool, string, string, error)

GetProgress returns the progress of the current running backup or restore.

func (*InProgress) Reset

func (p *InProgress) Reset()

Reset resets the progress indicator

func (*InProgress) SetError

func (p *InProgress) SetError(err error)

SetError sets the error returned from the current operation

func (*InProgress) SetProgress

func (p *InProgress) SetProgress(filename, op string)

SetProgress sets the current operation

func (*InProgress) UnsetProgress

func (p *InProgress) UnsetProgress(err error)

UnsetProgress unsets the current operation

Jump to

Keyboard shortcuts

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