v1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Overview

Package v1 contains API Schema definitions for the citacloud v1 API group +kubebuilder:object:generate=true +groupName=citacloud.rivtower.com

Index

Constants

View Source
const (
	VERSION633          = "v6.3.3"
	VERSION640          = "v6.4.0"
	LATEST_VERSION      = "latest"
	VERSION633_P2P_BFT  = "v6.3.3_p2p_bft"
	VERSION633_P2P_RAFT = "v6.3.3_p2p_raft"
	VERSION633_TLS_BFT  = "v6.3.3_tls_bft"
	VERSION633_TLS_RAFT = "v6.3.3_tls_raft"
	VERSION640_P2P_BFT  = "v6.4.0_p2p_bft"
	VERSION640_P2P_RAFT = "v6.4.0_p2p_raft"
	VERSION640_TLS_BFT  = "v6.4.0_tls_bft"
	VERSION640_TLS_RAFT = "v6.4.0_tls_raft"
	LATEST_P2P_BFT      = "latest_p2p_bft"
	LATEST_P2P_RAFT     = "latest_p2p_raft"
	LATEST_TLS_BFT      = "latest_tls_bft"
	LATEST_TLS_RAFT     = "latest_tls_raft"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "citacloud.rivtower.com", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var VERSION_MAP = map[string]ImageInfo{

	VERSION633_TLS_BFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_tls:v6.3.3",
		ConsensusImage:  "citacloud/consensus_bft:v6.3.3",
		ExecutorImage:   "citacloud/executor_evm:v6.3.3",
		StorageImage:    "citacloud/storage_rocksdb:v6.3.3",
		ControllerImage: "citacloud/controller:v6.3.3",
		KmsImage:        "citacloud/kms_sm:v6.3.3",
	},
	VERSION633_TLS_RAFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_tls:v6.3.3",
		ConsensusImage:  "citacloud/consensus_raft:v6.3.3",
		ExecutorImage:   "citacloud/executor_evm:v6.3.3",
		StorageImage:    "citacloud/storage_rocksdb:v6.3.3",
		ControllerImage: "citacloud/controller:v6.3.3",
		KmsImage:        "citacloud/kms_sm:v6.3.3",
	},
	VERSION633_P2P_BFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_p2p:v6.3.3",
		ConsensusImage:  "citacloud/consensus_bft:v6.3.3",
		ExecutorImage:   "citacloud/executor_evm:v6.3.3",
		StorageImage:    "citacloud/storage_rocksdb:v6.3.3",
		ControllerImage: "citacloud/controller:v6.3.3",
		KmsImage:        "citacloud/kms_sm:v6.3.3",
	},
	VERSION633_P2P_RAFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_p2p:v6.3.3",
		ConsensusImage:  "citacloud/consensus_raft:v6.3.3",
		ExecutorImage:   "citacloud/executor_evm:v6.3.3",
		StorageImage:    "citacloud/storage_rocksdb:v6.3.3",
		ControllerImage: "citacloud/controller:v6.3.3",
		KmsImage:        "citacloud/kms_sm:v6.3.3",
	},

	VERSION640_TLS_BFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_tls:v6.4.0",
		ConsensusImage:  "citacloud/consensus_bft:v6.4.0",
		ExecutorImage:   "citacloud/executor_evm:v6.4.0",
		StorageImage:    "citacloud/storage_rocksdb:v6.4.0",
		ControllerImage: "citacloud/controller:v6.4.0",
		KmsImage:        "citacloud/kms_sm:v6.4.0",
	},
	VERSION640_TLS_RAFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_tls:v6.4.0",
		ConsensusImage:  "citacloud/consensus_raft:v6.4.0",
		ExecutorImage:   "citacloud/executor_evm:v6.4.0",
		StorageImage:    "citacloud/storage_rocksdb:v6.4.0",
		ControllerImage: "citacloud/controller:v6.4.0",
		KmsImage:        "citacloud/kms_sm:v6.4.0",
	},
	VERSION640_P2P_BFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_p2p:v6.4.0",
		ConsensusImage:  "citacloud/consensus_bft:v6.4.0",
		ExecutorImage:   "citacloud/executor_evm:v6.4.0",
		StorageImage:    "citacloud/storage_rocksdb:v6.4.0",
		ControllerImage: "citacloud/controller:v6.4.0",
		KmsImage:        "citacloud/kms_sm:v6.4.0",
	},
	VERSION640_P2P_RAFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_p2p:v6.4.0",
		ConsensusImage:  "citacloud/consensus_raft:v6.4.0",
		ExecutorImage:   "citacloud/executor_evm:v6.4.0",
		StorageImage:    "citacloud/storage_rocksdb:v6.4.0",
		ControllerImage: "citacloud/controller:v6.4.0",
		KmsImage:        "citacloud/kms_sm:v6.4.0",
	},

	LATEST_TLS_BFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_tls:latest",
		ConsensusImage:  "citacloud/consensus_bft:latest",
		ExecutorImage:   "citacloud/executor_evm:latest",
		StorageImage:    "citacloud/storage_rocksdb:latest",
		ControllerImage: "citacloud/controller:latest",
		KmsImage:        "citacloud/kms_sm:latest",
	},
	LATEST_TLS_RAFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_tls:latest",
		ConsensusImage:  "citacloud/consensus_raft:latest",
		ExecutorImage:   "citacloud/executor_evm:latest",
		StorageImage:    "citacloud/storage_rocksdb:latest",
		ControllerImage: "citacloud/controller:latest",
		KmsImage:        "citacloud/kms_sm:latest",
	},
	LATEST_P2P_BFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_p2p:latest",
		ConsensusImage:  "citacloud/consensus_bft:latest",
		ExecutorImage:   "citacloud/executor_evm:latest",
		StorageImage:    "citacloud/storage_rocksdb:latest",
		ControllerImage: "citacloud/controller:latest",
		KmsImage:        "citacloud/kms_sm:latest",
	},
	LATEST_P2P_RAFT: {
		PullPolicy:      corev1.PullIfNotPresent,
		NetworkImage:    "citacloud/network_p2p:latest",
		ConsensusImage:  "citacloud/consensus_raft:latest",
		ExecutorImage:   "citacloud/executor_evm:latest",
		StorageImage:    "citacloud/storage_rocksdb:latest",
		ControllerImage: "citacloud/controller:latest",
		KmsImage:        "citacloud/kms_sm:latest",
	},
}

