model

package
v0.0.0-...-2c759a0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Modules []ModuleInfo `yaml:"modules"`
}

Config struct is array of ModuleInfo.

type Module

type Module struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Version string `json:"version"`
}

Module struct is for storing result and returning to client.

type ModuleInfo

type ModuleInfo struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
	Selector  struct {
		MatchLabels struct {
			StatusLabel  []string `yaml:"statusLabel"`
			VersionLabel []string `yaml:"versionLabel"`
		} `yaml:"matchLabels"`
	} `yaml:"selector"`
	ReadinessProbe struct {
		Exec struct {
			Command   []string `yaml:"command"`
			Container string   `yaml:"container"`
		} `yaml:"exec"`
		HTTPGet struct {
			Path   string `yaml:"path"`
			Port   string `yaml:"port"`
			Scheme string `yaml:"scheme"`
		} `yaml:"httpGet"`
		TCPSocket struct {
			Port string `yaml:"port"`
		} `yaml:"tcpSocket"`
	} `yaml:"readinessProbe"`
	VersionProbe struct {
		Container string `yaml:"container"`
		Exec      struct {
			Command []string `yaml:"command"`
		} `yaml:"exec"`
	} `yaml:"versionProbe"`
}

ModuleInfo is a strcut for storing configMap file. It must support all possible cases described in configMap.

type PodStatus

type PodStatus struct {
	Data map[string]int
}

PodStatus struct is for temporarily storing status of each pod.

func NewPodStatus

func NewPodStatus() *PodStatus

NewPodStatus initializes PodStatus struct.

Jump to

Keyboard shortcuts

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