Documentation ¶
Index ¶
- Variables
- type Namespace
- type ServiceGroup
- type ServiceGroupImpl
- func (s ServiceGroupImpl) Cancel(namespace string, name string) error
- func (s ServiceGroupImpl) ConfigUpdate(sg apistructs.ServiceGroup) error
- func (s ServiceGroupImpl) Create(req apistructs.ServiceGroupCreateV2Request) (apistructs.ServiceGroup, error)
- func (s ServiceGroupImpl) Delete(namespace string, name, force string) error
- func (s ServiceGroupImpl) Info(ctx context.Context, namespace string, name string) (apistructs.ServiceGroup, error)
- func (s ServiceGroupImpl) KillPod(ctx context.Context, namespace string, name string, containerID string) error
- func (s ServiceGroupImpl) Precheck(req apistructs.ServiceGroupPrecheckRequest) (apistructs.ServiceGroupPrecheckData, error)
- func (s ServiceGroupImpl) Restart(namespace string, name string) error
- func (s *ServiceGroupImpl) Scale(sg *apistructs.ServiceGroup) (apistructs.ServiceGroup, error)
- func (s ServiceGroupImpl) Update(req apistructs.ServiceGroupUpdateV2Request) (apistructs.ServiceGroup, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LastRestartTimeKey = "lastRestartTime" LastConfigUpdateTimeKey = "lastConfigUpdateTime" )
View Source
var DeleteNotFound error = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type ServiceGroup ¶
type ServiceGroup interface { Create(sg apistructs.ServiceGroupCreateV2Request) (apistructs.ServiceGroup, error) Update(sg apistructs.ServiceGroupUpdateV2Request) (apistructs.ServiceGroup, error) Restart(namespace string, name string) error Cancel(namespace string, name string) error Delete(namespace string, name, force string) error Info(ctx context.Context, namespace string, name string) (apistructs.ServiceGroup, error) Precheck(sg apistructs.ServiceGroupPrecheckRequest) (apistructs.ServiceGroupPrecheckData, error) ConfigUpdate(sg apistructs.ServiceGroup) error KillPod(ctx context.Context, namespace string, name string, podname string) error Scale(sg *apistructs.ServiceGroup) (apistructs.ServiceGroup, error) }
func NewServiceGroupImpl ¶
func NewServiceGroupImpl(js jsonstore.JsonStore, sched *task.Sched, clusterinfo clusterinfo.ClusterInfo) ServiceGroup
type ServiceGroupImpl ¶
type ServiceGroupImpl struct {
// contains filtered or unexported fields
}
func (ServiceGroupImpl) Cancel ¶
func (s ServiceGroupImpl) Cancel(namespace string, name string) error
TODO: Compared with service_endpoints.go, should the returned content be changed?
func (ServiceGroupImpl) ConfigUpdate ¶
func (s ServiceGroupImpl) ConfigUpdate(sg apistructs.ServiceGroup) error
func (ServiceGroupImpl) Create ¶
func (s ServiceGroupImpl) Create(req apistructs.ServiceGroupCreateV2Request) (apistructs.ServiceGroup, error)
func (ServiceGroupImpl) Delete ¶
func (s ServiceGroupImpl) Delete(namespace string, name, force string) error
func (ServiceGroupImpl) Info ¶
func (s ServiceGroupImpl) Info(ctx context.Context, namespace string, name string) (apistructs.ServiceGroup, error)
func (ServiceGroupImpl) Precheck ¶
func (s ServiceGroupImpl) Precheck(req apistructs.ServiceGroupPrecheckRequest) (apistructs.ServiceGroupPrecheckData, error)
func (ServiceGroupImpl) Restart ¶
func (s ServiceGroupImpl) Restart(namespace string, name string) error
func (*ServiceGroupImpl) Scale ¶ added in v1.0.1
func (s *ServiceGroupImpl) Scale(sg *apistructs.ServiceGroup) (apistructs.ServiceGroup, error)
func (ServiceGroupImpl) Update ¶
func (s ServiceGroupImpl) Update(req apistructs.ServiceGroupUpdateV2Request) (apistructs.ServiceGroup, error)
Click to show internal directories.
Click to hide internal directories.