Functions

func GetNewTime

func GetNewTime(time time.Time) *metav1.Time

Types

type Account

type Account struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AccountSpec   `json:"spec,omitempty"`
	Status AccountStatus `json:"status,omitempty"`
}

Account is the Schema for the accounts API

func (*Account) DeepCopy

func (in *Account) DeepCopy() *Account

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Account.

func (*Account) DeepCopyInto

func (in *Account) DeepCopyInto(out *Account)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Account) DeepCopyObject

func (in *Account) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Account) Default

func (r *Account) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Account) SetupWebhookWithManager

func (r *Account) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Account) ValidateCreate

func (r *Account) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Account) ValidateDelete

func (r *Account) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Account) ValidateUpdate

func (r *Account) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type AccountList

type AccountList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Account `json:"items"`
}

AccountList contains a list of Account

func (*AccountList) DeepCopy

func (in *AccountList) DeepCopy() *AccountList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountList.

func (*AccountList) DeepCopyInto

func (in *AccountList) DeepCopyInto(out *AccountList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AccountList) DeepCopyObject

func (in *AccountList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AccountSpec

type AccountSpec struct {
	// Corresponding chain name
	Chain string `json:"chain"`
	// Role type
	// +kubebuilder:validation:Enum=Admin;Consensus;Ordinary
	Role Role `json:"role,omitempty"`
	// kms password
	KmsPassword string `json:"kmsPassword"`
	// if role is Ordinary, you should set this field
	Domain string `json:"domain,omitempty"`
	// Address if address set, controller will not generate a new account address
	Address string `json:"address,omitempty"`
}

AccountSpec defines the desired state of Account

func (*AccountSpec) DeepCopy

func (in *AccountSpec) DeepCopy() *AccountSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountSpec.

func (*AccountSpec) DeepCopyInto

func (in *AccountSpec) DeepCopyInto(out *AccountSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AccountStatus

type AccountStatus struct {
	// Currently only the admin user will set this value
	Cert string `json:"cert,omitempty"`
	// Address
	Address string `json:"address,omitempty"`
}

AccountStatus defines the observed state of Account

func (*AccountStatus) DeepCopy

func (in *AccountStatus) DeepCopy() *AccountStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountStatus.

func (*AccountStatus) DeepCopyInto

func (in *AccountStatus) DeepCopyInto(out *AccountStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AdminAccountInfo

type AdminAccountInfo struct {
	Name    string `json:"name,omitempty"`
	Address string `json:"address,omitempty"`
}

func (*AdminAccountInfo) DeepCopy

func (in *AdminAccountInfo) DeepCopy() *AdminAccountInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdminAccountInfo.

func (*AdminAccountInfo) DeepCopyInto

func (in *AdminAccountInfo) DeepCopyInto(out *AdminAccountInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ByCreationTimestampForNode

type ByCreationTimestampForNode []NodeInfo

ByCreationTimestampForNode Sort from early to late +k8s:deepcopy-gen=false

func (ByCreationTimestampForNode) Len

func (ByCreationTimestampForNode) Less

func (a ByCreationTimestampForNode) Less(i, j int) bool

func (ByCreationTimestampForNode) Swap

func (a ByCreationTimestampForNode) Swap(i, j int)

type ByCreationTimestampForValidatorAccount

type ByCreationTimestampForValidatorAccount []ValidatorAccountInfo

ByCreationTimestampForValidatorAccount Sort from early to late +k8s:deepcopy-gen=false

func (ByCreationTimestampForValidatorAccount) Len

func (ByCreationTimestampForValidatorAccount) Less

func (ByCreationTimestampForValidatorAccount) Swap

type ChainConfig

type ChainConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ChainConfigSpec   `json:"spec,omitempty"`
	Status ChainConfigStatus `json:"status,omitempty"`
}

ChainConfig is the Schema for the chainconfigs API

func (*ChainConfig) DeepCopy

func (in *ChainConfig) DeepCopy() *ChainConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainConfig.

func (*ChainConfig) DeepCopyInto

func (in *ChainConfig) DeepCopyInto(out *ChainConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChainConfig) DeepCopyObject

func (in *ChainConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ChainConfig) Default

func (r *ChainConfig) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*ChainConfig) GetExactVersion

func (c *ChainConfig) GetExactVersion() (string, error)

func (*ChainConfig) MergeFromDefaultImageInfo

func (c *ChainConfig) MergeFromDefaultImageInfo(info ImageInfo)

func (*ChainConfig) SetupWebhookWithManager

func (r *ChainConfig) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ChainConfig) ValidateCreate

func (r *ChainConfig) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ChainConfig) ValidateDelete

