types

package
v0.0.0-...-8a20bae Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStatus

type ClusterStatus struct {
	GVK        v1.GroupVersionKind `json:"gvk"`
	Cluster    string              `json:"cluster"`
	Conditions []CommonCondition   `json:"conditions,omitempty"`
}

type Command

type Command struct {
	Type     CommandType         `json:"type"`
	GVK      v1.GroupVersionKind `json:"gvk"`
	Resource string              `json:"resource"`
	Content  string              `json:"content"`
}

type CommandResult

type CommandResult struct {
	OK      bool   `json:"ok"`
	Message string `json:"message"`
}

type CommandType

type CommandType string
const (
	ApplyCommand  CommandType = "APPLY"
	DeleteCommand             = "DELETE"
)

type CommonCondition

type CommonCondition struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

type Heartbeat

type Heartbeat struct {
	Cluster       ClusterStatus    `json:"cluster"`
	Resources     []ResourceStatus `json:"resources,omitempty"`
	CommandResult *CommandResult   `json:"commandResult,omitempty"`
	Time          int64            `json:"time"`
}

type HeartbeatResponse

type HeartbeatResponse struct {
	OK      bool          `json:"ok"`
	Message string        `json:"message"`
	Cluster ClusterStatus `json:"cluster"`
	Command *Command      `json:"command,omitempty"`
}

type ResourceStatus

type ResourceStatus struct {
	GVK             v1.GroupVersionKind `json:"gvk"`
	Resource        string              `json:"resource"`
	Conditions      []CommonCondition   `json:"conditions,omitempty"`
	ResourceVersion string              `json:"resourceVersion"`
}

Jump to

Keyboard shortcuts

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