Documentation ¶
Index ¶
- func TestUtil_ServiceCreation(t *testing.T, s *ManageService, dbIns db.DB, serverIns *server.LoopServer, ...)
- func TestUtil_ServiceCreationRetry(t *testing.T, s *ManageService, dbIns db.DB, dnsIns dns.DNS, ...)
- type ManageService
- func (s *ManageService) CreateService(ctx context.Context, req *manage.CreateServiceRequest, domainName string, ...) (serviceUUID string, err error)
- func (s *ManageService) DeleteService(ctx context.Context, cluster string, service string) error
- func (s *ManageService) DeleteSystemTables(ctx context.Context) error
- func (s *ManageService) DeleteVolume(ctx context.Context, volID string) error
- func (s *ManageService) GetServiceUUID(ctx context.Context, cluster string, service string) (serviceUUID string, err error)
- func (s *ManageService) ListClusters(ctx context.Context) ([]string, error)
- func (s *ManageService) ListServiceVolumes(ctx context.Context, cluster string, service string) (serviceVolumes []string, err error)
- func (s *ManageService) ListServices(ctx context.Context, cluster string) (svcs []*common.Service, err error)
- func (s *ManageService) SetServiceInitialized(ctx context.Context, cluster string, servicename string) error
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)
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) *ManageService
NewManageService allocates a ManageService instance
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 ¶
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