func (r *ChainConfig) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ChainConfig) ValidateUpdate

func (r *ChainConfig) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ChainConfigList

type ChainConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ChainConfig `json:"items"`
}

ChainConfigList contains a list of ChainConfig

func (*ChainConfigList) DeepCopy

func (in *ChainConfigList) DeepCopy() *ChainConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainConfigList.

func (*ChainConfigList) DeepCopyInto

func (in *ChainConfigList) DeepCopyInto(out *ChainConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChainConfigList) DeepCopyObject

func (in *ChainConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChainConfigSpec

type ChainConfigSpec struct {
	// chain id
	Id string `json:"id"`

	// 创世块的时间戳
	Timestamp int64 `json:"timestamp"`

	// 创世块的prevhash
	PrevHash string `json:"prevhash"`

	// 出块间隔
	BlockInterval int32 `json:"blockInterval"`

	// 块大小限制
	BlockLimit int32 `json:"blockLimit"`

	// 开启tls认证
	EnableTLS bool `json:"enableTls,omitempty"`

	// 共识算法
	// +kubebuilder:validation:Enum=BFT;Raft
	ConsensusType ConsensusType `json:"consensusType"`

	// 期望的状态
	// +kubebuilder:validation:Enum=Publicizing;Online
	Action ChainStatus `json:"action,omitempty"`

	// ImageInfo
	ImageInfo `json:"imageInfo,omitempty"`

	// Version
	// +kubebuilder:default:=latest
	Version string `json:"version,omitempty"`
}

ChainConfigSpec defines the desired state of ChainConfig

func (*ChainConfigSpec) DeepCopy

func (in *ChainConfigSpec) DeepCopy() *ChainConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainConfigSpec.

func (*ChainConfigSpec) DeepCopyInto

func (in *ChainConfigSpec) DeepCopyInto(out *ChainConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChainConfigStatus

type ChainConfigStatus struct {
	// admin账户信息
	AdminAccount *AdminAccountInfo `json:"adminAccount,omitempty"`
	// 共识节点账户信息
	ValidatorAccountList []ValidatorAccountInfo `json:"validatorAccountList,omitempty"`
	// 状态
	Status ChainStatus `json:"status,omitempty"`
	// 详情
	Message string `json:"message,omitempty"`
	// 链下节点信息
	NodeInfoList []NodeInfo `json:"nodeInfoList,omitempty"`
}

ChainConfigStatus defines the observed state of ChainConfig

func (*ChainConfigStatus) DeepCopy

func (in *ChainConfigStatus) DeepCopy() *ChainConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainConfigStatus.

func (*ChainConfigStatus) DeepCopyInto

func (in *ChainConfigStatus) DeepCopyInto(out *ChainConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChainNode

type ChainNode struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ChainNodeSpec   `json:"spec,omitempty"`
	Status ChainNodeStatus `json:"status,omitempty"`
}

ChainNode is the Schema for the chainnodes API

func (*ChainNode) DeepCopy

func (in *ChainNode) DeepCopy() *ChainNode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNode.

func (*ChainNode) DeepCopyInto

func (in *ChainNode) DeepCopyInto(out *ChainNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChainNode) DeepCopyObject

func (in *ChainNode) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ChainNode) Default

func (r *ChainNode) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*ChainNode) SetupWebhookWithManager

