resources

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package resources defines various internal Theila resources.

Index

Constants

View Source
const (
	// TaskStatusType is the type of TaskStatus resource.
	TaskStatusType = resource.Type("TaskStatuses.theila.sidero.dev")
	// TaskStateType is the type of TaskState resource.
	TaskStateType = resource.Type("TaskState.theila.sidero.dev")
)
View Source
const (
	// KubernetesResourceType is the type of TaskStatus resource.
	KubernetesResourceType = resource.Type("KubernetesResources.theila.sidero.dev")
)
View Source
const (
	// KubernetesVersionType is the type of KubernetesResource resource.
	KubernetesVersionType = resource.Type("KubernetesVersions.theila.sidero.dev")
)
View Source
const (
	// TaskLogType is the type of TaskLog resource.
	TaskLogType = resource.Type("TaskLogs.theila.sidero.dev")
)
View Source
const (
	// UpgradeK8sTaskType is the type of UpgradeK8sTask resource.
	UpgradeK8sTaskType = resource.Type("UpgradeTasks.theila.sidero.dev")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesResource

type KubernetesResource struct {
	// contains filtered or unexported fields
}

KubernetesResource represents the ongoing K8s upgrade task.

func (*KubernetesResource) DeepCopy

func (r *KubernetesResource) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*KubernetesResource) Metadata

func (r *KubernetesResource) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*KubernetesResource) Spec

func (r *KubernetesResource) Spec() interface{}

Spec implements resource.Resource.

func (*KubernetesResource) String

func (r *KubernetesResource) String() string

func (*KubernetesResource) UnmarshalProto

func (r *KubernetesResource) UnmarshalProto(md *resource.Metadata, protoSpec []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

type KubernetesVersion

type KubernetesVersion struct {
	// contains filtered or unexported fields
}

KubernetesVersion represents discovered Kubernetes version.

func NewKubernetesVersion

func NewKubernetesVersion(ns resource.Namespace, id resource.ID, version string) *KubernetesVersion

NewKubernetesVersion creates new KubernetesVersion resource.

func (*KubernetesVersion) DeepCopy

func (r *KubernetesVersion) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*KubernetesVersion) Metadata

func (r *KubernetesVersion) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*KubernetesVersion) SetVersion

func (r *KubernetesVersion) SetVersion(version string)

SetVersion updates spec version.

func (*KubernetesVersion) Spec

func (r *KubernetesVersion) Spec() interface{}

Spec implements resource.Resource.

func (*KubernetesVersion) String

func (r *KubernetesVersion) String() string

func (*KubernetesVersion) UnmarshalProto

func (r *KubernetesVersion) UnmarshalProto(md *resource.Metadata, protoSpec []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

type TaskLog

type TaskLog struct {
	// contains filtered or unexported fields
}

TaskLog represents the ongoing task logs.

func NewTaskLog

func NewTaskLog(ns resource.Namespace, id resource.ID, line string) *TaskLog

NewTaskLog creates new TaskLog resource.

func (*TaskLog) DeepCopy

func (r *TaskLog) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*TaskLog) Metadata

func (r *TaskLog) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*TaskLog) Spec

func (r *TaskLog) Spec() interface{}

Spec implements resource.Resource.

func (*TaskLog) String

func (r *TaskLog) String() string

func (*TaskLog) UnmarshalProto

func (r *TaskLog) UnmarshalProto(md *resource.Metadata, protoSpec []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

func (*TaskLog) Update

func (r *TaskLog) Update(line string)

Update the log line.

type TaskState

type TaskState struct {
	// contains filtered or unexported fields
}

TaskState represents the ongoing K8s upgrade task status.

func NewTaskState

func NewTaskState(ns resource.Namespace, id, statusID resource.ID) *TaskState

NewTaskState creates new TaskState resource.

func (*TaskState) DeepCopy

func (r *TaskState) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*TaskState) Metadata

func (r *TaskState) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*TaskState) Spec

func (r *TaskState) Spec() interface{}

Spec implements resource.Resource.

func (*TaskState) String

func (r *TaskState) String() string

func (*TaskState) TypedSpec

func (r *TaskState) TypedSpec() *rpc.TaskStateSpec

TypedSpec returns typed representation for the spec.

func (*TaskState) UnmarshalProto

func (r *TaskState) UnmarshalProto(md *resource.Metadata, protoSpec []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

type TaskStatus

type TaskStatus struct {
	// contains filtered or unexported fields
}

TaskStatus represents the ongoing K8s upgrade task status.

func NewTaskStatus

func NewTaskStatus(ns resource.Namespace, id resource.ID) *TaskStatus

NewTaskStatus creates new TaskStatus resource.

func (*TaskStatus) DeepCopy

func (r *TaskStatus) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*TaskStatus) Metadata

func (r *TaskStatus) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*TaskStatus) SetError

func (r *TaskStatus) SetError(err error)

SetError sets status error.

func (*TaskStatus) SetPhase

func (r *TaskStatus) SetPhase(phase rpc.TaskStatusSpec_Phase)

SetPhase updates status phase.

func (*TaskStatus) SetProgress

func (r *TaskStatus) SetProgress(progress float32)

SetProgress updates status progress.

func (*TaskStatus) SetVersions

func (r *TaskStatus) SetVersions(from, to string)

SetVersions updates the versions of the upgrade task.

func (*TaskStatus) Spec

func (r *TaskStatus) Spec() interface{}

Spec implements resource.Resource.

func (*TaskStatus) String

func (r *TaskStatus) String() string

func (*TaskStatus) TypedSpec

func (r *TaskStatus) TypedSpec() *rpc.TaskStatusSpec

TypedSpec returns the exact type of the spec of this resource.

func (*TaskStatus) UnmarshalProto

func (r *TaskStatus) UnmarshalProto(md *resource.Metadata, protoSpec []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

type UpgradeK8sTask

type UpgradeK8sTask struct {
	// contains filtered or unexported fields
}

UpgradeK8sTask represents the ongoing K8s upgrade task.

func NewUpgradeK8sTask

func NewUpgradeK8sTask(ns resource.Namespace, id resource.ID, spec *rpc.UpgradeK8SSpec) *UpgradeK8sTask

NewUpgradeK8sTask creates new StrResource.

func (*UpgradeK8sTask) DeepCopy

func (r *UpgradeK8sTask) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*UpgradeK8sTask) Metadata

func (r *UpgradeK8sTask) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*UpgradeK8sTask) Spec

func (r *UpgradeK8sTask) Spec() interface{}

Spec implements resource.Resource.

func (*UpgradeK8sTask) String

func (r *UpgradeK8sTask) String() string

func (*UpgradeK8sTask) TypedSpec

func (r *UpgradeK8sTask) TypedSpec() *rpc.UpgradeK8SSpec

TypedSpec returns typed spec object.

func (*UpgradeK8sTask) UnmarshalProto

func (r *UpgradeK8sTask) UnmarshalProto(md *resource.Metadata, protoSpec []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

Jump to

Keyboard shortcuts

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