manageservice

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestUtil_ServiceCreation added in v0.8.1

func TestUtil_ServiceCreation(t *testing.T, s *ManageService, dbIns db.DB, serverIns *server.LoopServer, requireStaticIP bool)

func TestUtil_ServiceCreationRetry

func TestUtil_ServiceCreationRetry(t *testing.T, s *ManageService, dbIns db.DB, dnsIns dns.DNS, serverIns *server.LoopServer, requireStaticIP bool, requireJournalVolume bool)

Types

type ManageService

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

ManageService implements the service operation details.

func NewManageService

func NewManageService(dbIns db.DB, serverInfo server.Info, serverIns server.Server, dnsIns dns.DNS, containersvcIns containersvc.ContainerSvc) *ManageService

NewManageService allocates a ManageService instance

func (*ManageService) CheckAndCreateServiceMembers added in v0.9.2

func (s *ManageService) CheckAndCreateServiceMembers(ctx context.Context, replicas int64, sattr *common.ServiceAttr, replicaConfigs []*manage.ReplicaConfig) error

CheckAndCreateServiceMembers check and create the service members

func (*ManageService) CreateConfig added in v0.9.6

func (s *ManageService) CreateConfig(ctx context.Context, serviceUUID string, prefix string,
	cfg *manage.ConfigFileContent, version int64, requuid string) (*common.ConfigID, error)

CreateConfig creates the config file

func (*ManageService) CreateService

func (s *ManageService) CreateService(ctx context.Context, req *manage.CreateServiceRequest,
	domainName string, vpcID string) (serviceUUID string, err error)

CreateService implements step 2. The cfgFileContents could either be one content for all replicas or one for each replica.

func (*ManageService) DeleteService

func (s *ManageService) DeleteService(ctx context.Context, cluster string, service string) (volIDs []string, err error)

DeleteService deletes the service record from db. Notes:

  • caller should stop and delete the service on the container platform.
  • the actual cloud serviceMembers of this service are not deleted, customer needs to delete them manually.

func (*ManageService) DeleteSystemTables

func (s *ManageService) DeleteSystemTables(ctx context.Context) error

DeleteSystemTables deletes all system tables. User has to delete all services first.

func (*ManageService) DeleteVolume

func (s *ManageService) DeleteVolume(ctx context.Context, volID string) error

DeleteVolume actually deletes one volume

func (*ManageService) GetServiceUUID

func (s *ManageService) GetServiceUUID(ctx context.Context, cluster string, service string) (serviceUUID string, err error)

GetServiceUUID gets the serviceUUID

func (*ManageService) ListClusters

func (s *ManageService) ListClusters(ctx context.Context) ([]string, error)

ListClusters lists all clusters in the system

func (*ManageService) ListServiceVolumes

func (s *ManageService) ListServiceVolumes(ctx context.Context, cluster string, service string) (serviceVolumes []string, err error)

ListServiceVolumes return all volumes of the service. DeleteService will not delete the actual volume in cloud, such as EBS. Customer should ListServiceVolumes before DeleteService, and delete the actual volumes manually.

func (*ManageService) ListServices

func (s *ManageService) ListServices(ctx context.Context, cluster string) (svcs []*common.Service, err error)

ListServices lists all services of the cluster

func (*ManageService) SetServiceInitialized

func (s *ManageService) SetServiceInitialized(ctx context.Context, cluster string, servicename string) error

SetServiceInitialized updates the service status from INITIALIZING to ACTIVE

Jump to

Keyboard shortcuts

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