func (r *ChainNode) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ChainNode) ValidateCreate

func (r *ChainNode) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ChainNode) ValidateDelete

func (r *ChainNode) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ChainNode) ValidateUpdate

func (r *ChainNode) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ChainNodeList

type ChainNodeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ChainNode `json:"items"`
}

ChainNodeList contains a list of ChainNode

func (*ChainNodeList) DeepCopy

func (in *ChainNodeList) DeepCopy() *ChainNodeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeList.

func (*ChainNodeList) DeepCopyInto

func (in *ChainNodeList) DeepCopyInto(out *ChainNodeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChainNodeList) DeepCopyObject

func (in *ChainNodeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChainNodeSpec

type ChainNodeSpec struct {

	// 节点信息
	NodeInfo `json:"nodeInfo"`

	// 对应的链级配置名称
	ChainName string `json:"chainName,omitempty"`

	// 日志等级
	LogLevel LogLevel `json:"logLevel,omitempty"`

	// pvc对应的storage class, 集群中必须存在的storage class
	StorageClassName *string `json:"storageClassName,omitempty"`

	// 申请的pvc大小
	StorageSize *int64 `json:"storageSize"`

	// 期望的状态
	// +kubebuilder:validation:Enum=Initialize;Stop;Start
	Action NodeAction `json:"action"`

	// ImageInfo
	ImageInfo `json:"imageInfo,omitempty"`

	// Resources describes the compute resource request and limit (include cpu、memory)
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
}

ChainNodeSpec defines the desired state of ChainNode

func (*ChainNodeSpec) DeepCopy

func (in *ChainNodeSpec) DeepCopy() *ChainNodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSpec.

func (*ChainNodeSpec) DeepCopyInto

func (in *ChainNodeSpec) DeepCopyInto(out *ChainNodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChainNodeStatus

type ChainNodeStatus struct {
	Status NodeStatus `json:"status,omitempty"`
}

ChainNodeStatus defines the observed state of ChainNode

func (*ChainNodeStatus) DeepCopy

func (in *ChainNodeStatus) DeepCopy() *ChainNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeStatus.

func (*ChainNodeStatus) DeepCopyInto

func (in *ChainNodeStatus) DeepCopyInto(out *ChainNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChainStatus

type ChainStatus string
const (
	// 初始化状态
	Initialization ChainStatus = "Initialization"
	// 运行状态
	Running ChainStatus = "Running"
	// 治理维护状态
	Maintenance ChainStatus = "Maintenance"
	// 公示中状态
	Publicizing ChainStatus = "Publicizing"
	// 上线
	Online ChainStatus = "Online"
)

type ConsensusType

type ConsensusType string
const (
	BFT  ConsensusType = "BFT"
	Raft ConsensusType = "Raft"
)

type ImageInfo

type ImageInfo struct {
	// PullPolicy
	PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`

	// network微服务镜像
	NetworkImage string `json:"networkImage,omitempty"`

	// consensus微服务镜像
	ConsensusImage string `json:"consensusImage,omitempty"`

	// executor微服务镜像
	ExecutorImage string `json:"executorImage,omitempty"`

	// storage微服务镜像
	StorageImage string `json:"storageImage,omitempty"`

	// controller微服务镜像
	ControllerImage string `json:"controllerImage,omitempty"`

	// kms微服务镜像
	KmsImage string `json:"kmsImage,omitempty"`
}

+k8s:deepcopy-gen=false

type LogLevel

type LogLevel string
const (
	Info LogLevel = "info"
	Warn LogLevel = "warn"
)

type NodeAction

type NodeAction string
const (
	NodeInitialize NodeAction = "Initialize"
	NodeStop       NodeAction = "Stop"
	NodeStart      NodeAction = "Start"
)

type NodeInfo

type NodeInfo struct {
	// Name
	Name string `json:"name,omitempty"`
	// 所属的k8s集群
	Cluster string `json:"cluster,omitempty"`

	// Domain
	Domain string `json:"domain,omitempty"`

	// 账号,不为空
	Account string `json:"account"`

	// 节点对外public ip
	ExternalIp string `json:"externalIp,omitempty"`

	// 节点暴露的端口号
	Port int32 `json:"port,omitempty"`

	// node status
	Status NodeStatus `json:"status,omitempty"`

	// CreationTimestamp
	CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"`
}

func (*NodeInfo) DeepCopy

func (in *NodeInfo) DeepCopy() *NodeInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo.

func (*NodeInfo) DeepCopyInto

func (in *NodeInfo) DeepCopyInto(out *NodeInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeStatus

type NodeStatus string
const (
	NodeWaitChainOnline NodeStatus = "WaitChainOnline"
	NodeInitialized     NodeStatus = "Initialized"
	NodeStarting        NodeStatus = "Starting"
	NodeRunning         NodeStatus = "Running"
	NodeWarning         NodeStatus = "Warning"
	NodeError           NodeStatus = "Error"
	NodeUpdating        NodeStatus = "Updating"
	// NodeNeedRestart if chainnode's config modified, chainnode should restart
	NodeNeedRestart NodeStatus = "NeedRestart"
	NodeStopping    NodeStatus = "Stopping"
	NodeStopped     NodeStatus = "Stopped"
)

type Role

type Role string
const (
	Admin     Role = "Admin"
	Consensus Role = "Consensus"
	Ordinary  Role = "Ordinary"
)

type ValidatorAccountInfo

type ValidatorAccountInfo struct {
	Name    string `json:"name,omitempty"`
	Address string `json:"address,omitempty"`
	// CreationTimestamp for sort
	CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"`
}

func (*ValidatorAccountInfo) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorAccountInfo.

func (*ValidatorAccountInfo) DeepCopyInto

func (in *ValidatorAccountInfo) DeepCopyInto(out *ValidatorAccountInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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