servicegroup

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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 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 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) 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) 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 added in v1.0.1

Jump to

Keyboard shortcuts

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