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, name string, force bool, sgExtra map[string]string) error
- func (s ServiceGroupImpl) Info(ctx context.Context, namespace string, name string) (apistructs.ServiceGroup, error)
- func (s ServiceGroupImpl) InspectRuntimeServicePods(namespace, name, serviceName, runtimeID string) (*apistructs.ServiceGroup, error)
- func (s ServiceGroupImpl) InspectServiceGroupWithTimeout(namespace, 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) (interface{}, 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 = 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, name string, force bool, extra map[string]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) (interface{}, error) InspectServiceGroupWithTimeout(namespace, name string) (*apistructs.ServiceGroup, error) InspectRuntimeServicePods(namespace, name, serviceName, runtimeID string) (*apistructs.ServiceGroup, error) }
func NewServiceGroupImpl ¶
func NewServiceGroupImpl(js jsonstore.JsonStore, sched *task.Sched, clusterinfo clusterinfo.ClusterInfo) ServiceGroup
func NewServiceGroupImplInit ¶
func NewServiceGroupImplInit() ServiceGroup
type ServiceGroupImpl ¶
type ServiceGroupImpl struct { Js jsonstore.JsonStore Sched *task.Sched Clusterinfo clusterinfo.ClusterInfo }
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) Info ¶
func (s ServiceGroupImpl) Info(ctx context.Context, namespace string, name string) (apistructs.ServiceGroup, error)
func (ServiceGroupImpl) InspectRuntimeServicePods ¶
func (s ServiceGroupImpl) InspectRuntimeServicePods(namespace, name, serviceName, runtimeID string) (*apistructs.ServiceGroup, error)
func (ServiceGroupImpl) InspectServiceGroupWithTimeout ¶
func (s ServiceGroupImpl) InspectServiceGroupWithTimeout(namespace, name string) (*apistructs.ServiceGroup, error)
TODO: an ugly hack, need refactor, it may cause goroutine explosion
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 ¶
func (s *ServiceGroupImpl) Scale(sg *apistructs.ServiceGroup) (interface{}, error)
func (ServiceGroupImpl) Update ¶
func (s ServiceGroupImpl) Update(req apistructs.ServiceGroupUpdateV2Request) (apistructs.ServiceGroup, error)
Click to show internal directories.
Click to hide internal directories.