elasticsearch

package
v0.0.0-...-88aa921 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var INSTANCE_PASSWORD string
View Source
var SYSTEM_USER_NAME = "system_user"

each time Serviced starts up a new password will be generated. This will be passed into the containers so that they can authenticate against the API

Functions

This section is empty.

Types

type ControlPlaneDao

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

func NewControlPlaneDao

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

Create a elastic search control center data access object

func NewControlSvc

func NewControlSvc(hostName string, port int, facade *facade.Facade, varpath, fsType string, maxdfstimeout time.Duration, dockerRegistry string) (*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 add a service. Return error if service already exists

func (*ControlPlaneDao) AddServiceTemplate

func (this *ControlPlaneDao) AddServiceTemplate(serviceTemplate servicetemplate.ServiceTemplate, templateID *string) error

func (*ControlPlaneDao) AddUser

func (this *ControlPlaneDao) AddUser(newUser userdomain.User, userName *string) error

addUser places a new user record into elastic searchp

func (*ControlPlaneDao) AssignIPs

func (this *ControlPlaneDao) AssignIPs(assignmentRequest dao.AssignmentRequest, _ *struct{}) error

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

func (*ControlPlaneDao) AsyncBackup

func (this *ControlPlaneDao) AsyncBackup(dirpath string, filename *string) error

AsyncBackup performs the backup asynchronously

func (*ControlPlaneDao) AsyncRestore

func (this *ControlPlaneDao) AsyncRestore(filename string, unused *int) error

AsyncRestore performs the restore aynchronously

func (*ControlPlaneDao) AsyncSnapshot

func (this *ControlPlaneDao) AsyncSnapshot(serviceID string, snapshotID *string) error

AsyncSnapshot is the asynchronous call to snapshot

func (*ControlPlaneDao) Backup

func (this *ControlPlaneDao) Backup(dirpath string, filename *string) error

Backup saves templates, services, and snapshots into a tgz file

func (*ControlPlaneDao) BackupStatus

func (this *ControlPlaneDao) BackupStatus(unused int, status *string) error

BackupStatus monitors the status of a backup or restore

func (*ControlPlaneDao) Commit

func (this *ControlPlaneDao) Commit(containerID string, snapshotID *string) error

Commit commits a container to a particular tenant and snapshots the resulting image

func (*ControlPlaneDao) DeleteSnapshot

func (this *ControlPlaneDao) DeleteSnapshot(snapshotID string, unused *int) error

DeleteSnapshot deletes a particular snapshot

func (*ControlPlaneDao) DeleteSnapshots

func (this *ControlPlaneDao) DeleteSnapshots(serviceID string, unused *int) error

DeleteSnapshots deletes all snapshots given a tenant

func (*ControlPlaneDao) DeployService

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

func (*ControlPlaneDao) DeployTemplate

func (this *ControlPlaneDao) DeployTemplate(request dao.ServiceTemplateDeploymentRequest, tenantIDs *[]string) error

func (*ControlPlaneDao) DeployTemplateActive

func (this *ControlPlaneDao) DeployTemplateActive(notUsed string, active *[]map[string]string) error

func (*ControlPlaneDao) DeployTemplateStatus

func (this *ControlPlaneDao) DeployTemplateStatus(request dao.ServiceTemplateDeploymentRequest, deployTemplateStatus *string) error

func (*ControlPlaneDao) FindChildService

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

func (*ControlPlaneDao) GetRunningService

func (this *ControlPlaneDao) GetRunningService(request dao.ServiceStateRequest, running *dao.RunningService) error

func (*ControlPlaneDao) GetRunningServices

func (this *ControlPlaneDao) GetRunningServices(request dao.EntityRequest, allRunningServices *[]dao.RunningService) 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) GetServiceAddressAssignments

func (this *ControlPlaneDao) GetServiceAddressAssignments(serviceID string, assignments *[]addressassignment.AddressAssignment) error

GetServiceAddressAssignments fills in all AddressAssignments for the specified serviced id.

func (*ControlPlaneDao) GetServiceEndpoints

func (this *ControlPlaneDao) GetServiceEndpoints(serviceID string, response *map[string][]dao.ApplicationEndpoint) (err error)

Get a service endpoint.

func (*ControlPlaneDao) GetServiceLogs

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

func (*ControlPlaneDao) GetServiceState

func (this *ControlPlaneDao) GetServiceState(request dao.ServiceStateRequest, state *servicestate.ServiceState) error

func (*ControlPlaneDao) GetServiceStateLogs

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

func (*ControlPlaneDao) GetServiceStates

func (this *ControlPlaneDao) GetServiceStates(serviceId string, states *[]servicestate.ServiceState) error

