instances_handler

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(server *server.Server, grp *huma.Group)

Types

type GetInstanceHealthInput

type GetInstanceHealthInput struct {
	server.BaseAuthInput
	models.InstanceHealthInput
}

Get instance health for a service

type GetInstanceHealthResponse

type GetInstanceHealthResponse struct {
	Body struct {
		Data *k8s.SimpleHealthStatus `json:"data" nullable:"false"`
	}
}

type HandlerGroup

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

func (*HandlerGroup) GetInstanceHealth

func (self *HandlerGroup) GetInstanceHealth(ctx context.Context, input *GetInstanceHealthInput) (*GetInstanceHealthResponse, error)

GetInstanceHealth gets pod health for a service

func (*HandlerGroup) ListInstances

func (self *HandlerGroup) ListInstances(ctx context.Context, input *ListInstancesInput) (*ListInstancesResponse, error)

ListInstances gets pods/statuses for a service

func (*HandlerGroup) RestartInstances

func (self *HandlerGroup) RestartInstances(ctx context.Context, input *RestartInstancesInput) (*RestartServicesResponse, error)

RestartInstances handles PUT /instances/restart

type ListInstancesInput

type ListInstancesInput struct {
	server.BaseAuthInput
	models.InstanceStatusInput
}

List instances (pods) for a service

type ListInstancesResponse

type ListInstancesResponse struct {
	Body struct {
		Data []k8s.PodContainerStatus `json:"data" nullable:"false"`
	}
}

type RestartInstancesInput

type RestartInstancesInput struct {
	server.BaseAuthInput
	Body struct {
		ServiceID     uuid.UUID `json:"service_id" required:"true"`
		TeamID        uuid.UUID `json:"team_id" required:"true"`
		ProjectID     uuid.UUID `json:"project_id" required:"true"`
		EnvironmentID uuid.UUID `json:"environment_id" required:"true"`
	}
}

Restart instance

type RestartServicesResponse

type RestartServicesResponse struct {
	Body struct {
		Data *Restarted `json:"data"`
	}
}

type Restarted

type Restarted struct {
	Restarted bool `json:"restarted"`
}

Jump to

Keyboard shortcuts

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