server

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package server provides the API models for server management.

Index

Constants

View Source
const (
	// Kind is the kind of the server.
	Kind = "Server"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition added in v0.1.24

type Condition struct {
	Type               ConditionType   `json:"type"`
	LastTransitionTime time.Time       `json:"lastTransitionTime"`
	Status             ConditionStatus `json:"status"`
	Reason             string          `json:"reason"`
	Message            string          `json:"message,omitempty"`

} // @name ServerCondition

Condition represents a condition of a server.

type ConditionStatus added in v0.1.24

type ConditionStatus string // @name ServerConditionStatus

ConditionStatus represents the status of a server condition.

const (
	// ConditionStatusTrue represents a true condition status.
	ConditionStatusTrue ConditionStatus = "True"
	// ConditionStatusFalse represents a false condition status.
	ConditionStatusFalse ConditionStatus = "False"
	// ConditionStatusUnknown represents an unknown condition status.
	ConditionStatusUnknown ConditionStatus = "Unknown"
)

type ConditionType added in v0.1.24

type ConditionType string // @name ServerConditionType

ConditionType represents the type of a server condition.

const (
	// ConditionTypeRegistered represents the condition when the server was registered.
	ConditionTypeRegistered ConditionType = "Registered"
	// ConditionTypeAlive represents the condition when the server is alive.
	ConditionTypeAlive ConditionType = "Alive"
)

type ListResponse

type ListResponse = v1.ListResponse[Server]

ListResponse represents a list of servers with metadata.

func NewListResponse

func NewListResponse(servers []Server, metadata v1.ListMeta) *ListResponse

NewListResponse creates a new ListResponse with the given servers and metadata.

type Server

type Server struct {
	ID              string      `json:"id"`
	LastHeartbeatAt time.Time   `json:"lastHeartbeatAt"`
	Conditions      []Condition `json:"conditions"`

} // @name Server

Server represents an API server instance.

Jump to

Keyboard shortcuts

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