func (*ControlPlaneDao) GetServiceStatus

func (this *ControlPlaneDao) GetServiceStatus(serviceID string, status *map[string]dao.ServiceStatus) error

func (*ControlPlaneDao) GetServiceTemplates

func (this *ControlPlaneDao) GetServiceTemplates(unused int, templates *map[string]servicetemplate.ServiceTemplate) error

func (*ControlPlaneDao) GetServices

func (this *ControlPlaneDao) GetServices(request dao.ServiceRequest, services *[]service.Service) error

Get the services (can filter by name and/or tenantID)

func (*ControlPlaneDao) GetSystemUser

func (this *ControlPlaneDao) GetSystemUser(unused int, user *userdomain.User) error

GetSystemUser returns the system user's credentials. The "unused int" is required by the RPC interface.

func (*ControlPlaneDao) GetTaggedServices

func (this *ControlPlaneDao) GetTaggedServices(request dao.ServiceRequest, services *[]service.Service) error

Get tagged services (can also filter by name and/or tenantID)

func (*ControlPlaneDao) GetTenantId

func (this *ControlPlaneDao) GetTenantId(serviceID string, tenantId *string) error

The tenant id is the root service uuid. Walk the service tree to root to find the tenant id.

func (*ControlPlaneDao) GetUser

func (this *ControlPlaneDao) GetUser(userName string, user *userdomain.User) error

func (*ControlPlaneDao) GetVolume

func (this *ControlPlaneDao) GetVolume(serviceID string, volume volume.Volume) error

GetVolume gets the volume of a service

func (*ControlPlaneDao) ImageLayerCount

func (cp *ControlPlaneDao) ImageLayerCount(imageUUID string, layers *int) error

func (*ControlPlaneDao) ListBackups

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

ListBackups lists the backup files in a given directory

func (*ControlPlaneDao) ListSnapshots

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

ListSnapshots lists all the available snapshots for a particular service

func (*ControlPlaneDao) LogHealthCheck

func (this *ControlPlaneDao) LogHealthCheck(result domain.HealthCheckResult, unused *int) error

func (*ControlPlaneDao) ReadyDFS

func (this *ControlPlaneDao) ReadyDFS(unused bool, unusedint *int) (err error)

ReadyDFS verifies that no other dfs operations are in progress

func (*ControlPlaneDao) RemoveAddressAssignment

func (this *ControlPlaneDao) RemoveAddressAssignment(id string, _ *struct{}) error

RemoveAddressAssignemnt Removes an AddressAssignment by id

func (*ControlPlaneDao) RemoveService

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

func (*ControlPlaneDao) RemoveServiceTemplate

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

func (*ControlPlaneDao) RemoveUser

func (this *ControlPlaneDao) RemoveUser(userName string, unused *int) error

RemoveUser removes the user specified by the userName string

func (*ControlPlaneDao) ResetRegistry

func (this *ControlPlaneDao) ResetRegistry(request dao.EntityRequest, unused *int) error

ResetRegistry resets 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 (this *ControlPlaneDao) Restore(filename string, unused *int) error

Restore restores a serviced installation to the state of its backup

func (*ControlPlaneDao) Rollback

func (this *ControlPlaneDao) Rollback(request dao.RollbackRequest, unused *int) error

Rollback rolls back the dfs to a particular snapshot

func (*ControlPlaneDao) Snapshot

func (this *ControlPlaneDao) Snapshot(request dao.SnapshotRequest, snapshotID *string) error

Snapshot takes a snapshot of the dfs and its respective images

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) UpdateService

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

func (*ControlPlaneDao) UpdateServiceState

func (this *ControlPlaneDao) UpdateServiceState(state servicestate.ServiceState, unused *int) error

Update the current state of a service instance.

func (*ControlPlaneDao) UpdateServiceTemplate

func (this *ControlPlaneDao) UpdateServiceTemplate(template servicetemplate.ServiceTemplate, unused *int) error

func (*ControlPlaneDao) UpdateUser

func (this *ControlPlaneDao) UpdateUser(user userdomain.User, unused *int) error

UpdateUser updates the user entry in elastic search. NOTE: It is assumed the pasword is NOT hashed when updating the user record

func (*ControlPlaneDao) ValidateCredentials

func (this *ControlPlaneDao) ValidateCredentials(user userdomain.User, result *bool) error

ValidateCredentials takes a user name and password and validates them against a stored user

func (*ControlPlaneDao) WaitService

func (this *ControlPlaneDao) WaitService(request dao.WaitServiceRequest, _ *struct{}) (err error)

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

Jump to

Keyboard shortcuts

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