instances_handler

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 12 Imported by: 0

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