actions

package
v0.0.0-...-b1029ed Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionService

type ActionService struct {
	// contains filtered or unexported fields
}

func NewActionService

func NewActionService(k8sClient *clientset.Clientset, rdb *redis.Client, logger *walog.WALogger) *ActionService

func (*ActionService) Bind

func (as *ActionService) Bind(r *http.Request, args *BindArgs, reply *BindReply) error

func (*ActionService) BindHandler

func (as *ActionService) BindHandler(id uuid.UUID, args *BindArgs) error

func (*ActionService) Create

func (as *ActionService) Create(r *http.Request, args *CreateArgs, reply *CreateReply) error

func (*ActionService) CreateHandler

func (as *ActionService) CreateHandler(id uuid.UUID, actionType walog.WorkloadActionTypeEnum, args *CreateArgs) (*SchedulingSuggestion, error)

func (*ActionService) Delete

func (as *ActionService) Delete(r *http.Request, args *DeleteArgs, reply *DeleteReply) error

func (*ActionService) DeleteHandler

func (as *ActionService) DeleteHandler(id uuid.UUID, actionType walog.WorkloadActionTypeEnum, args *DeleteArgs)

func (*ActionService) Move

func (as *ActionService) Move(r *http.Request, args *MoveArgs, reply *MoveReply) error

func (*ActionService) MoveHandler

func (as *ActionService) MoveHandler(id uuid.UUID, actionType walog.WorkloadActionTypeEnum, args *MoveArgs)

func (*ActionService) Redeploy

func (as *ActionService) Redeploy(r *http.Request, args *RedeployArgs, reply *RedeployReply) error

func (*ActionService) RedeployHandler

func (as *ActionService) RedeployHandler(id uuid.UUID, args *RedeployArgs) error

func (*ActionService) Scale

func (as *ActionService) Scale(r *http.Request, args *ScalesArgs, reply *ScaleReply) error

func (*ActionService) ScaleHandler

func (as *ActionService) ScaleHandler(args *ScalesArgs)

func (*ActionService) Swap

func (as *ActionService) Swap(r *http.Request, args *SwapArgs, reply *SwapReply) error

func (*ActionService) SwapHandler

func (as *ActionService) SwapHandler(idX uuid.UUID, idY uuid.UUID, args *SwapArgs)

func (*ActionService) UpdateResources

func (as *ActionService) UpdateResources(r *http.Request, args *UpdateResourcesArgs, reply *UpdateResourceReply) error

func (*ActionService) UpdateResourcesHandler

func (as *ActionService) UpdateResourcesHandler(id uuid.UUID, args *UpdateResourcesArgs)

type BindArgs

type BindArgs struct {
	Pod  `json:"pod"`
	Node `json:"node"`
}

type BindReply

type BindReply struct {
	Message string `json:"message"`
}

type CreateArgs

type CreateArgs struct {
	Workload `json:"workload"`
	Node     `json:"node"`
}

type CreateReply

type CreateReply struct {
	Message string `json:"message"`
}

type DeleteArgs

type DeleteArgs struct {
	Pod `json:"pod"`
}

type DeleteReply

type DeleteReply struct {
	Message string `json:"message"`
}

type MoveArgs

type MoveArgs struct {
	Pod  `json:"pod"`
	Node `json:"node"`
}

type MoveReply

type MoveReply struct {
	Message string `json:"message"`
}

type Node

type Node struct {
	Name string `json:"name"`
}

type ParentInfo

type ParentInfo struct {
	Type      logger.PodParentTypeEnum
	Name      string
	Namespace string
	UID       string
}

func GetPodOwner

func GetPodOwner(pod *v1.Pod, k8sClient *clientset.Clientset) (ParentInfo, error)

type Pod

type Pod struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

type RedeployArgs

type RedeployArgs struct {
	Pod `json:"pod"`
}

type RedeployReply

type RedeployReply struct {
	Message string `json:"message"`
}

type Resources

type Resources struct {
	ContainerName string  `json:"container_name"`
	CpuRequest    *string `json:"cpu_request"`
	CpuLimit      *string `json:"cpu_limit"`
	MemoryRequest *string `json:"memory_request"`
	MemoryLimit   *string `json:"memory_limit"`
}

type ScaleReply

type ScaleReply struct {
	Message string `json:"message"`
}

type ScalesArgs

type ScalesArgs struct {
	Workload `json:"workload"`
	Replicas *int32 `json:"replicas"`
}

type SchedulingSuggestion

type SchedulingSuggestion struct {
	ID         uuid.UUID                    `json:"id"`
	NodeName   string                       `json:"node_name"`
	ActionType walog.WorkloadActionTypeEnum `json:"action_type"`
}

type SwapArgs

type SwapArgs struct {
	X Pod `json:"x"`
	Y Pod `json:"y"`
}

type SwapReply

type SwapReply struct {
	Message string `json:"message"`
}

type TargetScaleKey

type TargetScaleKey struct {
	Namespace      string
	DeploymentName string
}

type UpdateResourceReply

type UpdateResourceReply struct {
	Message string `json:"message"`
}

type UpdateResourcesArgs

type UpdateResourcesArgs struct {
	Workload  `json:"workload"`
	Resources `json:"resources"`
}

type Workload

type Workload struct {
	Namespace  string  `json:"namespace"`
	APIVersion *string `json:"apiVersion,omitempty"`
	Kind       string  `json:"kind"`
	Name       string  `json:"name"`
}

func (Workload) QueueName

func (w Workload) QueueName() string

Jump to

Keyboard shortcuts

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