servicegroup

package
v1.3.0-rc.0...-d217119 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 Namespace

type Namespace string

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

func (s ServiceGroupImpl) Delete(namespace, name string, force bool, sgExtra map[string]string) 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) KillPod

func (s ServiceGroupImpl) KillPod(ctx context.Context, namespace string, name string, containerID string) 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)

Jump to

Keyboard shortcuts

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