models

package
v0.0.0-...-c8e5cf1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID        int
	Name      string
	Version   int
	Image     string
	CPU       string
	Memory    string
	Priority  float64
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*Client) LogValue

func (c *Client) LogValue() slog.Value

type OpCode

type OpCode int
const (
	OpCodeCreate OpCode
	OpCodeDelete
)

type PodOperation

type PodOperation struct {
	PodID string
	Code  OpCode
}

func DeleteOperations

func DeleteOperations(s *Status) []PodOperation

func OpCreate

func OpCreate(podID string) PodOperation

func OpDelete

func OpDelete(podID string) PodOperation

func UpdateOperations

func UpdateOperations(s, sBefore *Status, needRestart bool) []PodOperation

UpdateOperations возвращает список операций соответствующих изменению статуса подов.

func (PodOperation) LogValue

func (po PodOperation) LogValue() slog.Value

type Status

type Status struct {
	ID int
	X  bool
	Y  bool
	Z  bool
}

func (*Status) LogValue

func (s *Status) LogValue() slog.Value

Jump to

Keyboard shortcuts

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