model

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMap

func ToMap(nodes []PaxosNodeStatus) map[string]PaxosNodeStatus

Types

type PaxosNode

type PaxosNode struct {
	Pod        string `json:"pod,omitempty"`
	Role       string `json:"role,omitempty"`
	Generation int64  `json:"generation,omitempty"`
	Set        string `json:"set,omitempty"`
	Index      int    `json:"index,omitempty"`
}

PaxosNode records the node information of the paxos node.

type PaxosNodeStatus

type PaxosNodeStatus struct {
	PaxosNode `json:",inline"`
	Host      string `json:"host,omitempty"`
	Volume    string `json:"volume,omitempty"`
}

func FromPods

func FromPods(pods []corev1.Pod) ([]PaxosNodeStatus, error)

func (*PaxosNodeStatus) FromPod

func (s *PaxosNodeStatus) FromPod(pod *corev1.Pod) error

type PaxosVolume

type PaxosVolume struct {
	Name     string `json:"name,omitempty"`
	Host     string `json:"host,omitempty"`
	HostPath string `json:"host_path,omitempty"`
	Role     string `json:"role,omitempty"`
}

PaxosVolume records the volume information of the paxos nodes.

Jump to

Keyboard shortcuts

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