extensionfile

package
v0.0.0-...-a954c3e Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionData

type ExtensionData struct {
	// stick to _ notation as this data structure will be used by
	// hostagent extensions and all other extensions follow _ instead of camel casing.
	ServiceState           string   `json:"pf9_kube_service_state"`
	NodeState              string   `json:"pf9_kube_node_state"`
	StartAttempts          int      `json:"pf9_kube_start_attempt"`
	ClusterID              string   `json:"pf9_cluster_id"`
	ClusterRole            string   `json:"pf9_cluster_role"`
	AllStatusChecks        []string `json:"all_status_checks"`
	AllPhases              []string `json:"all_tasks"`
	CompletedPhases        []string `json:"completed_tasks"`
	CurrentStatusCheck     string   `json:"current_status_check"`
	CurrentPhase           string   `json:"current_task"`
	LastFailedCheck        string   `json:"last_failed_status_check"`
	LastFailedCheckTime    int64    `json:"last_failed_status_time"`
	LastFailedPhase        string   `json:"last_failed_task"`
	CurrentStatusCheckTime int64    `json:"status_check_timestamp"`

	Cfg *config.Config `json:"-"`

	// Operation is the current operation that nodelet is executing. Options: start|stop|status.
	Operation string `json:"-"`

	// KubeRunning indicates if the host is currently a node in the Kubernetes cluster.
	KubeRunning bool `json:"-"`

	// FailedStatusCheck contains the index of the first status check in the chain that failed.
	// If none failed, this should be -1.
	FailedStatusCheck int `json:"-"`

	// LastSuccessfulStatus contains the last the known time that the status check was successful.
	LastSuccessfulStatus time.Time `json:"-"`

	// StartFailStep contains the index of the start phase in the chain that failed.
	// If none failed, this should be -1.
	StartFailStep int `json:"-"`
	// contains filtered or unexported fields
}

ExtensionData : Struct for capturing data written to and read from extension data file.

func New

New returns new instance of ExtensionData.

func (*ExtensionData) Load

func (data *ExtensionData) Load() error

Load : reads the extension data file and populates the structure

func (*ExtensionData) Write

func (data *ExtensionData) Write()

type ExtensionFile

type ExtensionFile interface {
	Write()
	Load() error
}

ExtensionFile interface contains the methods for reading and writing ExtensionData struct to extension data file.

Jump to

Keyboard shortcuts

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