summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwbc6080 <wangbincheng4@huawei.com>2024-07-29 17:06:27 +0800
committerwbc6080 <wangbincheng4@huawei.com>2024-07-29 17:06:27 +0800
commite201b4cf2bcd2f9a015ef2ed144288d2a42e4fd0 (patch)
tree9f175c3b975d876d15541498b75a523d12d8d8e1
parentRemove unnecessary references about api in keadm (diff)
downloadkubeedge-e201b4cf2bcd2f9a015ef2ed144288d2a42e4fd0.tar.gz
migrate kubeedge api to stage directory
Signed-off-by: wbc6080 <wangbincheng4@huawei.com>
-rw-r--r--staging/src/github.com/kubeedge/api/apps/v1alpha1/doc.go21
-rw-r--r--staging/src/github.com/kubeedge/api/apps/v1alpha1/edgeapplication_types.go306
-rw-r--r--staging/src/github.com/kubeedge/api/apps/v1alpha1/nodegroup_types.go112
-rw-r--r--staging/src/github.com/kubeedge/api/apps/v1alpha1/register.go69
-rw-r--r--staging/src/github.com/kubeedge/api/apps/v1alpha1/zz_generated.deepcopy.go520
-rw-r--r--staging/src/github.com/kubeedge/api/common.go3
-rw-r--r--staging/src/github.com/kubeedge/api/common/constants/default.go178
-rw-r--r--staging/src/github.com/kubeedge/api/common/constants/default_others.go36
-rw-r--r--staging/src/github.com/kubeedge/api/common/constants/default_windows.go39
-rw-r--r--staging/src/github.com/kubeedge/api/common/types/http.go24
-rw-r--r--staging/src/github.com/kubeedge/api/common/types/types.go112
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/OWNERS9
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/default.go303
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/helper.go70
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/register.go23
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/types.go546
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation.go216
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation_test.go535
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/default.go235
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/helper.go38
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/register.go23
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/types.go468
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation.go154
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation_test.go356
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default.go233
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_kubelet_configuration.go108
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_others.go25
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_windows.go23
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/helper.go38
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/register.go23
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/types.go1054
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation.go161
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_others.go20
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_test.go398
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_windows.go10
-rw-r--r--staging/src/github.com/kubeedge/api/componentconfig/meta/v1alpha1/types.go43
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1alpha2/device_instance_types.go432
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1alpha2/device_model_types.go150
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1alpha2/doc.go19
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1alpha2/register.go84
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1alpha2/zz_generated.deepcopy.go839
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1beta1/device_instance_types.go329
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1beta1/device_model_types.go97
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1beta1/doc.go19
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1beta1/register.go84
-rw-r--r--staging/src/github.com/kubeedge/api/devices/v1beta1/zz_generated.deepcopy.go616
-rw-r--r--staging/src/github.com/kubeedge/api/dmi/services.go92
-rw-r--r--staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.pb.go5218
-rw-r--r--staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.proto539
-rw-r--r--staging/src/github.com/kubeedge/api/dmi/v1beta1/api.pb.go3964
-rw-r--r--staging/src/github.com/kubeedge/api/dmi/v1beta1/api.proto433
-rw-r--r--staging/src/github.com/kubeedge/api/dmi/v1beta1/api_grpc.pb.go583
-rw-r--r--staging/src/github.com/kubeedge/api/fsm/v1alpha1/backup_task.go31
-rw-r--r--staging/src/github.com/kubeedge/api/fsm/v1alpha1/fsm.go45
-rw-r--r--staging/src/github.com/kubeedge/api/fsm/v1alpha1/image_prepull_task.go42
-rw-r--r--staging/src/github.com/kubeedge/api/fsm/v1alpha1/rollback_task.go31
-rw-r--r--staging/src/github.com/kubeedge/api/fsm/v1alpha1/upgrade_task.go61
-rw-r--r--staging/src/github.com/kubeedge/api/go.mod206
-rw-r--r--staging/src/github.com/kubeedge/api/go.sum596
-rw-r--r--staging/src/github.com/kubeedge/api/operations/v1alpha1/doc.go19
-rw-r--r--staging/src/github.com/kubeedge/api/operations/v1alpha1/imageprepull_types.go164
-rw-r--r--staging/src/github.com/kubeedge/api/operations/v1alpha1/register.go73
-rw-r--r--staging/src/github.com/kubeedge/api/operations/v1alpha1/type.go148
-rw-r--r--staging/src/github.com/kubeedge/api/operations/v1alpha1/zz_generated.deepcopy.go345
-rw-r--r--staging/src/github.com/kubeedge/api/policy/v1alpha1/doc.go21
-rw-r--r--staging/src/github.com/kubeedge/api/policy/v1alpha1/register.go61
-rw-r--r--staging/src/github.com/kubeedge/api/policy/v1alpha1/serviceaccountaccess_types.go88
-rw-r--r--staging/src/github.com/kubeedge/api/policy/v1alpha1/zz_generated.deepcopy.go188
-rw-r--r--staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/doc.go21
-rw-r--r--staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/register.go63
-rw-r--r--staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/type.go103
-rw-r--r--staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/zz_generated.deepcopy.go180
-rw-r--r--staging/src/github.com/kubeedge/api/rules/v1/doc.go4
-rw-r--r--staging/src/github.com/kubeedge/api/rules/v1/register.go71
-rw-r--r--staging/src/github.com/kubeedge/api/rules/v1/types.go93
-rw-r--r--staging/src/github.com/kubeedge/api/rules/v1/zz_generated.deepcopy.go221
-rw-r--r--staging/src/github.com/kubeedge/api/util/flag/flags.go129
-rw-r--r--staging/src/github.com/kubeedge/api/util/fsm/fsm.go139
-rw-r--r--staging/src/github.com/kubeedge/api/util/pass-through/pass_through.go22
-rw-r--r--staging/src/github.com/kubeedge/api/util/pass-through/pass_through_test.go61
-rw-r--r--staging/src/github.com/kubeedge/api/util/util.go158
-rw-r--r--staging/src/github.com/kubeedge/api/util/util_test.go165
-rw-r--r--staging/src/github.com/kubeedge/api/util/validation/check.go14
-rw-r--r--staging/src/github.com/kubeedge/api/util/validation/check_test.go25
-rw-r--r--staging/src/github.com/kubeedge/api/util/validation/validation.go44
-rw-r--r--staging/src/github.com/kubeedge/api/util/validation/validation_test.go96
l---------vendor/github.com/kubeedge/api1
87 files changed, 23759 insertions, 0 deletions
diff --git a/staging/src/github.com/kubeedge/api/apps/v1alpha1/doc.go b/staging/src/github.com/kubeedge/api/apps/v1alpha1/doc.go
new file mode 100644
index 000000000..27e7c9713
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/apps/v1alpha1/doc.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package v1alpha1 is the v1alpha1 version of the API.
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// +groupName=apps.kubeedge.io
+package v1alpha1
diff --git a/staging/src/github.com/kubeedge/api/apps/v1alpha1/edgeapplication_types.go b/staging/src/github.com/kubeedge/api/apps/v1alpha1/edgeapplication_types.go
new file mode 100644
index 000000000..7edc8e1c0
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/apps/v1alpha1/edgeapplication_types.go
@@ -0,0 +1,306 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// EdgeApplicationSpec defines the desired state of EdgeApplication
+type EdgeApplicationSpec struct {
+ // WorkloadTemplate contains original templates of resources to be deployed
+ // as an EdgeApplication.
+ WorkloadTemplate ResourceTemplate `json:"workloadTemplate,omitempty"`
+ // WorkloadScope represents which node groups the workload will be deployed in.
+ WorkloadScope WorkloadScope `json:"workloadScope"`
+}
+
+// WorkloadScope represents which node groups the workload should be deployed in.
+type WorkloadScope struct {
+ // TargetNodeGroups represents the target node groups of workload to be deployed.
+ // +optional
+ TargetNodeGroups []TargetNodeGroup `json:"targetNodeGroups,omitempty"`
+}
+
+// TargetNodeGroup represents the target node group of workload to be deployed, including
+// override rules to apply for this node group.
+type TargetNodeGroup struct {
+ // Name represents the name of target node group
+ Name string `json:"name"`
+ // Overriders represents the override rules that would apply on workload.
+ Overriders Overriders `json:"overriders,omitempty"`
+}
+
+// ResourceTemplate represents original templates of resources to be deployed
+// as an EdgeApplication.
+type ResourceTemplate struct {
+ // Manifests represent a list of Kubernetes resources to be deployed on the managed node groups.
+ // +optional
+ Manifests []Manifest `json:"manifests,omitempty"`
+}
+
+// Overriders represents the override rules that would apply on resources.
+type Overriders struct {
+ // Replicas will override the replicas field of deployment
+ // +optional
+ Replicas *int `json:"replicas,omitempty"`
+ // ImageOverriders represents the rules dedicated to handling image overrides.
+ // +optional
+ ImageOverriders []ImageOverrider `json:"imageOverriders,omitempty"`
+ // EnvOverriders will override the env field of the container
+ // +optional
+ EnvOverriders []EnvOverrider `json:"envOverriders,omitempty"`
+ // CommandOverriders represents the rules dedicated to handling container command
+ // +optional
+ CommandOverriders []CommandArgsOverrider `json:"commandOverriders,omitempty"`
+ // ArgsOverriders represents the rules dedicated to handling container args
+ // +optional
+ ArgsOverriders []CommandArgsOverrider `json:"argsOverriders,omitempty"`
+ // ResourcesOverriders will override the resources field of the container
+ // +optional
+ ResourcesOverriders []ResourcesOverrider `json:"resourcesOverriders,omitempty"`
+}
+
+// CommandArgsOverrider represents the rules dedicated to handling command/args overrides.
+type CommandArgsOverrider struct {
+ // The name of container
+ // +required
+ ContainerName string `json:"containerName"`
+
+ // Operator represents the operator which will apply on the command/args.
+ // +kubebuilder:validation:Enum=add;remove
+ // +required
+ Operator OverriderOperator `json:"operator"`
+
+ // Value to be applied to command/args.
+ // Items in Value which will be appended after command/args when Operator is 'add'.
+ // Items in Value which match in command/args will be deleted when Operator is 'remove'.
+ // If Value is empty, then the command/args will remain the same.
+ // +optional
+ Value []string `json:"value,omitempty"`
+}
+
+// EnvOverrider represents the rules dedicated to handling env overrides.
+type EnvOverrider struct {
+ // The name of container
+ // +required
+ ContainerName string `json:"containerName"`
+
+ // Operator represents the operator which will apply on the env.
+ // +kubebuilder:validation:Enum=add;remove;replace
+ // +required
+ Operator OverriderOperator `json:"operator"`
+
+ // Value to be applied to env.
+ // Must not be empty when operator is 'add' or 'replace'.
+ // When the operator is 'remove', the matched value in env will be deleted
+ // and only the name of the value will be matched.
+ // If Value is empty, then the env will remain the same.
+ // +optional
+ Value []corev1.EnvVar `json:"value,omitempty"`
+}
+
+// ResourcesOverrider represents the rules dedicated to handling resources overrides.
+type ResourcesOverrider struct {
+ // The name of container
+ // +required
+ ContainerName string `json:"containerName"`
+
+ // Value to be applied to resources.
+ // Must not be empty
+ // +required
+ Value corev1.ResourceRequirements `json:"value,omitempty"`
+}
+
+// ImageOverrider represents the rules dedicated to handling image overrides.
+type ImageOverrider struct {
+ // Predicate filters images before applying the rule.
+ //
+ // Defaults to nil, in that case, the system will automatically detect image fields if the resource type is
+ // Pod, ReplicaSet, Deployment or StatefulSet by following rule:
+ // - Pod: /spec/containers/<N>/image
+ // - ReplicaSet: /spec/template/spec/containers/<N>/image
+ // - Deployment: /spec/template/spec/containers/<N>/image
+ // - StatefulSet: /spec/template/spec/containers/<N>/image
+ // In addition, all images will be processed if the resource object has more than one containers.
+ //
+ // If not nil, only images matches the filters will be processed.
+ // +optional
+ Predicate *ImagePredicate `json:"predicate,omitempty"`
+
+ // Component is part of image name.
+ // Basically we presume an image can be made of '[registry/]repository[:tag]'.
+ // The registry could be:
+ // - k8s.gcr.io
+ // - fictional.registry.example:10443
+ // The repository could be:
+ // - kube-apiserver
+ // - fictional/nginx
+ // The tag cloud be:
+ // - latest
+ // - v1.19.1
+ // - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c
+ //
+ // +kubebuilder:validation:Enum=Registry;Repository;Tag
+ // +required
+ Component ImageComponent `json:"component"`
+
+ // Operator represents the operator which will apply on the image.
+ // +kubebuilder:validation:Enum=add;remove;replace
+ // +required
+ Operator OverriderOperator `json:"operator"`
+
+ // Value to be applied to image.
+ // Must not be empty when operator is 'add' or 'replace'.
+ // Defaults to empty and ignored when operator is 'remove'.
+ // +optional
+ Value string `json:"value,omitempty"`
+}
+
+// ImagePredicate describes images filter.
+type ImagePredicate struct {
+ // Path indicates the path of target field
+ // +required
+ Path string `json:"path"`
+}
+
+// ImageComponent indicates the components for image.
+type ImageComponent string
+
+const (
+ // Registry is the registry component of an image with format '[registry/]repository[:tag]'.
+ Registry ImageComponent = "Registry"
+
+ // Repository is the repository component of an image with format '[registry/]repository[:tag]'.
+ Repository ImageComponent = "Repository"
+
+ // Tag is the tag component of an image with format '[registry/]repository[:tag]'.
+ Tag ImageComponent = "Tag"
+)
+
+// OverriderOperator is the set of operators that can be used in an overrider.
+type OverriderOperator string
+
+// These are valid overrider operators.
+const (
+ OverriderOpAdd OverriderOperator = "add"
+ OverriderOpRemove OverriderOperator = "remove"
+ OverriderOpReplace OverriderOperator = "replace"
+)
+
+// Manifest represents a resource to be deployed on managed node groups.
+type Manifest struct {
+ // +kubebuilder:pruning:PreserveUnknownFields
+ runtime.RawExtension `json:",inline"`
+}
+
+// EdgeApplicationStatus defines the observed state of EdgeApplication
+type EdgeApplicationStatus struct {
+ // WorkloadStatus contains running statuses of generated resources.
+ // +optional
+ WorkloadStatus []ManifestStatus `json:"workloadStatus,omitempty"`
+}
+
+// ManifestStatus contains running status of a specific manifest in spec.
+type ManifestStatus struct {
+ // Identifier represents the identity of a resource linking to manifests in spec.
+ // +required
+ Identifier ResourceIdentifier `json:"identifier"`
+
+ // Conditions contain the different condition statuses for this manifest.
+ // Valid condition types are:
+ // 1. Processing: this workload is under processing and the current state of manifest does not match the desired.
+ // 2. Available: the current status of this workload matches the desired.
+ // +kubebuilder:validation:Enum=Processing;Available
+ // +optional
+ Condition ManifestCondition `json:"conditions,omitempty"`
+}
+
+// ResourceIdentifier provides the identifiers needed to interact with any arbitrary object.
+type ResourceIdentifier struct {
+ // Ordinal represents an index in manifests list, so the condition can still be linked
+ // to a manifest even though manifest cannot be parsed successfully.
+ // +kubebuilder:validation:Minimum=0
+ // +required
+ Ordinal int `json:"ordinal"`
+
+ // Group is the group of the resource.
+ // +optional
+ Group string `json:"group,omitempty"`
+
+ // Version is the version of the resource.
+ // +optional
+ Version string `json:"version,omitempty"`
+
+ // Kind is the kind of the resource.
+ // +optional
+ Kind string `json:"kind,omitempty"`
+
+ // Resource is the resource type of the resource
+ // +optional
+ Resource string `json:"resource,omitempty"`
+
+ // Namespace is the namespace of the resource
+ // +optional
+ Namespace string `json:"namespace,omitempty"`
+
+ // Name is the name of the resource
+ // +optional
+ Name string `json:"name,omitempty"`
+}
+
+type ManifestCondition string
+
+const (
+ // EdgeAppProcessing represents that the manifest is under processing and currently
+ // the status of this manifest does not match the desired.
+ EdgeAppProcessing ManifestCondition = "Processing"
+ // EdgeAppAvailable represents that the manifest has been applied successfully and the current
+ // status matches the desired.
+ EdgeAppAvailable ManifestCondition = "Available"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
+// +kubebuilder:subresource:status
+// +kubebuilder:resource:shortName=eapp
+
+// EdgeApplication is the Schema for the edgeapplications API
+type EdgeApplication struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec represents the desired behavior of EdgeApplication.
+ // +required
+ Spec EdgeApplicationSpec `json:"spec,omitempty"`
+ // Status represents the status of PropagationStatus.
+ // +optional
+ Status EdgeApplicationStatus `json:"status,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// EdgeApplicationList contains a list of EdgeApplication
+type EdgeApplicationList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []EdgeApplication `json:"items"`
+}
diff --git a/staging/src/github.com/kubeedge/api/apps/v1alpha1/nodegroup_types.go b/staging/src/github.com/kubeedge/api/apps/v1alpha1/nodegroup_types.go
new file mode 100644
index 000000000..2c9d059e9
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/apps/v1alpha1/nodegroup_types.go
@@ -0,0 +1,112 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// NodeGroupSpec defines the desired state of NodeGroup
+type NodeGroupSpec struct {
+ // Nodes contains names of all the nodes in the nodegroup.
+ // +optional
+ Nodes []string `json:"nodes,omitempty"`
+
+ // MatchLabels are used to select nodes that have these labels.
+ // +optional
+ MatchLabels map[string]string `json:"matchLabels,omitempty"`
+}
+
+// NodeGroupStatus contains the observed status of all selected nodes in
+// this NodeGroup, including nodes that have been one of the members of this NodeGroup
+// and those have not.
+type NodeGroupStatus struct {
+ // NodeStatuses is a status list of all selected nodes.
+ // +optional
+ NodeStatuses []NodeStatus `json:"nodeStatuses,omitempty"`
+}
+
+// NodeStatus contains status of node that selected by this NodeGroup.
+type NodeStatus struct {
+ // NodeName contains name of this node.
+ // +required
+ NodeName string `json:"nodeName"`
+ // ReadyStatus contains ready status of this node.
+ // +required
+ ReadyStatus ReadyStatus `json:"readyStatus"`
+ // SelectionStatus contains status of the selection result for this node.
+ // +required
+ SelectionStatus SelectionStatus `json:"selectionStatus"`
+ // SelectionStatusReason contains human-readable reason for this SelectionStatus.
+ // +optional
+ SelectionStatusReason string `json:"selectionStatusReason,omitempty"`
+}
+
+// ReadyStatus represents the healthy status of node.
+type ReadyStatus string
+
+const (
+ // NodeReady indicates that this node is ready.
+ NodeReady ReadyStatus = "Ready"
+
+ // NodeNotReady indicates that this node is not ready.
+ NodeNotReady ReadyStatus = "NotReady"
+
+ // Unknown indicates that the status of this node is unknown.
+ Unknown ReadyStatus = "Unknown"
+)
+
+// SelectionStatus represents the status of selecting a node as a member of this NodeGroup.
+type SelectionStatus string
+
+const (
+ // SucceededSelection represents that this node has been selected as a member of this NodeGroup.
+ SucceededSelection SelectionStatus = "Succeeded"
+ // FailedSelection represents that this node failed to become a member of this NodeGroup.
+ FailedSelection SelectionStatus = "Failed"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
+// +kubebuilder:subresource:status
+// +kubebuilder:resource:scope=Cluster,shortName=ng
+
+// NodeGroup is the Schema for the nodegroups API
+type NodeGroup struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec represents the specification of the desired behavior of member nodegroup.
+ // +required
+ Spec NodeGroupSpec `json:"spec,omitempty"`
+
+ // Status represents the status of member nodegroup.
+ // +optional
+ Status NodeGroupStatus `json:"status,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// NodeGroupList contains a list of NodeGroup
+type NodeGroupList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []NodeGroup `json:"items"`
+}
diff --git a/staging/src/github.com/kubeedge/api/apps/v1alpha1/register.go b/staging/src/github.com/kubeedge/api/apps/v1alpha1/register.go
new file mode 100644
index 000000000..df43c8cdb
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/apps/v1alpha1/register.go
@@ -0,0 +1,69 @@
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by register-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName specifies the group name used to register the objects.
+const GroupName = "apps.kubeedge.io"
+
+// GroupVersion specifies the group and the version used to register the objects.
+var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// SchemeGroupVersion is group version used to register these objects
+// Deprecated: use GroupVersion instead.
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ // Depreciated: use Install instead
+ AddToScheme = localSchemeBuilder.AddToScheme
+ Install = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Adds the list of known types to Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &EdgeApplication{},
+ &EdgeApplicationList{},
+ &NodeGroup{},
+ &NodeGroupList{},
+ )
+ // AddToGroupVersion allows the serialization of client types like ListOptions.
+ v1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/apps/v1alpha1/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/apps/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..bedad63d2
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/apps/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,520 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/api/core/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CommandArgsOverrider) DeepCopyInto(out *CommandArgsOverrider) {
+ *out = *in
+ if in.Value != nil {
+ in, out := &in.Value, &out.Value
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandArgsOverrider.
+func (in *CommandArgsOverrider) DeepCopy() *CommandArgsOverrider {
+ if in == nil {
+ return nil
+ }
+ out := new(CommandArgsOverrider)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EdgeApplication) DeepCopyInto(out *EdgeApplication) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EdgeApplication.
+func (in *EdgeApplication) DeepCopy() *EdgeApplication {
+ if in == nil {
+ return nil
+ }
+ out := new(EdgeApplication)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *EdgeApplication) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EdgeApplicationList) DeepCopyInto(out *EdgeApplicationList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]EdgeApplication, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EdgeApplicationList.
+func (in *EdgeApplicationList) DeepCopy() *EdgeApplicationList {
+ if in == nil {
+ return nil
+ }
+ out := new(EdgeApplicationList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *EdgeApplicationList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EdgeApplicationSpec) DeepCopyInto(out *EdgeApplicationSpec) {
+ *out = *in
+ in.WorkloadTemplate.DeepCopyInto(&out.WorkloadTemplate)
+ in.WorkloadScope.DeepCopyInto(&out.WorkloadScope)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EdgeApplicationSpec.
+func (in *EdgeApplicationSpec) DeepCopy() *EdgeApplicationSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(EdgeApplicationSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EdgeApplicationStatus) DeepCopyInto(out *EdgeApplicationStatus) {
+ *out = *in
+ if in.WorkloadStatus != nil {
+ in, out := &in.WorkloadStatus, &out.WorkloadStatus
+ *out = make([]ManifestStatus, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EdgeApplicationStatus.
+func (in *EdgeApplicationStatus) DeepCopy() *EdgeApplicationStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(EdgeApplicationStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EnvOverrider) DeepCopyInto(out *EnvOverrider) {
+ *out = *in
+ if in.Value != nil {
+ in, out := &in.Value, &out.Value
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvOverrider.
+func (in *EnvOverrider) DeepCopy() *EnvOverrider {
+ if in == nil {
+ return nil
+ }
+ out := new(EnvOverrider)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImageOverrider) DeepCopyInto(out *ImageOverrider) {
+ *out = *in
+ if in.Predicate != nil {
+ in, out := &in.Predicate, &out.Predicate
+ *out = new(ImagePredicate)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageOverrider.
+func (in *ImageOverrider) DeepCopy() *ImageOverrider {
+ if in == nil {
+ return nil
+ }
+ out := new(ImageOverrider)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePredicate) DeepCopyInto(out *ImagePredicate) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePredicate.
+func (in *ImagePredicate) DeepCopy() *ImagePredicate {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePredicate)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Manifest) DeepCopyInto(out *Manifest) {
+ *out = *in
+ in.RawExtension.DeepCopyInto(&out.RawExtension)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
+func (in *Manifest) DeepCopy() *Manifest {
+ if in == nil {
+ return nil
+ }
+ out := new(Manifest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ManifestStatus) DeepCopyInto(out *ManifestStatus) {
+ *out = *in
+ out.Identifier = in.Identifier
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestStatus.
+func (in *ManifestStatus) DeepCopy() *ManifestStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ManifestStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeGroup) DeepCopyInto(out *NodeGroup) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroup.
+func (in *NodeGroup) DeepCopy() *NodeGroup {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeGroup)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *NodeGroup) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeGroupList) DeepCopyInto(out *NodeGroupList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NodeGroup, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupList.
+func (in *NodeGroupList) DeepCopy() *NodeGroupList {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeGroupList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *NodeGroupList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeGroupSpec) DeepCopyInto(out *NodeGroupSpec) {
+ *out = *in
+ if in.Nodes != nil {
+ in, out := &in.Nodes, &out.Nodes
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.MatchLabels != nil {
+ in, out := &in.MatchLabels, &out.MatchLabels
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupSpec.
+func (in *NodeGroupSpec) DeepCopy() *NodeGroupSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeGroupSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeGroupStatus) DeepCopyInto(out *NodeGroupStatus) {
+ *out = *in
+ if in.NodeStatuses != nil {
+ in, out := &in.NodeStatuses, &out.NodeStatuses
+ *out = make([]NodeStatus, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupStatus.
+func (in *NodeGroupStatus) DeepCopy() *NodeGroupStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeGroupStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
+func (in *NodeStatus) DeepCopy() *NodeStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Overriders) DeepCopyInto(out *Overriders) {
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int)
+ **out = **in
+ }
+ if in.ImageOverriders != nil {
+ in, out := &in.ImageOverriders, &out.ImageOverriders
+ *out = make([]ImageOverrider, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.EnvOverriders != nil {
+ in, out := &in.EnvOverriders, &out.EnvOverriders
+ *out = make([]EnvOverrider, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.CommandOverriders != nil {
+ in, out := &in.CommandOverriders, &out.CommandOverriders
+ *out = make([]CommandArgsOverrider, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.ArgsOverriders != nil {
+ in, out := &in.ArgsOverriders, &out.ArgsOverriders
+ *out = make([]CommandArgsOverrider, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.ResourcesOverriders != nil {
+ in, out := &in.ResourcesOverriders, &out.ResourcesOverriders
+ *out = make([]ResourcesOverrider, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Overriders.
+func (in *Overriders) DeepCopy() *Overriders {
+ if in == nil {
+ return nil
+ }
+ out := new(Overriders)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceIdentifier.
+func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceIdentifier)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceTemplate) DeepCopyInto(out *ResourceTemplate) {
+ *out = *in
+ if in.Manifests != nil {
+ in, out := &in.Manifests, &out.Manifests
+ *out = make([]Manifest, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTemplate.
+func (in *ResourceTemplate) DeepCopy() *ResourceTemplate {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceTemplate)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourcesOverrider) DeepCopyInto(out *ResourcesOverrider) {
+ *out = *in
+ in.Value.DeepCopyInto(&out.Value)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesOverrider.
+func (in *ResourcesOverrider) DeepCopy() *ResourcesOverrider {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourcesOverrider)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TargetNodeGroup) DeepCopyInto(out *TargetNodeGroup) {
+ *out = *in
+ in.Overriders.DeepCopyInto(&out.Overriders)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetNodeGroup.
+func (in *TargetNodeGroup) DeepCopy() *TargetNodeGroup {
+ if in == nil {
+ return nil
+ }
+ out := new(TargetNodeGroup)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *WorkloadScope) DeepCopyInto(out *WorkloadScope) {
+ *out = *in
+ if in.TargetNodeGroups != nil {
+ in, out := &in.TargetNodeGroups, &out.TargetNodeGroups
+ *out = make([]TargetNodeGroup, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadScope.
+func (in *WorkloadScope) DeepCopy() *WorkloadScope {
+ if in == nil {
+ return nil
+ }
+ out := new(WorkloadScope)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/common.go b/staging/src/github.com/kubeedge/api/common.go
new file mode 100644
index 000000000..6f556a651
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/common.go
@@ -0,0 +1,3 @@
+package apis
+
+const ISO8601UTC = "2006-01-02T15:04:05Z"
diff --git a/staging/src/github.com/kubeedge/api/common/constants/default.go b/staging/src/github.com/kubeedge/api/common/constants/default.go
new file mode 100644
index 000000000..d0820fefd
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/common/constants/default.go
@@ -0,0 +1,178 @@
+package constants
+
+import (
+ "time"
+
+ v1 "k8s.io/api/core/v1"
+)
+
+// Module name and group name
+const (
+ // SyncController
+ DefaultContextSendModuleName = "cloudhub"
+
+ ProjectName = "KubeEdge"
+
+ SystemName = "kubeedge"
+ SystemNamespace = SystemName
+
+ CloudConfigMapName = "cloudcore"
+ EdgeMappingCloudKey = "cloudcore"
+
+ // runtime
+ DockerContainerRuntime = "docker"
+ RemoteContainerRuntime = "remote"
+)
+
+// Resources
+const (
+ DefaultCAURL = "/ca.crt"
+ DefaultCertURL = "/edge.crt"
+ DefaultNodeUpgradeURL = "/nodeupgrade"
+ DefaultTaskStateReportURL = "/task/{taskType}/name/{taskID}/node/{nodeID}/status"
+ DefaultServiceAccountIssuer = "https://kubernetes.default.svc.cluster.local"
+
+ // Edged
+ DefaultDockerAddress = "unix:///var/run/docker.sock"
+ DefaultDockershimRootDir = "/var/lib/dockershim"
+ DefaultRuntimeType = "remote"
+ DefaultEdgedMemoryCapacity = 7852396000
+ // DefaultMosquittoImage ...
+ // Deprecated: the mqtt broker is alreay managed by the DaemonSet in the cloud
+ DefaultMosquittoImage = "eclipse-mosquitto:1.6.15"
+ // update PodSandboxImage version when bumping k8s vendor version, consistent with vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go defaultPodSandboxImageVersion
+ // When this value are updated, also update comments in pkg/apis/componentconfig/edgecore/v1alpha1/types.go
+ DefaultPodSandboxImage = "kubeedge/pause:3.6"
+ DefaultImagePullProgressDeadline = time.Minute
+ DefaultImageGCHighThreshold = 80
+ DefaultImageGCLowThreshold = 40
+ DefaultMaximumDeadContainersPerPod = 1
+ DefaultHostnameOverride = "default-edge-node"
+ DefaultRegisterNodeNamespace = "default"
+ DefaultNetworkPluginMTU = 1500
+ DefaultConcurrentConsumers = 5
+ DefaultCgroupRoot = ""
+ DefaultVolumeStatsAggPeriod = time.Minute
+ DefaultTunnelPort = 10004
+ DefaultClusterDomain = "cluster.local"
+
+ CurrentSupportK8sVersion = "v1.29.5"
+
+ // MetaManager
+ DefaultRemoteQueryTimeout = 60
+ DefaultMetaServerAddr = "127.0.0.1:10550"
+ DefaultDummyServerAddr = "169.254.30.10:10550"
+
+ // Config
+ DefaultKubeContentType = "application/vnd.kubernetes.protobuf"
+ DefaultKubeNamespace = v1.NamespaceAll
+ DefaultKubeQPS = 100.0
+ DefaultKubeBurst = 200
+ DefaultNodeLimit = 500
+ DefaultKubeUpdateNodeFrequency = 20
+
+ // EdgeController
+ DefaultUpdatePodStatusWorkers = 1
+ DefaultUpdateNodeStatusWorkers = 1
+ DefaultQueryConfigMapWorkers = 100
+ DefaultQuerySecretWorkers = 100
+ DefaultQueryPersistentVolumeWorkers = 4
+ DefaultQueryPersistentVolumeClaimWorkers = 4
+ DefaultQueryVolumeAttachmentWorkers = 4
+ DefaultCreateNodeWorkers = 100
+ DefaultUpdateNodeWorkers = 4
+ DefaultPatchPodWorkers = 100
+ DefaultDeletePodWorkers = 100
+ DefaultUpdateRuleStatusWorkers = 4
+ DefaultQueryLeaseWorkers = 100
+ DefaultServiceAccountTokenWorkers = 100
+ DefaultCreatePodWorkers = 4
+ DefaultCertificateSigningRequestWorkers = 4
+
+ DefaultUpdatePodStatusBuffer = 1024
+ DefaultUpdateNodeStatusBuffer = 1024
+ DefaultQueryConfigMapBuffer = 1024
+ DefaultQuerySecretBuffer = 1024
+ DefaultQueryPersistentVolumeBuffer = 1024
+ DefaultQueryPersistentVolumeClaimBuffer = 1024
+ DefaultQueryVolumeAttachmentBuffer = 1024
+ DefaultCreateNodeBuffer = 1024
+ DefaultUpdateNodeBuffer = 1024
+ DefaultPatchPodBuffer = 1024
+ DefaultDeletePodBuffer = 1024
+ DefaultQueryLeaseBuffer = 1024
+ DefaultServiceAccountTokenBuffer = 1024
+ DefaultCreatePodBuffer = 1024
+ DefaultCertificateSigningRequestBuffer = 1024
+
+ DefaultPodEventBuffer = 1
+ DefaultConfigMapEventBuffer = 1
+ DefaultSecretEventBuffer = 1
+ DefaultRulesEventBuffer = 1
+ DefaultRuleEndpointsEventBuffer = 1
+
+ // DeviceController
+ DefaultUpdateDeviceTwinsBuffer = 1024
+ DefaultUpdateDeviceStatesBuffer = 1024
+ DefaultDeviceEventBuffer = 1
+ DefaultDeviceModelEventBuffer = 1
+ DefaultUpdateDeviceStatusWorkers = 1
+
+ // TaskManager
+ DefaultNodeUpgradeJobStatusBuffer = 1024
+ DefaultNodeUpgradeJobEventBuffer = 1
+ DefaultNodeUpgradeJobWorkers = 1
+
+ // ImagePrePullController
+ DefaultImagePrePullJobStatusBuffer = 1024
+ DefaultImagePrePullJobEventBuffer = 1
+ DefaultImagePrePullJobWorkers = 1
+
+ // Resource sep
+ ResourceSep = "/"
+
+ ResourceTypeService = "service"
+ ResourceTypeEndpoints = "endpoints"
+
+ ResourceTypePersistentVolume = "persistentvolume"
+ ResourceTypePersistentVolumeClaim = "persistentvolumeclaim"
+ ResourceTypeVolumeAttachment = "volumeattachment"
+
+ CSIResourceTypeVolume = "volume"
+ CSIOperationTypeCreateVolume = "createvolume"
+ CSIOperationTypeDeleteVolume = "deletevolume"
+ CSIOperationTypeControllerPublishVolume = "controllerpublishvolume"
+ CSIOperationTypeControllerUnpublishVolume = "controllerunpublishvolume"
+ CSISyncMsgRespTimeout = 1 * time.Minute
+
+ ServerAddress = "127.0.0.1"
+ // ServerPort is the default port for the edgecore server on each host machine.
+ // May be overridden by a flag at startup in the future.
+ ServerPort = 10350
+
+ // MessageSuccessfulContent is the successful content value of Message struct
+ MessageSuccessfulContent string = "OK"
+ DefaultQPS = 30
+ DefaultBurst = 60
+ // MaxRespBodyLength is the max length of http response body
+ MaxRespBodyLength = 1 << 20 // 1 MiB
+
+ EdgeNodeRoleKey = "node-role.kubernetes.io/edge"
+ EdgeNodeRoleValue = ""
+
+ // DefaultMosquittoContainerName ...
+ // Deprecated: the mqtt broker is alreay managed by the DaemonSet in the cloud
+ DefaultMosquittoContainerName = "mqtt-kubeedge"
+ // DeployMqttContainerEnv ...
+ // Deprecated: the mqtt broker is alreay managed by the DaemonSet in the cloud
+ DeployMqttContainerEnv = "DEPLOY_MQTT_CONTAINER"
+
+ // EdgeHub
+ DefaultWebSocketPort = 10000
+ DefaultQuicPort = 10001
+
+ // DeviceTwin
+ DefaultDMISockPath = "/etc/kubeedge/dmi.sock"
+)
+
+const ISO8601UTC = "2006-01-02T15:04:05Z"
diff --git a/staging/src/github.com/kubeedge/api/common/constants/default_others.go b/staging/src/github.com/kubeedge/api/common/constants/default_others.go
new file mode 100644
index 000000000..ed6891818
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/common/constants/default_others.go
@@ -0,0 +1,36 @@
+//go:build !windows
+
+package constants
+
+// Resources
+const (
+ // Certificates
+ DefaultConfigDir = "/etc/kubeedge/config/"
+ DefaultCAFile = "/etc/kubeedge/ca/rootCA.crt"
+ DefaultCAKeyFile = "/etc/kubeedge/ca/rootCA.key"
+ DefaultCertFile = "/etc/kubeedge/certs/server.crt"
+ DefaultKeyFile = "/etc/kubeedge/certs/server.key"
+
+ DefaultStreamCAFile = "/etc/kubeedge/ca/streamCA.crt"
+ DefaultStreamCertFile = "/etc/kubeedge/certs/stream.crt"
+ DefaultStreamKeyFile = "/etc/kubeedge/certs/stream.key"
+
+ DefaultMqttCAFile = "/etc/kubeedge/ca/rootCA.crt"
+ DefaultMqttCertFile = "/etc/kubeedge/certs/server.crt"
+ DefaultMqttKeyFile = "/etc/kubeedge/certs/server.key"
+
+ // Bootstrap file, contains token used by edgecore to apply for ca/cert
+ BootstrapFile = "/etc/kubeedge/bootstrap-edgecore.conf"
+
+ // Edged
+ DefaultRootDir = "/var/lib/edged"
+ DefaultRemoteRuntimeEndpoint = "unix:///run/containerd/containerd.sock"
+ DefaultRemoteImageEndpoint = "unix:///run/containerd/containerd.sock"
+ DefaultCNIConfDir = "/etc/cni/net.d"
+ DefaultCNIBinDir = "/opt/cni/bin"
+ DefaultCNICacheDir = "/var/lib/cni/cache"
+ DefaultVolumePluginDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
+
+ // DefaultManifestsDir edge node default static pod path
+ DefaultManifestsDir = "/etc/kubeedge/manifests"
+)
diff --git a/staging/src/github.com/kubeedge/api/common/constants/default_windows.go b/staging/src/github.com/kubeedge/api/common/constants/default_windows.go
new file mode 100644
index 000000000..54e0400d5
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/common/constants/default_windows.go
@@ -0,0 +1,39 @@
+//go:build windows
+
+package constants
+
+// Module name and group name
+const ()
+
+// Resources
+const (
+ // Certificates
+ DefaultConfigDir = "c:\\etc\\kubeedge\\config\\"
+ DefaultCAFile = "c:\\etc\\kubeedge\\ca\\rootCA.crt"
+ DefaultCAKeyFile = "c:\\etc\\kubeedge\\ca\\rootCA.key"
+ DefaultCertFile = "c:\\etc\\kubeedge\\certs\\server.crt"
+ DefaultKeyFile = "c:\\etc\\kubeedge\\certs\\server.key"
+
+ DefaultStreamCAFile = "c:\\etc\\kubeedge\\ca\\streamCA.crt"
+ DefaultStreamCertFile = "c:\\etc\\kubeedge\\certs\\stream.crt"
+ DefaultStreamKeyFile = "c:\\etc\\kubeedge\\certs\\stream.key"
+
+ DefaultMqttCAFile = "c:\\etc\\kubeedge\\ca\\rootCA.crt"
+ DefaultMqttCertFile = "c:\\etc\\kubeedge\\certs\\server.crt"
+ DefaultMqttKeyFile = "c:\\etc\\kubeedge\\certs\\server.key"
+
+ // Bootstrap file, contains token used by edgecore to apply for ca/cert
+ BootstrapFile = "c:\\etc\\kubeedge\\bootstrap-edgecore.conf"
+
+ // Edged
+ DefaultRootDir = "c:\\var\\lib\\edged"
+ DefaultRemoteRuntimeEndpoint = "npipe://./pipe/containerd-containerd"
+ DefaultRemoteImageEndpoint = "npipe://./pipe/containerd-containerd"
+ DefaultCNIConfDir = "c:\\etc\\cni\\net.d"
+ DefaultCNIBinDir = "c:\\opt\\cni\\bin"
+ DefaultCNICacheDir = "c:\\var\\lib\\cni\\cache"
+ DefaultVolumePluginDir = "C:\\usr\\libexec\\kubernetes\\kubelet-plugins\\volume\\exec\\"
+
+ // DefaultManifestsDir edge node default static pod path
+ DefaultManifestsDir = "c:\\etc\\kubeedge\\manifests\\"
+)
diff --git a/staging/src/github.com/kubeedge/api/common/types/http.go b/staging/src/github.com/kubeedge/api/common/types/http.go
new file mode 100644
index 000000000..e1faa7f6c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/common/types/http.go
@@ -0,0 +1,24 @@
+package types
+
+import "net/http"
+
+// HTTPRequest is used structure used to unmarshal message content from cloud
+type HTTPRequest struct {
+ Header http.Header `json:"header"`
+ Body []byte `json:"body"`
+ Method string `json:"method"`
+ URL string `json:"url"`
+}
+
+// HTTPResponse is HTTP request's response structure used to send response to cloud
+type HTTPResponse struct {
+ Header http.Header `json:"header"`
+ StatusCode int `json:"status_code"`
+ Body []byte `json:"body"`
+}
+
+const (
+ HeaderAuthorization = "Authorization"
+ HeaderNodeName = "NodeName"
+ HeaderExtKeyUsages = "ExtKeyUsages"
+)
diff --git a/staging/src/github.com/kubeedge/api/common/types/types.go b/staging/src/github.com/kubeedge/api/common/types/types.go
new file mode 100644
index 000000000..630ea4343
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/common/types/types.go
@@ -0,0 +1,112 @@
+package types
+
+import (
+ v1 "k8s.io/api/core/v1"
+ "k8s.io/apimachinery/pkg/api/resource"
+ metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+
+ api "github.com/kubeedge/api/fsm/v1alpha1"
+ "github.com/kubeedge/api/operations/v1alpha1"
+)
+
+// PodStatusRequest is Message.Content which comes from edge
+type PodStatusRequest struct {
+ UID types.UID
+ Name string
+ Status v1.PodStatus
+}
+
+// ExtendResource is the extended resource detail that comes from edge
+type ExtendResource struct {
+ Name string `json:"name,omitempty"`
+ Type string `json:"type,omitempty"`
+ Capacity resource.Quantity `json:"capacity,omitempty"`
+}
+
+// NodeStatusRequest is Message.Content which comes from edge
+type NodeStatusRequest struct {
+ UID types.UID
+ Status v1.NodeStatus
+ ExtendResources map[v1.ResourceName][]ExtendResource
+}
+
+// NodeUpgradeJobRequest is upgrade msg coming from cloud to edge
+type NodeUpgradeJobRequest struct {
+ UpgradeID string
+ HistoryID string
+ Version string
+ UpgradeTool string
+ Image string
+}
+
+// NodeUpgradeJobResponse is used to report status msg to cloudhub https service
+type NodeUpgradeJobResponse struct {
+ UpgradeID string
+ HistoryID string
+ NodeName string
+ FromVersion string
+ ToVersion string
+ Status string
+ Reason string
+}
+
+// NodePreCheckRequest is pre-check msg coming from cloud to edge
+type NodePreCheckRequest struct {
+ CheckItem []string
+}
+
+type NodeTaskRequest struct {
+ TaskID string
+ Type string
+ State string
+ Item interface{}
+}
+
+type NodeTaskResponse struct {
+ // NodeName is the name of edge node.
+ NodeName string
+ // State represents for the upgrade state phase of the edge node.
+ // There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
+ State api.State
+ // Event represents for the event of the ImagePrePullJob.
+ // There are three possible event values: Init, Check, Pull.
+ Event string
+ // Action represents for the action of the ImagePrePullJob.
+ // There are three possible action values: Success, Failure, TimeOut.
+ Action api.Action
+ // Reason represents for the reason of the ImagePrePullJob.
+ Reason string
+ // Time represents for the running time of the ImagePrePullJob.
+ Time string
+
+ ExternalMessage string
+}
+
+// ObjectResp is the object that api-server response
+type ObjectResp struct {
+ Object metaV1.Object
+ Err error
+}
+
+// ImagePrePullJobRequest is image prepull msg from cloud to edge
+type ImagePrePullJobRequest struct {
+ Images []string
+ NodeName string
+ Secret string
+ RetryTimes int32
+ CheckItems []string
+}
+
+// ImagePrePullJobResponse is used to report status msg to cloudhub https service from each node
+type ImagePrePullJobResponse struct {
+ NodeName string
+ State string
+ Reason string
+ ImageStatus []v1alpha1.ImageStatus
+}
+
+type RestartResponse struct {
+ ErrMessages []string `json:"errMessages,omitempty"`
+ LogMessages []string `json:"LogMessages,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/OWNERS b/staging/src/github.com/kubeedge/api/componentconfig/OWNERS
new file mode 100644
index 000000000..0897c190b
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/OWNERS
@@ -0,0 +1,9 @@
+approvers:
+ - fisherxu
+ - kadisi
+ - kevin-wangzefeng
+reviewers:
+ - fisherxu
+ - kadisi
+ - kevin-wangzefeng
+ - kuramal
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/default.go b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/default.go
new file mode 100644
index 000000000..adf862696
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/default.go
@@ -0,0 +1,303 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "path"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ utilnet "k8s.io/apimachinery/pkg/util/net"
+
+ "github.com/kubeedge/api/common/constants"
+)
+
+// NewDefaultCloudCoreConfig returns a full CloudCoreConfig object
+func NewDefaultCloudCoreConfig() *CloudCoreConfig {
+ advertiseAddress, _ := utilnet.ChooseHostInterface()
+
+ c := &CloudCoreConfig{
+ TypeMeta: metav1.TypeMeta{
+ Kind: Kind,
+ APIVersion: path.Join(GroupName, APIVersion),
+ },
+ CommonConfig: &CommonConfig{
+ TunnelPort: constants.ServerPort,
+ MonitorServer: MonitorServer{
+ BindAddress: "127.0.0.1:9091",
+ EnableProfiling: false,
+ },
+ },
+ KubeAPIConfig: &KubeAPIConfig{
+ ContentType: constants.DefaultKubeContentType,
+ QPS: 5 * constants.DefaultNodeLimit,
+ Burst: 10 * constants.DefaultNodeLimit,
+ },
+ Modules: &Modules{
+ CloudHub: &CloudHub{
+ Enable: true,
+ KeepaliveInterval: 30,
+ NodeLimit: constants.DefaultNodeLimit,
+ TLSCAFile: constants.DefaultCAFile,
+ TLSCAKeyFile: constants.DefaultCAKeyFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ WriteTimeout: 30,
+ AdvertiseAddress: []string{advertiseAddress.String()},
+ DNSNames: []string{""},
+ EdgeCertSigningDuration: 365,
+ TokenRefreshDuration: 12,
+ Quic: &CloudHubQUIC{
+ Enable: false,
+ Address: "0.0.0.0",
+ Port: 10001,
+ MaxIncomingStreams: 10000,
+ },
+ UnixSocket: &CloudHubUnixSocket{
+ Enable: true,
+ Address: "unix:///var/lib/kubeedge/kubeedge.sock",
+ },
+ WebSocket: &CloudHubWebSocket{
+ Enable: true,
+ Port: 10000,
+ Address: "0.0.0.0",
+ },
+ HTTPS: &CloudHubHTTPS{
+ Enable: true,
+ Port: 10002,
+ Address: "0.0.0.0",
+ },
+ Authorization: &CloudHubAuthorization{
+ Enable: false,
+ Debug: true,
+ Modes: []AuthorizationMode{
+ {
+ Node: &NodeAuthorization{
+ Enable: true,
+ },
+ },
+ },
+ },
+ },
+ EdgeController: &EdgeController{
+ Enable: true,
+ NodeUpdateFrequency: 10,
+ Buffer: getDefaultEdgeControllerBuffer(constants.DefaultNodeLimit),
+ Load: getDefaultEdgeControllerLoad(constants.DefaultNodeLimit),
+ },
+ DeviceController: &DeviceController{
+ Enable: true,
+ Buffer: &DeviceControllerBuffer{
+ UpdateDeviceTwins: constants.DefaultUpdateDeviceTwinsBuffer,
+ UpdateDeviceStates: constants.DefaultUpdateDeviceStatesBuffer,
+ DeviceEvent: constants.DefaultDeviceEventBuffer,
+ DeviceModelEvent: constants.DefaultDeviceModelEventBuffer,
+ },
+ Load: &DeviceControllerLoad{
+ UpdateDeviceStatusWorkers: constants.DefaultUpdateDeviceStatusWorkers,
+ },
+ },
+ TaskManager: &TaskManager{
+ Enable: false,
+ Buffer: &TaskManagerBuffer{
+ TaskStatus: constants.DefaultNodeUpgradeJobStatusBuffer,
+ TaskEvent: constants.DefaultNodeUpgradeJobEventBuffer,
+ },
+ Load: &TaskManagerLoad{
+ TaskWorkers: constants.DefaultNodeUpgradeJobWorkers,
+ },
+ },
+ SyncController: &SyncController{
+ Enable: true,
+ },
+ DynamicController: &DynamicController{
+ Enable: false,
+ },
+ CloudStream: &CloudStream{
+ Enable: false,
+ TLSTunnelCAFile: constants.DefaultCAFile,
+ TLSTunnelCertFile: constants.DefaultCertFile,
+ TLSTunnelPrivateKeyFile: constants.DefaultKeyFile,
+ TunnelPort: constants.DefaultTunnelPort,
+ TLSStreamCAFile: constants.DefaultStreamCAFile,
+ TLSStreamCertFile: constants.DefaultStreamCertFile,
+ TLSStreamPrivateKeyFile: constants.DefaultStreamKeyFile,
+ StreamPort: 10003,
+ },
+ Router: &Router{
+ Enable: false,
+ Address: "0.0.0.0",
+ Port: 9443,
+ RestTimeout: 60,
+ },
+ IptablesManager: &IptablesManager{
+ Enable: true,
+ Mode: InternalMode,
+ },
+ },
+ }
+ return c
+}
+
+// NodeLimit is a maximum number of edge node that can connect to the single CloudCore
+// instance. You should take this parameter seriously, because this parameter is closely
+// related to the number of goroutines for upstream message processing.
+// getDefaultEdgeControllerLoad return Default EdgeControllerLoad based on nodeLimit
+func getDefaultEdgeControllerLoad(nodeLimit int32) *EdgeControllerLoad {
+ return &EdgeControllerLoad{
+ UpdatePodStatusWorkers: constants.DefaultUpdatePodStatusWorkers,
+ UpdateNodeStatusWorkers: constants.DefaultUpdateNodeStatusWorkers,
+ QueryConfigMapWorkers: constants.DefaultQueryConfigMapWorkers,
+ QuerySecretWorkers: constants.DefaultQuerySecretWorkers,
+ QueryPersistentVolumeWorkers: constants.DefaultQueryPersistentVolumeWorkers,
+ QueryPersistentVolumeClaimWorkers: constants.DefaultQueryPersistentVolumeClaimWorkers,
+ QueryVolumeAttachmentWorkers: constants.DefaultQueryVolumeAttachmentWorkers,
+ QueryNodeWorkers: nodeLimit,
+ CreateNodeWorkers: constants.DefaultCreateNodeWorkers,
+ PatchNodeWorkers: 100 + nodeLimit/50,
+ UpdateNodeWorkers: constants.DefaultUpdateNodeWorkers,
+ PatchPodWorkers: constants.DefaultPatchPodWorkers,
+ DeletePodWorkers: constants.DefaultDeletePodWorkers,
+ CreateLeaseWorkers: nodeLimit,
+ QueryLeaseWorkers: constants.DefaultQueryLeaseWorkers,
+ UpdateRuleStatusWorkers: constants.DefaultUpdateRuleStatusWorkers,
+ ServiceAccountTokenWorkers: constants.DefaultServiceAccountTokenWorkers,
+ CreatePodWorks: constants.DefaultCreatePodWorkers,
+ CertificateSigningRequestWorkers: constants.DefaultCertificateSigningRequestWorkers,
+ }
+}
+
+// getDefaultEdgeControllerBuffer return Default EdgeControllerBuffer based on nodeLimit
+func getDefaultEdgeControllerBuffer(nodeLimit int32) *EdgeControllerBuffer {
+ return &EdgeControllerBuffer{
+ UpdatePodStatus: constants.DefaultUpdatePodStatusBuffer,
+ UpdateNodeStatus: constants.DefaultUpdateNodeStatusBuffer,
+ QueryConfigMap: constants.DefaultQueryConfigMapBuffer,
+ QuerySecret: constants.DefaultQuerySecretBuffer,
+ PodEvent: constants.DefaultPodEventBuffer,
+ ConfigMapEvent: constants.DefaultConfigMapEventBuffer,
+ SecretEvent: constants.DefaultSecretEventBuffer,
+ RulesEvent: constants.DefaultRulesEventBuffer,
+ RuleEndpointsEvent: constants.DefaultRuleEndpointsEventBuffer,
+ QueryPersistentVolume: constants.DefaultQueryPersistentVolumeBuffer,
+ QueryPersistentVolumeClaim: constants.DefaultQueryPersistentVolumeClaimBuffer,
+ QueryVolumeAttachment: constants.DefaultQueryVolumeAttachmentBuffer,
+ CreateNode: constants.DefaultCreateNodeBuffer,
+ PatchNode: 1024 + nodeLimit/2,
+ QueryNode: 1024 + nodeLimit,
+ UpdateNode: constants.DefaultUpdateNodeBuffer,
+ PatchPod: constants.DefaultPatchPodBuffer,
+ DeletePod: constants.DefaultDeletePodBuffer,
+ CreateLease: 1024 + nodeLimit,
+ QueryLease: constants.DefaultQueryLeaseBuffer,
+ ServiceAccountToken: constants.DefaultServiceAccountTokenBuffer,
+ CreatePod: constants.DefaultCreatePodBuffer,
+ CertificateSigningRequest: constants.DefaultCertificateSigningRequestBuffer,
+ }
+}
+
+func AdjustCloudCoreConfig(c *CloudCoreConfig) bool {
+ changed := false
+ nodeLimit := c.Modules.CloudHub.NodeLimit
+
+ if c.KubeAPIConfig.QPS != 5*nodeLimit {
+ changed = true
+ c.KubeAPIConfig.QPS = 5 * nodeLimit
+ }
+
+ if c.KubeAPIConfig.Burst != 10*nodeLimit {
+ changed = true
+ c.KubeAPIConfig.Burst = 10 * nodeLimit
+ }
+
+ if c.Modules.EdgeController.Load.QueryNodeWorkers < nodeLimit {
+ changed = true
+ c.Modules.EdgeController.Load.QueryNodeWorkers = nodeLimit
+ }
+
+ if c.Modules.EdgeController.Load.PatchNodeWorkers < 100+nodeLimit/50 {
+ changed = true
+ c.Modules.EdgeController.Load.PatchNodeWorkers = 100 + nodeLimit/50
+ }
+
+ if c.Modules.EdgeController.Load.CreateLeaseWorkers < nodeLimit {
+ changed = true
+ c.Modules.EdgeController.Load.CreateLeaseWorkers = nodeLimit
+ }
+
+ if c.Modules.EdgeController.Buffer.PatchNode < 1024+nodeLimit/2 {
+ changed = true
+ c.Modules.EdgeController.Buffer.PatchNode = 1024 + nodeLimit/2
+ }
+
+ if c.Modules.EdgeController.Buffer.QueryNode < 1024+nodeLimit {
+ changed = true
+ c.Modules.EdgeController.Buffer.QueryNode = 1024 + nodeLimit
+ }
+
+ if c.Modules.EdgeController.Buffer.CreateLease < 1024+nodeLimit {
+ changed = true
+ c.Modules.EdgeController.Buffer.CreateLease = 1024 + nodeLimit
+ }
+
+ return changed
+}
+
+// NewMinCloudCoreConfig returns a min CloudCoreConfig object
+func NewMinCloudCoreConfig() *CloudCoreConfig {
+ advertiseAddress, _ := utilnet.ChooseHostInterface()
+
+ return &CloudCoreConfig{
+ TypeMeta: metav1.TypeMeta{
+ Kind: Kind,
+ APIVersion: path.Join(GroupName, APIVersion),
+ },
+ Modules: &Modules{
+ CloudHub: &CloudHub{
+ NodeLimit: 1000,
+ TLSCAFile: constants.DefaultCAFile,
+ TLSCAKeyFile: constants.DefaultCAKeyFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ AdvertiseAddress: []string{advertiseAddress.String()},
+ UnixSocket: &CloudHubUnixSocket{
+ Enable: true,
+ Address: "unix:///var/lib/kubeedge/kubeedge.sock",
+ },
+ WebSocket: &CloudHubWebSocket{
+ Enable: true,
+ Port: 10000,
+ Address: "0.0.0.0",
+ },
+ HTTPS: &CloudHubHTTPS{
+ Enable: true,
+ Port: 10002,
+ Address: "0.0.0.0",
+ },
+ },
+ Router: &Router{
+ Enable: false,
+ Address: "0.0.0.0",
+ Port: 9443,
+ RestTimeout: 60,
+ },
+ IptablesManager: &IptablesManager{
+ Enable: true,
+ Mode: InternalMode,
+ },
+ },
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/helper.go b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/helper.go
new file mode 100644
index 000000000..02d41f2d1
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/helper.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "encoding/json"
+ "errors"
+ "os"
+
+ "k8s.io/klog/v2"
+ "sigs.k8s.io/yaml"
+)
+
+type IptablesMgrMode string
+
+const (
+ InternalMode IptablesMgrMode = "internal"
+ ExternalMode IptablesMgrMode = "external"
+)
+
+func (c *CloudCoreConfig) Parse(filename string) error {
+ data, err := os.ReadFile(filename)
+ if err != nil {
+ klog.Errorf("Failed to read configfile %s: %v", filename, err)
+ return err
+ }
+ err = yaml.Unmarshal(data, c)
+ if err != nil {
+ klog.Errorf("Failed to unmarshal configfile %s: %v", filename, err)
+ return err
+ }
+ return nil
+}
+
+func (in *IptablesManager) UnmarshalJSON(data []byte) error {
+ if len(data) == 0 {
+ return nil
+ }
+
+ // Define a secondary type so that we don't end up with a recursive call to json.Unmarshal
+ type IM IptablesManager
+ var out = (*IM)(in)
+ err := json.Unmarshal(data, &out)
+ if err != nil {
+ return err
+ }
+
+ // Validate the valid enum values
+ switch in.Mode {
+ case InternalMode, ExternalMode:
+ return nil
+ default:
+ in.Mode = ""
+ return errors.New("invalid value for iptablesmgr mode")
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/register.go b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/register.go
new file mode 100644
index 000000000..00ddbb03b
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/register.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+const (
+ GroupName = "cloudcore.config.kubeedge.io"
+ APIVersion = "v1alpha1"
+ Kind = "CloudCore"
+)
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/types.go b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/types.go
new file mode 100644
index 000000000..95001e2cc
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/types.go
@@ -0,0 +1,546 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "time"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// CloudCoreConfig indicates the config of cloudCore which get from cloudCore config file
+type CloudCoreConfig struct {
+ metav1.TypeMeta
+ // CommonConfig indicates common config for all modules
+ // +Required
+ CommonConfig *CommonConfig `json:"commonConfig,omitempty"`
+ // KubeAPIConfig indicates the kubernetes cluster info which cloudCore will connected
+ // +Required
+ KubeAPIConfig *KubeAPIConfig `json:"kubeAPIConfig,omitempty"`
+ // Modules indicates cloudCore modules config
+ // +Required
+ Modules *Modules `json:"modules,omitempty"`
+ // FeatureGates is a map of feature names to bools that enable or disable alpha/experimental features.
+ FeatureGates map[string]bool `json:"featureGates,omitempty"`
+}
+
+// CommonConfig indicates common config for all modules
+type CommonConfig struct {
+ // TunnelPort indicates the port that the cloudcore tunnel listened
+ TunnelPort int `json:"tunnelPort,omitempty"`
+
+ // MonitorServer holds config that exposes prometheus metrics and pprof
+ MonitorServer MonitorServer `json:"monitorServer,omitempty"`
+}
+
+// MonitorServer indicates MonitorServer config
+type MonitorServer struct {
+ // BindAddress is the IP address and port for the monitor server to serve on,
+ // defaulting to 127.0.0.1:9091 (set to 0.0.0.0 for all interfaces)
+ BindAddress string `json:"bindAddress,omitempty"`
+
+ // EnableProfiling enables profiling via web interface on /debug/pprof handler.
+ // Profiling handlers will be handled by monitor server.
+ EnableProfiling bool `json:"enableProfiling,omitempty"`
+}
+
+// KubeAPIConfig indicates the configuration for interacting with k8s server
+type KubeAPIConfig struct {
+ // Master indicates the address of the Kubernetes API server (overrides any value in KubeConfig)
+ // such as https://127.0.0.1:8443
+ // default ""
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ Master string `json:"master"`
+ // ContentType indicates the ContentType of message transmission when interacting with k8s
+ // default "application/vnd.kubernetes.protobuf"
+ ContentType string `json:"contentType,omitempty"`
+ // QPS to while talking with kubernetes apiserver
+ // default 100
+ QPS int32 `json:"qps,omitempty"`
+ // Burst to use while talking with kubernetes apiserver
+ // default 200
+ Burst int32 `json:"burst,omitempty"`
+ // KubeConfig indicates the path to kubeConfig file with authorization and master location information.
+ // default "/root/.kube/config"
+ // +Required
+ KubeConfig string `json:"kubeConfig"`
+}
+
+// Modules indicates the modules of CloudCore will be use
+type Modules struct {
+ // CloudHub indicates CloudHub module config
+ CloudHub *CloudHub `json:"cloudHub,omitempty"`
+ // EdgeController indicates EdgeController module config
+ EdgeController *EdgeController `json:"edgeController,omitempty"`
+ // DeviceController indicates DeviceController module config
+ DeviceController *DeviceController `json:"deviceController,omitempty"`
+ // TaskManager indicates TaskManager module config
+ TaskManager *TaskManager `json:"taskManager,omitempty"`
+ // SyncController indicates SyncController module config
+ SyncController *SyncController `json:"syncController,omitempty"`
+ // DynamicController indicates DynamicController module config
+ DynamicController *DynamicController `json:"dynamicController,omitempty"`
+ // CloudStream indicates cloudstream module config
+ CloudStream *CloudStream `json:"cloudStream,omitempty"`
+ // Router indicates router module config
+ Router *Router `json:"router,omitempty"`
+ // IptablesManager indicates iptables module config
+ IptablesManager *IptablesManager `json:"iptablesManager,omitempty"`
+}
+
+// CloudHub indicates the config of CloudHub module.
+// CloudHub is a web socket or quic server responsible for watching changes at the cloud side,
+// caching and sending messages to EdgeHub.
+type CloudHub struct {
+ // Enable indicates whether CloudHub is enabled, if set to false (for debugging etc.),
+ // skip checking other CloudHub configs.
+ // default true
+ Enable bool `json:"enable"`
+ // KeepaliveInterval indicates keep-alive interval (second)
+ // default 30
+ KeepaliveInterval int32 `json:"keepaliveInterval,omitempty"`
+ // NodeLimit is a maximum number of edge node that can connect to the single CloudCore
+ // default 1000
+ NodeLimit int32 `json:"nodeLimit,omitempty"`
+ // TLSCAFile indicates ca file path
+ // default "/etc/kubeedge/ca/rootCA.crt"
+ TLSCAFile string `json:"tlsCAFile,omitempty"`
+ // TLSCAKeyFile indicates caKey file path
+ // default "/etc/kubeedge/ca/rootCA.key"
+ TLSCAKeyFile string `json:"tlsCAKeyFile,omitempty"`
+ // TLSPrivateKeyFile indicates key file path
+ // default "/etc/kubeedge/certs/server.crt"
+ TLSCertFile string `json:"tlsCertFile,omitempty"`
+ // TLSPrivateKeyFile indicates key file path
+ // default "/etc/kubeedge/certs/server.key"
+ TLSPrivateKeyFile string `json:"tlsPrivateKeyFile,omitempty"`
+ // WriteTimeout indicates write time (second)
+ // default 30
+ WriteTimeout int32 `json:"writeTimeout,omitempty"`
+ // Quic indicates quic server info
+ Quic *CloudHubQUIC `json:"quic,omitempty"`
+ // UnixSocket set unixsocket server info
+ UnixSocket *CloudHubUnixSocket `json:"unixsocket,omitempty"`
+ // WebSocket indicates websocket server info
+ // +Required
+ WebSocket *CloudHubWebSocket `json:"websocket,omitempty"`
+ // HTTPS indicates https server info
+ // +Required
+ HTTPS *CloudHubHTTPS `json:"https,omitempty"`
+ // AdvertiseAddress sets the IP address for the cloudcore to advertise.
+ AdvertiseAddress []string `json:"advertiseAddress,omitempty"`
+ // DNSNames sets the DNSNames for CloudCore.
+ DNSNames []string `json:"dnsNames,omitempty"`
+ // EdgeCertSigningDuration indicates the validity period of edge certificate
+ // default 365d
+ EdgeCertSigningDuration time.Duration `json:"edgeCertSigningDuration,omitempty"`
+ // TokenRefreshDuration indicates the interval of cloudcore token refresh, unit is hour
+ // default 12h
+ TokenRefreshDuration time.Duration `json:"tokenRefreshDuration,omitempty"`
+ // Authorization authz configurations
+ Authorization *CloudHubAuthorization `json:"authorization,omitempty"`
+}
+
+// CloudHubQUIC indicates the quic server config
+type CloudHubQUIC struct {
+ // Enable indicates whether enable quic protocol
+ // default false
+ Enable bool `json:"enable"`
+ // Address set server ip address
+ // default 0.0.0.0
+ Address string `json:"address,omitempty"`
+ // Port set open port for quic server
+ // default 10001
+ Port uint32 `json:"port,omitempty"`
+ // MaxIncomingStreams set the max incoming stream for quic server
+ // default 10000
+ MaxIncomingStreams int32 `json:"maxIncomingStreams,omitempty"`
+}
+
+// CloudHubUnixSocket indicates the unix socket config
+type CloudHubUnixSocket struct {
+ // Enable indicates whether enable unix domain socket protocol
+ // default true
+ Enable bool `json:"enable"`
+ // Address indicates unix domain socket address
+ // default "unix:///var/lib/kubeedge/kubeedge.sock"
+ Address string `json:"address,omitempty"`
+}
+
+// CloudHubWebSocket indicates the websocket config of CloudHub
+type CloudHubWebSocket struct {
+ // Enable indicates whether enable websocket protocol
+ // default true
+ Enable bool `json:"enable"`
+ // Address indicates server ip address
+ // default 0.0.0.0
+ Address string `json:"address,omitempty"`
+ // Port indicates the open port for websocket server
+ // default 10000
+ Port uint32 `json:"port,omitempty"`
+}
+
+// CloudHubHTTPS indicates the http config of CloudHub
+type CloudHubHTTPS struct {
+ // Enable indicates whether enable Https protocol
+ // default true
+ Enable bool `json:"enable"`
+ // Address indicates server ip address
+ // default 0.0.0.0
+ Address string `json:"address,omitempty"`
+ // Port indicates the open port for HTTPS server
+ // default 10002
+ Port uint32 `json:"port,omitempty"`
+}
+
+// CloudHubAuthorization CloudHub authz configurations
+type CloudHubAuthorization struct {
+ // Enable indicates whether enable CloudHub Authorization
+ // default false
+ Enable bool `json:"enable"`
+ // Debug only logs errors but always allow messages
+ // default false
+ Debug bool `json:"debug"`
+ // Modes a list of authorization modes will be used
+ // default node
+ Modes []AuthorizationMode `json:"modes"`
+}
+
+// AuthorizationMode indicates an authorization mdoe
+type AuthorizationMode struct {
+ // Node node authorization
+ Node *NodeAuthorization `json:"node,omitempty"`
+}
+
+// NodeAuthorization node authorization
+type NodeAuthorization struct {
+ // Enable enables node authorization
+ // default true
+ Enable bool `json:"enable"`
+}
+
+// EdgeController indicates the config of EdgeController module
+type EdgeController struct {
+ // Enable indicates whether EdgeController is enabled,
+ // if set to false (for debugging etc.), skip checking other EdgeController configs.
+ // default true
+ Enable bool `json:"enable"`
+ // NodeUpdateFrequency indicates node update frequency (second)
+ // default 10
+ NodeUpdateFrequency int32 `json:"nodeUpdateFrequency,omitempty"`
+ // Buffer indicates k8s resource buffer
+ Buffer *EdgeControllerBuffer `json:"buffer,omitempty"`
+ // Load indicates EdgeController load
+ Load *EdgeControllerLoad `json:"load,omitempty"`
+}
+
+// EdgeControllerBuffer indicates the EdgeController buffer
+type EdgeControllerBuffer struct {
+ // UpdatePodStatus indicates the buffer of pod status
+ // default 1024
+ UpdatePodStatus int32 `json:"updatePodStatus,omitempty"`
+ // UpdateNodeStatus indicates the buffer of update node status
+ // default 1024
+ UpdateNodeStatus int32 `json:"updateNodeStatus,omitempty"`
+ // QueryConfigMap indicates the buffer of query configMap
+ // default 1024
+ QueryConfigMap int32 `json:"queryConfigMap,omitempty"`
+ // QuerySecret indicates the buffer of query secret
+ // default 1024
+ QuerySecret int32 `json:"querySecret,omitempty"`
+ // PodEvent indicates the buffer of pod event
+ // default 1
+ PodEvent int32 `json:"podEvent,omitempty"`
+ // ConfigMapEvent indicates the buffer of configMap event
+ // default 1
+ ConfigMapEvent int32 `json:"configMapEvent,omitempty"`
+ // SecretEvent indicates the buffer of secret event
+ // default 1
+ SecretEvent int32 `json:"secretEvent,omitempty"`
+ // RulesEvent indicates the buffer of rule event
+ // default 1
+ RulesEvent int32 `json:"rulesEvent,omitempty"`
+ // RuleEndpointsEvent indicates the buffer of endpoint event
+ // default 1
+ RuleEndpointsEvent int32 `json:"ruleEndpointsEvent,omitempty"`
+ // QueryPersistentVolume indicates the buffer of query persistent volume
+ // default 1024
+ QueryPersistentVolume int32 `json:"queryPersistentVolume,omitempty"`
+ // QueryPersistentVolumeClaim indicates the buffer of query persistent volume claim
+ // default 1024
+ QueryPersistentVolumeClaim int32 `json:"queryPersistentVolumeClaim,omitempty"`
+ // QueryVolumeAttachment indicates the buffer of query volume attachment
+ // default 1024
+ QueryVolumeAttachment int32 `json:"queryVolumeAttachment,omitempty"`
+ // CreateNode indicates the buffer of create node
+ // default 1024
+ CreateNode int32 `json:"createNode,omitempty"`
+ // PatchNode indicates the buffer of patch node
+ // default 1024
+ PatchNode int32 `json:"patchNode,omitempty"`
+ // QueryNode indicates the buffer of query node
+ // default 1024
+ QueryNode int32 `json:"queryNode,omitempty"`
+ // UpdateNode indicates the buffer of update node
+ // default 1024
+ UpdateNode int32 `json:"updateNode,omitempty"`
+ // PatchPod indicates the buffer of patch pod
+ // default 1024
+ PatchPod int32 `json:"patchPod,omitempty"`
+ // DeletePod indicates the buffer of delete pod message from edge
+ // default 1024
+ DeletePod int32 `json:"deletePod,omitempty"`
+ // CreateLease indicates the buffer of create lease message from edge
+ // default 1024
+ CreateLease int32 `json:"createLease,omitempty"`
+ // QueryLease indicates the buffer of query lease message from edge
+ // default 1024
+ QueryLease int32 `json:"queryLease,omitempty"`
+ // ServiceAccount indicates the buffer of service account token
+ // default 1024
+ ServiceAccountToken int32 `json:"serviceAccountToken,omitempty"`
+ // CreatePod indicates the buffer of create pod
+ // default 1024
+ CreatePod int32 `json:"createPod,omitempty"`
+ // CertificateSigningRequest indicates the buffer of certificatesSigningRequest
+ // default 1024
+ CertificateSigningRequest int32 `json:"certificateSigningRequest,omitempty"`
+}
+
+// EdgeControllerLoad indicates the EdgeController load
+type EdgeControllerLoad struct {
+ // UpdatePodStatusWorkers indicates the load of update pod status workers
+ // default 1
+ UpdatePodStatusWorkers int32 `json:"updatePodStatusWorkers,omitempty"`
+ // UpdateNodeStatusWorkers indicates the load of update node status workers
+ // default 1
+ UpdateNodeStatusWorkers int32 `json:"updateNodeStatusWorkers,omitempty"`
+ // QueryConfigMapWorkers indicates the load of query config map workers
+ // default 4
+ QueryConfigMapWorkers int32 `json:"queryConfigMapWorkers,omitempty"`
+ // QuerySecretWorkers indicates the load of query secret workers
+ // default 4
+ QuerySecretWorkers int32 `json:"querySecretWorkers,omitempty"`
+ // QueryPersistentVolumeWorkers indicates the load of query persistent volume workers
+ // default 4
+ QueryPersistentVolumeWorkers int32 `json:"queryPersistentVolumeWorkers,omitempty"`
+ // QueryPersistentVolumeClaimWorkers indicates the load of query persistent volume claim workers
+ // default 4
+ QueryPersistentVolumeClaimWorkers int32 `json:"queryPersistentVolumeClaimWorkers,omitempty"`
+ // QueryVolumeAttachmentWorkers indicates the load of query volume attachment workers
+ // default 4
+ QueryVolumeAttachmentWorkers int32 `json:"queryVolumeAttachmentWorkers,omitempty"`
+ // CreateNodeWorkers indicates the load of create node workers
+ // default 4
+ CreateNodeWorkers int32 `json:"createNodeWorkers,omitempty"`
+ // PatchNodeWorkers indicates the load of patch node workers
+ // default 4
+ PatchNodeWorkers int32 `json:"patchNodeWorkers,omitempty"`
+ // QueryNodeWorkers indicates the load of query node workers
+ // default 4
+ QueryNodeWorkers int32 `json:"queryNodeWorkers,omitempty"`
+ // UpdateNodeWorkers indicates the load of update node workers
+ // default 4
+ UpdateNodeWorkers int32 `json:"updateNodeWorkers,omitempty"`
+ // PatchPodWorkers indicates the load of patch pod workers
+ // default 4
+ PatchPodWorkers int32 `json:"patchPodWorkers,omitempty"`
+ // DeletePodWorkers indicates the load of delete pod workers
+ // default 4
+ DeletePodWorkers int32 `json:"deletePodWorkers,omitempty"`
+ // CreateLeaseWorkers indicates the load of create lease workers
+ // default 4
+ CreateLeaseWorkers int32 `json:"createLeaseWorkers,omitempty"`
+ // QueryLeaseWorkers indicates the load of query lease workers
+ // default 4
+ QueryLeaseWorkers int32 `json:"queryLeaseWorkers,omitempty"`
+ // UpdateRuleStatusWorkers indicates the load of update rule status
+ // default 4
+ UpdateRuleStatusWorkers int32 `json:"UpdateRuleStatusWorkers,omitempty"`
+ // ServiceAccountTokenWorkers indicates the load of service account token
+ // default 4
+ ServiceAccountTokenWorkers int32 `json:"ServiceAccountTokenWorkers,omitempty"`
+ // CreatePodWorks indicates the load of create pod
+ // default 4
+ CreatePodWorks int32 `json:"CreatePodWorks,omitempty"`
+ // CertificateSigningRequestWorkers indicates the load of CertificateSigningRequest
+ // default 4
+ CertificateSigningRequestWorkers int32 `json:"certificateSigningRequestWorkers,omitempty"`
+}
+
+// DeviceController indicates the device controller
+type DeviceController struct {
+ // Enable indicates whether deviceController is enabled,
+ // if set to false (for debugging etc.), skip checking other deviceController configs.
+ // default true
+ Enable bool `json:"enable"`
+ // Buffer indicates Device controller buffer
+ Buffer *DeviceControllerBuffer `json:"buffer,omitempty"`
+ // Load indicates DeviceController Load
+ Load *DeviceControllerLoad `json:"load,omitempty"`
+}
+
+// DeviceControllerBuffer indicates deviceController buffer
+type DeviceControllerBuffer struct {
+ // UpdateDeviceTwins indicates the buffer of update device twins
+ // default 1024
+ UpdateDeviceTwins int32 `json:"updateDeviceTwins,omitempty"`
+ // UpdateDeviceStates indicates the buffer of update device states
+ // default 1024
+ UpdateDeviceStates int32 `json:"updateDeviceStatus,omitempty"`
+ // DeviceEvent indicates the buffer of device event
+ // default 1
+ DeviceEvent int32 `json:"deviceEvent,omitempty"`
+ // DeviceModelEvent indicates the buffer of device model event
+ // default 1
+ DeviceModelEvent int32 `json:"deviceModelEvent,omitempty"`
+}
+
+// DeviceControllerLoad indicates the deviceController load
+type DeviceControllerLoad struct {
+ // UpdateDeviceStatusWorkers indicates the load of update device status workers
+ // default 1
+ UpdateDeviceStatusWorkers int32 `json:"updateDeviceStatusWorkers,omitempty"`
+}
+
+// TaskManager indicates the operations controller
+type TaskManager struct {
+ // Enable indicates whether TaskManager is enabled,
+ // if set to false (for debugging etc.), skip checking other TaskManager configs.
+ // default false
+ Enable bool `json:"enable"`
+ // Buffer indicates Operation Controller buffer
+ Buffer *TaskManagerBuffer `json:"buffer,omitempty"`
+ // Load indicates Operation Controller Load
+ Load *TaskManagerLoad `json:"load,omitempty"`
+}
+
+// TaskManagerBuffer indicates TaskManager buffer
+type TaskManagerBuffer struct {
+ // TaskStatus indicates the buffer of update NodeUpgradeJob status
+ // default 1024
+ TaskStatus int32 `json:"taskStatus,omitempty"`
+ // TaskEvent indicates the buffer of NodeUpgradeJob event
+ // default 1
+ TaskEvent int32 `json:"taskEvent,omitempty"`
+}
+
+// TaskManagerLoad indicates the TaskManager load
+type TaskManagerLoad struct {
+ // TaskWorkers indicates the load of update NodeUpgradeJob workers
+ // default 1
+ TaskWorkers int32 `json:"taskWorkers,omitempty"`
+}
+
+// ImagePrePullController indicates the operations controller
+type ImagePrePullController struct {
+ // Enable indicates whether ImagePrePullController is enabled,
+ // if set to false (for debugging etc.), skip checking other ImagePrePullController configs.
+ // default false
+ Enable bool `json:"enable"`
+ // Buffer indicates Operation Controller buffer
+ Buffer *ImagePrePullControllerBuffer `json:"buffer,omitempty"`
+ // Load indicates Operation Controller Load
+ Load *ImagePrePullControllerLoad `json:"load,omitempty"`
+}
+
+// ImagePrePullControllerBuffer indicates ImagePrePullController buffer
+type ImagePrePullControllerBuffer struct {
+ // ImagePrePullJobStatus indicates the buffer of update ImagePrePullJob status
+ // default 1024
+ ImagePrePullJobStatus int32 `json:"imagePrePullJobStatus,omitempty"`
+ // ImagePrePullJobEvent indicates the buffer of ImagePrePullJob event
+ // default 1
+ ImagePrePullJobEvent int32 `json:"imagePrePullJobEvent,omitempty"`
+}
+
+// ImagePrePullControllerLoad indicates the ImagePrePullController load
+type ImagePrePullControllerLoad struct {
+ // ImagePrePullJobWorkers indicates the load of update ImagePrePullJob workers
+ // default 1
+ ImagePrePullJobWorkers int32 `json:"imagePrePullJobWorkers,omitempty"`
+}
+
+// SyncController indicates the sync controller
+type SyncController struct {
+ // Enable indicates whether syncController is enabled,
+ // if set to false (for debugging etc.), skip checking other syncController configs.
+ // default true
+ Enable bool `json:"enable"`
+}
+
+// DynamicController indicates the dynamic controller
+type DynamicController struct {
+ // Enable indicates whether dynamicController is enabled,
+ // if set to false (for debugging etc.), skip checking other dynamicController configs.
+ // default true
+ Enable bool `json:"enable"`
+}
+
+// CloudStream indicates the stream controller
+type CloudStream struct {
+ // Enable indicates whether cloudstream is enabled, if set to false (for debugging etc.), skip checking other configs.
+ // default true
+ Enable bool `json:"enable"`
+
+ // TLSTunnelCAFile indicates ca file path
+ // default /etc/kubeedge/ca/rootCA.crt
+ TLSTunnelCAFile string `json:"tlsTunnelCAFile,omitempty"`
+ // TLSTunnelCertFile indicates cert file path
+ // default /etc/kubeedge/certs/server.crt
+ TLSTunnelCertFile string `json:"tlsTunnelCertFile,omitempty"`
+ // TLSTunnelPrivateKeyFile indicates key file path
+ // default /etc/kubeedge/certs/server.key
+ TLSTunnelPrivateKeyFile string `json:"tlsTunnelPrivateKeyFile,omitempty"`
+ // TunnelPort set open port for tunnel server
+ // default 10004
+ TunnelPort uint32 `json:"tunnelPort,omitempty"`
+
+ // TLSStreamCAFile indicates kube-apiserver ca file path
+ // default /etc/kubeedge/ca/streamCA.crt
+ TLSStreamCAFile string `json:"tlsStreamCAFile,omitempty"`
+ // TLSStreamCertFile indicates cert file path
+ // default /etc/kubeedge/certs/stream.crt
+ TLSStreamCertFile string `json:"tlsStreamCertFile,omitempty"`
+ // TLSStreamPrivateKeyFile indicates key file path
+ // default /etc/kubeedge/certs/stream.key
+ TLSStreamPrivateKeyFile string `json:"tlsStreamPrivateKeyFile,omitempty"`
+ // StreamPort set open port for stream server
+ // default 10003
+ StreamPort uint32 `json:"streamPort,omitempty"`
+}
+
+type Router struct {
+ // default true
+ Enable bool `json:"enable"`
+ Address string `json:"address,omitempty"`
+ Port uint32 `json:"port,omitempty"`
+ RestTimeout uint32 `json:"restTimeout,omitempty"`
+}
+
+// IptablesManager indicates the config of Iptables
+type IptablesManager struct {
+ // Enable indicates whether enable IptablesManager
+ // default true
+ Enable bool `json:"enable"`
+ // It indicates how the component is deployed, valid mode can use "internal" or "external".
+ // The iptables manager component with the internal mode is always deployed inside the cloudcore, will share the host network, forward to the internal port of the tunnel port.
+ // The iptables manager component with the external mode is always deployed outside the cloudcore, will share the host network, forward to the internal cloudcore service and port.
+ // default internal.
+ // +kubebuilder:validation:Enum=internal;external
+ Mode IptablesMgrMode `json:"mode,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation.go b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation.go
new file mode 100644
index 000000000..8603ac1ac
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation.go
@@ -0,0 +1,216 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "net"
+ "os"
+ "path"
+ "path/filepath"
+ "strconv"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/klog/v2"
+ netutils "k8s.io/utils/net"
+
+ "github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1"
+ utilvalidation "github.com/kubeedge/api/util/validation"
+)
+
+// ValidateCloudCoreConfiguration validates `c` and returns an errorList if it is invalid
+func ValidateCloudCoreConfiguration(c *v1alpha1.CloudCoreConfig) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateKubeAPIConfig(*c.KubeAPIConfig)...)
+ allErrs = append(allErrs, ValidateCommonConfig(*c.CommonConfig)...)
+ allErrs = append(allErrs, ValidateModuleCloudHub(*c.Modules.CloudHub)...)
+ allErrs = append(allErrs, ValidateModuleEdgeController(*c.Modules.EdgeController)...)
+ allErrs = append(allErrs, ValidateModuleDeviceController(*c.Modules.DeviceController)...)
+ allErrs = append(allErrs, ValidateModuleSyncController(*c.Modules.SyncController)...)
+ allErrs = append(allErrs, ValidateModuleDynamicController(*c.Modules.DynamicController)...)
+ allErrs = append(allErrs, ValidateModuleCloudStream(*c.Modules.CloudStream)...)
+ return allErrs
+}
+
+func ValidateCommonConfig(c v1alpha1.CommonConfig) field.ErrorList {
+ return validateHostPort(c.MonitorServer.BindAddress, field.NewPath("monitorServer.bindAddress"))
+}
+
+func validateHostPort(input string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ hostIP, port, err := net.SplitHostPort(input)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, input, "must be IP:port"))
+ return allErrs
+ }
+
+ if ip := netutils.ParseIPSloppy(hostIP); ip == nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, hostIP, "must be a valid IP"))
+ }
+
+ if p, err := strconv.Atoi(port); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, port, "must be a valid port"))
+ } else if p < 1 || p > 65535 {
+ allErrs = append(allErrs, field.Invalid(fldPath, port, "must be a valid port"))
+ }
+
+ return allErrs
+}
+
+// ValidateModuleCloudHub validates `c` and returns an errorList if it is invalid
+func ValidateModuleCloudHub(c v1alpha1.CloudHub) field.ErrorList {
+ if !c.Enable {
+ return field.ErrorList{}
+ }
+
+ allErrs := field.ErrorList{}
+ validHTTPSPort := utilvalidation.IsValidPortNum(int(c.HTTPS.Port))
+ validWPort := utilvalidation.IsValidPortNum(int(c.WebSocket.Port))
+ validAddress := utilvalidation.IsValidIP(c.WebSocket.Address)
+ validQPort := utilvalidation.IsValidPortNum(int(c.Quic.Port))
+ validQAddress := utilvalidation.IsValidIP(c.Quic.Address)
+
+ if len(validHTTPSPort) > 0 {
+ for _, m := range validHTTPSPort {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("port"), c.HTTPS.Port, m))
+ }
+ }
+ if len(validWPort) > 0 {
+ for _, m := range validWPort {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("port"), c.WebSocket.Port, m))
+ }
+ }
+ if len(validAddress) > 0 {
+ for _, m := range validAddress {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("Address"), c.WebSocket.Address, m))
+ }
+ }
+ if len(validQPort) > 0 {
+ for _, m := range validQPort {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("port"), c.Quic.Port, m))
+ }
+ }
+ if len(validQAddress) > 0 {
+ for _, m := range validQAddress {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("Address"), c.Quic.Address, m))
+ }
+ }
+ if !strings.HasPrefix(strings.ToLower(c.UnixSocket.Address), "unix://") {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("address"),
+ c.UnixSocket.Address, "unixSocketAddress must has prefix unix://"))
+ }
+ s := strings.SplitN(c.UnixSocket.Address, "://", 2)
+ if len(s) > 1 && !utilvalidation.FileIsExist(path.Dir(s[1])) {
+ if err := os.MkdirAll(path.Dir(s[1]), os.ModePerm); err != nil {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("address"),
+ c.UnixSocket.Address, fmt.Sprintf("create unixSocketAddress %v dir %v error: %v",
+ c.UnixSocket.Address, path.Dir(s[1]), err)))
+ }
+ }
+ if c.TokenRefreshDuration <= 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("TokenRefreshDuration"),
+ c.TokenRefreshDuration, "TokenRefreshDuration must be positive"))
+ }
+ return allErrs
+}
+
+// ValidateModuleEdgeController validates `e` and returns an errorList if it is invalid
+func ValidateModuleEdgeController(e v1alpha1.EdgeController) field.ErrorList {
+ if !e.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ if e.NodeUpdateFrequency <= 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("NodeUpdateFrequency"), e.NodeUpdateFrequency, "NodeUpdateFrequency need > 0"))
+ }
+ return allErrs
+}
+
+// ValidateModuleDeviceController validates `d` and returns an errorList if it is invalid
+func ValidateModuleDeviceController(d v1alpha1.DeviceController) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleSyncController validates `d` and returns an errorList if it is invalid
+func ValidateModuleSyncController(d v1alpha1.SyncController) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleDynamicController validates `d` and returns an errorList if it is invalid
+func ValidateModuleDynamicController(d v1alpha1.DynamicController) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleCloudStream validates `d` and returns an errorList if it is invalid
+func ValidateModuleCloudStream(d v1alpha1.CloudStream) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+
+ allErrs := field.ErrorList{}
+
+ if !utilvalidation.FileIsExist(d.TLSTunnelPrivateKeyFile) {
+ klog.Warningf("TLSTunnelPrivateKeyFile does not exist in %s, will load from secret", d.TLSTunnelPrivateKeyFile)
+ }
+ if !utilvalidation.FileIsExist(d.TLSTunnelCertFile) {
+ klog.Warningf("TLSTunnelCertFile does not exist in %s, will load from secret", d.TLSTunnelCertFile)
+ }
+ if !utilvalidation.FileIsExist(d.TLSTunnelCAFile) {
+ klog.Warningf("TLSTunnelCAFile does not exist in %s, will load from secret", d.TLSTunnelCAFile)
+ }
+
+ if !utilvalidation.FileIsExist(d.TLSStreamPrivateKeyFile) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("TLSStreamPrivateKeyFile"), d.TLSStreamPrivateKeyFile, "TLSStreamPrivateKeyFile not exist"))
+ }
+ if !utilvalidation.FileIsExist(d.TLSStreamCertFile) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("TLSStreamCertFile"), d.TLSStreamCertFile, "TLSStreamCertFile not exist"))
+ }
+ if !utilvalidation.FileIsExist(d.TLSStreamCAFile) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("TLSStreamCAFile"), d.TLSStreamCAFile, "TLSStreamCAFile not exist"))
+ }
+
+ return allErrs
+}
+
+// ValidateKubeAPIConfig validates `k` and returns an errorList if it is invalid
+func ValidateKubeAPIConfig(k v1alpha1.KubeAPIConfig) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if k.KubeConfig != "" && !filepath.IsAbs(k.KubeConfig) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("kubeconfig"), k.KubeConfig, "kubeconfig need abs path"))
+ }
+ if k.KubeConfig != "" && !utilvalidation.FileIsExist(k.KubeConfig) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("kubeconfig"), k.KubeConfig, "kubeconfig not exist"))
+ }
+ return allErrs
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation_test.go b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation_test.go
new file mode 100644
index 000000000..d8ae5bf40
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1/validation/validation_test.go
@@ -0,0 +1,535 @@
+/*
+Copyright 2021 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "os"
+ "path/filepath"
+ "reflect"
+ "testing"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+
+ "github.com/kubeedge/api/componentconfig/cloudcore/v1alpha1"
+)
+
+func TestValidateCloudCoreConfiguration(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "existFile")
+ if err != nil {
+ t.Errorf("create temp file failed: %v", err)
+ return
+ }
+
+ config := v1alpha1.NewDefaultCloudCoreConfig()
+ config.Modules.CloudHub.UnixSocket.Address = "unix://" + ef.Name()
+ config.KubeAPIConfig.KubeConfig = ef.Name()
+
+ errList := ValidateCloudCoreConfiguration(config)
+ if len(errList) > 0 {
+ t.Errorf("cloudcore configuration is not correct: %v", errList)
+ }
+}
+
+func TestValidateModuleCloudHub(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "existFile")
+ if err != nil {
+ t.Errorf("create temp file failed: %v", err)
+ return
+ }
+ unixAddr := "unix://" + ef.Name()
+
+ cases := []struct {
+ name string
+ input v1alpha1.CloudHub
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.CloudHub{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 invalid https port",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 0,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: unixAddr,
+ },
+ TokenRefreshDuration: 1,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("port"), uint32(0), "must be between 1 and 65535, inclusive")},
+ },
+ {
+ name: "case3 invalid websocket port",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 10000,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 0,
+ Address: "127.0.0.1",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: unixAddr,
+ },
+ TokenRefreshDuration: 1,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("port"), uint32(0), "must be between 1 and 65535, inclusive")},
+ },
+ {
+ name: "case4 invalid websocket addr",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 10000,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 10002,
+ Address: "xxx.xxx.xxx.xxx",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: unixAddr,
+ },
+ TokenRefreshDuration: 1,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("Address"), "xxx.xxx.xxx.xxx", "must be a valid IP address, (e.g. 10.9.8.7)")},
+ },
+ {
+ name: "case5 invalid quic port",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 10000,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 0,
+ Address: "127.0.0.1",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: unixAddr,
+ },
+ TokenRefreshDuration: 1,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("port"), uint32(0), "must be between 1 and 65535, inclusive")},
+ },
+ {
+ name: "case6 invalid websocket addr",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 10000,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 10002,
+ Address: "xxx.xxx.xxx.xxx",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: unixAddr,
+ },
+ TokenRefreshDuration: 1,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("Address"), "xxx.xxx.xxx.xxx", "must be a valid IP address, (e.g. 10.9.8.7)")},
+ },
+ {
+ name: "case7 invalid unixSocketAddress",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 10000,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: "var/lib/kubeedge/kubeedge.sock",
+ },
+ TokenRefreshDuration: 1,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("address"),
+ "var/lib/kubeedge/kubeedge.sock", "unixSocketAddress must has prefix unix://")},
+ },
+ {
+ name: "case8 invalid TokenRefreshDuration",
+ input: v1alpha1.CloudHub{
+ Enable: true,
+ HTTPS: &v1alpha1.CloudHubHTTPS{
+ Port: 10000,
+ },
+ WebSocket: &v1alpha1.CloudHubWebSocket{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ Quic: &v1alpha1.CloudHubQUIC{
+ Port: 10002,
+ Address: "127.0.0.1",
+ },
+ UnixSocket: &v1alpha1.CloudHubUnixSocket{
+ Address: unixAddr,
+ },
+ TokenRefreshDuration: 0,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("TokenRefreshDuration"),
+ time.Duration(0), "TokenRefreshDuration must be positive")},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleCloudHub(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleEdgeController(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.EdgeController
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.EdgeController{
+ Enable: false,
+ NodeUpdateFrequency: 0,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 NodeUpdateFrequency not legal",
+ input: v1alpha1.EdgeController{
+ Enable: true,
+ NodeUpdateFrequency: 0,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("NodeUpdateFrequency"), int32(0),
+ "NodeUpdateFrequency need > 0")},
+ },
+ {
+ name: "case3 all ok",
+ input: v1alpha1.EdgeController{
+ Enable: true,
+ NodeUpdateFrequency: 10,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleEdgeController(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleDeviceController(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.DeviceController
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.DeviceController{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 all ok",
+ input: v1alpha1.DeviceController{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleDeviceController(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleSyncController(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.SyncController
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.SyncController{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 all ok",
+ input: v1alpha1.SyncController{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleSyncController(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleDynamicController(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.DynamicController
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.DynamicController{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 all ok",
+ input: v1alpha1.DynamicController{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleDynamicController(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleCloudStream(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "existFile")
+ if err != nil {
+ t.Errorf("create temp file failed: %v", err)
+ return
+ }
+
+ nonexistentDir := filepath.Join(dir, "not_exist_dir")
+ notExistFile := filepath.Join(nonexistentDir, "not_exist_file")
+
+ cases := []struct {
+ name string
+ input v1alpha1.CloudStream
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enable",
+ input: v1alpha1.CloudStream{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 TLSStreamPrivateKeyFile not exist",
+ input: v1alpha1.CloudStream{
+ Enable: true,
+ TLSStreamPrivateKeyFile: notExistFile,
+ TLSStreamCertFile: ef.Name(),
+ TLSStreamCAFile: ef.Name(),
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("TLSStreamPrivateKeyFile"), notExistFile,
+ "TLSStreamPrivateKeyFile not exist")},
+ },
+ {
+ name: "case3 TLSStreamCertFile not exist",
+ input: v1alpha1.CloudStream{
+ Enable: true,
+ TLSStreamPrivateKeyFile: ef.Name(),
+ TLSStreamCertFile: notExistFile,
+ TLSStreamCAFile: ef.Name(),
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("TLSStreamCertFile"), notExistFile,
+ "TLSStreamCertFile not exist")},
+ },
+ {
+ name: "case4 TLSStreamCAFile not exist",
+ input: v1alpha1.CloudStream{
+ Enable: true,
+ TLSStreamPrivateKeyFile: ef.Name(),
+ TLSStreamCertFile: ef.Name(),
+ TLSStreamCAFile: notExistFile,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("TLSStreamCAFile"), notExistFile,
+ "TLSStreamCAFile not exist")},
+ },
+ {
+ name: "case5 all ok",
+ input: v1alpha1.CloudStream{
+ Enable: true,
+ TLSStreamPrivateKeyFile: ef.Name(),
+ TLSStreamCertFile: ef.Name(),
+ TLSStreamCAFile: ef.Name(),
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleCloudStream(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateKubeAPIConfig(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "existFile")
+ if err != nil {
+ t.Errorf("create temp file failed: %v", err)
+ return
+ }
+
+ nonexistentDir := filepath.Join(dir, "not_exist_dir")
+ notExistFile := filepath.Join(nonexistentDir, "not_exist_file")
+
+ cases := []struct {
+ name string
+ input v1alpha1.KubeAPIConfig
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not abs path",
+ input: v1alpha1.KubeAPIConfig{
+ KubeConfig: ".",
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("kubeconfig"), ".",
+ "kubeconfig need abs path")},
+ },
+ {
+ name: "case2 file not exist",
+ input: v1alpha1.KubeAPIConfig{
+ KubeConfig: notExistFile,
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("kubeconfig"), notExistFile,
+ "kubeconfig not exist")},
+ },
+ {
+ name: "case3 all ok",
+ input: v1alpha1.KubeAPIConfig{
+ KubeConfig: ef.Name(),
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateKubeAPIConfig(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateCommonConfig(t *testing.T) {
+ tests := []struct {
+ name string
+ commonConfig v1alpha1.CommonConfig
+ expectedErr bool
+ }{
+ {
+ name: "invalid metric server addr",
+ commonConfig: v1alpha1.CommonConfig{
+ MonitorServer: v1alpha1.MonitorServer{
+ BindAddress: "xxx.xxx.xxx.xxx:9091",
+ },
+ },
+ expectedErr: true,
+ },
+ {
+ name: "invalid metric server port",
+ commonConfig: v1alpha1.CommonConfig{
+ MonitorServer: v1alpha1.MonitorServer{
+ BindAddress: "127.0.0.1:88888",
+ },
+ },
+ expectedErr: true,
+ },
+ {
+ name: "valid metric server config",
+ commonConfig: v1alpha1.CommonConfig{
+ MonitorServer: v1alpha1.MonitorServer{
+ BindAddress: "127.0.0.1:9091",
+ },
+ },
+ expectedErr: false,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ errList := ValidateCommonConfig(tt.commonConfig)
+ if len(errList) == 0 && tt.expectedErr {
+ t.Errorf("ValidateCommonConfig expected get err, but errList is nil")
+ }
+
+ if len(errList) != 0 && !tt.expectedErr {
+ t.Errorf("ValidateCommonConfig expected get no err, but errList is not nil")
+ }
+ })
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/default.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/default.go
new file mode 100644
index 000000000..dac937ad7
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/default.go
@@ -0,0 +1,235 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "net"
+ "net/url"
+ "path"
+ "strconv"
+
+ v1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ "github.com/kubeedge/api/common/constants"
+ metaconfig "github.com/kubeedge/api/componentconfig/meta/v1alpha1"
+ "github.com/kubeedge/api/util"
+)
+
+// NewDefaultEdgeCoreConfig returns a full EdgeCoreConfig object
+func NewDefaultEdgeCoreConfig() *EdgeCoreConfig {
+ hostnameOverride := util.GetHostname()
+ localIP, _ := util.GetLocalIP(hostnameOverride)
+
+ return &EdgeCoreConfig{
+ TypeMeta: metav1.TypeMeta{
+ Kind: Kind,
+ APIVersion: path.Join(GroupName, APIVersion),
+ },
+ DataBase: &DataBase{
+ DriverName: DataBaseDriverName,
+ AliasName: DataBaseAliasName,
+ DataSource: DataBaseDataSource,
+ },
+ Modules: &Modules{
+ Edged: &Edged{
+ Enable: true,
+ Labels: map[string]string{},
+ Annotations: map[string]string{},
+ Taints: []v1.Taint{},
+ NodeStatusUpdateFrequency: 10,
+ RuntimeType: constants.DefaultRuntimeType,
+ DockerAddress: constants.DefaultDockerAddress,
+ RemoteRuntimeEndpoint: constants.DefaultRemoteRuntimeEndpoint,
+ RemoteImageEndpoint: constants.DefaultRemoteImageEndpoint,
+ NodeIP: localIP,
+ ClusterDNS: "",
+ ClusterDomain: "",
+ ConcurrentConsumers: constants.DefaultConcurrentConsumers,
+ EdgedMemoryCapacity: constants.DefaultEdgedMemoryCapacity,
+ PodSandboxImage: constants.DefaultPodSandboxImage,
+ ImagePullProgressDeadline: 60,
+ RuntimeRequestTimeout: 2,
+ HostnameOverride: hostnameOverride,
+ RegisterNodeNamespace: constants.DefaultRegisterNodeNamespace,
+ CustomInterfaceName: "",
+ RegisterNode: true,
+ DevicePluginEnabled: false,
+ GPUPluginEnabled: false,
+ ImageGCHighThreshold: constants.DefaultImageGCHighThreshold,
+ ImageGCLowThreshold: constants.DefaultImageGCLowThreshold,
+ MaximumDeadContainersPerPod: constants.DefaultMaximumDeadContainersPerPod,
+ CGroupDriver: CGroupDriverCGroupFS,
+ CgroupsPerQOS: true,
+ CgroupRoot: constants.DefaultCgroupRoot,
+ NetworkPluginName: "",
+ CNIConfDir: constants.DefaultCNIConfDir,
+ CNIBinDir: constants.DefaultCNIBinDir,
+ CNICacheDir: constants.DefaultCNICacheDir,
+ NetworkPluginMTU: constants.DefaultNetworkPluginMTU,
+ VolumeStatsAggPeriod: constants.DefaultVolumeStatsAggPeriod,
+ EnableMetrics: true,
+ },
+ EdgeHub: &EdgeHub{
+ Enable: true,
+ Heartbeat: 15,
+ MessageQPS: constants.DefaultQPS,
+ MessageBurst: constants.DefaultBurst,
+ ProjectID: "e632aba927ea4ac2b575ec1603d56f10",
+ TLSCAFile: constants.DefaultCAFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ Quic: &EdgeHubQUIC{
+ Enable: false,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ Server: net.JoinHostPort(localIP, "10001"),
+ WriteDeadline: 15,
+ },
+ WebSocket: &EdgeHubWebSocket{
+ Enable: true,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ Server: net.JoinHostPort(localIP, "10000"),
+ WriteDeadline: 15,
+ },
+ HTTPServer: (&url.URL{
+ Scheme: "https",
+ Host: net.JoinHostPort(localIP, "10002"),
+ }).String(),
+ Token: "",
+ RotateCertificates: true,
+ },
+ EventBus: &EventBus{
+ Enable: true,
+ MqttQOS: 0,
+ MqttRetain: false,
+ MqttSessionQueueSize: 100,
+ MqttServerExternal: "tcp://127.0.0.1:1883",
+ MqttServerInternal: "tcp://127.0.0.1:1884",
+ MqttSubClientID: "",
+ MqttPubClientID: "",
+ MqttUsername: "",
+ MqttPassword: "",
+ MqttMode: MqttModeExternal,
+ TLS: &EventBusTLS{
+ Enable: false,
+ TLSMqttCAFile: constants.DefaultMqttCAFile,
+ TLSMqttCertFile: constants.DefaultMqttCertFile,
+ TLSMqttPrivateKeyFile: constants.DefaultMqttKeyFile,
+ },
+ },
+ MetaManager: &MetaManager{
+ Enable: true,
+ ContextSendGroup: metaconfig.GroupNameHub,
+ ContextSendModule: metaconfig.ModuleNameEdgeHub,
+ RemoteQueryTimeout: constants.DefaultRemoteQueryTimeout,
+ MetaServer: &MetaServer{
+ Enable: false,
+ Server: constants.DefaultMetaServerAddr,
+ TLSCaFile: constants.DefaultCAFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ },
+ },
+ ServiceBus: &ServiceBus{
+ Enable: false,
+ Server: "127.0.0.1",
+ Port: 9060,
+ Timeout: 60,
+ },
+ DeviceTwin: &DeviceTwin{
+ Enable: true,
+ },
+ DBTest: &DBTest{
+ Enable: false,
+ },
+ EdgeStream: &EdgeStream{
+ Enable: false,
+ TLSTunnelCAFile: constants.DefaultCAFile,
+ TLSTunnelCertFile: constants.DefaultCertFile,
+ TLSTunnelPrivateKeyFile: constants.DefaultKeyFile,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ TunnelServer: net.JoinHostPort("127.0.0.1", strconv.Itoa(constants.DefaultTunnelPort)),
+ WriteDeadline: 15,
+ },
+ },
+ }
+}
+
+// NewMinEdgeCoreConfig returns a common EdgeCoreConfig object
+func NewMinEdgeCoreConfig() *EdgeCoreConfig {
+ hostnameOverride := util.GetHostname()
+ localIP, _ := util.GetLocalIP(hostnameOverride)
+ return &EdgeCoreConfig{
+ TypeMeta: metav1.TypeMeta{
+ Kind: Kind,
+ APIVersion: path.Join(GroupName, APIVersion),
+ },
+ DataBase: &DataBase{
+ DataSource: DataBaseDataSource,
+ },
+ Modules: &Modules{
+ Edged: &Edged{
+ RuntimeType: constants.DefaultRuntimeType,
+ RemoteRuntimeEndpoint: constants.DefaultRemoteRuntimeEndpoint,
+ RemoteImageEndpoint: constants.DefaultRemoteImageEndpoint,
+ DockerAddress: constants.DefaultDockerAddress,
+ NodeIP: localIP,
+ ClusterDNS: "",
+ ClusterDomain: "",
+ PodSandboxImage: constants.DefaultPodSandboxImage,
+ HostnameOverride: hostnameOverride,
+ DevicePluginEnabled: false,
+ GPUPluginEnabled: false,
+ CGroupDriver: CGroupDriverCGroupFS,
+ CgroupsPerQOS: true,
+ CgroupRoot: constants.DefaultCgroupRoot,
+ },
+ EdgeHub: &EdgeHub{
+ Heartbeat: 15,
+ TLSCAFile: constants.DefaultCAFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ WebSocket: &EdgeHubWebSocket{
+ Enable: true,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ Server: net.JoinHostPort(localIP, "10000"),
+ WriteDeadline: 15,
+ },
+ HTTPServer: (&url.URL{
+ Scheme: "https",
+ Host: net.JoinHostPort(localIP, "10002"),
+ }).String(),
+ Token: "",
+ },
+ EventBus: &EventBus{
+ MqttQOS: 0,
+ MqttRetain: false,
+ MqttServerExternal: "tcp://127.0.0.1:1883",
+ MqttServerInternal: "tcp://127.0.0.1:1884",
+ MqttSubClientID: "",
+ MqttPubClientID: "",
+ MqttUsername: "",
+ MqttPassword: "",
+ MqttMode: MqttModeExternal,
+ },
+ },
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/helper.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/helper.go
new file mode 100644
index 000000000..c1ba802c5
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/helper.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "os"
+
+ "k8s.io/klog/v2"
+ "sigs.k8s.io/yaml"
+)
+
+func (c *EdgeCoreConfig) Parse(filename string) error {
+ data, err := os.ReadFile(filename)
+ if err != nil {
+ klog.Errorf("Failed to read configfile %s: %v", filename, err)
+ return err
+ }
+ err = yaml.Unmarshal(data, c)
+ if err != nil {
+ klog.Errorf("Failed to unmarshal configfile %s: %v", filename, err)
+ return err
+ }
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/register.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/register.go
new file mode 100644
index 000000000..a42316268
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/register.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+const (
+ GroupName = "edgecore.config.kubeedge.io"
+ APIVersion = "v1alpha1"
+ Kind = "EdgeCore"
+)
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/types.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/types.go
new file mode 100644
index 000000000..bdfb29429
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/types.go
@@ -0,0 +1,468 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "time"
+
+ v1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ metaconfig "github.com/kubeedge/api/componentconfig/meta/v1alpha1"
+)
+
+const (
+ MqttModeInternal MqttMode = 0
+ MqttModeBoth MqttMode = 1
+ MqttModeExternal MqttMode = 2
+)
+
+const (
+ CGroupDriverCGroupFS = "cgroupfs"
+ CGroupDriverSystemd = "systemd"
+)
+
+const (
+ // DataBaseDriverName is sqlite3
+ DataBaseDriverName = "sqlite3"
+ // DataBaseAliasName is default
+ DataBaseAliasName = "default"
+ // DataBaseDataSource is edge.db
+ DataBaseDataSource = "/var/lib/kubeedge/edgecore.db"
+)
+
+type ProtocolName string
+type MqttMode int
+
+// EdgeCoreConfig indicates the EdgeCore config which read from EdgeCore config file
+type EdgeCoreConfig struct {
+ metav1.TypeMeta
+ // DataBase indicates database info
+ // +Required
+ DataBase *DataBase `json:"database,omitempty"`
+ // Modules indicates EdgeCore modules config
+ // +Required
+ Modules *Modules `json:"modules,omitempty"`
+ // FeatureGates is a map of feature names to bools that enable or disable alpha/experimental features.
+ FeatureGates map[string]bool `json:"featureGates,omitempty"`
+}
+
+// DataBase indicates the database info
+type DataBase struct {
+ // DriverName indicates database driver name
+ // default "sqlite3"
+ DriverName string `json:"driverName,omitempty"`
+ // AliasName indicates alias name
+ // default "default"
+ AliasName string `json:"aliasName,omitempty"`
+ // DataSource indicates the data source path
+ // default "/var/lib/kubeedge/edgecore.db"
+ DataSource string `json:"dataSource,omitempty"`
+}
+
+// Modules indicates the modules which edgeCore will be used
+type Modules struct {
+ // Edged indicates edged module config
+ // +Required
+ Edged *Edged `json:"edged,omitempty"`
+ // EdgeHub indicates edgeHub module config
+ // +Required
+ EdgeHub *EdgeHub `json:"edgeHub,omitempty"`
+ // EventBus indicates eventBus config for edgeCore
+ // +Required
+ EventBus *EventBus `json:"eventBus,omitempty"`
+ // MetaManager indicates meta module config
+ // +Required
+ MetaManager *MetaManager `json:"metaManager,omitempty"`
+ // ServiceBus indicates serviceBus module config
+ ServiceBus *ServiceBus `json:"serviceBus,omitempty"`
+ // DeviceTwin indicates deviceTwin module config
+ DeviceTwin *DeviceTwin `json:"deviceTwin,omitempty"`
+ // DBTest indicates dbTest module config
+ DBTest *DBTest `json:"dbTest,omitempty"`
+ // EdgeStream indicates edgestream module config
+ // +Required
+ EdgeStream *EdgeStream `json:"edgeStream,omitempty"`
+}
+
+// Edged indicates the config fo edged module
+// edged is lighted-kubelet
+type Edged struct {
+ // Enable indicates whether edged is enabled,
+ // if set to false (for debugging etc.), skip checking other edged configs.
+ // default true
+ Enable bool `json:"enable"`
+ // Labels indicates current node labels
+ Labels map[string]string `json:"labels,omitempty"`
+ // Annotations indicates current node annotations
+ Annotations map[string]string `json:"annotations,omitempty"`
+ // Taints indicates current node taints
+ Taints []v1.Taint `json:"taints,omitempty"`
+ // NodeStatusUpdateFrequency indicates node status update frequency (second)
+ // default 10
+ NodeStatusUpdateFrequency int32 `json:"nodeStatusUpdateFrequency,omitempty"`
+ // RuntimeType indicates cri runtime ,support: docker, remote
+ // default "docker"
+ RuntimeType string `json:"runtimeType,omitempty"`
+ // DockerAddress indicates docker server address
+ // default "unix:///var/run/docker.sock"
+ DockerAddress string `json:"dockerAddress,omitempty"`
+ // RemoteRuntimeEndpoint indicates remote runtime endpoint
+ // default "unix:///var/run/dockershim.sock"
+ RemoteRuntimeEndpoint string `json:"remoteRuntimeEndpoint,omitempty"`
+ // RemoteImageEndpoint indicates remote image endpoint
+ // default "unix:///var/run/dockershim.sock"
+ RemoteImageEndpoint string `json:"remoteImageEndpoint,omitempty"`
+ // NodeIP indicates current node ip.
+ // Setting the value overwrites the automatically detected IP address
+ // default get local host ip
+ NodeIP string `json:"nodeIP"`
+ // ClusterDNS indicates cluster dns
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ // +Required
+ ClusterDNS string `json:"clusterDNS"`
+ // ClusterDomain indicates cluster domain
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ ClusterDomain string `json:"clusterDomain"`
+ // EdgedMemoryCapacity indicates memory capacity (byte)
+ // default 7852396000
+ EdgedMemoryCapacity int64 `json:"edgedMemoryCapacity,omitempty"`
+ // PodSandboxImage is the image whose network/ipc namespaces containers in each pod will use.
+ // +Required
+ // default kubeedge/pause:3.6
+ PodSandboxImage string `json:"podSandboxImage,omitempty"`
+ // ImagePullProgressDeadline indicates image pull progress dead line (second)
+ // default 60
+ ImagePullProgressDeadline int32 `json:"imagePullProgressDeadline,omitempty"`
+ // RuntimeRequestTimeout indicates runtime request timeout (second)
+ // default 2
+ RuntimeRequestTimeout int32 `json:"runtimeRequestTimeout,omitempty"`
+ // HostnameOverride indicates hostname
+ // default os.Hostname()
+ HostnameOverride string `json:"hostnameOverride,omitempty"`
+ // RegisterNode enables automatic registration
+ // default true
+ RegisterNode bool `json:"registerNode,omitempty"`
+ // RegisterNodeNamespace indicates register node namespace
+ // default "default"
+ RegisterNodeNamespace string `json:"registerNodeNamespace,omitempty"`
+ // CustomInterfaceName indicates the name of the network interface used for obtaining the IP address.
+ // Setting this will override the setting 'NodeIP' if provided.
+ // If this is not defined the IP address is obtained by the hostname.
+ // default ""
+ CustomInterfaceName string `json:"customInterfaceName,omitempty"`
+ // ConcurrentConsumers indicates concurrent consumers for pod add or remove operation
+ // default 5
+ ConcurrentConsumers int `json:"concurrentConsumers,omitempty"`
+ // DevicePluginEnabled indicates enable device plugin
+ // default false
+ // Note: Can not use "omitempty" option, it will affect the output of the default configuration file
+ DevicePluginEnabled bool `json:"devicePluginEnabled"`
+ // GPUPluginEnabled indicates enable gpu plugin
+ // default false,
+ // Note: Can not use "omitempty" option, it will affect the output of the default configuration file
+ GPUPluginEnabled bool `json:"gpuPluginEnabled"`
+ // ImageGCHighThreshold indicates image gc high threshold (percent)
+ // default 80
+ ImageGCHighThreshold int32 `json:"imageGCHighThreshold,omitempty"`
+ // ImageGCLowThreshold indicates image gc low threshold (percent)
+ // default 40
+ ImageGCLowThreshold int32 `json:"imageGCLowThreshold,omitempty"`
+ // MaximumDeadContainersPerPod indicates max num dead containers per pod
+ // default 1
+ MaximumDeadContainersPerPod int32 `json:"maximumDeadContainersPerPod,omitempty"`
+ // CGroupDriver indicates container cgroup driver, support: cgroupfs, systemd
+ // default "cgroupfs"
+ // +Required
+ CGroupDriver string `json:"cgroupDriver,omitempty"`
+ // NetworkPluginName indicates the name of the network plugin to be invoked,
+ // if an empty string is specified, use noop plugin
+ // default ""
+ NetworkPluginName string `json:"networkPluginName,omitempty"`
+ // CNIConfDir indicates the full path of the directory in which to search for CNI config files
+ // default "/etc/cni/net.d"
+ CNIConfDir string `json:"cniConfDir,omitempty"`
+ // CNIBinDir indicates a comma-separated list of full paths of directories
+ // in which to search for CNI plugin binaries
+ // default "/opt/cni/bin"
+ CNIBinDir string `json:"cniBinDir,omitempty"`
+ // CNICacheDir indicates the full path of the directory in which CNI should store cache files
+ // default "/var/lib/cni/cache"
+ CNICacheDir string `json:"cniCacheDirs,omitempty"`
+ // NetworkPluginMTU indicates the MTU to be passed to the network plugin
+ // default 1500
+ NetworkPluginMTU int32 `json:"networkPluginMTU,omitempty"`
+ // CgroupsPerQOS enables QoS based Cgroup hierarchy: top level cgroups for QoS Classes
+ // And all Burstable and BestEffort pods are brought up under their
+ // specific top level QoS cgroup.
+ // Default: true
+ CgroupsPerQOS bool `json:"cgroupsPerQOS"`
+ // CgroupRoot is the root cgroup to use for pods.
+ // If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.
+ // Default: ""
+ CgroupRoot string `json:"cgroupRoot"`
+ // EdgeCoreCgroups is the absolute name of cgroups to isolate the edgecore in
+ // Dynamic Kubelet Config (beta): This field should not be updated without a full node
+ // reboot. It is safest to keep this value the same as the local config.
+ // Default: ""
+ EdgeCoreCgroups string `json:"edgeCoreCgroups,omitempty"`
+ // systemCgroups is absolute name of cgroups in which to place
+ // all non-kernel processes that are not already in a container. Empty
+ // for no container. Rolling back the flag requires a reboot.
+ // Dynamic Kubelet Config (beta): This field should not be updated without a full node
+ // reboot. It is safest to keep this value the same as the local config.
+ // Default: ""
+ SystemCgroups string `json:"systemCgroups,omitempty"`
+ // How frequently to calculate and cache volume disk usage for all pods
+ // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that
+ // shortening the period may carry a performance impact.
+ // Default: "1m"
+ VolumeStatsAggPeriod time.Duration `json:"volumeStatsAggPeriod,omitempty"`
+ // EnableMetrics indicates whether enable the metrics
+ // default true
+ EnableMetrics bool `json:"enableMetrics,omitempty"`
+}
+
+// EdgeHub indicates the EdgeHub module config
+type EdgeHub struct {
+ // Enable indicates whether EdgeHub is enabled,
+ // if set to false (for debugging etc.), skip checking other EdgeHub configs.
+ // default true
+ Enable bool `json:"enable"`
+ // Heartbeat indicates heart beat (second)
+ // default 15
+ Heartbeat int32 `json:"heartbeat,omitempty"`
+ // MessageQPS is the QPS to allow while send message to cloudHub.
+ // DefaultQPS: 30
+ MessageQPS int32 `json:"messageQPS,omitempty"`
+ // MessageBurst is the burst to allow while send message to cloudHub.
+ // DefaultBurst: 60
+ MessageBurst int32 `json:"messageBurst,omitempty"`
+ // ProjectID indicates project id
+ // default e632aba927ea4ac2b575ec1603d56f10
+ ProjectID string `json:"projectID,omitempty"`
+ // TLSCAFile set ca file path
+ // default "/etc/kubeedge/ca/rootCA.crt"
+ TLSCAFile string `json:"tlsCaFile,omitempty"`
+ // TLSCertFile indicates the file containing x509 Certificate for HTTPS
+ // default "/etc/kubeedge/certs/server.crt"
+ TLSCertFile string `json:"tlsCertFile,omitempty"`
+ // TLSPrivateKeyFile indicates the file containing x509 private key matching tlsCertFile
+ // default "/etc/kubeedge/certs/server.key"
+ TLSPrivateKeyFile string `json:"tlsPrivateKeyFile,omitempty"`
+ // Quic indicates quic config for EdgeHub module
+ // Optional if websocket is configured
+ Quic *EdgeHubQUIC `json:"quic,omitempty"`
+ // WebSocket indicates websocket config for EdgeHub module
+ // Optional if quic is configured
+ WebSocket *EdgeHubWebSocket `json:"websocket,omitempty"`
+ // Token indicates the priority of joining the cluster for the edge
+ Token string `json:"token"`
+ // HTTPServer indicates the server for edge to apply for the certificate.
+ HTTPServer string `json:"httpServer,omitempty"`
+ // RotateCertificates indicates whether edge certificate can be rotated
+ // default true
+ RotateCertificates bool `json:"rotateCertificates,omitempty"`
+}
+
+// EdgeHubQUIC indicates the quic client config
+type EdgeHubQUIC struct {
+ // Enable indicates whether enable this protocol
+ // default false
+ Enable bool `json:"enable"`
+ // HandshakeTimeout indicates handshake timeout (second)
+ // default 30
+ HandshakeTimeout int32 `json:"handshakeTimeout,omitempty"`
+ // ReadDeadline indicates read deadline (second)
+ // default 15
+ ReadDeadline int32 `json:"readDeadline,omitempty"`
+ // Server indicates quic server address (ip:port)
+ // +Required
+ Server string `json:"server,omitempty"`
+ // WriteDeadline indicates write deadline (second)
+ // default 15
+ WriteDeadline int32 `json:"writeDeadline,omitempty"`
+}
+
+// EdgeHubWebSocket indicates the websocket client config
+type EdgeHubWebSocket struct {
+ // Enable indicates whether enable this protocol
+ // default true
+ Enable bool `json:"enable"`
+ // HandshakeTimeout indicates handshake timeout (second)
+ // default 30
+ HandshakeTimeout int32 `json:"handshakeTimeout,omitempty"`
+ // ReadDeadline indicates read deadline (second)
+ // default 15
+ ReadDeadline int32 `json:"readDeadline,omitempty"`
+ // Server indicates websocket server address (ip:port)
+ // +Required
+ Server string `json:"server,omitempty"`
+ // WriteDeadline indicates write deadline (second)
+ // default 15
+ WriteDeadline int32 `json:"writeDeadline,omitempty"`
+}
+
+// EventBus indicates the event bus module config
+type EventBus struct {
+ // Enable indicates whether EventBus is enabled, if set to false (for debugging etc.),
+ // skip checking other EventBus configs.
+ // default true
+ Enable bool `json:"enable"`
+ // MqttQOS indicates mqtt qos
+ // 0: QOSAtMostOnce, 1: QOSAtLeastOnce, 2: QOSExactlyOnce
+ // default 0
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ MqttQOS uint8 `json:"mqttQOS"`
+ // MqttRetain indicates whether server will store the message and can be delivered to future subscribers,
+ // if this flag set true, sever will store the message and can be delivered to future subscribers
+ // default false
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ MqttRetain bool `json:"mqttRetain"`
+ // MqttSessionQueueSize indicates the size of how many sessions will be handled.
+ // default 100
+ MqttSessionQueueSize int32 `json:"mqttSessionQueueSize,omitempty"`
+ // MqttServerInternal indicates internal mqtt broker url
+ // default "tcp://127.0.0.1:1884"
+ MqttServerInternal string `json:"mqttServerInternal,omitempty"`
+ // MqttServerExternal indicates external mqtt broker url
+ // default "tcp://127.0.0.1:1883"
+ MqttServerExternal string `json:"mqttServerExternal,omitempty"`
+ // MqttSubClientID indicates mqtt subscribe ClientID
+ // default ""
+ MqttSubClientID string `json:"mqttSubClientID"`
+ // MqttPubClientID indicates mqtt publish ClientID
+ // default ""
+ MqttPubClientID string `json:"mqttPubClientID"`
+ // MqttUsername indicates mqtt username
+ // default ""
+ MqttUsername string `json:"mqttUsername"`
+ // MqttPassword indicates mqtt password
+ // default ""
+ MqttPassword string `json:"mqttPassword"`
+ // MqttMode indicates which broker type will be chosen
+ // 0: internal mqtt broker enable only.
+ // 1: internal and external mqtt broker enable.
+ // 2: external mqtt broker enable only
+ // +Required
+ // default: 2
+ MqttMode MqttMode `json:"mqttMode"`
+ // Tls indicates tls config for EventBus module
+ TLS *EventBusTLS `json:"eventBusTLS,omitempty"`
+}
+
+// EventBusTLS indicates the EventBus tls config with MQTT broker
+type EventBusTLS struct {
+ // Enable indicates whether enable tls connection
+ // default false
+ Enable bool `json:"enable"`
+ // TLSMqttCAFile sets ca file path
+ // default "/etc/kubeedge/ca/rootCA.crt"
+ TLSMqttCAFile string `json:"tlsMqttCAFile,omitempty"`
+ // TLSMqttCertFile indicates the file containing x509 Certificate for HTTPS
+ // default "/etc/kubeedge/certs/server.crt"
+ TLSMqttCertFile string `json:"tlsMqttCertFile,omitempty"`
+ // TLSMqttPrivateKeyFile indicates the file containing x509 private key matching tlsMqttCertFile
+ // default "/etc/kubeedge/certs/server.key"
+ TLSMqttPrivateKeyFile string `json:"tlsMqttPrivateKeyFile,omitempty"`
+}
+
+// MetaManager indicates the MetaManager module config
+type MetaManager struct {
+ // Enable indicates whether MetaManager is enabled,
+ // if set to false (for debugging etc.), skip checking other MetaManager configs.
+ // default true
+ Enable bool `json:"enable"`
+ // ContextSendGroup indicates send group
+ ContextSendGroup metaconfig.GroupName `json:"contextSendGroup,omitempty"`
+ // ContextSendModule indicates send module
+ ContextSendModule metaconfig.ModuleName `json:"contextSendModule,omitempty"`
+ // RemoteQueryTimeout indicates remote query timeout (second)
+ // default 60
+ RemoteQueryTimeout int32 `json:"remoteQueryTimeout,omitempty"`
+ // The config of MetaServer
+ MetaServer *MetaServer `json:"metaServer,omitempty"`
+}
+
+type MetaServer struct {
+ Enable bool `json:"enable"`
+ Server string `json:"server"`
+ TLSCaFile string `json:"tlsCaFile"`
+ TLSCertFile string `json:"tlsCertFile"`
+ TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"`
+}
+
+// ServiceBus indicates the ServiceBus module config
+type ServiceBus struct {
+ // Enable indicates whether ServiceBus is enabled,
+ // if set to false (for debugging etc.), skip checking other ServiceBus configs.
+ // default false
+ Enable bool `json:"enable"`
+ // Address indicates address for http server
+ Server string `json:"server"`
+ // Port indicates port for http server
+ Port int `json:"port"`
+ // Timeout indicates timeout for servicebus receive message
+ Timeout int `json:"timeout"`
+}
+
+// DeviceTwin indicates the DeviceTwin module config
+type DeviceTwin struct {
+ // Enable indicates whether DeviceTwin is enabled,
+ // if set to false (for debugging etc.), skip checking other DeviceTwin configs.
+ // default true
+ Enable bool `json:"enable"`
+}
+
+// DBTest indicates the DBTest module config
+type DBTest struct {
+ // Enable indicates whether DBTest is enabled,
+ // if set to false (for debugging etc.), skip checking other DBTest configs.
+ // default false
+ Enable bool `json:"enable"`
+}
+
+// EdgeStream indicates the stream controller
+type EdgeStream struct {
+ // Enable indicates whether edgestream is enabled, if set to false (for debugging etc.), skip checking other configs.
+ // default true
+ Enable bool `json:"enable"`
+
+ // TLSTunnelCAFile indicates ca file path
+ // default /etc/kubeedge/ca/rootCA.crt
+ TLSTunnelCAFile string `json:"tlsTunnelCAFile,omitempty"`
+
+ // TLSTunnelCertFile indicates the file containing x509 Certificate for HTTPS
+ // default /etc/kubeedge/certs/server.crt
+ TLSTunnelCertFile string `json:"tlsTunnelCertFile,omitempty"`
+ // TLSTunnelPrivateKeyFile indicates the file containing x509 private key matching tlsCertFile
+ // default /etc/kubeedge/certs/server.key
+ TLSTunnelPrivateKeyFile string `json:"tlsTunnelPrivateKeyFile,omitempty"`
+
+ // HandshakeTimeout indicates handshake timeout (second)
+ // default 30
+ HandshakeTimeout int32 `json:"handshakeTimeout,omitempty"`
+ // ReadDeadline indicates read deadline (second)
+ // default 15
+ ReadDeadline int32 `json:"readDeadline,omitempty"`
+ // TunnelServer indicates websocket server address (ip:port)
+ // +Required
+ TunnelServer string `json:"server,omitempty"`
+ // WriteDeadline indicates write deadline (second)
+ // default 15
+ WriteDeadline int32 `json:"writeDeadline,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation.go
new file mode 100644
index 000000000..04b18488d
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation.go
@@ -0,0 +1,154 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "os"
+ "path"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/klog/v2"
+ "k8s.io/kubernetes/pkg/apis/core/validation"
+
+ "github.com/kubeedge/api/componentconfig/edgecore/v1alpha1"
+ utilvalidation "github.com/kubeedge/api/util/validation"
+)
+
+// ValidateEdgeCoreConfiguration validates `c` and returns an errorList if it is invalid
+func ValidateEdgeCoreConfiguration(c *v1alpha1.EdgeCoreConfig) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateDataBase(*c.DataBase)...)
+ allErrs = append(allErrs, ValidateModuleEdged(*c.Modules.Edged)...)
+ allErrs = append(allErrs, ValidateModuleEdgeHub(*c.Modules.EdgeHub)...)
+ allErrs = append(allErrs, ValidateModuleEventBus(*c.Modules.EventBus)...)
+ allErrs = append(allErrs, ValidateModuleMetaManager(*c.Modules.MetaManager)...)
+ allErrs = append(allErrs, ValidateModuleServiceBus(*c.Modules.ServiceBus)...)
+ allErrs = append(allErrs, ValidateModuleDeviceTwin(*c.Modules.DeviceTwin)...)
+ allErrs = append(allErrs, ValidateModuleDBTest(*c.Modules.DBTest)...)
+ allErrs = append(allErrs, ValidateModuleEdgeStream(*c.Modules.EdgeStream)...)
+ return allErrs
+}
+
+// ValidateDataBase validates `db` and returns an errorList if it is invalid
+func ValidateDataBase(db v1alpha1.DataBase) field.ErrorList {
+ allErrs := field.ErrorList{}
+ sourceDir := path.Dir(db.DataSource)
+ if !utilvalidation.FileIsExist(sourceDir) {
+ if err := os.MkdirAll(sourceDir, os.ModePerm); err != nil {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("DataSource"), db.DataSource,
+ fmt.Sprintf("create DataSoure dir %v error ", sourceDir)))
+ }
+ }
+ return allErrs
+}
+
+// ValidateModuleEdged validates `e` and returns an errorList if it is invalid
+func ValidateModuleEdged(e v1alpha1.Edged) field.ErrorList {
+ if !e.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ messages := validation.ValidateNodeName(e.HostnameOverride, false)
+ for _, msg := range messages {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("HostnameOverride"), e.HostnameOverride, msg))
+ }
+ if e.NodeIP == "" {
+ klog.Warningf("NodeIP is empty , use default ip which can connect to cloud.")
+ }
+ switch e.CGroupDriver {
+ case v1alpha1.CGroupDriverCGroupFS, v1alpha1.CGroupDriverSystemd:
+ default:
+ allErrs = append(allErrs, field.Invalid(field.NewPath("CGroupDriver"), e.CGroupDriver,
+ "CGroupDriver value error"))
+ }
+ return allErrs
+}
+
+// ValidateModuleEdgeHub validates `h` and returns an errorList if it is invalid
+func ValidateModuleEdgeHub(h v1alpha1.EdgeHub) field.ErrorList {
+ if !h.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+
+ if h.WebSocket.Enable == h.Quic.Enable {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("enable"),
+ h.Quic.Enable, "websocket.enable and quic.enable cannot be true and false at the same time"))
+ }
+
+ return allErrs
+}
+
+// ValidateModuleEventBus validates `m` and returns an errorList if it is invalid
+func ValidateModuleEventBus(m v1alpha1.EventBus) field.ErrorList {
+ if !m.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ if m.MqttMode > v1alpha1.MqttModeExternal || m.MqttMode < v1alpha1.MqttModeInternal {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("Mode"), m.MqttMode,
+ fmt.Sprintf("Mode need in [%v,%v] range", v1alpha1.MqttModeInternal,
+ v1alpha1.MqttModeExternal)))
+ }
+ return allErrs
+}
+
+// ValidateModuleMetaManager validates `m` and returns an errorList if it is invalid
+func ValidateModuleMetaManager(m v1alpha1.MetaManager) field.ErrorList {
+ if !m.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleServiceBus validates `s` and returns an errorList if it is invalid
+func ValidateModuleServiceBus(s v1alpha1.ServiceBus) field.ErrorList {
+ if !s.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleDeviceTwin validates `d` and returns an errorList if it is invalid
+func ValidateModuleDeviceTwin(d v1alpha1.DeviceTwin) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleDBTest validates `d` and returns an errorList if it is invalid
+func ValidateModuleDBTest(d v1alpha1.DBTest) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleEdgeStream validates `m` and returns an errorList if it is invalid
+func ValidateModuleEdgeStream(m v1alpha1.EdgeStream) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if !m.Enable {
+ return allErrs
+ }
+ return allErrs
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation_test.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation_test.go
new file mode 100644
index 000000000..059e60a41
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha1/validation/validation_test.go
@@ -0,0 +1,356 @@
+/*
+Copyright 2021 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "reflect"
+ "testing"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+
+ "github.com/kubeedge/api/componentconfig/edgecore/v1alpha1"
+)
+
+func TestValidateEdgeCoreConfiguration(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "existFile")
+ if err != nil {
+ t.Errorf("create temp file failed: %v", err)
+ return
+ }
+
+ config := v1alpha1.NewDefaultEdgeCoreConfig()
+ config.DataBase.DataSource = ef.Name()
+
+ errList := ValidateEdgeCoreConfiguration(config)
+ if len(errList) > 0 {
+ t.Errorf("configuration is not right: %v", errList)
+ }
+}
+
+func TestValidateDataBase(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "FileIsExist")
+ if err == nil {
+ db := v1alpha1.DataBase{
+ DataSource: ef.Name(),
+ }
+ if errs := ValidateDataBase(db); len(errs) > 0 {
+ t.Errorf("file %v should exist: err is %v", db, errs)
+ }
+ }
+
+ nonexistentDir := filepath.Join(dir, "not_exists_dir")
+ nonexistentFile := filepath.Join(nonexistentDir, "not_exist_file")
+
+ db := v1alpha1.DataBase{
+ DataSource: nonexistentFile,
+ }
+
+ if errs := ValidateDataBase(db); len(errs) > 0 {
+ t.Errorf("file %v should not created, err is %v", nonexistentFile, errs)
+ }
+}
+
+func TestValidateModuleEdged(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.Edged
+ result field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.Edged{
+ Enable: false,
+ },
+ result: field.ErrorList{},
+ },
+ {
+ name: "case2 not right CGroupDriver",
+ input: v1alpha1.Edged{
+ Enable: true,
+ HostnameOverride: "example.com",
+ CGroupDriver: "fake",
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("CGroupDriver"), "fake",
+ "CGroupDriver value error")},
+ },
+ {
+ name: "case3 invalid hostname",
+ input: v1alpha1.Edged{
+ Enable: true,
+ HostnameOverride: "Example%$#com",
+ CGroupDriver: v1alpha1.CGroupDriverCGroupFS,
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("HostnameOverride"), "Example%$#com", `a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')`)},
+ },
+ {
+ name: "case4 success",
+ input: v1alpha1.Edged{
+ Enable: true,
+ HostnameOverride: "example.com",
+ CGroupDriver: v1alpha1.CGroupDriverCGroupFS,
+ },
+ result: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if got := ValidateModuleEdged(c.input); !reflect.DeepEqual(got, c.result) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.result, got)
+ }
+ }
+}
+
+func TestValidateModuleEdgeHub(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.EdgeHub
+ result field.ErrorList
+ }{
+ {
+ name: "case1 not enable",
+ input: v1alpha1.EdgeHub{
+ Enable: false,
+ },
+ result: field.ErrorList{},
+ },
+ {
+ name: "case2 both quic and websocket are enabled",
+ input: v1alpha1.EdgeHub{
+ Enable: true,
+ Quic: &v1alpha1.EdgeHubQUIC{
+ Enable: true,
+ },
+ WebSocket: &v1alpha1.EdgeHubWebSocket{
+ Enable: true,
+ },
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("enable"),
+ true, "websocket.enable and quic.enable cannot be true and false at the same time")},
+ },
+ {
+ name: "case3 success",
+ input: v1alpha1.EdgeHub{
+ Enable: true,
+ WebSocket: &v1alpha1.EdgeHubWebSocket{
+ Enable: true,
+ },
+ Quic: &v1alpha1.EdgeHubQUIC{
+ Enable: false,
+ },
+ },
+ result: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if got := ValidateModuleEdgeHub(c.input); !reflect.DeepEqual(got, c.result) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.result, got)
+ }
+ }
+}
+
+func TestValidateModuleEventBus(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.EventBus
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.EventBus{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 mqtt not right",
+ input: v1alpha1.EventBus{
+ Enable: true,
+ MqttMode: v1alpha1.MqttMode(3),
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("Mode"), v1alpha1.MqttMode(3),
+ fmt.Sprintf("Mode need in [%v,%v] range", v1alpha1.MqttModeInternal,
+ v1alpha1.MqttModeExternal))},
+ },
+ {
+ name: "case2 all ok",
+ input: v1alpha1.EventBus{
+ Enable: true,
+ MqttMode: 2,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleEventBus(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleMetaManager(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.MetaManager
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.MetaManager{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha1.MetaManager{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleMetaManager(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleServiceBus(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.ServiceBus
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.ServiceBus{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha1.ServiceBus{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleServiceBus(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleDeviceTwin(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.DeviceTwin
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.DeviceTwin{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha1.DeviceTwin{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleDeviceTwin(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleDBTest(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.DBTest
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.DBTest{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha1.DBTest{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleDBTest(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleEdgeStream(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha1.EdgeStream
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha1.EdgeStream{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha1.EdgeStream{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleEdgeStream(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default.go
new file mode 100644
index 000000000..6fe9647fe
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default.go
@@ -0,0 +1,233 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+import (
+ "net"
+ "net/url"
+ "path"
+ "strconv"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ "github.com/kubeedge/api/common/constants"
+ metaconfig "github.com/kubeedge/api/componentconfig/meta/v1alpha1"
+ "github.com/kubeedge/api/util"
+)
+
+// NewDefaultEdgeCoreConfig returns a full EdgeCoreConfig object
+func NewDefaultEdgeCoreConfig() (config *EdgeCoreConfig) {
+ hostnameOverride := util.GetHostname()
+ localIP, _ := util.GetLocalIP(hostnameOverride)
+
+ defaultTailedKubeletConfig := TailoredKubeletConfiguration{}
+ SetDefaultsKubeletConfiguration(&defaultTailedKubeletConfig)
+
+ config = &EdgeCoreConfig{
+ TypeMeta: metav1.TypeMeta{
+ Kind: Kind,
+ APIVersion: path.Join(GroupName, APIVersion),
+ },
+ DataBase: &DataBase{
+ DriverName: DataBaseDriverName,
+ AliasName: DataBaseAliasName,
+ DataSource: DataBaseDataSource,
+ },
+ Modules: &Modules{
+ Edged: &Edged{
+ Enable: true,
+ TailoredKubeletConfig: &defaultTailedKubeletConfig,
+ TailoredKubeletFlag: TailoredKubeletFlag{
+ HostnameOverride: hostnameOverride,
+ ContainerRuntimeOptions: ContainerRuntimeOptions{
+ PodSandboxImage: constants.DefaultPodSandboxImage,
+ },
+ RootDirectory: constants.DefaultRootDir,
+ MaxContainerCount: -1,
+ MaxPerPodContainerCount: 1,
+ MinimumGCAge: metav1.Duration{Duration: 0},
+ NodeLabels: make(map[string]string),
+ RegisterSchedulable: true,
+ WindowsPriorityClass: DefaultWindowsPriorityClass,
+ },
+ CustomInterfaceName: "",
+ RegisterNodeNamespace: constants.DefaultRegisterNodeNamespace,
+ },
+ EdgeHub: &EdgeHub{
+ Enable: true,
+ Heartbeat: 15,
+ MessageQPS: constants.DefaultQPS,
+ MessageBurst: constants.DefaultBurst,
+ ProjectID: "e632aba927ea4ac2b575ec1603d56f10",
+ TLSCAFile: constants.DefaultCAFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ Quic: &EdgeHubQUIC{
+ Enable: false,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ Server: net.JoinHostPort(localIP, "10001"),
+ WriteDeadline: 15,
+ },
+ WebSocket: &EdgeHubWebSocket{
+ Enable: true,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ Server: net.JoinHostPort(localIP, "10000"),
+ WriteDeadline: 15,
+ },
+ HTTPServer: (&url.URL{
+ Scheme: "https",
+ Host: net.JoinHostPort(localIP, "10002"),
+ }).String(),
+ Token: "",
+ RotateCertificates: true,
+ },
+ EventBus: &EventBus{
+ Enable: true,
+ MqttQOS: 0,
+ MqttRetain: false,
+ MqttSessionQueueSize: 100,
+ MqttServerExternal: "tcp://127.0.0.1:1883",
+ MqttServerInternal: "tcp://127.0.0.1:1884",
+ MqttSubClientID: "",
+ MqttPubClientID: "",
+ MqttUsername: "",
+ MqttPassword: "",
+ MqttMode: MqttModeExternal,
+ TLS: &EventBusTLS{
+ Enable: false,
+ TLSMqttCAFile: constants.DefaultMqttCAFile,
+ TLSMqttCertFile: constants.DefaultMqttCertFile,
+ TLSMqttPrivateKeyFile: constants.DefaultMqttKeyFile,
+ },
+ },
+ MetaManager: &MetaManager{
+ Enable: true,
+ ContextSendGroup: metaconfig.GroupNameHub,
+ ContextSendModule: metaconfig.ModuleNameEdgeHub,
+ RemoteQueryTimeout: constants.DefaultRemoteQueryTimeout,
+ MetaServer: &MetaServer{
+ Enable: false,
+ Server: constants.DefaultMetaServerAddr,
+ TLSCaFile: constants.DefaultCAFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ ServiceAccountIssuers: []string{constants.DefaultServiceAccountIssuer},
+ DummyServer: constants.DefaultDummyServerAddr,
+ },
+ },
+ ServiceBus: &ServiceBus{
+ Enable: false,
+ Server: "127.0.0.1",
+ Port: 9060,
+ Timeout: 60,
+ },
+ DeviceTwin: &DeviceTwin{
+ Enable: true,
+ DMISockPath: constants.DefaultDMISockPath,
+ },
+ DBTest: &DBTest{
+ Enable: false,
+ },
+ EdgeStream: &EdgeStream{
+ Enable: false,
+ TLSTunnelCAFile: constants.DefaultCAFile,
+ TLSTunnelCertFile: constants.DefaultCertFile,
+ TLSTunnelPrivateKeyFile: constants.DefaultKeyFile,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ TunnelServer: net.JoinHostPort("127.0.0.1", strconv.Itoa(constants.DefaultTunnelPort)),
+ WriteDeadline: 15,
+ },
+ },
+ }
+ return
+}
+
+// NewMinEdgeCoreConfig returns a common EdgeCoreConfig object
+func NewMinEdgeCoreConfig() (config *EdgeCoreConfig) {
+ hostnameOverride := util.GetHostname()
+ localIP, _ := util.GetLocalIP(hostnameOverride)
+
+ defaultTailedKubeletConfig := TailoredKubeletConfiguration{}
+ SetDefaultsKubeletConfiguration(&defaultTailedKubeletConfig)
+
+ config = &EdgeCoreConfig{
+ TypeMeta: metav1.TypeMeta{
+ Kind: Kind,
+ APIVersion: path.Join(GroupName, APIVersion),
+ },
+ DataBase: &DataBase{
+ DataSource: DataBaseDataSource,
+ },
+ Modules: &Modules{
+ DeviceTwin: &DeviceTwin{
+ DMISockPath: constants.DefaultDMISockPath,
+ },
+ Edged: &Edged{
+ Enable: true,
+ TailoredKubeletConfig: &defaultTailedKubeletConfig,
+ TailoredKubeletFlag: TailoredKubeletFlag{
+ HostnameOverride: hostnameOverride,
+ ContainerRuntimeOptions: ContainerRuntimeOptions{
+ PodSandboxImage: constants.DefaultPodSandboxImage,
+ },
+ RootDirectory: constants.DefaultRootDir,
+ MaxContainerCount: -1,
+ MaxPerPodContainerCount: 1,
+ MinimumGCAge: metav1.Duration{Duration: 0},
+ NodeLabels: make(map[string]string),
+ RegisterSchedulable: true,
+ WindowsPriorityClass: DefaultWindowsPriorityClass,
+ },
+ CustomInterfaceName: "",
+ RegisterNodeNamespace: constants.DefaultRegisterNodeNamespace,
+ },
+ EdgeHub: &EdgeHub{
+ Heartbeat: 15,
+ TLSCAFile: constants.DefaultCAFile,
+ TLSCertFile: constants.DefaultCertFile,
+ TLSPrivateKeyFile: constants.DefaultKeyFile,
+ WebSocket: &EdgeHubWebSocket{
+ Enable: true,
+ HandshakeTimeout: 30,
+ ReadDeadline: 15,
+ Server: net.JoinHostPort(localIP, "10000"),
+ WriteDeadline: 15,
+ },
+ HTTPServer: (&url.URL{
+ Scheme: "https",
+ Host: net.JoinHostPort(localIP, "10002"),
+ }).String(),
+ Token: "",
+ },
+ EventBus: &EventBus{
+ MqttQOS: 0,
+ MqttRetain: false,
+ MqttServerExternal: "tcp://127.0.0.1:1883",
+ MqttServerInternal: "tcp://127.0.0.1:1884",
+ MqttSubClientID: "",
+ MqttPubClientID: "",
+ MqttUsername: "",
+ MqttPassword: "",
+ MqttMode: MqttModeExternal,
+ },
+ },
+ }
+ return
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_kubelet_configuration.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_kubelet_configuration.go
new file mode 100644
index 000000000..c11ceca97
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_kubelet_configuration.go
@@ -0,0 +1,108 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+@CHANGELOG
+KubeEdge Authors: To set default tailored kubelet configuration,
+This file is derived from K8S Kubelet apis code with reduced set of methods
+Changes done are
+1. Package edged got some functions from "k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1"
+and made some variant
+*/
+
+package v1alpha2
+
+import (
+ "time"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ logsapi "k8s.io/component-base/logs/api/v1"
+ kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
+ configv1beta1 "k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1"
+ "k8s.io/kubernetes/pkg/kubelet/eviction"
+ "k8s.io/kubernetes/pkg/kubelet/qos"
+ utilpointer "k8s.io/utils/pointer"
+
+ "github.com/kubeedge/api/common/constants"
+)
+
+// SetDefaultsKubeletConfiguration sets defaults for tailored kubelet configuration
+func SetDefaultsKubeletConfiguration(obj *TailoredKubeletConfiguration) {
+ obj.StaticPodPath = constants.DefaultManifestsDir
+ obj.SyncFrequency = metav1.Duration{Duration: 1 * time.Minute}
+ obj.FileCheckFrequency = metav1.Duration{Duration: 20 * time.Second}
+ obj.Address = constants.ServerAddress
+ obj.ReadOnlyPort = constants.ServerPort
+ obj.ClusterDomain = constants.DefaultClusterDomain
+ obj.RegistryPullQPS = utilpointer.Int32(5)
+ obj.RegistryBurst = 10
+ obj.EventRecordQPS = utilpointer.Int32(50)
+ obj.EventBurst = 100
+ obj.EnableDebuggingHandlers = utilpointer.Bool(true)
+ obj.OOMScoreAdj = utilpointer.Int32(int32(qos.KubeletOOMScoreAdj))
+ obj.StreamingConnectionIdleTimeout = metav1.Duration{Duration: 4 * time.Hour}
+ obj.NodeStatusReportFrequency = metav1.Duration{Duration: 5 * time.Minute}
+ obj.NodeStatusUpdateFrequency = metav1.Duration{Duration: 10 * time.Second}
+ obj.NodeLeaseDurationSeconds = 40
+ obj.ImageMinimumGCAge = metav1.Duration{Duration: 2 * time.Minute}
+ // default is below docker's default dm.min_free_space of 90%
+ obj.ImageGCHighThresholdPercent = utilpointer.Int32(85)
+ obj.ImageGCLowThresholdPercent = utilpointer.Int32(80)
+ obj.VolumeStatsAggPeriod = metav1.Duration{Duration: time.Minute}
+ obj.CPUManagerPolicy = "none"
+ // Keep the same as default NodeStatusUpdateFrequency
+ obj.CPUManagerReconcilePeriod = metav1.Duration{Duration: 10 * time.Second}
+ obj.MemoryManagerPolicy = kubeletconfigv1beta1.NoneMemoryManagerPolicy
+ obj.TopologyManagerPolicy = kubeletconfigv1beta1.NoneTopologyManagerPolicy
+ obj.TopologyManagerScope = kubeletconfigv1beta1.ContainerTopologyManagerScope
+ obj.RuntimeRequestTimeout = metav1.Duration{Duration: 2 * time.Minute}
+ obj.HairpinMode = kubeletconfigv1beta1.PromiscuousBridge
+ obj.MaxPods = 110
+ // default nil or negative value to -1 (implies node allocatable pid limit)
+ obj.PodPidsLimit = utilpointer.Int64(-1)
+ obj.CPUCFSQuotaPeriod = &metav1.Duration{Duration: 100 * time.Millisecond}
+ obj.NodeStatusMaxImages = utilpointer.Int32(0)
+ obj.MaxOpenFiles = 1000000
+ obj.ContentType = "application/json"
+ obj.SerializeImagePulls = utilpointer.Bool(true)
+ obj.EvictionHard = eviction.DefaultEvictionHard
+ obj.EvictionPressureTransitionPeriod = metav1.Duration{Duration: 5 * time.Minute}
+ obj.EnableControllerAttachDetach = utilpointer.Bool(true)
+ obj.MakeIPTablesUtilChains = utilpointer.Bool(true)
+ obj.IPTablesMasqueradeBit = utilpointer.Int32(configv1beta1.DefaultIPTablesMasqueradeBit)
+ obj.IPTablesDropBit = utilpointer.Int32(configv1beta1.DefaultIPTablesDropBit)
+ obj.FailSwapOn = utilpointer.Bool(false)
+ obj.ContainerLogMaxSize = "10Mi"
+ obj.ContainerLogMaxFiles = utilpointer.Int32(5)
+ obj.ConfigMapAndSecretChangeDetectionStrategy = kubeletconfigv1beta1.GetChangeDetectionStrategy
+ obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement
+ obj.VolumePluginDir = constants.DefaultVolumePluginDir
+ // Use the Default LoggingConfiguration option
+ logsapi.SetRecommendedLoggingConfiguration(&obj.Logging)
+ obj.EnableSystemLogHandler = utilpointer.Bool(true)
+ obj.EnableProfilingHandler = utilpointer.Bool(true)
+ obj.EnableDebugFlagsHandler = utilpointer.Bool(true)
+ obj.SeccompDefault = utilpointer.Bool(false)
+ obj.MemoryThrottlingFactor = utilpointer.Float64(configv1beta1.DefaultMemoryThrottlingFactor)
+ obj.RegisterNode = utilpointer.Bool(true)
+
+ obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement
+ obj.CgroupDriver = DefaultCgroupDriver
+ obj.CgroupsPerQOS = utilpointer.Bool(DefaultCgroupsPerQOS)
+ obj.ResolverConfig = utilpointer.String(DefaultResolverConfig)
+ obj.CPUCFSQuota = utilpointer.Bool(DefaultCPUCFSQuota)
+ obj.LocalStorageCapacityIsolation = utilpointer.Bool(true)
+ obj.ContainerRuntimeEndpoint = constants.DefaultRemoteRuntimeEndpoint
+ obj.ImageServiceEndpoint = constants.DefaultRemoteImageEndpoint
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_others.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_others.go
new file mode 100644
index 000000000..ba7dbb6c0
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_others.go
@@ -0,0 +1,25 @@
+//go:build !windows
+
+package v1alpha2
+
+import kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
+
+const (
+ CGroupDriverCGroupFS = "cgroupfs"
+ CGroupDriverSystemd = "systemd"
+
+ // DataBaseDataSource is edge.db
+ DataBaseDataSource = "/var/lib/kubeedge/edgecore.db"
+
+ DefaultCgroupDriver = "cgroupfs"
+ DefaultCgroupsPerQOS = true
+ DefaultResolverConfig = kubetypes.ResolvConfDefault
+ DefaultCPUCFSQuota = true
+ DefaultWindowsPriorityClass = ""
+)
+
+var (
+ // TODO: Move these constants to k8s.io/kubelet/config/v1beta1 instead?
+ // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information.
+ DefaultNodeAllocatableEnforcement = []string{"pods"}
+)
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_windows.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_windows.go
new file mode 100644
index 000000000..4ff62fdef
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/default_windows.go
@@ -0,0 +1,23 @@
+//go:build windows
+
+package v1alpha2
+
+const (
+ CGroupDriverCGroupFS = "-"
+ CGroupDriverSystemd = ""
+
+ // DataBaseDataSource is edge.db
+ DataBaseDataSource = "C:\\var\\lib\\kubeedge\\edgecore.db"
+
+ DefaultCgroupDriver = ""
+ DefaultCgroupsPerQOS = false
+ DefaultResolverConfig = ""
+ DefaultCPUCFSQuota = false
+ DefaultWindowsPriorityClass = "NORMAL_PRIORITY_CLASS"
+)
+
+var (
+ // TODO: Move these constants to k8s.io/kubelet/config/v1beta1 instead?
+ // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information.
+ DefaultNodeAllocatableEnforcement = []string{}
+)
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/helper.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/helper.go
new file mode 100644
index 000000000..a4857c5bf
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/helper.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+import (
+ "os"
+
+ "k8s.io/klog/v2"
+ "sigs.k8s.io/yaml"
+)
+
+func (c *EdgeCoreConfig) Parse(filename string) error {
+ data, err := os.ReadFile(filename)
+ if err != nil {
+ klog.Errorf("Failed to read configfile %s: %v", filename, err)
+ return err
+ }
+ err = yaml.Unmarshal(data, c)
+ if err != nil {
+ klog.Errorf("Failed to unmarshal configfile %s: %v", filename, err)
+ return err
+ }
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/register.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/register.go
new file mode 100644
index 000000000..222afb6e4
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/register.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+const (
+ GroupName = "edgecore.config.kubeedge.io"
+ APIVersion = "v1alpha2"
+ Kind = "EdgeCore"
+)
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/types.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/types.go
new file mode 100644
index 000000000..ec46622c6
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/types.go
@@ -0,0 +1,1054 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+import (
+ v1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ logsapi "k8s.io/component-base/logs/api/v1"
+ tailoredkubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
+
+ metaconfig "github.com/kubeedge/api/componentconfig/meta/v1alpha1"
+)
+
+const (
+ MqttModeInternal MqttMode = 0
+ MqttModeBoth MqttMode = 1
+ MqttModeExternal MqttMode = 2
+)
+
+const (
+ // DataBaseDriverName is sqlite3
+ DataBaseDriverName = "sqlite3"
+ // DataBaseAliasName is default
+ DataBaseAliasName = "default"
+)
+
+type ProtocolName string
+type MqttMode int
+
+// EdgeCoreConfig indicates the EdgeCore config which read from EdgeCore config file
+type EdgeCoreConfig struct {
+ metav1.TypeMeta
+ // DataBase indicates database info
+ // +Required
+ DataBase *DataBase `json:"database,omitempty"`
+ // Modules indicates EdgeCore modules config
+ // +Required
+ Modules *Modules `json:"modules,omitempty"`
+ // FeatureGates is a map of feature names to bools that enable or disable alpha/experimental features.
+ FeatureGates map[string]bool `json:"featureGates,omitempty"`
+}
+
+// DataBase indicates the database info
+type DataBase struct {
+ // DriverName indicates database driver name
+ // default "sqlite3"
+ DriverName string `json:"driverName,omitempty"`
+ // AliasName indicates alias name
+ // default "default"
+ AliasName string `json:"aliasName,omitempty"`
+ // DataSource indicates the data source path
+ // default "/var/lib/kubeedge/edgecore.db"
+ DataSource string `json:"dataSource,omitempty"`
+}
+
+// Modules indicates the modules which edgeCore will be used
+type Modules struct {
+ // Edged indicates edged module config
+ // +Required
+ Edged *Edged `json:"edged,omitempty"`
+ // EdgeHub indicates edgeHub module config
+ // +Required
+ EdgeHub *EdgeHub `json:"edgeHub,omitempty"`
+ // EventBus indicates eventBus config for edgeCore
+ // +Required
+ EventBus *EventBus `json:"eventBus,omitempty"`
+ // MetaManager indicates meta module config
+ // +Required
+ MetaManager *MetaManager `json:"metaManager,omitempty"`
+ // ServiceBus indicates serviceBus module config
+ ServiceBus *ServiceBus `json:"serviceBus,omitempty"`
+ // DeviceTwin indicates deviceTwin module config
+ DeviceTwin *DeviceTwin `json:"deviceTwin,omitempty"`
+ // DBTest indicates dbTest module config
+ DBTest *DBTest `json:"dbTest,omitempty"`
+ // EdgeStream indicates edgestream module config
+ // +Required
+ EdgeStream *EdgeStream `json:"edgeStream,omitempty"`
+}
+
+// Edged indicates the config fo edged module
+// edged is lighted-kubelet
+type Edged struct {
+ // Enable indicates whether EdgeHub is enabled,
+ // if set to false (for debugging etc.), skip checking other EdgeHub configs.
+ // default true
+ Enable bool `json:"enable"`
+ // TailoredKubeletConfig contains the configuration for the Kubelet, tailored by KubeEdge
+ TailoredKubeletConfig *TailoredKubeletConfiguration `json:"tailoredKubeletConfig"`
+ // TailoredKubeletFlag
+ TailoredKubeletFlag
+ // CustomInterfaceName indicates the name of the network interface used for obtaining the IP address.
+ // Setting this will override the setting 'NodeIP' if provided.
+ // If this is not defined the IP address is obtained by the hostname.
+ // default ""
+ CustomInterfaceName string `json:"customInterfaceName,omitempty"`
+ // RegisterNodeNamespace indicates register node namespace
+ // default "default"
+ RegisterNodeNamespace string `json:"registerNodeNamespace,omitempty"`
+}
+
+// TailoredKubeletConfiguration indicates the tailored kubelet configuration.
+// It is derived from Kubernetes code `KubeletConfiguration` in package `k8s.io/kubelet/config/v1beta1` and made some variant.
+type TailoredKubeletConfiguration struct {
+ // staticPodPath is the path to the directory containing local (static) pods to
+ // run, or the path to a single static pod file.
+ // Default: "/etc/kubeedge/manifests"
+ // +optional
+ StaticPodPath string `json:"staticPodPath,omitempty"`
+ // syncFrequency is the max period between synchronizing running
+ // containers and config.
+ // Default: "1m"
+ // +optional
+ SyncFrequency metav1.Duration `json:"syncFrequency,omitempty"`
+ // fileCheckFrequency is the duration between checking config files for
+ // new data.
+ // Default: "20s"
+ // +optional
+ FileCheckFrequency metav1.Duration `json:"fileCheckFrequency,omitempty"`
+ // address is the IP address for the Edged to serve on (set to 0.0.0.0
+ // for all interfaces).
+ // Default: "127.0.0.1"
+ // +optional
+ Address string `json:"address,omitempty"`
+ // readOnlyPort is the read-only port for the Edged to serve on with
+ // no authentication/authorization.
+ // The port number must be between 1 and 65535, inclusive.
+ // Setting this field to 0 disables the read-only service.
+ // Default: 10350
+ // +optional
+ ReadOnlyPort int32 `json:"readOnlyPort,omitempty"`
+ // registryPullQPS is the limit of registry pulls per second.
+ // The value must not be a negative number.
+ // Setting it to 0 means no limit.
+ // Default: 5
+ // +optional
+ RegistryPullQPS *int32 `json:"registryPullQPS,omitempty"`
+ // registryBurst is the maximum size of bursty pulls, temporarily allows
+ // pulls to burst to this number, while still not exceeding registryPullQPS.
+ // The value must not be a negative number.
+ // Only used if registryPullQPS is greater than 0.
+ // Default: 10
+ // +optional
+ RegistryBurst int32 `json:"registryBurst,omitempty"`
+ // eventRecordQPS is the maximum event creations per second. If 0, there
+ // is no limit enforced. The value cannot be a negative number.
+ // Default: 50
+ // +optional
+ EventRecordQPS *int32 `json:"eventRecordQPS,omitempty"`
+ // eventBurst is the maximum size of a burst of event creations, temporarily
+ // allows event creations to burst to this number, while still not exceeding
+ // eventRecordQPS. This field cannot be a negative number and it is only used
+ // when eventRecordQPS > 0.
+ // Default: 100
+ // +optional
+ EventBurst int32 `json:"eventBurst,omitempty"`
+ // enableDebuggingHandlers enables server endpoints for log access
+ // and local running of containers and commands, including the exec,
+ // attach, logs, and portforward features.
+ // Default: true
+ // +optional
+ EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers,omitempty"`
+ // enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true.
+ // Default: false
+ // +optional
+ EnableContentionProfiling bool `json:"enableContentionProfiling,omitempty"`
+ // oomScoreAdj is The oom-score-adj value for edged process. Values
+ // must be within the range [-1000, 1000].
+ // Default: -999
+ // +optional
+ OOMScoreAdj *int32 `json:"oomScoreAdj,omitempty"`
+ // clusterDomain is the DNS domain for this cluster. If set, edged will
+ // configure all containers to search this domain in addition to the
+ // host's search domains.
+ // Default: "cluster.local"
+ // +optional
+ ClusterDomain string `json:"clusterDomain,omitempty"`
+ // clusterDNS is a list of IP addresses for the cluster DNS server. If set,
+ // edged will configure all containers to use this for DNS resolution
+ // instead of the host's DNS servers.
+ // Default: nil
+ // +optional
+ ClusterDNS []string `json:"clusterDNS,omitempty"`
+ // streamingConnectionIdleTimeout is the maximum time a streaming connection
+ // can be idle before the connection is automatically closed.
+ // Default: "4h"
+ // +optional
+ StreamingConnectionIdleTimeout metav1.Duration `json:"streamingConnectionIdleTimeout,omitempty"`
+ // nodeStatusUpdateFrequency is the frequency that edged computes node
+ // status. If node lease feature is not enabled, it is also the frequency that
+ // edged posts node status to master.
+ // Note: When node lease feature is not enabled, be cautious when changing the
+ // constant, it must work with nodeMonitorGracePeriod in nodecontroller.
+ // Default: "10s"
+ // +optional
+ NodeStatusUpdateFrequency metav1.Duration `json:"nodeStatusUpdateFrequency,omitempty"`
+ // nodeStatusReportFrequency is the frequency that edged posts node
+ // status to master if node status does not change. edged will ignore this
+ // frequency and post node status immediately if any change is detected. It is
+ // only used when node lease feature is enabled. nodeStatusReportFrequency's
+ // default value is 5m. But if nodeStatusUpdateFrequency is set explicitly,
+ // nodeStatusReportFrequency's default value will be set to
+ // nodeStatusUpdateFrequency for backward compatibility.
+ // Default: "5m"
+ // +optional
+ NodeStatusReportFrequency metav1.Duration `json:"nodeStatusReportFrequency,omitempty"`
+ // nodeLeaseDurationSeconds is the duration the edged will set on its corresponding Lease,
+ // when the NodeLease feature is enabled. This feature provides an indicator of node
+ // health by having the edged create and periodically renew a lease, named after the node,
+ // in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy.
+ // The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval
+ // may be set based on the lease duration.
+ // The field value must be greater than 0.
+ // Default: 40
+ // +optional
+ NodeLeaseDurationSeconds int32 `json:"nodeLeaseDurationSeconds,omitempty"`
+ // imageMinimumGCAge is the minimum age for an unused image before it is
+ // garbage collected.
+ // Default: "2m"
+ // +optional
+ ImageMinimumGCAge metav1.Duration `json:"imageMinimumGCAge,omitempty"`
+ // imageMaximumGCAge is the maximum age an image can be unused before it is garbage collected.
+ // The default of this field is "0s", which disables this field--meaning images won't be garbage
+ // collected based on being unused for too long.
+ // Default: "0s" (disabled)
+ // +optional
+ ImageMaximumGCAge metav1.Duration `json:"imageMaximumGCAge,omitempty"`
+ // imageGCHighThresholdPercent is the percent of disk usage after which
+ // image garbage collection is always run. The percent is calculated by
+ // dividing this field value by 100, so this field must be between 0 and
+ // 100, inclusive. When specified, the value must be greater than
+ // imageGCLowThresholdPercent.
+ // Default: 85
+ // +optional
+ ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty"`
+ // imageGCLowThresholdPercent is the percent of disk usage before which
+ // image garbage collection is never run. Lowest disk usage to garbage
+ // collect to. The percent is calculated by dividing this field value by 100,
+ // so the field value must be between 0 and 100, inclusive. When specified, the
+ // value must be less than imageGCHighThresholdPercent.
+ // Default: 80
+ // +optional
+ ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty"`
+ // volumeStatsAggPeriod is the frequency for calculating and caching volume
+ // disk usage for all pods.
+ // Default: "1m"
+ // +optional
+ VolumeStatsAggPeriod metav1.Duration `json:"volumeStatsAggPeriod,omitempty"`
+ // kubeletCgroups is the absolute name of cgroups to isolate the kubelet in
+ // Default: ""
+ // +optional
+ KubeletCgroups string `json:"kubeletCgroups,omitempty"`
+ // systemCgroups is absolute name of cgroups in which to place
+ // all non-kernel processes that are not already in a container. Empty
+ // for no container. Rolling back the flag requires a reboot.
+ // The cgroupRoot must be specified if this field is not empty.
+ // Default: ""
+ // +optional
+ SystemCgroups string `json:"systemCgroups,omitempty"`
+ // cgroupRoot is the root cgroup to use for pods. This is handled by the
+ // container runtime on a best effort basis.
+ // +optional
+ CgroupRoot string `json:"cgroupRoot,omitempty"`
+ // cgroupsPerQOS enable QoS based CGroup hierarchy: top level CGroups for QoS classes
+ // and all Burstable and BestEffort Pods are brought up under their specific top level
+ // QoS CGroup.
+ // Default: true
+ // +optional
+ CgroupsPerQOS *bool `json:"cgroupsPerQOS,omitempty"`
+ // cgroupDriver is the driver edged uses to manipulate CGroups on the host (cgroupfs
+ // or systemd).
+ // Default: "cgroupfs"
+ // +optional
+ CgroupDriver string `json:"cgroupDriver,omitempty"`
+ // cpuManagerPolicy is the name of the policy to use.
+ // Requires the CPUManager feature gate to be enabled.
+ // Default: "None"
+ // +optional
+ CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"`
+ // cpuManagerPolicyOptions is a set of key=value which allows to set extra options
+ // to fine tune the behaviour of the cpu manager policies.
+ // Requires both the "CPUManager" and "CPUManagerPolicyOptions" feature gates to be enabled.
+ // Default: nil
+ // +optional
+ CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"`
+ // cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager.
+ // Requires the CPUManager feature gate to be enabled.
+ // Default: "10s"
+ // +optional
+ CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"`
+ // memoryManagerPolicy is the name of the policy to use by memory manager.
+ // Requires the MemoryManager feature gate to be enabled.
+ // Default: "none"
+ // +optional
+ MemoryManagerPolicy string `json:"memoryManagerPolicy,omitempty"`
+ // topologyManagerPolicy is the name of the topology manager policy to use.
+ // Valid values include:
+ //
+ // - `restricted`: edged only allows pods with optimal NUMA node alignment for
+ // requested resources;
+ // - `best-effort`: edged will favor pods with NUMA alignment of CPU and device
+ // resources;
+ // - `none`: edged has no knowledge of NUMA alignment of a pod's CPU and device resources.
+ // - `single-numa-node`: edged only allows pods with a single NUMA alignment
+ // of CPU and device resources.
+ //
+ // Policies other than "none" require the TopologyManager feature gate to be enabled.
+ // Default: "none"
+ // +optional
+ TopologyManagerPolicy string `json:"topologyManagerPolicy,omitempty"`
+ // topologyManagerScope represents the scope of topology hint generation
+ // that topology manager requests and hint providers generate. Valid values include:
+ //
+ // - `container`: topology policy is applied on a per-container basis.
+ // - `pod`: topology policy is applied on a per-pod basis.
+ //
+ // "pod" scope requires the TopologyManager feature gate to be enabled.
+ // Default: "container"
+ // +optional
+ TopologyManagerScope string `json:"topologyManagerScope,omitempty"`
+ // TopologyManagerPolicyOptions is a set of key=value which allows to set extra options
+ // to fine tune the behaviour of the topology manager policies.
+ // Requires both the "TopologyManager" and "TopologyManagerPolicyOptions" feature gates to be enabled.
+ // Default: nil
+ // +optional
+ TopologyManagerPolicyOptions map[string]string `json:"topologyManagerPolicyOptions,omitempty"`
+ // qosReserved is a set of resource name to percentage pairs that specify
+ // the minimum percentage of a resource reserved for exclusive use by the
+ // guaranteed QoS tier.
+ // Currently supported resources: "memory"
+ // Requires the QOSReserved feature gate to be enabled.
+ // Default: nil
+ // +optional
+ QOSReserved map[string]string `json:"qosReserved,omitempty"`
+ // runtimeRequestTimeout is the timeout for all runtime requests except long running
+ // requests - pull, logs, exec and attach.
+ // Default: "2m"
+ // +optional
+ RuntimeRequestTimeout metav1.Duration `json:"runtimeRequestTimeout,omitempty"`
+ // hairpinMode specifies how the edged should configure the container
+ // bridge for hairpin packets.
+ // Setting this flag allows endpoints in a Service to loadbalance back to
+ // themselves if they should try to access their own Service. Values:
+ //
+ // - "promiscuous-bridge": make the container bridge promiscuous.
+ // - "hairpin-veth": set the hairpin flag on container veth interfaces.
+ // - "none": do nothing.
+ //
+ // Generally, one must set `--hairpin-mode=hairpin-veth to` achieve hairpin NAT,
+ // because promiscuous-bridge assumes the existence of a container bridge named cbr0.
+ // Default: "promiscuous-bridge"
+ // +optional
+ HairpinMode string `json:"hairpinMode,omitempty"`
+ // maxPods is the maximum number of Pods that can run on this Kubelet.
+ // The value must be a non-negative integer.
+ // Default: 110
+ // +optional
+ MaxPods int32 `json:"maxPods,omitempty"`
+ // podCIDR is the CIDR to use for pod IP addresses, only used in standalone mode.
+ // In cluster mode, this is obtained from the control plane.
+ // Default: ""
+ // +optional
+ PodCIDR string `json:"podCIDR,omitempty"`
+ // podPidsLimit is the maximum number of PIDs in any pod.
+ // Default: -1
+ // +optional
+ PodPidsLimit *int64 `json:"podPidsLimit,omitempty"`
+ // resolvConf is the resolver configuration file used as the basis
+ // for the container DNS resolution configuration.
+ // If set to the empty string, will override the default and effectively disable DNS lookups.
+ // Default: "/etc/resolv.conf"
+ // +optional
+ ResolverConfig *string `json:"resolvConf,omitempty"`
+ // cpuCFSQuota enables CPU CFS quota enforcement for containers that
+ // specify CPU limits.
+ // Default: true
+ // +optional
+ CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty"`
+ // cpuCFSQuotaPeriod is the CPU CFS quota period value, `cpu.cfs_period_us`.
+ // The value must be between 1 us and 1 second, inclusive.
+ // Requires the CustomCPUCFSQuotaPeriod feature gate to be enabled.
+ // Default: "100ms"
+ // +optional
+ CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty"`
+ // nodeStatusMaxImages caps the number of images reported in Node.status.images.
+ // The value must be greater than -2.
+ // Note: If -1 is specified, no cap will be applied. If 0 is specified, no image is returned.
+ // Default: 0
+ // +optional
+ NodeStatusMaxImages *int32 `json:"nodeStatusMaxImages,omitempty"`
+ // maxOpenFiles is Number of files that can be opened by edged process.
+ // The value must be a non-negative number.
+ // Default: 1000000
+ // +optional
+ MaxOpenFiles int64 `json:"maxOpenFiles,omitempty"`
+ // contentType is contentType of requests sent to apiserver.
+ // Default: "application/json"
+ // +optional
+ ContentType string `json:"contentType,omitempty"`
+ // serializeImagePulls when enabled, tells the edged to pull images one
+ // at a time. We recommend *not* changing the default value on nodes that
+ // run docker daemon with version < 1.9 or an Aufs storage backend.
+ // Issue #10959 has more details.
+ // Default: true
+ // +optional
+ SerializeImagePulls *bool `json:"serializeImagePulls,omitempty"`
+ // MaxParallelImagePulls sets the maximum number of image pulls in parallel.
+ // This field cannot be set if SerializeImagePulls is true.
+ // Setting it to nil means no limit.
+ // Default: nil
+ // +optional
+ MaxParallelImagePulls *int32 `json:"maxParallelImagePulls,omitempty"`
+ // evictionHard is a map of signal names to quantities that defines hard eviction
+ // thresholds. For example: `{"memory.available": "300Mi"}`.
+ // To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource.
+ // Default:
+ // memory.available: "100Mi"
+ // nodefs.available: "10%"
+ // nodefs.inodesFree: "5%"
+ // imagefs.available: "15%"
+ // +optional
+ EvictionHard map[string]string `json:"evictionHard,omitempty"`
+ // evictionSoft is a map of signal names to quantities that defines soft eviction thresholds.
+ // For example: `{"memory.available": "300Mi"}`.
+ // Default: nil
+ // +optional
+ EvictionSoft map[string]string `json:"evictionSoft,omitempty"`
+ // evictionSoftGracePeriod is a map of signal names to quantities that defines grace
+ // periods for each soft eviction signal. For example: `{"memory.available": "30s"}`.
+ // Default: nil
+ // +optional
+ EvictionSoftGracePeriod map[string]string `json:"evictionSoftGracePeriod,omitempty"`
+ // evictionPressureTransitionPeriod is the duration for which the kubelet has to wait
+ // before transitioning out of an eviction pressure condition.
+ // Default: "5m"
+ // +optional
+ EvictionPressureTransitionPeriod metav1.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
+ // evictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use
+ // when terminating pods in response to a soft eviction threshold being met. This value
+ // effectively caps the Pod's terminationGracePeriodSeconds value during soft evictions.
+ // Note: Due to issue #64530, the behavior has a bug where this value currently just
+ // overrides the grace period during soft eviction, which can increase the grace
+ // period from what is set on the Pod. This bug will be fixed in a future release.
+ // Default: 0
+ // +optional
+ EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod,omitempty"`
+ // evictionMinimumReclaim is a map of signal names to quantities that defines minimum reclaims,
+ // which describe the minimum amount of a given resource the kubelet will reclaim when
+ // performing a pod eviction while that resource is under pressure.
+ // For example: `{"imagefs.available": "2Gi"}`.
+ // Default: nil
+ // +optional
+ EvictionMinimumReclaim map[string]string `json:"evictionMinimumReclaim,omitempty"`
+ // podsPerCore is the maximum number of pods per core. Cannot exceed maxPods.
+ // The value must be a non-negative integer.
+ // If 0, there is no limit on the number of Pods.
+ // Default: 0
+ // +optional
+ PodsPerCore int32 `json:"podsPerCore,omitempty"`
+ // enableControllerAttachDetach enables the Attach/Detach controller to
+ // manage attachment/detachment of volumes scheduled to this node, and
+ // disables kubelet from executing any attach/detach operations.
+ // Default: true
+ // +optional
+ EnableControllerAttachDetach *bool `json:"enableControllerAttachDetach,omitempty"`
+ // protectKernelDefaults, if true, causes the edged to error if kernel
+ // flags are not as it expects. Otherwise the edged will attempt to modify
+ // kernel flags to match its expectation.
+ // Default: false
+ // +optional
+ ProtectKernelDefaults bool `json:"protectKernelDefaults,omitempty"`
+ // makeIPTablesUtilChains, if true, causes the Kubelet to create the
+ // KUBE-IPTABLES-HINT chain in iptables as a hint to other components about the
+ // configuration of iptables on the system.
+ // Default: true
+ // +optional
+ MakeIPTablesUtilChains *bool `json:"makeIPTablesUtilChains,omitempty"`
+ // iptablesMasqueradeBit formerly controlled the creation of the KUBE-MARK-MASQ
+ // chain.
+ // Deprecated: no longer has any effect.
+ // Default: 14
+ // +optional
+ IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit,omitempty"`
+ // iptablesDropBit formerly controlled the creation of the KUBE-MARK-DROP chain.
+ // Deprecated: no longer has any effect.
+ // Default: 15
+ // +optional
+ IPTablesDropBit *int32 `json:"iptablesDropBit,omitempty"`
+ // featureGates is a map of feature names to bools that enable or disable experimental
+ // features. This field modifies piecemeal the built-in default values from
+ // "k8s.io/kubernetes/pkg/features/kube_features.go".
+ // Default: nil
+ // +optional
+ FeatureGates map[string]bool `json:"featureGates,omitempty"`
+ // failSwapOn tells the edged to fail to start if swap is enabled on the node.
+ // Default: false
+ // +optional
+ FailSwapOn *bool `json:"failSwapOn,omitempty"`
+ // memorySwap configures swap memory available to container workloads.
+ // +featureGate=NodeSwap
+ // +optional
+ MemorySwap tailoredkubeletconfigv1beta1.MemorySwapConfiguration `json:"memorySwap,omitempty"`
+ // containerLogMaxSize is a quantity defining the maximum size of the container log
+ // file before it is rotated. For example: "5Mi" or "256Ki".
+ // Default: "10Mi"
+ // +optional
+ ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"`
+ // containerLogMaxFiles specifies the maximum number of container log files that can
+ // be present for a container.
+ // Default: 5
+ // +optional
+ ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty"`
+ // configMapAndSecretChangeDetectionStrategy is a mode in which ConfigMap and Secret
+ // managers are running. Valid values include:
+ //
+ // - `Get`: edged fetches necessary objects directly from the API server;
+ // - `Cache`: edged uses TTL cache for object fetched from the API server;
+ // - `Watch`: edged uses watches to observe changes to objects that are in its interest.
+ //
+ // Default: "Get"
+ // +optional
+ ConfigMapAndSecretChangeDetectionStrategy tailoredkubeletconfigv1beta1.ResourceChangeDetectionStrategy `json:"configMapAndSecretChangeDetectionStrategy,omitempty"`
+
+ /* the following fields are meant for Node Allocatable */
+
+ // systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G)
+ // pairs that describe resources reserved for non-kubernetes components.
+ // Currently only cpu and memory are supported.
+ // See http://kubernetes.io/docs/user-guide/compute-resources for more detail.
+ // Default: nil
+ // +optional
+ SystemReserved map[string]string `json:"systemReserved,omitempty"`
+ // kubeReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
+ // that describe resources reserved for kubernetes system components.
+ // Currently cpu, memory and local storage for root file system are supported.
+ // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ // for more details.
+ // Default: nil
+ // +optional
+ KubeReserved map[string]string `json:"kubeReserved,omitempty"`
+ // The reservedSystemCPUs option specifies the CPU list reserved for the host
+ // level system threads and kubernetes related threads. This provide a "static"
+ // CPU list rather than the "dynamic" list by systemReserved and kubeReserved.
+ // This option does not support systemReservedCgroup or kubeReservedCgroup.
+ ReservedSystemCPUs string `json:"reservedSystemCPUs,omitempty"`
+ // showHiddenMetricsForVersion is the previous version for which you want to show
+ // hidden metrics.
+ // Only the previous minor version is meaningful, other values will not be allowed.
+ // The format is `<major>.<minor>`, e.g.: `1.16`.
+ // The purpose of this format is make sure you have the opportunity to notice
+ // if the next release hides additional metrics, rather than being surprised
+ // when they are permanently removed in the release after that.
+ // Default: ""
+ // +optional
+ ShowHiddenMetricsForVersion string `json:"showHiddenMetricsForVersion,omitempty"`
+ // systemReservedCgroup helps the edged identify absolute name of top level CGroup used
+ // to enforce `systemReserved` compute resource reservation for OS system daemons.
+ // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md)
+ // doc for more information.
+ // Default: ""
+ // +optional
+ SystemReservedCgroup string `json:"systemReservedCgroup,omitempty"`
+ // kubeReservedCgroup helps the edged identify absolute name of top level CGroup used
+ // to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons.
+ // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md)
+ // doc for more information.
+ // Default: ""
+ // +optional
+ KubeReservedCgroup string `json:"kubeReservedCgroup,omitempty"`
+ // This flag specifies the various Node Allocatable enforcements that edged needs to perform.
+ // This flag accepts a list of options. Acceptable options are `none`, `pods`,
+ // `system-reserved` and `kube-reserved`.
+ // If `none` is specified, no other options may be specified.
+ // When `system-reserved` is in the list, systemReservedCgroup must be specified.
+ // When `kube-reserved` is in the list, kubeReservedCgroup must be specified.
+ // This field is supported only when `cgroupsPerQOS` is set to true.
+ // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md)
+ // for more information.
+ // Default: ["pods"]
+ // +optional
+ EnforceNodeAllocatable []string `json:"enforceNodeAllocatable,omitempty"`
+ // A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in `*`).
+ // Unsafe sysctl groups are `kernel.shm*`, `kernel.msg*`, `kernel.sem`, `fs.mqueue.*`,
+ // and `net.*`. For example: "`kernel.msg*,net.ipv4.route.min_pmtu`"
+ // Default: []
+ // +optional
+ AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`
+ // volumePluginDir is the full path of the directory in which to search
+ // for additional third party volume plugins.
+ // Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
+ // +optional
+ VolumePluginDir string `json:"volumePluginDir,omitempty"`
+ // kernelMemcgNotification, if set, instructs the edged to integrate with the
+ // kernel memcg notification for determining if memory eviction thresholds are
+ // exceeded rather than polling.
+ // Default: false
+ // +optional
+ KernelMemcgNotification bool `json:"kernelMemcgNotification,omitempty"`
+ // logging specifies the options of logging.
+ // Refer to [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go)
+ // for more information.
+ // Default:
+ // Format: text
+ // + optional
+ Logging logsapi.LoggingConfiguration `json:"logging,omitempty"`
+ // enableSystemLogHandler enables system logs via web interface host:port/logs/
+ // Default: true
+ // +optional
+ EnableSystemLogHandler *bool `json:"enableSystemLogHandler,omitempty"`
+ // enableSystemLogQuery enables the node log query feature on the /logs endpoint.
+ // EnableSystemLogHandler has to be enabled in addition for this feature to work.
+ // Default: false
+ // +featureGate=NodeLogQuery
+ // +optional
+ EnableSystemLogQuery *bool `json:"enableSystemLogQuery,omitempty"`
+ // shutdownGracePeriod specifies the total duration that the node should delay the
+ // shutdown and total grace period for pod termination during a node shutdown.
+ // Default: "0s"
+ // +featureGate=GracefulNodeShutdown
+ // +optional
+ ShutdownGracePeriod metav1.Duration `json:"shutdownGracePeriod,omitempty"`
+ // shutdownGracePeriodCriticalPods specifies the duration used to terminate critical
+ // pods during a node shutdown. This should be less than shutdownGracePeriod.
+ // For example, if shutdownGracePeriod=30s, and shutdownGracePeriodCriticalPods=10s,
+ // during a node shutdown the first 20 seconds would be reserved for gracefully
+ // terminating normal pods, and the last 10 seconds would be reserved for terminating
+ // critical pods.
+ // Default: "0s"
+ // +featureGate=GracefulNodeShutdown
+ // +optional
+ ShutdownGracePeriodCriticalPods metav1.Duration `json:"shutdownGracePeriodCriticalPods,omitempty"`
+ // shutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based
+ // on their associated priority class value.
+ // When a shutdown request is received, the Kubelet will initiate shutdown on all pods
+ // running on the node with a grace period that depends on the priority of the pod,
+ // and then wait for all pods to exit.
+ // Each entry in the array represents the graceful shutdown time a pod with a priority
+ // class value that lies in the range of that value and the next higher entry in the
+ // list when the node is shutting down.
+ // For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to
+ // shutdown, and all remaining pods 30s to shutdown.
+ //
+ // shutdownGracePeriodByPodPriority:
+ // - priority: 2000000000
+ // shutdownGracePeriodSeconds: 10
+ // - priority: 10000
+ // shutdownGracePeriodSeconds: 20
+ // - priority: 0
+ // shutdownGracePeriodSeconds: 30
+ //
+ // The time the Kubelet will wait before exiting will at most be the maximum of all
+ // shutdownGracePeriodSeconds for each priority class range represented on the node.
+ // When all pods have exited or reached their grace periods, the Kubelet will release
+ // the shutdown inhibit lock.
+ // Requires the GracefulNodeShutdown feature gate to be enabled.
+ // This configuration must be empty if either ShutdownGracePeriod or ShutdownGracePeriodCriticalPods is set.
+ // Default: nil
+ // +featureGate=GracefulNodeShutdownBasedOnPodPriority
+ // +optional
+ ShutdownGracePeriodByPodPriority []tailoredkubeletconfigv1beta1.ShutdownGracePeriodByPodPriority `json:"shutdownGracePeriodByPodPriority,omitempty"`
+ // reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes.
+ // The parameter makes sense only in the context of the memory manager feature.
+ // The memory manager will not allocate reserved memory for container workloads.
+ // For example, if you have a NUMA0 with 10Gi of memory and the reservedMemory was
+ // specified to reserve 1Gi of memory at NUMA0, the memory manager will assume that
+ // only 9Gi is available for allocation.
+ // You can specify a different amount of NUMA node and memory types.
+ // You can omit this parameter at all, but you should be aware that the amount of
+ // reserved memory from all NUMA nodes should be equal to the amount of memory specified
+ // by the [node allocatable](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).
+ // If at least one node allocatable parameter has a non-zero value, you will need
+ // to specify at least one NUMA node.
+ // Also, avoid specifying:
+ //
+ // 1. Duplicates, the same NUMA node, and memory type, but with a different value.
+ // 2. zero limits for any memory type.
+ // 3. NUMAs nodes IDs that do not exist under the machine.
+ // 4. memory types except for memory and hugepages-<size>
+ //
+ // Default: nil
+ // +optional
+ ReservedMemory []tailoredkubeletconfigv1beta1.MemoryReservation `json:"reservedMemory,omitempty"`
+ // enableProfilingHandler enables profiling via web interface host:port/debug/pprof/
+ // Default: true
+ // +optional
+ EnableProfilingHandler *bool `json:"enableProfilingHandler,omitempty"`
+ // enableDebugFlagsHandler enables flags endpoint via web interface host:port/debug/flags/v
+ // Default: true
+ // +optional
+ EnableDebugFlagsHandler *bool `json:"enableDebugFlagsHandler,omitempty"`
+ // SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads.
+ // This requires the corresponding SeccompDefault feature gate to be enabled as well.
+ // Default: false
+ // +optional
+ SeccompDefault *bool `json:"seccompDefault,omitempty"`
+ // MemoryThrottlingFactor specifies the factor multiplied by the memory limit or node allocatable memory
+ // when setting the cgroupv2 memory.high value to enforce MemoryQoS.
+ // Decreasing this factor will set lower high limit for container cgroups and put heavier reclaim pressure
+ // while increasing will put less reclaim pressure.
+ // See http://kep.k8s.io/2570 for more details.
+ // Default: 0.8
+ // +featureGate=MemoryQoS
+ // +optional
+ MemoryThrottlingFactor *float64 `json:"memoryThrottlingFactor,omitempty"`
+ // registerWithTaints are an array of taints to add to a node object when
+ // the kubelet registers itself. This only takes effect when registerNode
+ // is true and upon the initial registration of the node.
+ // Default: nil
+ // +optional
+ RegisterWithTaints []v1.Taint `json:"registerWithTaints,omitempty"`
+ // registerNode enables automatic registration with the apiserver.
+ // Default: true
+ // +optional
+ RegisterNode *bool `json:"registerNode,omitempty"`
+ // LocalStorageCapacityIsolation enables local ephemeral storage isolation feature. The default setting is true.
+ // This feature allows users to set request/limit for container's ephemeral storage and manage it in a similar way
+ // as cpu and memory. It also allows setting sizeLimit for emptyDir volume, which will trigger pod eviction if disk
+ // usage from the volume exceeds the limit.
+ // This feature depends on the capability of detecting correct root file system disk usage. For certain systems,
+ // such as kind rootless, if this capability cannot be supported, the feature LocalStorageCapacityIsolation should be
+ // disabled. Once disabled, user should not set request/limit for container's ephemeral storage, or sizeLimit for emptyDir.
+ // Default: true
+ // +optional
+ LocalStorageCapacityIsolation *bool `json:"localStorageCapacityIsolation,omitempty"`
+ // ContainerRuntimeEndpoint is the endpoint of container runtime.
+ // Unix Domain Sockets are supported on Linux, while npipe and tcp endpoints are supported on Windows.
+ // Examples:'unix:///path/to/runtime.sock', 'npipe:////./pipe/runtime'
+ ContainerRuntimeEndpoint string `json:"containerRuntimeEndpoint"`
+ // ImageServiceEndpoint is the endpoint of container image service.
+ // Unix Domain Socket are supported on Linux, while npipe and tcp endpoints are supported on Windows.
+ // Examples:'unix:///path/to/runtime.sock', 'npipe:////./pipe/runtime'.
+ // If not specified, the value in containerRuntimeEndpoint is used.
+ // +optional
+ ImageServiceEndpoint string `json:"imageServiceEndpoint,omitempty"`
+}
+
+// TailoredKubeletFlag indicates the tailored kubelet flag
+type TailoredKubeletFlag struct {
+ // HostnameOverride is the hostname used to identify the kubelet instead
+ // of the actual hostname.
+ // default os.Hostname()
+ HostnameOverride string `json:"hostnameOverride,omitempty"`
+ // NodeIP is IP address of the node.
+ // If set, edged will use this IP address for the node.
+ NodeIP string `json:"nodeIP,omitempty"`
+ // Container-runtime-specific options.
+ ContainerRuntimeOptions
+ // rootDirectory is the directory path to place kubelet files (volume
+ // mounts,etc).
+ // default "/var/lib/edged"
+ RootDirectory string `json:"rootDirectory,omitempty"`
+ // WindowsService should be set to true if kubelet is running as a service on Windows.
+ // Its corresponding flag only gets registered in Windows builds.
+ WindowsService bool `json:"windowsService,omitempty"`
+ // WindowsPriorityClass sets the priority class associated with the Kubelet process
+ // Its corresponding flag only gets registered in Windows builds
+ // The default priority class associated with any process in Windows is NORMAL_PRIORITY_CLASS. Keeping it as is
+ // to maintain backwards compatibility.
+ // Source: https://docs.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities
+ WindowsPriorityClass string `json:"windowsPriorityClass,omitempty"`
+ // experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path
+ ExperimentalMounterPath string `json:"experimentalMounterPath,omitempty"`
+ // This flag, if set, will avoid including `EvictionHard` limits while computing Node Allocatable.
+ // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information.
+ ExperimentalNodeAllocatableIgnoreEvictionThreshold bool `json:"experimentalNodeAllocatableIgnoreEvictionThreshold,omitempty"`
+ // Node Labels are the node labels to add when registering the node in the cluster
+ NodeLabels map[string]string `json:"nodeLabels,omitempty"`
+ // DEPRECATED FLAGS
+ // minimumGCAge is the minimum age for a finished container before it is
+ // garbage collected.
+ MinimumGCAge metav1.Duration `json:"minimumGCAge,omitempty"`
+ // maxPerPodContainerCount is the maximum number of old instances to
+ // retain per container. Each container takes up some disk space.
+ MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount,omitempty"`
+ // maxContainerCount is the maximum number of old instances of containers
+ // to retain globally. Each container takes up some disk space.
+ MaxContainerCount int32 `json:"maxContainerCount,omitempty"`
+ // registerSchedulable tells the edgecore to register the node as
+ // schedulable. Won't have any effect if register-node is false.
+ // DEPRECATED: use registerWithTaints instead
+ RegisterSchedulable bool `json:"registerSchedulable,omitempty"`
+ // This flag, if set, instructs the edged to keep volumes from terminated pods mounted to the node.
+ // This can be useful for debugging volume related issues.
+ KeepTerminatedPodVolumes bool `json:"keepTerminatedPodVolumes,omitempty"`
+ // SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads on the node.
+ // To use this flag, the corresponding SeccompDefault feature gate must be enabled.
+ SeccompDefault bool `json:"seccompDefault,omitempty"`
+}
+
+// ContainerRuntimeOptions defines options for the container runtime.
+type ContainerRuntimeOptions struct {
+ // General Options.
+
+ // RuntimeCgroups that container runtime is expected to be isolated in.
+ RuntimeCgroups string `json:"runtimeCgroups,omitempty"`
+ // PodSandboxImage is the image whose network/ipc namespaces
+ // containers in each pod will use.
+ // default kubeedge/pause:3.6
+ PodSandboxImage string `json:"podSandboxImage,omitempty"`
+}
+
+// EdgeHub indicates the EdgeHub module config
+type EdgeHub struct {
+ // Enable indicates whether EdgeHub is enabled,
+ // if set to false (for debugging etc.), skip checking other EdgeHub configs.
+ // default true
+ Enable bool `json:"enable"`
+ // Heartbeat indicates heart beat (second)
+ // default 15
+ Heartbeat int32 `json:"heartbeat,omitempty"`
+ // MessageQPS is the QPS to allow while send message to cloudHub.
+ // DefaultQPS: 30
+ MessageQPS int32 `json:"messageQPS,omitempty"`
+ // MessageBurst is the burst to allow while send message to cloudHub.
+ // DefaultBurst: 60
+ MessageBurst int32 `json:"messageBurst,omitempty"`
+ // ProjectID indicates project id
+ // default e632aba927ea4ac2b575ec1603d56f10
+ ProjectID string `json:"projectID,omitempty"`
+ // TLSCAFile set ca file path
+ // default "/etc/kubeedge/ca/rootCA.crt"
+ TLSCAFile string `json:"tlsCaFile,omitempty"`
+ // TLSCertFile indicates the file containing x509 Certificate for HTTPS
+ // default "/etc/kubeedge/certs/server.crt"
+ TLSCertFile string `json:"tlsCertFile,omitempty"`
+ // TLSPrivateKeyFile indicates the file containing x509 private key matching tlsCertFile
+ // default "/etc/kubeedge/certs/server.key"
+ TLSPrivateKeyFile string `json:"tlsPrivateKeyFile,omitempty"`
+ // Quic indicates quic config for EdgeHub module
+ // Optional if websocket is configured
+ Quic *EdgeHubQUIC `json:"quic,omitempty"`
+ // WebSocket indicates websocket config for EdgeHub module
+ // Optional if quic is configured
+ WebSocket *EdgeHubWebSocket `json:"websocket,omitempty"`
+ // Token indicates the priority of joining the cluster for the edge
+ // Deprecated: will be removed in future release, will not be saved in configuration file
+ Token string `json:"token"`
+ // HTTPServer indicates the server for edge to apply for the certificate.
+ HTTPServer string `json:"httpServer,omitempty"`
+ // RotateCertificates indicates whether edge certificate can be rotated
+ // default true
+ RotateCertificates bool `json:"rotateCertificates,omitempty"`
+}
+
+// EdgeHubQUIC indicates the quic client config
+type EdgeHubQUIC struct {
+ // Enable indicates whether enable this protocol
+ // default false
+ Enable bool `json:"enable"`
+ // HandshakeTimeout indicates handshake timeout (second)
+ // default 30
+ HandshakeTimeout int32 `json:"handshakeTimeout,omitempty"`
+ // ReadDeadline indicates read deadline (second)
+ // default 15
+ ReadDeadline int32 `json:"readDeadline,omitempty"`
+ // Server indicates quic server address (ip:port)
+ // +Required
+ Server string `json:"server,omitempty"`
+ // WriteDeadline indicates write deadline (second)
+ // default 15
+ WriteDeadline int32 `json:"writeDeadline,omitempty"`
+}
+
+// EdgeHubWebSocket indicates the websocket client config
+type EdgeHubWebSocket struct {
+ // Enable indicates whether enable this protocol
+ // default true
+ Enable bool `json:"enable"`
+ // HandshakeTimeout indicates handshake timeout (second)
+ // default 30
+ HandshakeTimeout int32 `json:"handshakeTimeout,omitempty"`
+ // ReadDeadline indicates read deadline (second)
+ // default 15
+ ReadDeadline int32 `json:"readDeadline,omitempty"`
+ // Server indicates websocket server address (ip:port)
+ // +Required
+ Server string `json:"server,omitempty"`
+ // WriteDeadline indicates write deadline (second)
+ // default 15
+ WriteDeadline int32 `json:"writeDeadline,omitempty"`
+}
+
+// EventBus indicates the event bus module config
+type EventBus struct {
+ // Enable indicates whether EventBus is enabled, if set to false (for debugging etc.),
+ // skip checking other EventBus configs.
+ // default true
+ Enable bool `json:"enable"`
+ // MqttQOS indicates mqtt qos
+ // 0: QOSAtMostOnce, 1: QOSAtLeastOnce, 2: QOSExactlyOnce
+ // default 0
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ MqttQOS uint8 `json:"mqttQOS"`
+ // MqttRetain indicates whether server will store the message and can be delivered to future subscribers,
+ // if this flag set true, sever will store the message and can be delivered to future subscribers
+ // default false
+ // Note: Can not use "omitempty" option, It will affect the output of the default configuration file
+ MqttRetain bool `json:"mqttRetain"`
+ // MqttSessionQueueSize indicates the size of how many sessions will be handled.
+ // default 100
+ MqttSessionQueueSize int32 `json:"mqttSessionQueueSize,omitempty"`
+ // MqttServerInternal indicates internal mqtt broker url
+ // default "tcp://127.0.0.1:1884"
+ MqttServerInternal string `json:"mqttServerInternal,omitempty"`
+ // MqttServerExternal indicates external mqtt broker url
+ // default "tcp://127.0.0.1:1883"
+ MqttServerExternal string `json:"mqttServerExternal,omitempty"`
+ // MqttSubClientID indicates mqtt subscribe ClientID
+ // default ""
+ MqttSubClientID string `json:"mqttSubClientID"`
+ // MqttPubClientID indicates mqtt publish ClientID
+ // default ""
+ MqttPubClientID string `json:"mqttPubClientID"`
+ // MqttUsername indicates mqtt username
+ // default ""
+ MqttUsername string `json:"mqttUsername"`
+ // MqttPassword indicates mqtt password
+ // default ""
+ MqttPassword string `json:"mqttPassword"`
+ // MqttMode indicates which broker type will be chosen
+ // 0: internal mqtt broker enable only.
+ // 1: internal and external mqtt broker enable.
+ // 2: external mqtt broker enable only
+ // +Required
+ // default: 2
+ MqttMode MqttMode `json:"mqttMode"`
+ // Tls indicates tls config for EventBus module
+ TLS *EventBusTLS `json:"eventBusTLS,omitempty"`
+}
+
+// EventBusTLS indicates the EventBus tls config with MQTT broker
+type EventBusTLS struct {
+ // Enable indicates whether enable tls connection
+ // default false
+ Enable bool `json:"enable"`
+ // TLSMqttCAFile sets ca file path
+ // default "/etc/kubeedge/ca/rootCA.crt"
+ TLSMqttCAFile string `json:"tlsMqttCAFile,omitempty"`
+ // TLSMqttCertFile indicates the file containing x509 Certificate for HTTPS
+ // default "/etc/kubeedge/certs/server.crt"
+ TLSMqttCertFile string `json:"tlsMqttCertFile,omitempty"`
+ // TLSMqttPrivateKeyFile indicates the file containing x509 private key matching tlsMqttCertFile
+ // default "/etc/kubeedge/certs/server.key"
+ TLSMqttPrivateKeyFile string `json:"tlsMqttPrivateKeyFile,omitempty"`
+}
+
+// MetaManager indicates the MetaManager module config
+type MetaManager struct {
+ // Enable indicates whether MetaManager is enabled,
+ // if set to false (for debugging etc.), skip checking other MetaManager configs.
+ // default true
+ Enable bool `json:"enable"`
+ // ContextSendGroup indicates send group
+ ContextSendGroup metaconfig.GroupName `json:"contextSendGroup,omitempty"`
+ // ContextSendModule indicates send module
+ ContextSendModule metaconfig.ModuleName `json:"contextSendModule,omitempty"`
+ // RemoteQueryTimeout indicates remote query timeout (second)
+ // default 60
+ RemoteQueryTimeout int32 `json:"remoteQueryTimeout,omitempty"`
+ // The config of MetaServer
+ MetaServer *MetaServer `json:"metaServer,omitempty"`
+}
+
+type MetaServer struct {
+ Enable bool `json:"enable"`
+ Server string `json:"server"`
+ TLSCaFile string `json:"tlsCaFile"`
+ TLSCertFile string `json:"tlsCertFile"`
+ TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"`
+ ServiceAccountIssuers []string `json:"serviceAccountIssuers"`
+ APIAudiences []string `json:"apiAudiences"`
+ ServiceAccountKeyFiles []string `json:"serviceAccountKeyFiles"`
+ // DummyServer defines the IP address of dummy interface and port
+ // that MetaServer listen on for edge pods to connect, format: ip:port
+ DummyServer string `json:"dummyServer"`
+}
+
+// ServiceBus indicates the ServiceBus module config
+type ServiceBus struct {
+ // Enable indicates whether ServiceBus is enabled,
+ // if set to false (for debugging etc.), skip checking other ServiceBus configs.
+ // default false
+ Enable bool `json:"enable"`
+ // Address indicates address for http server
+ Server string `json:"server"`
+ // Port indicates port for http server
+ Port int `json:"port"`
+ // Timeout indicates timeout for servicebus receive mseeage
+ Timeout int `json:"timeout"`
+}
+
+// DeviceTwin indicates the DeviceTwin module config
+type DeviceTwin struct {
+ // Enable indicates whether DeviceTwin is enabled,
+ // if set to false (for debugging etc.), skip checking other DeviceTwin configs.
+ // default true
+ Enable bool `json:"enable"`
+ // DMISockPath sets the path to dmi.sock
+ // default "/etc/kubeedge/dmi.sock"
+ DMISockPath string `json:"dmiSockPath,omitempty"`
+}
+
+// DBTest indicates the DBTest module config
+type DBTest struct {
+ // Enable indicates whether DBTest is enabled,
+ // if set to false (for debugging etc.), skip checking other DBTest configs.
+ // default false
+ Enable bool `json:"enable"`
+}
+
+// EdgeStream indicates the stream controller
+type EdgeStream struct {
+ // Enable indicates whether edgestream is enabled, if set to false (for debugging etc.), skip checking other configs.
+ // default true
+ Enable bool `json:"enable"`
+
+ // TLSTunnelCAFile indicates ca file path
+ // default /etc/kubeedge/ca/rootCA.crt
+ TLSTunnelCAFile string `json:"tlsTunnelCAFile,omitempty"`
+
+ // TLSTunnelCertFile indicates the file containing x509 Certificate for HTTPS
+ // default /etc/kubeedge/certs/server.crt
+ TLSTunnelCertFile string `json:"tlsTunnelCertFile,omitempty"`
+ // TLSTunnelPrivateKeyFile indicates the file containing x509 private key matching tlsCertFile
+ // default /etc/kubeedge/certs/server.key
+ TLSTunnelPrivateKeyFile string `json:"tlsTunnelPrivateKeyFile,omitempty"`
+
+ // HandshakeTimeout indicates handshake timeout (second)
+ // default 30
+ HandshakeTimeout int32 `json:"handshakeTimeout,omitempty"`
+ // ReadDeadline indicates read deadline (second)
+ // default 15
+ ReadDeadline int32 `json:"readDeadline,omitempty"`
+ // TunnelServer indicates websocket server address (ip:port)
+ // +Required
+ TunnelServer string `json:"server,omitempty"`
+ // WriteDeadline indicates write deadline (second)
+ // default 15
+ WriteDeadline int32 `json:"writeDeadline,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation.go
new file mode 100644
index 000000000..142b8bccd
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "os"
+ "path"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/klog/v2"
+ "k8s.io/kubernetes/pkg/apis/core/validation"
+
+ "github.com/kubeedge/api/componentconfig/edgecore/v1alpha2"
+ utilvalidation "github.com/kubeedge/api/util/validation"
+)
+
+// ValidateEdgeCoreConfiguration validates `c` and returns an errorList if it is invalid
+func ValidateEdgeCoreConfiguration(c *v1alpha2.EdgeCoreConfig) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateDataBase(*c.DataBase)...)
+ allErrs = append(allErrs, ValidateModuleEdged(*c.Modules.Edged)...)
+ allErrs = append(allErrs, ValidateModuleEdgeHub(*c.Modules.EdgeHub)...)
+ allErrs = append(allErrs, ValidateModuleEventBus(*c.Modules.EventBus)...)
+ allErrs = append(allErrs, ValidateModuleMetaManager(*c.Modules.MetaManager)...)
+ allErrs = append(allErrs, ValidateModuleServiceBus(*c.Modules.ServiceBus)...)
+ allErrs = append(allErrs, ValidateModuleDeviceTwin(*c.Modules.DeviceTwin)...)
+ allErrs = append(allErrs, ValidateModuleDBTest(*c.Modules.DBTest)...)
+ allErrs = append(allErrs, ValidateModuleEdgeStream(*c.Modules.EdgeStream)...)
+ return allErrs
+}
+
+// ValidateDataBase validates `db` and returns an errorList if it is invalid
+func ValidateDataBase(db v1alpha2.DataBase) field.ErrorList {
+ allErrs := field.ErrorList{}
+ sourceDir := path.Dir(db.DataSource)
+ if !utilvalidation.FileIsExist(sourceDir) {
+ if err := os.MkdirAll(sourceDir, os.ModePerm); err != nil {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("DataSource"), db.DataSource,
+ fmt.Sprintf("create DataSoure dir %v error ", sourceDir)))
+ }
+ }
+ return allErrs
+}
+
+// ValidateModuleEdged validates `e` and returns an errorList if it is invalid
+func ValidateModuleEdged(e v1alpha2.Edged) field.ErrorList {
+ if !e.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ messages := validation.ValidateNodeName(e.HostnameOverride, false)
+ for _, msg := range messages {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("HostnameOverride"), e.HostnameOverride, msg))
+ }
+ if e.NodeIP == "" {
+ klog.Warningf("NodeIP is empty , use default ip which can connect to cloud.")
+ }
+ if err := ValidateCgroupDriver(e.TailoredKubeletConfig.CgroupDriver); err != nil {
+ allErrs = append(allErrs, err)
+ }
+ return allErrs
+}
+
+// ValidateModuleEdgeHub validates `h` and returns an errorList if it is invalid
+func ValidateModuleEdgeHub(h v1alpha2.EdgeHub) field.ErrorList {
+ if !h.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+
+ if h.WebSocket.Enable == h.Quic.Enable {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("enable"),
+ h.Quic.Enable, "websocket.enable and quic.enable cannot be true and false at the same time"))
+ }
+
+ if h.MessageQPS < 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("messageQPS"), h.MessageQPS,
+ "MessageQPS must not be a negative number"))
+ }
+
+ if h.MessageBurst < 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("messageBurst"), h.MessageBurst,
+ "MessageBurst must not be a negative number"))
+ }
+
+ return allErrs
+}
+
+// ValidateModuleEventBus validates `m` and returns an errorList if it is invalid
+func ValidateModuleEventBus(m v1alpha2.EventBus) field.ErrorList {
+ if !m.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ if m.MqttMode > v1alpha2.MqttModeExternal || m.MqttMode < v1alpha2.MqttModeInternal {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("Mode"), m.MqttMode,
+ fmt.Sprintf("Mode need in [%v,%v] range", v1alpha2.MqttModeInternal,
+ v1alpha2.MqttModeExternal)))
+ }
+ return allErrs
+}
+
+// ValidateModuleMetaManager validates `m` and returns an errorList if it is invalid
+func ValidateModuleMetaManager(m v1alpha2.MetaManager) field.ErrorList {
+ if !m.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleServiceBus validates `s` and returns an errorList if it is invalid
+func ValidateModuleServiceBus(s v1alpha2.ServiceBus) field.ErrorList {
+ if !s.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleDeviceTwin validates `d` and returns an errorList if it is invalid
+func ValidateModuleDeviceTwin(d v1alpha2.DeviceTwin) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleDBTest validates `d` and returns an errorList if it is invalid
+func ValidateModuleDBTest(d v1alpha2.DBTest) field.ErrorList {
+ if !d.Enable {
+ return field.ErrorList{}
+ }
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+// ValidateModuleEdgeStream validates `m` and returns an errorList if it is invalid
+func ValidateModuleEdgeStream(m v1alpha2.EdgeStream) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if !m.Enable {
+ return allErrs
+ }
+ return allErrs
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_others.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_others.go
new file mode 100644
index 000000000..e022bf628
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_others.go
@@ -0,0 +1,20 @@
+//go:build !windows
+
+package validation
+
+import (
+ "k8s.io/apimachinery/pkg/util/validation/field"
+
+ "github.com/kubeedge/api/componentconfig/edgecore/v1alpha2"
+)
+
+// ValidateCgroupDriver validates `edged.TailoredKubeletConfig.CgroupDriver` and returns an errorList if it is invalid
+func ValidateCgroupDriver(cgroupDriver string) *field.Error {
+ switch cgroupDriver {
+ case v1alpha2.CGroupDriverCGroupFS, v1alpha2.CGroupDriverSystemd:
+ default:
+ return field.Invalid(field.NewPath("CGroupDriver"), cgroupDriver,
+ "CGroupDriver value error")
+ }
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_test.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_test.go
new file mode 100644
index 000000000..ca8a92939
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_test.go
@@ -0,0 +1,398 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "reflect"
+ "testing"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+
+ "github.com/kubeedge/api/componentconfig/edgecore/v1alpha2"
+)
+
+func TestValidateEdgeCoreConfiguration(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "existFile")
+ if err != nil {
+ t.Errorf("create temp file failed: %v", err)
+ return
+ }
+
+ config := v1alpha2.NewDefaultEdgeCoreConfig()
+ config.DataBase.DataSource = ef.Name()
+
+ errList := ValidateEdgeCoreConfiguration(config)
+ if len(errList) > 0 {
+ t.Errorf("configuration is not right: %v", errList)
+ }
+}
+
+func TestValidateDataBase(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "FileIsExist")
+ if err == nil {
+ db := v1alpha2.DataBase{
+ DataSource: ef.Name(),
+ }
+ if errs := ValidateDataBase(db); len(errs) > 0 {
+ t.Errorf("file %v should exist: err is %v", db, errs)
+ }
+ }
+
+ nonexistentDir := filepath.Join(dir, "not_exists_dir")
+ nonexistentFile := filepath.Join(nonexistentDir, "not_exist_file")
+
+ db := v1alpha2.DataBase{
+ DataSource: nonexistentFile,
+ }
+
+ if errs := ValidateDataBase(db); len(errs) > 0 {
+ t.Errorf("file %v should not created, err is %v", nonexistentFile, errs)
+ }
+}
+
+func TestValidateModuleEdged(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.Edged
+ result field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.Edged{
+ Enable: false,
+ },
+ result: field.ErrorList{},
+ },
+ {
+ name: "case2 not right CGroupDriver",
+ input: v1alpha2.Edged{
+ Enable: true,
+ TailoredKubeletFlag: v1alpha2.TailoredKubeletFlag{
+ HostnameOverride: "example.com",
+ },
+ TailoredKubeletConfig: &v1alpha2.TailoredKubeletConfiguration{
+ CgroupDriver: "fake",
+ },
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("CGroupDriver"), "fake",
+ "CGroupDriver value error")},
+ },
+ {
+ name: "case3 invalid hostname",
+ input: v1alpha2.Edged{
+ Enable: true,
+ TailoredKubeletFlag: v1alpha2.TailoredKubeletFlag{
+ HostnameOverride: "Example%$#com",
+ },
+ TailoredKubeletConfig: &v1alpha2.TailoredKubeletConfiguration{
+ CgroupDriver: v1alpha2.CGroupDriverCGroupFS,
+ },
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("HostnameOverride"), "Example%$#com", `a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')`)},
+ },
+ {
+ name: "case4 success",
+ input: v1alpha2.Edged{
+ Enable: true,
+ TailoredKubeletFlag: v1alpha2.TailoredKubeletFlag{
+ HostnameOverride: "example.com",
+ },
+ TailoredKubeletConfig: &v1alpha2.TailoredKubeletConfiguration{
+ CgroupDriver: v1alpha2.CGroupDriverCGroupFS,
+ },
+ },
+ result: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if got := ValidateModuleEdged(c.input); !reflect.DeepEqual(got, c.result) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.result, got)
+ }
+ }
+}
+
+func TestValidateModuleEdgeHub(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.EdgeHub
+ result field.ErrorList
+ }{
+ {
+ name: "case1 not enable",
+ input: v1alpha2.EdgeHub{
+ Enable: false,
+ },
+ result: field.ErrorList{},
+ },
+ {
+ name: "case2 both quic and websocket are enabled",
+ input: v1alpha2.EdgeHub{
+ Enable: true,
+ Quic: &v1alpha2.EdgeHubQUIC{
+ Enable: true,
+ },
+ WebSocket: &v1alpha2.EdgeHubWebSocket{
+ Enable: true,
+ },
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("enable"),
+ true, "websocket.enable and quic.enable cannot be true and false at the same time")},
+ },
+ {
+ name: "case3 success",
+ input: v1alpha2.EdgeHub{
+ Enable: true,
+ WebSocket: &v1alpha2.EdgeHubWebSocket{
+ Enable: true,
+ },
+ Quic: &v1alpha2.EdgeHubQUIC{
+ Enable: false,
+ },
+ },
+ result: field.ErrorList{},
+ },
+ {
+ name: "case4 MessageQPS must not be a negative number",
+ input: v1alpha2.EdgeHub{
+ Enable: true,
+ WebSocket: &v1alpha2.EdgeHubWebSocket{
+ Enable: true,
+ },
+ Quic: &v1alpha2.EdgeHubQUIC{
+ Enable: false,
+ },
+ MessageQPS: -1,
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("messageQPS"),
+ int32(-1), "MessageQPS must not be a negative number")},
+ },
+ {
+ name: "case5 MessageBurst must not be a negative number",
+ input: v1alpha2.EdgeHub{
+ Enable: true,
+ WebSocket: &v1alpha2.EdgeHubWebSocket{
+ Enable: true,
+ },
+ Quic: &v1alpha2.EdgeHubQUIC{
+ Enable: false,
+ },
+ MessageBurst: -1,
+ },
+ result: field.ErrorList{field.Invalid(field.NewPath("messageBurst"),
+ int32(-1), "MessageBurst must not be a negative number")},
+ },
+ }
+
+ for _, c := range cases {
+ if got := ValidateModuleEdgeHub(c.input); !reflect.DeepEqual(got, c.result) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.result, got)
+ }
+ }
+}
+
+func TestValidateModuleEventBus(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.EventBus
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.EventBus{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 mqtt not right",
+ input: v1alpha2.EventBus{
+ Enable: true,
+ MqttMode: v1alpha2.MqttMode(3),
+ },
+ expected: field.ErrorList{field.Invalid(field.NewPath("Mode"), v1alpha2.MqttMode(3),
+ fmt.Sprintf("Mode need in [%v,%v] range", v1alpha2.MqttModeInternal,
+ v1alpha2.MqttModeExternal))},
+ },
+ {
+ name: "case2 all ok",
+ input: v1alpha2.EventBus{
+ Enable: true,
+ MqttMode: 2,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleEventBus(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleMetaManager(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.MetaManager
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.MetaManager{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha2.MetaManager{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleMetaManager(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleServiceBus(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.ServiceBus
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.ServiceBus{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha2.ServiceBus{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleServiceBus(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleDeviceTwin(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.DeviceTwin
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.DeviceTwin{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha2.DeviceTwin{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleDeviceTwin(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleDBTest(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.DBTest
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.DBTest{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha2.DBTest{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleDBTest(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
+
+func TestValidateModuleEdgeStream(t *testing.T) {
+ cases := []struct {
+ name string
+ input v1alpha2.EdgeStream
+ expected field.ErrorList
+ }{
+ {
+ name: "case1 not enabled",
+ input: v1alpha2.EdgeStream{
+ Enable: false,
+ },
+ expected: field.ErrorList{},
+ },
+ {
+ name: "case2 enabled",
+ input: v1alpha2.EdgeStream{
+ Enable: true,
+ },
+ expected: field.ErrorList{},
+ },
+ }
+
+ for _, c := range cases {
+ if result := ValidateModuleEdgeStream(c.input); !reflect.DeepEqual(result, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, result)
+ }
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_windows.go b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_windows.go
new file mode 100644
index 000000000..749cd5bd2
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/edgecore/v1alpha2/validation/validation_windows.go
@@ -0,0 +1,10 @@
+//go:build windows
+
+package validation
+
+import "k8s.io/apimachinery/pkg/util/validation/field"
+
+// ValidateCgroupDriver validates `e` and returns an errorList if it is invalid
+func ValidateCgroupDriver(cgroupDriver string) *field.Error {
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/componentconfig/meta/v1alpha1/types.go b/staging/src/github.com/kubeedge/api/componentconfig/meta/v1alpha1/types.go
new file mode 100644
index 000000000..163cfe011
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/componentconfig/meta/v1alpha1/types.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type ModuleName string
+type GroupName string
+
+// Available modules for EdgeCore
+const (
+ ModuleNameEventBus ModuleName = "eventbus"
+ ModuleNameServiceBus ModuleName = "servicebus"
+ // TODO @kadisi change websocket to edgehub
+ ModuleNameEdgeHub ModuleName = "websocket"
+ ModuleNameMetaManager ModuleName = "metamanager"
+ ModuleNameEdged ModuleName = "edged"
+ ModuleNameTwin ModuleName = "twin"
+ ModuleNameDBTest ModuleName = "dbTest"
+)
+
+// Available modules group
+const (
+ GroupNameHub GroupName = "hub"
+ GroupNameEdgeController GroupName = "edgecontroller"
+ GroupNameBus GroupName = "bus"
+ GroupNameTwin GroupName = "twin"
+ GroupNameMeta GroupName = "meta"
+ GroupNameEdged GroupName = "edged"
+ GroupNameUser GroupName = "user"
+)
diff --git a/staging/src/github.com/kubeedge/api/devices/v1alpha2/device_instance_types.go b/staging/src/github.com/kubeedge/api/devices/v1alpha2/device_instance_types.go
new file mode 100644
index 000000000..025fcc0ce
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1alpha2/device_instance_types.go
@@ -0,0 +1,432 @@
+/*
+Copyright 2020 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+import (
+ "encoding/json"
+
+ v1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// DeviceSpec represents a single device instance. It is an instantation of a device model.
+type DeviceSpec struct {
+ // Required: DeviceModelRef is reference to the device model used as a template
+ // to create the device instance.
+ DeviceModelRef *v1.LocalObjectReference `json:"deviceModelRef,omitempty"`
+ // Required: The protocol configuration used to connect to the device.
+ Protocol ProtocolConfig `json:"protocol,omitempty"`
+ // List of property visitors which describe how to access the device properties.
+ // PropertyVisitors must unique by propertyVisitor.propertyName.
+ // +optional
+ PropertyVisitors []DevicePropertyVisitor `json:"propertyVisitors,omitempty"`
+ // Data section describe a list of time-series properties which should be processed
+ // on edge node.
+ // +optional
+ Data DeviceData `json:"data,omitempty"`
+ // NodeSelector indicates the binding preferences between devices and nodes.
+ // Refer to k8s.io/kubernetes/pkg/apis/core NodeSelector for more details
+ // +optional
+ NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty"`
+}
+
+// Only one of its members may be specified.
+type ProtocolConfig struct {
+ // Protocol configuration for opc-ua
+ // +optional
+ OpcUA *ProtocolConfigOpcUA `json:"opcua,omitempty"`
+ // Protocol configuration for modbus
+ // +optional
+ Modbus *ProtocolConfigModbus `json:"modbus,omitempty"`
+ // Protocol configuration for bluetooth
+ // +optional
+ Bluetooth *ProtocolConfigBluetooth `json:"bluetooth,omitempty"`
+ // Configuration for protocol common part
+ // +optional
+ Common *ProtocolConfigCommon `json:"common,omitempty"`
+ // Configuration for customized protocol
+ // +optional
+ CustomizedProtocol *ProtocolConfigCustomized `json:"customizedProtocol,omitempty"`
+}
+
+type ProtocolConfigOpcUA struct {
+ // Required: The URL for opc server endpoint.
+ URL string `json:"url,omitempty"`
+ // Username for access opc server.
+ // +optional
+ UserName string `json:"userName,omitempty"`
+ // Password for access opc server.
+ // +optional
+ Password string `json:"password,omitempty"`
+ // Defaults to "none".
+ // +optional
+ SecurityPolicy string `json:"securityPolicy,omitempty"`
+ // Defaults to "none".
+ // +optional
+ SecurityMode string `json:"securityMode,omitempty"`
+ // Certificate for access opc server.
+ // +optional
+ Certificate string `json:"certificate,omitempty"`
+ // PrivateKey for access opc server.
+ // +optional
+ PrivateKey string `json:"privateKey,omitempty"`
+ // Timeout seconds for the opc server connection.???
+ // +optional
+ Timeout int64 `json:"timeout,omitempty"`
+}
+
+// Only one of its members may be specified.
+type ProtocolConfigModbus struct {
+ // Required. 0-255
+ SlaveID *int64 `json:"slaveID,omitempty"`
+}
+
+// Only one of COM or TCP may be specified.
+type ProtocolConfigCommon struct {
+ // +optional
+ COM *ProtocolConfigCOM `json:"com,omitempty"`
+ // +optional
+ TCP *ProtocolConfigTCP `json:"tcp,omitempty"`
+ // Communication type, like tcp client, tcp server or COM
+ // +optional
+ CommType string `json:"commType,omitempty"`
+ // Reconnection timeout
+ // +optional
+ ReconnTimeout int64 `json:"reconnTimeout,omitempty"`
+ // Reconnecting retry times
+ // +optional
+ ReconnRetryTimes int64 `json:"reconnRetryTimes,omitempty"`
+ // Define timeout of mapper collect from device.
+ // +optional
+ CollectTimeout int64 `json:"collectTimeout,omitempty"`
+ // Define retry times of mapper will collect from device.
+ // +optional
+ CollectRetryTimes int64 `json:"collectRetryTimes,omitempty"`
+ // Define collect type, sync or async.
+ // +optional
+ // +kubebuilder:validation:Enum=sync;async
+ CollectType string `json:"collectType,omitempty"`
+ // Customized values for provided protocol
+ // +optional
+ // +kubebuilder:validation:XPreserveUnknownFields
+ CustomizedValues *CustomizedValue `json:"customizedValues,omitempty"`
+}
+
+type ProtocolConfigTCP struct {
+ // Required.
+ IP string `json:"ip,omitempty"`
+ // Required.
+ Port int64 `json:"port,omitempty"`
+}
+
+type ProtocolConfigCOM struct {
+ // Required.
+ SerialPort string `json:"serialPort,omitempty"`
+ // Required. BaudRate 115200|57600|38400|19200|9600|4800|2400|1800|1200|600|300|200|150|134|110|75|50
+ // +kubebuilder:validation:Enum=115200;57600;38400;19200;9600;4800;2400;1800;1200;600;300;200;150;134;110;75;50
+ BaudRate int64 `json:"baudRate,omitempty"`
+ // Required. Valid values are 8, 7, 6, 5.
+ // +kubebuilder:validation:Enum=8;7;6;5
+ DataBits int64 `json:"dataBits,omitempty"`
+ // Required. Valid options are "none", "even", "odd". Defaults to "none".
+ // +kubebuilder:validation:Enum=none;even;odd
+ Parity string `json:"parity,omitempty"`
+ // Required. Bit that stops 1|2
+ // +kubebuilder:validation:Enum=1;2
+ StopBits int64 `json:"stopBits,omitempty"`
+}
+
+type ProtocolConfigBluetooth struct {
+ // Unique identifier assigned to the device.
+ // +optional
+ MACAddress string `json:"macAddress,omitempty"`
+}
+
+type ProtocolConfigCustomized struct {
+ // Unique protocol name
+ // Required.
+ ProtocolName string `json:"protocolName,omitempty"`
+ // Any config data
+ // +optional
+ // +kubebuilder:validation:XPreserveUnknownFields
+ ConfigData *CustomizedValue `json:"configData,omitempty"`
+}
+
+// DeviceStatus reports the device state and the desired/reported values of twin attributes.
+type DeviceStatus struct {
+ // A list of device twins containing desired/reported desired/reported values of twin properties.
+ // Optional: A passive device won't have twin properties and this list could be empty.
+ // +optional
+ Twins []Twin `json:"twins,omitempty"`
+}
+
+// Twin provides a logical representation of control properties (writable properties in the
+// device model). The properties can have a Desired state and a Reported state. The cloud configures
+// the `Desired`state of a device property and this configuration update is pushed to the edge node.
+// The mapper sends a command to the device to change this property value as per the desired state .
+// It receives the `Reported` state of the property once the previous operation is complete and sends
+// the reported state to the cloud. Offline device interaction in the edge is possible via twin
+// properties for control/command operations.
+type Twin struct {
+ // Required: The property name for which the desired/reported values are specified.
+ // This property should be present in the device model.
+ PropertyName string `json:"propertyName,omitempty"`
+ // Required: the desired property value.
+ Desired TwinProperty `json:"desired,omitempty"`
+ // Required: the reported property value.
+ Reported TwinProperty `json:"reported,omitempty"`
+}
+
+// TwinProperty represents the device property for which an Expected/Actual state can be defined.
+type TwinProperty struct {
+ // Required: The value for this property.
+ Value string `json:"value,"`
+ // Additional metadata like timestamp when the value was reported etc.
+ // +optional
+ Metadata map[string]string `json:"metadata,omitempty"`
+}
+
+// DeviceData reports the device's time-series data to edge MQTT broker.
+// These data should not be processed by edgecore. Instead, they can be processed by
+// third-party data-processing apps like EMQX kuiper.
+type DeviceData struct {
+ // Required: A list of data properties, which are not required to be processed by edgecore
+ DataProperties []DataProperty `json:"dataProperties,omitempty"`
+ // Topic used by mapper, all data collected from dataProperties
+ // should be published to this topic,
+ // the default value is $ke/events/device/+/data/update
+ // +optional
+ DataTopic string `json:"dataTopic,omitempty"`
+}
+
+// DataProperty represents the device property for external use.
+type DataProperty struct {
+ // Required: The property name for which should be processed by external apps.
+ // This property should be present in the device model.
+ PropertyName string `json:"propertyName,omitempty"`
+ // Additional metadata like timestamp when the value was reported etc.
+ // +optional
+ Metadata map[string]string `json:"metadata,omitempty"`
+}
+
+// DevicePropertyVisitor describes the specifics of accessing a particular device
+// property. Visitors are intended to be consumed by device mappers which connect to devices
+// and collect data / perform actions on the device.
+type DevicePropertyVisitor struct {
+ // Required: The device property name to be accessed. This should refer to one of the
+ // device properties defined in the device model.
+ PropertyName string `json:"propertyName,omitempty"`
+ // Define how frequent mapper will report the value.
+ // +optional
+ ReportCycle int64 `json:"reportCycle,omitempty"`
+ // Define how frequent mapper will collect from device.
+ // +optional
+ CollectCycle int64 `json:"collectCycle,omitempty"`
+ // Customized values for visitor of provided protocols
+ // +optional
+ // +kubebuilder:validation:XPreserveUnknownFields
+ CustomizedValues *CustomizedValue `json:"customizedValues,omitempty"`
+ // Required: Protocol relevant config details about the how to access the device property.
+ VisitorConfig `json:",inline"`
+}
+
+// At least one of its members must be specified.
+type VisitorConfig struct {
+ // Opcua represents a set of additional visitor config fields of opc-ua protocol.
+ // +optional
+ OpcUA *VisitorConfigOPCUA `json:"opcua,omitempty"`
+ // Modbus represents a set of additional visitor config fields of modbus protocol.
+ // +optional
+ Modbus *VisitorConfigModbus `json:"modbus,omitempty"`
+ // Bluetooth represents a set of additional visitor config fields of bluetooth protocol.
+ // +optional
+ Bluetooth *VisitorConfigBluetooth `json:"bluetooth,omitempty"`
+ // CustomizedProtocol represents a set of visitor config fields of bluetooth protocol.
+ // +optional
+ CustomizedProtocol *VisitorConfigCustomized `json:"customizedProtocol,omitempty"`
+}
+
+// Common visitor configurations for bluetooth protocol
+type VisitorConfigBluetooth struct {
+ // Required: Unique ID of the corresponding operation
+ CharacteristicUUID string `json:"characteristicUUID,omitempty"`
+ // Responsible for converting the data coming from the platform into a form that is understood by the bluetooth device
+ // For example: "ON":[1], "OFF":[0]
+ // +optional
+ DataWriteToBluetooth map[string][]byte `json:"dataWrite,omitempty"`
+ // Responsible for converting the data being read from the bluetooth device into a form that is understandable by the platform
+ // +optional
+ BluetoothDataConverter BluetoothReadConverter `json:"dataConverter,omitempty"`
+}
+
+// Specifies the operations that may need to be performed to convert the data
+type BluetoothReadConverter struct {
+ // Required: Specifies the start index of the incoming byte stream to be considered to convert the data.
+ // For example: start-index:2, end-index:3 concatenates the value present at second and third index of the incoming byte stream. If we want to reverse the order we can give it as start-index:3, end-index:2
+ StartIndex int `json:"startIndex,omitempty"`
+ // Required: Specifies the end index of incoming byte stream to be considered to convert the data
+ // the value specified should be inclusive for example if 3 is specified it includes the third index
+ EndIndex int `json:"endIndex,omitempty"`
+ // Refers to the number of bits to shift left, if left-shift operation is necessary for conversion
+ // +optional
+ ShiftLeft uint `json:"shiftLeft,omitempty"`
+ // Refers to the number of bits to shift right, if right-shift operation is necessary for conversion
+ // +optional
+ ShiftRight uint `json:"shiftRight,omitempty"`
+ // Specifies in what order the operations(which are required to be performed to convert incoming data into understandable form) are performed
+ // +optional
+ OrderOfOperations []BluetoothOperations `json:"orderOfOperations,omitempty"`
+}
+
+// Specify the operation that should be performed to convert incoming data into understandable form
+type BluetoothOperations struct {
+ // Required: Specifies the operation to be performed to convert incoming data
+ BluetoothOperationType BluetoothArithmeticOperationType `json:"operationType,omitempty"`
+ // Required: Specifies with what value the operation is to be performed
+ BluetoothOperationValue float64 `json:"operationValue,omitempty"`
+}
+
+// Operations supported by Bluetooth protocol to convert the value being read from the device into an understandable form
+// +kubebuilder:validation:Enum:Add;Subtract;Multiply;Divide
+type BluetoothArithmeticOperationType string
+
+// Bluetooth Protocol Operation type
+const (
+ BluetoothAdd BluetoothArithmeticOperationType = "Add"
+ BluetoothSubtract BluetoothArithmeticOperationType = "Subtract"
+ BluetoothMultiply BluetoothArithmeticOperationType = "Multiply"
+ BluetoothDivide BluetoothArithmeticOperationType = "Divide"
+)
+
+// Common visitor configurations for opc-ua protocol
+type VisitorConfigOPCUA struct {
+ // Required: The ID of opc-ua node, e.g. "ns=1,i=1005"
+ NodeID string `json:"nodeID,omitempty"`
+ // The name of opc-ua node
+ BrowseName string `json:"browseName,omitempty"`
+}
+
+// Common visitor configurations for modbus protocol
+type VisitorConfigModbus struct {
+ // Required: Type of register
+ Register ModbusRegisterType `json:"register,omitempty"`
+ // Required: Offset indicates the starting register number to read/write data.
+ Offset *int64 `json:"offset,omitempty"`
+ // Required: Limit number of registers to read/write.
+ Limit *int64 `json:"limit,omitempty"`
+ // The scale to convert raw property data into final units.
+ // Defaults to 1.0
+ // +optional
+ Scale float64 `json:"scale,omitempty"`
+ // Indicates whether the high and low byte swapped.
+ // Defaults to false.
+ // +optional
+ IsSwap bool `json:"isSwap,omitempty"`
+ // Indicates whether the high and low register swapped.
+ // Defaults to false.
+ // +optional
+ IsRegisterSwap bool `json:"isRegisterSwap,omitempty"`
+}
+
+// The Modbus register type to read a device property.
+// +kubebuilder:validation:Enum=CoilRegister;DiscreteInputRegister;InputRegister;HoldingRegister
+type ModbusRegisterType string
+
+// Modbus protocol register types
+const (
+ ModbusRegisterTypeCoilRegister ModbusRegisterType = "CoilRegister"
+ ModbusRegisterTypeDiscreteInputRegister ModbusRegisterType = "DiscreteInputRegister"
+ ModbusRegisterTypeInputRegister ModbusRegisterType = "InputRegister"
+ ModbusRegisterTypeHoldingRegister ModbusRegisterType = "HoldingRegister"
+)
+
+// Common visitor configurations for customized protocol
+type VisitorConfigCustomized struct {
+ // Required: name of customized protocol
+ ProtocolName string `json:"protocolName,omitempty"`
+ // Required: The configData of customized protocol
+ // +kubebuilder:validation:XPreserveUnknownFields
+ ConfigData *CustomizedValue `json:"configData,omitempty"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// Device is the Schema for the devices API
+// +k8s:openapi-gen=true
+type Device struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec DeviceSpec `json:"spec,omitempty"`
+ Status DeviceStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// DeviceList contains a list of Device
+type DeviceList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []Device `json:"items"`
+}
+
+// CustomizedValue contains a map type data
+// +kubebuilder:validation:Type=object
+type CustomizedValue struct {
+ Data map[string]interface{} `json:"-"`
+}
+
+// MarshalJSON implements the Marshaler interface.
+func (in *CustomizedValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(in.Data)
+}
+
+// UnmarshalJSON implements the Unmarshaler interface.
+func (in *CustomizedValue) UnmarshalJSON(data []byte) error {
+ var out map[string]interface{}
+ err := json.Unmarshal(data, &out)
+ if err != nil {
+ return err
+ }
+ in.Data = out
+ return nil
+}
+
+// DeepCopyInto implements the DeepCopyInto interface.
+func (in *CustomizedValue) DeepCopyInto(out *CustomizedValue) {
+ bytes, err := json.Marshal(*in)
+ if err != nil {
+ panic(err)
+ }
+ var clone map[string]interface{}
+ err = json.Unmarshal(bytes, &clone)
+ if err != nil {
+ panic(err)
+ }
+ out.Data = clone
+}
+
+// DeepCopy implements the DeepCopy interface.
+func (in *CustomizedValue) DeepCopy() *CustomizedValue {
+ if in == nil {
+ return nil
+ }
+ out := new(CustomizedValue)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1alpha2/device_model_types.go b/staging/src/github.com/kubeedge/api/devices/v1alpha2/device_model_types.go
new file mode 100644
index 000000000..2a809dcdf
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1alpha2/device_model_types.go
@@ -0,0 +1,150 @@
+/*
+Copyright 2020 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha2
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// DeviceModelSpec defines the model / template for a device.It is a blueprint which describes the device
+// capabilities and access mechanism via property visitors.
+type DeviceModelSpec struct {
+ // Required for DMI: Protocol name used by the device.
+ Protocol string `json:"protocol,omitempty"`
+ // Required: List of device properties.
+ Properties []DeviceProperty `json:"properties,omitempty"`
+}
+
+// DeviceProperty describes an individual device property / attribute like temperature / humidity etc.
+type DeviceProperty struct {
+ // Required: The device property name.
+ Name string `json:"name,omitempty"`
+ // The device property description.
+ // +optional
+ Description string `json:"description,omitempty"`
+ // Required: PropertyType represents the type and data validation of the property.
+ Type PropertyType `json:"type,omitempty"`
+}
+
+// Represents the type and data validation of a property.
+// Only one of its members may be specified.
+type PropertyType struct {
+ // +optional
+ Int *PropertyTypeInt64 `json:"int,omitempty"`
+ // +optional
+ String *PropertyTypeString `json:"string,omitempty"`
+ // +optional
+ Double *PropertyTypeDouble `json:"double,omitempty"`
+ // +optional
+ Float *PropertyTypeFloat `json:"float,omitempty"`
+ // +optional
+ Boolean *PropertyTypeBoolean `json:"boolean,omitempty"`
+ // +optional
+ Bytes *PropertyTypeBytes `json:"bytes,omitempty"`
+}
+
+type PropertyTypeInt64 struct {
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+ // +optional
+ DefaultValue int64 `json:"defaultValue,omitempty"`
+ // +optional
+ Minimum int64 `json:"minimum,omitempty"`
+ // +optional
+ Maximum int64 `json:"maximum,omitempty"`
+ // The unit of the property
+ // +optional
+ Unit string `json:"unit,omitempty"`
+}
+
+type PropertyTypeString struct {
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+ // +optional
+ DefaultValue string `json:"defaultValue,omitempty"`
+}
+
+type PropertyTypeDouble struct {
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+ // +optional
+ DefaultValue float64 `json:"defaultValue,omitempty"`
+ // +optional
+ Minimum float64 `json:"minimum,omitempty"`
+ // +optional
+ Maximum float64 `json:"maximum,omitempty"`
+ // The unit of the property
+ // +optional
+ Unit string `json:"unit,omitempty"`
+}
+
+type PropertyTypeFloat struct {
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+ // +optional
+ DefaultValue float32 `json:"defaultValue,omitempty"`
+ // +optional
+ Minimum float32 `json:"minimum,omitempty"`
+ // +optional
+ Maximum float32 `json:"maximum,omitempty"`
+ // The unit of the property
+ // +optional
+ Unit string `json:"unit,omitempty"`
+}
+
+type PropertyTypeBoolean struct {
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+ // +optional
+ DefaultValue bool `json:"defaultValue,omitempty"`
+}
+
+type PropertyTypeBytes struct {
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+}
+
+// The access mode for a device property.
+// +kubebuilder:validation:Enum=ReadWrite;ReadOnly
+type PropertyAccessMode string
+
+// Access mode constants for a device property.
+const (
+ ReadWrite PropertyAccessMode = "ReadWrite"
+ ReadOnly PropertyAccessMode = "ReadOnly"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// DeviceModel is the Schema for the device model API
+// +k8s:openapi-gen=true
+type DeviceModel struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec DeviceModelSpec `json:"spec,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// DeviceModelList contains a list of DeviceModel
+type DeviceModelList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []DeviceModel `json:"items"`
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1alpha2/doc.go b/staging/src/github.com/kubeedge/api/devices/v1alpha2/doc.go
new file mode 100644
index 000000000..f3bd8722f
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1alpha2/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package
+package v1alpha2
diff --git a/staging/src/github.com/kubeedge/api/devices/v1alpha2/register.go b/staging/src/github.com/kubeedge/api/devices/v1alpha2/register.go
new file mode 100644
index 000000000..6bf94f178
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1alpha2/register.go
@@ -0,0 +1,84 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// NOTE: Boilerplate only. Ignore this file.
+
+// Package v1alpha2 contains API Schema definitions for the devices v1alpha2 API group
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=kubeedge/cloud/pkg/apis/devices
+// +k8s:defaulter-gen=TypeMeta
+// +groupName=devices.kubeedge.io
+package v1alpha2
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+const (
+ // GroupName is the group name use in this package.
+ GroupName = "devices.kubeedge.io"
+ // Version is the API version.
+ Version = "v1alpha2"
+)
+
+var (
+ // SchemeGroupVersion is the group version used to register these objects.
+ SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// addKnownTypes adds the set of types defined in this package to the supplied scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Device{},
+ &DeviceList{},
+ &DeviceModel{},
+ &DeviceModelList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
+
+func AddDeviceCrds(scheme *runtime.Scheme) error {
+ // Add Device
+ scheme.AddKnownTypes(SchemeGroupVersion, &Device{}, &DeviceList{})
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ // Add DeviceModel
+ scheme.AddKnownTypes(SchemeGroupVersion, &DeviceModel{}, &DeviceModelList{})
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1alpha2/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/devices/v1alpha2/zz_generated.deepcopy.go
new file mode 100644
index 000000000..a271226b7
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1alpha2/zz_generated.deepcopy.go
@@ -0,0 +1,839 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1alpha2
+
+import (
+ v1 "k8s.io/api/core/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BluetoothOperations) DeepCopyInto(out *BluetoothOperations) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BluetoothOperations.
+func (in *BluetoothOperations) DeepCopy() *BluetoothOperations {
+ if in == nil {
+ return nil
+ }
+ out := new(BluetoothOperations)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BluetoothReadConverter) DeepCopyInto(out *BluetoothReadConverter) {
+ *out = *in
+ if in.OrderOfOperations != nil {
+ in, out := &in.OrderOfOperations, &out.OrderOfOperations
+ *out = make([]BluetoothOperations, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BluetoothReadConverter.
+func (in *BluetoothReadConverter) DeepCopy() *BluetoothReadConverter {
+ if in == nil {
+ return nil
+ }
+ out := new(BluetoothReadConverter)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DataProperty) DeepCopyInto(out *DataProperty) {
+ *out = *in
+ if in.Metadata != nil {
+ in, out := &in.Metadata, &out.Metadata
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataProperty.
+func (in *DataProperty) DeepCopy() *DataProperty {
+ if in == nil {
+ return nil
+ }
+ out := new(DataProperty)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Device) DeepCopyInto(out *Device) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.
+func (in *Device) DeepCopy() *Device {
+ if in == nil {
+ return nil
+ }
+ out := new(Device)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Device) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceData) DeepCopyInto(out *DeviceData) {
+ *out = *in
+ if in.DataProperties != nil {
+ in, out := &in.DataProperties, &out.DataProperties
+ *out = make([]DataProperty, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceData.
+func (in *DeviceData) DeepCopy() *DeviceData {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceData)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceList) DeepCopyInto(out *DeviceList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Device, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceList.
+func (in *DeviceList) DeepCopy() *DeviceList {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceModel) DeepCopyInto(out *DeviceModel) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModel.
+func (in *DeviceModel) DeepCopy() *DeviceModel {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceModel)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceModel) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceModelList) DeepCopyInto(out *DeviceModelList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DeviceModel, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModelList.
+func (in *DeviceModelList) DeepCopy() *DeviceModelList {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceModelList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceModelList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceModelSpec) DeepCopyInto(out *DeviceModelSpec) {
+ *out = *in
+ if in.Properties != nil {
+ in, out := &in.Properties, &out.Properties
+ *out = make([]DeviceProperty, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModelSpec.
+func (in *DeviceModelSpec) DeepCopy() *DeviceModelSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceModelSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceProperty) DeepCopyInto(out *DeviceProperty) {
+ *out = *in
+ in.Type.DeepCopyInto(&out.Type)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceProperty.
+func (in *DeviceProperty) DeepCopy() *DeviceProperty {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceProperty)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DevicePropertyVisitor) DeepCopyInto(out *DevicePropertyVisitor) {
+ *out = *in
+ if in.CustomizedValues != nil {
+ in, out := &in.CustomizedValues, &out.CustomizedValues
+ *out = (*in).DeepCopy()
+ }
+ in.VisitorConfig.DeepCopyInto(&out.VisitorConfig)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevicePropertyVisitor.
+func (in *DevicePropertyVisitor) DeepCopy() *DevicePropertyVisitor {
+ if in == nil {
+ return nil
+ }
+ out := new(DevicePropertyVisitor)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceSpec) DeepCopyInto(out *DeviceSpec) {
+ *out = *in
+ if in.DeviceModelRef != nil {
+ in, out := &in.DeviceModelRef, &out.DeviceModelRef
+ *out = new(v1.LocalObjectReference)
+ **out = **in
+ }
+ in.Protocol.DeepCopyInto(&out.Protocol)
+ if in.PropertyVisitors != nil {
+ in, out := &in.PropertyVisitors, &out.PropertyVisitors
+ *out = make([]DevicePropertyVisitor, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Data.DeepCopyInto(&out.Data)
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = new(v1.NodeSelector)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSpec.
+func (in *DeviceSpec) DeepCopy() *DeviceSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceStatus) DeepCopyInto(out *DeviceStatus) {
+ *out = *in
+ if in.Twins != nil {
+ in, out := &in.Twins, &out.Twins
+ *out = make([]Twin, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceStatus.
+func (in *DeviceStatus) DeepCopy() *DeviceStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyType) DeepCopyInto(out *PropertyType) {
+ *out = *in
+ if in.Int != nil {
+ in, out := &in.Int, &out.Int
+ *out = new(PropertyTypeInt64)
+ **out = **in
+ }
+ if in.String != nil {
+ in, out := &in.String, &out.String
+ *out = new(PropertyTypeString)
+ **out = **in
+ }
+ if in.Double != nil {
+ in, out := &in.Double, &out.Double
+ *out = new(PropertyTypeDouble)
+ **out = **in
+ }
+ if in.Float != nil {
+ in, out := &in.Float, &out.Float
+ *out = new(PropertyTypeFloat)
+ **out = **in
+ }
+ if in.Boolean != nil {
+ in, out := &in.Boolean, &out.Boolean
+ *out = new(PropertyTypeBoolean)
+ **out = **in
+ }
+ if in.Bytes != nil {
+ in, out := &in.Bytes, &out.Bytes
+ *out = new(PropertyTypeBytes)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyType.
+func (in *PropertyType) DeepCopy() *PropertyType {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyType)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyTypeBoolean) DeepCopyInto(out *PropertyTypeBoolean) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeBoolean.
+func (in *PropertyTypeBoolean) DeepCopy() *PropertyTypeBoolean {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyTypeBoolean)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyTypeBytes) DeepCopyInto(out *PropertyTypeBytes) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeBytes.
+func (in *PropertyTypeBytes) DeepCopy() *PropertyTypeBytes {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyTypeBytes)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyTypeDouble) DeepCopyInto(out *PropertyTypeDouble) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeDouble.
+func (in *PropertyTypeDouble) DeepCopy() *PropertyTypeDouble {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyTypeDouble)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyTypeFloat) DeepCopyInto(out *PropertyTypeFloat) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeFloat.
+func (in *PropertyTypeFloat) DeepCopy() *PropertyTypeFloat {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyTypeFloat)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyTypeInt64) DeepCopyInto(out *PropertyTypeInt64) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeInt64.
+func (in *PropertyTypeInt64) DeepCopy() *PropertyTypeInt64 {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyTypeInt64)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PropertyTypeString) DeepCopyInto(out *PropertyTypeString) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PropertyTypeString.
+func (in *PropertyTypeString) DeepCopy() *PropertyTypeString {
+ if in == nil {
+ return nil
+ }
+ out := new(PropertyTypeString)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfig) DeepCopyInto(out *ProtocolConfig) {
+ *out = *in
+ if in.OpcUA != nil {
+ in, out := &in.OpcUA, &out.OpcUA
+ *out = new(ProtocolConfigOpcUA)
+ **out = **in
+ }
+ if in.Modbus != nil {
+ in, out := &in.Modbus, &out.Modbus
+ *out = new(ProtocolConfigModbus)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Bluetooth != nil {
+ in, out := &in.Bluetooth, &out.Bluetooth
+ *out = new(ProtocolConfigBluetooth)
+ **out = **in
+ }
+ if in.Common != nil {
+ in, out := &in.Common, &out.Common
+ *out = new(ProtocolConfigCommon)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.CustomizedProtocol != nil {
+ in, out := &in.CustomizedProtocol, &out.CustomizedProtocol
+ *out = new(ProtocolConfigCustomized)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfig.
+func (in *ProtocolConfig) DeepCopy() *ProtocolConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigBluetooth) DeepCopyInto(out *ProtocolConfigBluetooth) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigBluetooth.
+func (in *ProtocolConfigBluetooth) DeepCopy() *ProtocolConfigBluetooth {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigBluetooth)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigCOM) DeepCopyInto(out *ProtocolConfigCOM) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigCOM.
+func (in *ProtocolConfigCOM) DeepCopy() *ProtocolConfigCOM {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigCOM)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigCommon) DeepCopyInto(out *ProtocolConfigCommon) {
+ *out = *in
+ if in.COM != nil {
+ in, out := &in.COM, &out.COM
+ *out = new(ProtocolConfigCOM)
+ **out = **in
+ }
+ if in.TCP != nil {
+ in, out := &in.TCP, &out.TCP
+ *out = new(ProtocolConfigTCP)
+ **out = **in
+ }
+ if in.CustomizedValues != nil {
+ in, out := &in.CustomizedValues, &out.CustomizedValues
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigCommon.
+func (in *ProtocolConfigCommon) DeepCopy() *ProtocolConfigCommon {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigCommon)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigCustomized) DeepCopyInto(out *ProtocolConfigCustomized) {
+ *out = *in
+ if in.ConfigData != nil {
+ in, out := &in.ConfigData, &out.ConfigData
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigCustomized.
+func (in *ProtocolConfigCustomized) DeepCopy() *ProtocolConfigCustomized {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigCustomized)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigModbus) DeepCopyInto(out *ProtocolConfigModbus) {
+ *out = *in
+ if in.SlaveID != nil {
+ in, out := &in.SlaveID, &out.SlaveID
+ *out = new(int64)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigModbus.
+func (in *ProtocolConfigModbus) DeepCopy() *ProtocolConfigModbus {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigModbus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigOpcUA) DeepCopyInto(out *ProtocolConfigOpcUA) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigOpcUA.
+func (in *ProtocolConfigOpcUA) DeepCopy() *ProtocolConfigOpcUA {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigOpcUA)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfigTCP) DeepCopyInto(out *ProtocolConfigTCP) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfigTCP.
+func (in *ProtocolConfigTCP) DeepCopy() *ProtocolConfigTCP {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfigTCP)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Twin) DeepCopyInto(out *Twin) {
+ *out = *in
+ in.Desired.DeepCopyInto(&out.Desired)
+ in.Reported.DeepCopyInto(&out.Reported)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Twin.
+func (in *Twin) DeepCopy() *Twin {
+ if in == nil {
+ return nil
+ }
+ out := new(Twin)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TwinProperty) DeepCopyInto(out *TwinProperty) {
+ *out = *in
+ if in.Metadata != nil {
+ in, out := &in.Metadata, &out.Metadata
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TwinProperty.
+func (in *TwinProperty) DeepCopy() *TwinProperty {
+ if in == nil {
+ return nil
+ }
+ out := new(TwinProperty)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VisitorConfig) DeepCopyInto(out *VisitorConfig) {
+ *out = *in
+ if in.OpcUA != nil {
+ in, out := &in.OpcUA, &out.OpcUA
+ *out = new(VisitorConfigOPCUA)
+ **out = **in
+ }
+ if in.Modbus != nil {
+ in, out := &in.Modbus, &out.Modbus
+ *out = new(VisitorConfigModbus)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Bluetooth != nil {
+ in, out := &in.Bluetooth, &out.Bluetooth
+ *out = new(VisitorConfigBluetooth)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.CustomizedProtocol != nil {
+ in, out := &in.CustomizedProtocol, &out.CustomizedProtocol
+ *out = new(VisitorConfigCustomized)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfig.
+func (in *VisitorConfig) DeepCopy() *VisitorConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(VisitorConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VisitorConfigBluetooth) DeepCopyInto(out *VisitorConfigBluetooth) {
+ *out = *in
+ if in.DataWriteToBluetooth != nil {
+ in, out := &in.DataWriteToBluetooth, &out.DataWriteToBluetooth
+ *out = make(map[string][]byte, len(*in))
+ for key, val := range *in {
+ var outVal []byte
+ if val == nil {
+ (*out)[key] = nil
+ } else {
+ in, out := &val, &outVal
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ (*out)[key] = outVal
+ }
+ }
+ in.BluetoothDataConverter.DeepCopyInto(&out.BluetoothDataConverter)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigBluetooth.
+func (in *VisitorConfigBluetooth) DeepCopy() *VisitorConfigBluetooth {
+ if in == nil {
+ return nil
+ }
+ out := new(VisitorConfigBluetooth)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VisitorConfigCustomized) DeepCopyInto(out *VisitorConfigCustomized) {
+ *out = *in
+ if in.ConfigData != nil {
+ in, out := &in.ConfigData, &out.ConfigData
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigCustomized.
+func (in *VisitorConfigCustomized) DeepCopy() *VisitorConfigCustomized {
+ if in == nil {
+ return nil
+ }
+ out := new(VisitorConfigCustomized)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VisitorConfigModbus) DeepCopyInto(out *VisitorConfigModbus) {
+ *out = *in
+ if in.Offset != nil {
+ in, out := &in.Offset, &out.Offset
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Limit != nil {
+ in, out := &in.Limit, &out.Limit
+ *out = new(int64)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigModbus.
+func (in *VisitorConfigModbus) DeepCopy() *VisitorConfigModbus {
+ if in == nil {
+ return nil
+ }
+ out := new(VisitorConfigModbus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VisitorConfigOPCUA) DeepCopyInto(out *VisitorConfigOPCUA) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfigOPCUA.
+func (in *VisitorConfigOPCUA) DeepCopy() *VisitorConfigOPCUA {
+ if in == nil {
+ return nil
+ }
+ out := new(VisitorConfigOPCUA)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1beta1/device_instance_types.go b/staging/src/github.com/kubeedge/api/devices/v1beta1/device_instance_types.go
new file mode 100644
index 000000000..2ab13cbae
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1beta1/device_instance_types.go
@@ -0,0 +1,329 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "encoding/json"
+
+ v1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// DeviceSpec represents a single device instance.
+type DeviceSpec struct {
+ // Required: DeviceModelRef is reference to the device model used as a template
+ // to create the device instance.
+ DeviceModelRef *v1.LocalObjectReference `json:"deviceModelRef,omitempty"`
+ // NodeName is a request to schedule this device onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this device onto that node, assuming that it fits
+ // resource requirements.
+ // +optional
+ NodeName string `json:"nodeName,omitempty"`
+ // List of properties which describe the device properties.
+ // properties list item must be unique by properties.Name.
+ // +optional
+ Properties []DeviceProperty `json:"properties,omitempty"`
+ // Required: The protocol configuration used to connect to the device.
+ Protocol ProtocolConfig `json:"protocol,omitempty"`
+}
+
+// DeviceStatus reports the device state and the desired/reported values of twin attributes.
+type DeviceStatus struct {
+ // A list of device twins containing desired/reported desired/reported values of twin properties.
+ // Optional: A passive device won't have twin properties and this list could be empty.
+ // +optional
+ Twins []Twin `json:"twins,omitempty"`
+ // Optional: The state of the device.
+ // +optional
+ State string `json:"state,omitempty"`
+ // Optional: The last time the device was online.
+ // +optional
+ LastOnlineTime string `json:"lastOnlineTime,omitempty"`
+}
+
+// Twin provides a logical representation of control properties (writable properties in the
+// device model). The properties can have a Desired state and a Reported state. The cloud configures
+// the `Desired`state of a device property and this configuration update is pushed to the edge node.
+// The mapper sends a command to the device to change this property value as per the desired state .
+// It receives the `Reported` state of the property once the previous operation is complete and sends
+// the reported state to the cloud. Offline device interaction in the edge is possible via twin
+// properties for control/command operations.
+type Twin struct {
+ // Required: The property name for which the desired/reported values are specified.
+ // This property should be present in the device model.
+ PropertyName string `json:"propertyName,omitempty"`
+ // Required: the reported property value.
+ Reported TwinProperty `json:"reported,omitempty"`
+ // The meaning of here is to indicate desired value of `deviceProperty.Desired`
+ // that the mapper has received in current cycle.
+ // Useful in cases that people want to check whether the mapper is working
+ // appropriately and its internal status is up-to-date.
+ // This value should be only updated by devicecontroller upstream.
+ ObservedDesired TwinProperty `json:"observedDesired,omitempty"`
+}
+
+// TwinProperty represents the device property for which an Expected/Actual state can be defined.
+type TwinProperty struct {
+ // Required: The value for this property.
+ Value string `json:"value,"`
+ // Additional metadata like timestamp when the value was reported etc.
+ // +optional
+ Metadata map[string]string `json:"metadata,omitempty"`
+}
+
+type ProtocolConfig struct {
+ // Unique protocol name
+ // Required.
+ ProtocolName string `json:"protocolName,omitempty"`
+ // Any config data
+ // +optional
+ // +kubebuilder:validation:XPreserveUnknownFields
+ ConfigData *CustomizedValue `json:"configData,omitempty"`
+}
+
+// DeviceProperty describes the specifics all the properties of the device.
+type DeviceProperty struct {
+ // Required: The device property name to be accessed. It must be unique.
+ // Note: If you need to use the built-in stream data processing function, you need to define Name as saveFrame or saveVideo
+ Name string `json:"name,omitempty"`
+ // The desired property value.
+ Desired TwinProperty `json:"desired,omitempty"`
+ // Visitors are intended to be consumed by device mappers which connect to devices
+ // and collect data / perform actions on the device.
+ // Required: Protocol relevant config details about the how to access the device property.
+ Visitors VisitorConfig `json:"visitors,omitempty"`
+ // Define how frequent mapper will report the value.
+ // +optional
+ ReportCycle int64 `json:"reportCycle,omitempty"`
+ // Define how frequent mapper will collect from device.
+ // +optional
+ CollectCycle int64 `json:"collectCycle,omitempty"`
+ // whether be reported to the cloud
+ ReportToCloud bool `json:"reportToCloud,omitempty"`
+ // PushMethod represents the protocol used to push data,
+ // please ensure that the mapper can access the destination address.
+ // +optional
+ PushMethod *PushMethod `json:"pushMethod,omitempty"`
+}
+
+type PushMethod struct {
+ // HTTP Push method configuration for http
+ // +optional
+ HTTP *PushMethodHTTP `json:"http,omitempty"`
+ // MQTT Push method configuration for mqtt
+ // +optional
+ MQTT *PushMethodMQTT `json:"mqtt,omitempty"`
+ // DBMethod represents the method used to push data to database,
+ // please ensure that the mapper can access the destination address.
+ // +optional
+ DBMethod *DBMethodConfig `json:"dbMethod,omitempty"`
+}
+
+type PushMethodHTTP struct {
+ // +optional
+ HostName string `json:"hostName,omitempty"`
+ // +optional
+ Port int64 `json:"port,omitempty"`
+ // +optional
+ RequestPath string `json:"requestPath,omitempty"`
+ // +optional
+ Timeout int64 `json:"timeout,omitempty"`
+}
+
+type PushMethodMQTT struct {
+ // broker address, like mqtt://127.0.0.1:1883
+ // +optional
+ Address string `json:"address,omitempty"`
+ // publish topic for mqtt
+ // +optional
+ Topic string `json:"topic,omitempty"`
+ // qos of mqtt publish param
+ // +optional
+ QoS int32 `json:"qos,omitempty"`
+ // Is the message retained
+ // +optional
+ Retained bool `json:"retained,omitempty"`
+}
+
+type DBMethodConfig struct {
+ // method configuration for database
+ // +optional
+ Influxdb2 *DBMethodInfluxdb2 `json:"influxdb2,omitempty"`
+ // +optional
+ Redis *DBMethodRedis `json:"redis,omitempty"`
+ // +optional
+ TDEngine *DBMethodTDEngine `json:"TDEngine,omitempty"`
+ // +optional
+ Mysql *DBMethodMySQL `json:"mysql,omitempty"`
+}
+
+type DBMethodInfluxdb2 struct {
+ // Config of influx database
+ // +optional
+ Influxdb2ClientConfig *Influxdb2ClientConfig `json:"influxdb2ClientConfig"`
+ // config of device data when push to influx database
+ // +optional
+ Influxdb2DataConfig *Influxdb2DataConfig `json:"influxdb2DataConfig"`
+}
+
+type Influxdb2ClientConfig struct {
+ // Url of influx database
+ // +optional
+ URL string `json:"url,omitempty"`
+ // Org of the user in influx database
+ // +optional
+ Org string `json:"org,omitempty"`
+ // Bucket of the user in influx database
+ // +optional
+ Bucket string `json:"bucket,omitempty"`
+}
+
+type Influxdb2DataConfig struct {
+ // Measurement of the user data
+ // +optional
+ Measurement string `json:"measurement,omitempty"`
+ // the tag of device data
+ // +optional
+ Tag map[string]string `json:"tag,omitempty"`
+ // FieldKey of the user data
+ // +optional
+ FieldKey string `json:"fieldKey,omitempty"`
+}
+
+type DBMethodRedis struct {
+ // RedisClientConfig of redis database
+ // +optional
+ RedisClientConfig *RedisClientConfig `json:"redisClientConfig,omitempty"`
+}
+
+type RedisClientConfig struct {
+ // Addr of Redis database
+ // +optional
+ Addr string `json:"addr,omitempty"`
+ // Db of Redis database
+ // +optional
+ DB int `json:"db,omitempty"`
+ // Poolsize of Redis database
+ // +optional
+ Poolsize int `json:"poolsize,omitempty"`
+ // MinIdleConns of Redis database
+ // +optional
+ MinIdleConns int `json:"minIdleConns,omitempty"`
+}
+
+type DBMethodTDEngine struct {
+ // tdengineClientConfig of tdengine database
+ // +optional
+ TDEngineClientConfig *TDEngineClientConfig `json:"TDEngineClientConfig,omitempty"`
+}
+type TDEngineClientConfig struct {
+ // addr of tdEngine database
+ // +optional
+ Addr string `json:"addr,omitempty"`
+ // dbname of tdEngine database
+ // +optional
+ DBName string `json:"dbName,omitempty"`
+}
+
+type DBMethodMySQL struct {
+ MySQLClientConfig *MySQLClientConfig `json:"mysqlClientConfig,omitempty"`
+}
+
+type MySQLClientConfig struct {
+ // mysql address,like localhost:3306
+ Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
+ // database name
+ Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
+ // user name
+ UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName,omitempty"`
+}
+
+type VisitorConfig struct {
+ // Required: name of customized protocol
+ ProtocolName string `json:"protocolName,omitempty"`
+ // Required: The configData of customized protocol
+ // +kubebuilder:validation:XPreserveUnknownFields
+ ConfigData *CustomizedValue `json:"configData,omitempty"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// Device is the Schema for the devices API
+// +k8s:openapi-gen=true
+// +kubebuilder:storageversion
+type Device struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+ Spec DeviceSpec `json:"spec,omitempty"`
+ Status DeviceStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// DeviceList contains a list of Device
+type DeviceList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []Device `json:"items"`
+}
+
+// CustomizedValue contains a map type data
+// +kubebuilder:validation:Type=object
+type CustomizedValue struct {
+ Data map[string]interface{} `json:"-"`
+}
+
+// MarshalJSON implements the Marshaler interface.
+func (in *CustomizedValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(in.Data)
+}
+
+// UnmarshalJSON implements the Unmarshaler interface.
+func (in *CustomizedValue) UnmarshalJSON(data []byte) error {
+ var out map[string]interface{}
+ err := json.Unmarshal(data, &out)
+ if err != nil {
+ return err
+ }
+ in.Data = out
+ return nil
+}
+
+// DeepCopyInto implements the DeepCopyInto interface.
+func (in *CustomizedValue) DeepCopyInto(out *CustomizedValue) {
+ bytes, err := json.Marshal(*in)
+ if err != nil {
+ panic(err)
+ }
+ var clone map[string]interface{}
+ err = json.Unmarshal(bytes, &clone)
+ if err != nil {
+ panic(err)
+ }
+ out.Data = clone
+}
+
+// DeepCopy implements the DeepCopy interface.
+func (in *CustomizedValue) DeepCopy() *CustomizedValue {
+ if in == nil {
+ return nil
+ }
+ out := new(CustomizedValue)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1beta1/device_model_types.go b/staging/src/github.com/kubeedge/api/devices/v1beta1/device_model_types.go
new file mode 100644
index 000000000..c4964ad1c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1beta1/device_model_types.go
@@ -0,0 +1,97 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// DeviceModelSpec defines the model for a device.It is a blueprint which describes the device
+// capabilities and access mechanism via property visitors.
+type DeviceModelSpec struct {
+ // Required: List of device properties.
+ Properties []ModelProperty `json:"properties,omitempty"`
+ // Required: Protocol name used by the device.
+ Protocol string `json:"protocol,omitempty"`
+}
+
+// ModelProperty describes an individual device property / attribute like temperature / humidity etc.
+type ModelProperty struct {
+ // Required: The device property name.
+ // Note: If you need to use the built-in stream data processing function, you need to define Name as saveFrame or saveVideo
+ Name string `json:"name,omitempty"`
+ // The device property description.
+ // +optional
+ Description string `json:"description,omitempty"`
+ // Required: Type of device property, ENUM: INT,FLOAT,DOUBLE,STRING,BOOLEAN,BYTES,STREAM
+ Type PropertyType `json:"type,omitempty"`
+ // Required: Access mode of property, ReadWrite or ReadOnly.
+ AccessMode PropertyAccessMode `json:"accessMode,omitempty"`
+ // +optional
+ Minimum string `json:"minimum,omitempty"`
+ // +optional
+ Maximum string `json:"maximum,omitempty"`
+ // The unit of the property
+ // +optional
+ Unit string `json:"unit,omitempty"`
+}
+
+// The type of device property.
+// +kubebuilder:validation:Enum=INT;FLOAT;DOUBLE;STRING;BOOLEAN;BYTES;STREAM
+type PropertyType string
+
+const (
+ INT PropertyType = "INT"
+ FLOAT PropertyType = "FLOAT"
+ DOUBLE PropertyType = "DOUBLE"
+ STRING PropertyType = "STRING"
+ BOOLEAN PropertyType = "BOOLEAN"
+ BYTES PropertyType = "BYTES"
+ STREAM PropertyType = "STREAM"
+)
+
+// The access mode for a device property.
+// +kubebuilder:validation:Enum=ReadWrite;ReadOnly
+type PropertyAccessMode string
+
+// Access mode constants for a device property.
+const (
+ ReadWrite PropertyAccessMode = "ReadWrite"
+ ReadOnly PropertyAccessMode = "ReadOnly"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// DeviceModel is the Schema for the device model API
+// +k8s:openapi-gen=true
+// +kubebuilder:storageversion
+type DeviceModel struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec DeviceModelSpec `json:"spec,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// DeviceModelList contains a list of DeviceModel
+type DeviceModelList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []DeviceModel `json:"items"`
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1beta1/doc.go b/staging/src/github.com/kubeedge/api/devices/v1beta1/doc.go
new file mode 100644
index 000000000..cbd63dede
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1beta1/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package
+package v1beta1
diff --git a/staging/src/github.com/kubeedge/api/devices/v1beta1/register.go b/staging/src/github.com/kubeedge/api/devices/v1beta1/register.go
new file mode 100644
index 000000000..e392afec9
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1beta1/register.go
@@ -0,0 +1,84 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// NOTE: Boilerplate only. Ignore this file.
+
+// Package v1beta1 contains API Schema definitions for the devices v1beta1 API group
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=kubeedge/cloud/pkg/apis/devices
+// +k8s:defaulter-gen=TypeMeta
+// +groupName=devices.kubeedge.io
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+const (
+ // GroupName is the group name use in this package.
+ GroupName = "devices.kubeedge.io"
+ // Version is the API version.
+ Version = "v1beta1"
+)
+
+var (
+ // SchemeGroupVersion is the group version used to register these objects.
+ SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// addKnownTypes adds the set of types defined in this package to the supplied scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Device{},
+ &DeviceList{},
+ &DeviceModel{},
+ &DeviceModelList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
+
+func AddDeviceCrds(scheme *runtime.Scheme) error {
+ // Add Device
+ scheme.AddKnownTypes(SchemeGroupVersion, &Device{}, &DeviceList{})
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ // Add DeviceModel
+ scheme.AddKnownTypes(SchemeGroupVersion, &DeviceModel{}, &DeviceModelList{})
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/devices/v1beta1/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/devices/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..2c042490c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/devices/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,616 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1beta1
+
+import (
+ v1 "k8s.io/api/core/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DBMethodConfig) DeepCopyInto(out *DBMethodConfig) {
+ *out = *in
+ if in.Influxdb2 != nil {
+ in, out := &in.Influxdb2, &out.Influxdb2
+ *out = new(DBMethodInfluxdb2)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Redis != nil {
+ in, out := &in.Redis, &out.Redis
+ *out = new(DBMethodRedis)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.TDEngine != nil {
+ in, out := &in.TDEngine, &out.TDEngine
+ *out = new(DBMethodTDEngine)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Mysql != nil {
+ in, out := &in.Mysql, &out.Mysql
+ *out = new(DBMethodMySQL)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBMethodConfig.
+func (in *DBMethodConfig) DeepCopy() *DBMethodConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(DBMethodConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DBMethodInfluxdb2) DeepCopyInto(out *DBMethodInfluxdb2) {
+ *out = *in
+ if in.Influxdb2ClientConfig != nil {
+ in, out := &in.Influxdb2ClientConfig, &out.Influxdb2ClientConfig
+ *out = new(Influxdb2ClientConfig)
+ **out = **in
+ }
+ if in.Influxdb2DataConfig != nil {
+ in, out := &in.Influxdb2DataConfig, &out.Influxdb2DataConfig
+ *out = new(Influxdb2DataConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBMethodInfluxdb2.
+func (in *DBMethodInfluxdb2) DeepCopy() *DBMethodInfluxdb2 {
+ if in == nil {
+ return nil
+ }
+ out := new(DBMethodInfluxdb2)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DBMethodMySQL) DeepCopyInto(out *DBMethodMySQL) {
+ *out = *in
+ if in.MySQLClientConfig != nil {
+ in, out := &in.MySQLClientConfig, &out.MySQLClientConfig
+ *out = new(MySQLClientConfig)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBMethodMySQL.
+func (in *DBMethodMySQL) DeepCopy() *DBMethodMySQL {
+ if in == nil {
+ return nil
+ }
+ out := new(DBMethodMySQL)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DBMethodRedis) DeepCopyInto(out *DBMethodRedis) {
+ *out = *in
+ if in.RedisClientConfig != nil {
+ in, out := &in.RedisClientConfig, &out.RedisClientConfig
+ *out = new(RedisClientConfig)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBMethodRedis.
+func (in *DBMethodRedis) DeepCopy() *DBMethodRedis {
+ if in == nil {
+ return nil
+ }
+ out := new(DBMethodRedis)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DBMethodTDEngine) DeepCopyInto(out *DBMethodTDEngine) {
+ *out = *in
+ if in.TDEngineClientConfig != nil {
+ in, out := &in.TDEngineClientConfig, &out.TDEngineClientConfig
+ *out = new(TDEngineClientConfig)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBMethodTDEngine.
+func (in *DBMethodTDEngine) DeepCopy() *DBMethodTDEngine {
+ if in == nil {
+ return nil
+ }
+ out := new(DBMethodTDEngine)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Device) DeepCopyInto(out *Device) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.
+func (in *Device) DeepCopy() *Device {
+ if in == nil {
+ return nil
+ }
+ out := new(Device)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Device) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceList) DeepCopyInto(out *DeviceList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Device, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceList.
+func (in *DeviceList) DeepCopy() *DeviceList {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceModel) DeepCopyInto(out *DeviceModel) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModel.
+func (in *DeviceModel) DeepCopy() *DeviceModel {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceModel)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceModel) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceModelList) DeepCopyInto(out *DeviceModelList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DeviceModel, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModelList.
+func (in *DeviceModelList) DeepCopy() *DeviceModelList {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceModelList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceModelList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceModelSpec) DeepCopyInto(out *DeviceModelSpec) {
+ *out = *in
+ if in.Properties != nil {
+ in, out := &in.Properties, &out.Properties
+ *out = make([]ModelProperty, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceModelSpec.
+func (in *DeviceModelSpec) DeepCopy() *DeviceModelSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceModelSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceProperty) DeepCopyInto(out *DeviceProperty) {
+ *out = *in
+ in.Desired.DeepCopyInto(&out.Desired)
+ in.Visitors.DeepCopyInto(&out.Visitors)
+ if in.PushMethod != nil {
+ in, out := &in.PushMethod, &out.PushMethod
+ *out = new(PushMethod)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceProperty.
+func (in *DeviceProperty) DeepCopy() *DeviceProperty {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceProperty)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceSpec) DeepCopyInto(out *DeviceSpec) {
+ *out = *in
+ if in.DeviceModelRef != nil {
+ in, out := &in.DeviceModelRef, &out.DeviceModelRef
+ *out = new(v1.LocalObjectReference)
+ **out = **in
+ }
+ if in.Properties != nil {
+ in, out := &in.Properties, &out.Properties
+ *out = make([]DeviceProperty, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Protocol.DeepCopyInto(&out.Protocol)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSpec.
+func (in *DeviceSpec) DeepCopy() *DeviceSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceStatus) DeepCopyInto(out *DeviceStatus) {
+ *out = *in
+ if in.Twins != nil {
+ in, out := &in.Twins, &out.Twins
+ *out = make([]Twin, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceStatus.
+func (in *DeviceStatus) DeepCopy() *DeviceStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Influxdb2ClientConfig) DeepCopyInto(out *Influxdb2ClientConfig) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Influxdb2ClientConfig.
+func (in *Influxdb2ClientConfig) DeepCopy() *Influxdb2ClientConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(Influxdb2ClientConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Influxdb2DataConfig) DeepCopyInto(out *Influxdb2DataConfig) {
+ *out = *in
+ if in.Tag != nil {
+ in, out := &in.Tag, &out.Tag
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Influxdb2DataConfig.
+func (in *Influxdb2DataConfig) DeepCopy() *Influxdb2DataConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(Influxdb2DataConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ModelProperty) DeepCopyInto(out *ModelProperty) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelProperty.
+func (in *ModelProperty) DeepCopy() *ModelProperty {
+ if in == nil {
+ return nil
+ }
+ out := new(ModelProperty)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *MySQLClientConfig) DeepCopyInto(out *MySQLClientConfig) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MySQLClientConfig.
+func (in *MySQLClientConfig) DeepCopy() *MySQLClientConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(MySQLClientConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProtocolConfig) DeepCopyInto(out *ProtocolConfig) {
+ *out = *in
+ if in.ConfigData != nil {
+ in, out := &in.ConfigData, &out.ConfigData
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolConfig.
+func (in *ProtocolConfig) DeepCopy() *ProtocolConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(ProtocolConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PushMethod) DeepCopyInto(out *PushMethod) {
+ *out = *in
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(PushMethodHTTP)
+ **out = **in
+ }
+ if in.MQTT != nil {
+ in, out := &in.MQTT, &out.MQTT
+ *out = new(PushMethodMQTT)
+ **out = **in
+ }
+ if in.DBMethod != nil {
+ in, out := &in.DBMethod, &out.DBMethod
+ *out = new(DBMethodConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushMethod.
+func (in *PushMethod) DeepCopy() *PushMethod {
+ if in == nil {
+ return nil
+ }
+ out := new(PushMethod)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PushMethodHTTP) DeepCopyInto(out *PushMethodHTTP) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushMethodHTTP.
+func (in *PushMethodHTTP) DeepCopy() *PushMethodHTTP {
+ if in == nil {
+ return nil
+ }
+ out := new(PushMethodHTTP)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PushMethodMQTT) DeepCopyInto(out *PushMethodMQTT) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushMethodMQTT.
+func (in *PushMethodMQTT) DeepCopy() *PushMethodMQTT {
+ if in == nil {
+ return nil
+ }
+ out := new(PushMethodMQTT)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RedisClientConfig) DeepCopyInto(out *RedisClientConfig) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClientConfig.
+func (in *RedisClientConfig) DeepCopy() *RedisClientConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(RedisClientConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TDEngineClientConfig) DeepCopyInto(out *TDEngineClientConfig) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TDEngineClientConfig.
+func (in *TDEngineClientConfig) DeepCopy() *TDEngineClientConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(TDEngineClientConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Twin) DeepCopyInto(out *Twin) {
+ *out = *in
+ in.Reported.DeepCopyInto(&out.Reported)
+ in.ObservedDesired.DeepCopyInto(&out.ObservedDesired)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Twin.
+func (in *Twin) DeepCopy() *Twin {
+ if in == nil {
+ return nil
+ }
+ out := new(Twin)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TwinProperty) DeepCopyInto(out *TwinProperty) {
+ *out = *in
+ if in.Metadata != nil {
+ in, out := &in.Metadata, &out.Metadata
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TwinProperty.
+func (in *TwinProperty) DeepCopy() *TwinProperty {
+ if in == nil {
+ return nil
+ }
+ out := new(TwinProperty)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VisitorConfig) DeepCopyInto(out *VisitorConfig) {
+ *out = *in
+ if in.ConfigData != nil {
+ in, out := &in.ConfigData, &out.ConfigData
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VisitorConfig.
+func (in *VisitorConfig) DeepCopy() *VisitorConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(VisitorConfig)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/dmi/services.go b/staging/src/github.com/kubeedge/api/dmi/services.go
new file mode 100644
index 000000000..65e1a693d
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/dmi/services.go
@@ -0,0 +1,92 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package dmi
+
+import (
+ dmiapi "github.com/kubeedge/api/dmi/v1beta1"
+)
+
+// DeviceManagerService defines the public APIS for remote device management.
+// The server is implemented by the module of device manager in edgecore
+// and the client is implemented by the device mapper for upstreaming.
+// The mapper should register itself to the device manager when it is online
+// to get the list of devices. And then the mapper can report the device status to the device manager.
+type DeviceManagerService interface {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ MapperRegister(*dmiapi.MapperRegisterRequest) (*dmiapi.MapperRegisterResponse, error)
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ ReportDeviceStatus(*dmiapi.ReportDeviceStatusRequest) (*dmiapi.ReportDeviceStatusResponse, error)
+ // ReportDeviceStates reports the state of devices to device manager.
+ ReportDeviceState(*dmiapi.ReportDeviceStatesRequest) (*dmiapi.ReportDeviceStatesResponse, error)
+}
+
+// DeviceMapperService defines the public APIS for remote device management.
+// The server is implemented by the device mapper
+// and the client is implemented by the module of device manager in edgecore for downstreaming.
+// The device manager can manage the device life cycle through these interfaces provided by DeviceMapperService.
+// When device manager gets a message of device management from cloudcore, it should call the corresponding grpc interface
+// to make the mapper maintain the list of device information.
+type DeviceMapperService interface {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ RegisterDevice(*dmiapi.RegisterDeviceRequest) (*dmiapi.RegisterDeviceResponse, error)
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ RemoveDevice(*dmiapi.RemoveDeviceRequest) (*dmiapi.RemoveDeviceResponse, error)
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ UpdateDevice(*dmiapi.UpdateDeviceRequest) (*dmiapi.UpdateDeviceResponse, error)
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ GetDevice(*dmiapi.GetDeviceRequest) (*dmiapi.GetDeviceResponse, error)
+
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ CreateDeviceModel(request *dmiapi.CreateDeviceModelRequest) (*dmiapi.CreateDeviceModelResponse, error)
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ RemoveDeviceModel(*dmiapi.RemoveDeviceModelRequest) (*dmiapi.RemoveDeviceModelResponse, error)
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ UpdateDeviceModel(*dmiapi.UpdateDeviceModelRequest) (*dmiapi.UpdateDeviceModelResponse, error)
+}
diff --git a/staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.pb.go b/staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.pb.go
new file mode 100644
index 000000000..f56a76844
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.pb.go
@@ -0,0 +1,5218 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+//
+// To regenerate api.pb.go run hack/generate-dmi.sh
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.21.1
+// source: api.proto
+
+package v1alpha1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MapperRegisterRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The flag to show how device manager returns.
+ // True means device manager should return the device list in the response.
+ // False means device manager should just return nothing.
+ WithData bool `protobuf:"varint,1,opt,name=withData,proto3" json:"withData,omitempty"`
+ // Mapper information to be registered to the device manager.
+ Mapper *MapperInfo `protobuf:"bytes,2,opt,name=mapper,proto3" json:"mapper,omitempty"`
+}
+
+func (x *MapperRegisterRequest) Reset() {
+ *x = MapperRegisterRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapperRegisterRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapperRegisterRequest) ProtoMessage() {}
+
+func (x *MapperRegisterRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapperRegisterRequest.ProtoReflect.Descriptor instead.
+func (*MapperRegisterRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MapperRegisterRequest) GetWithData() bool {
+ if x != nil {
+ return x.WithData
+ }
+ return false
+}
+
+func (x *MapperRegisterRequest) GetMapper() *MapperInfo {
+ if x != nil {
+ return x.Mapper
+ }
+ return nil
+}
+
+type MapperRegisterResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // List of device models which the mapper maintains.
+ ModelList []*DeviceModel `protobuf:"bytes,1,rep,name=modelList,proto3" json:"modelList,omitempty"`
+ // List of devices which the mapper maintains.
+ DeviceList []*Device `protobuf:"bytes,2,rep,name=deviceList,proto3" json:"deviceList,omitempty"`
+}
+
+func (x *MapperRegisterResponse) Reset() {
+ *x = MapperRegisterResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapperRegisterResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapperRegisterResponse) ProtoMessage() {}
+
+func (x *MapperRegisterResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapperRegisterResponse.ProtoReflect.Descriptor instead.
+func (*MapperRegisterResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *MapperRegisterResponse) GetModelList() []*DeviceModel {
+ if x != nil {
+ return x.ModelList
+ }
+ return nil
+}
+
+func (x *MapperRegisterResponse) GetDeviceList() []*Device {
+ if x != nil {
+ return x.DeviceList
+ }
+ return nil
+}
+
+// DeviceModel specifies the information of a device model.
+type DeviceModel struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of a device model.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Specification of a device model.
+ Spec *DeviceModelSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
+}
+
+func (x *DeviceModel) Reset() {
+ *x = DeviceModel{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceModel) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceModel) ProtoMessage() {}
+
+func (x *DeviceModel) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceModel.ProtoReflect.Descriptor instead.
+func (*DeviceModel) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DeviceModel) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeviceModel) GetSpec() *DeviceModelSpec {
+ if x != nil {
+ return x.Spec
+ }
+ return nil
+}
+
+// DeviceModelSpec is the specification of a device model.
+type DeviceModelSpec struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The properties provided by the device of this device model.
+ Properties []*DeviceProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
+ // The commands executed by the device of this device model.
+ Commands []*DeviceCommand `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"`
+ // The protocol name used by the device of this device model.
+ Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
+}
+
+func (x *DeviceModelSpec) Reset() {
+ *x = DeviceModelSpec{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceModelSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceModelSpec) ProtoMessage() {}
+
+func (x *DeviceModelSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceModelSpec.ProtoReflect.Descriptor instead.
+func (*DeviceModelSpec) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *DeviceModelSpec) GetProperties() []*DeviceProperty {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *DeviceModelSpec) GetCommands() []*DeviceCommand {
+ if x != nil {
+ return x.Commands
+ }
+ return nil
+}
+
+func (x *DeviceModelSpec) GetProtocol() string {
+ if x != nil {
+ return x.Protocol
+ }
+ return ""
+}
+
+// DeviceProperty is the property of a device.
+type DeviceProperty struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of this property.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The description of this property.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ // The specific type of this property.
+ Type *PropertyType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+}
+
+func (x *DeviceProperty) Reset() {
+ *x = DeviceProperty{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceProperty) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceProperty) ProtoMessage() {}
+
+func (x *DeviceProperty) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceProperty.ProtoReflect.Descriptor instead.
+func (*DeviceProperty) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DeviceProperty) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeviceProperty) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *DeviceProperty) GetType() *PropertyType {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+// PropertyType is the type of a property.
+type PropertyType struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Property of Type Int64.
+ Int *PropertyTypeInt64 `protobuf:"bytes,1,opt,name=int,proto3" json:"int,omitempty"`
+ // Property of Type String.
+ String_ *PropertyTypeString `protobuf:"bytes,2,opt,name=string,proto3" json:"string,omitempty"`
+ // Property of Type Double.
+ Double *PropertyTypeDouble `protobuf:"bytes,3,opt,name=double,proto3" json:"double,omitempty"`
+ // Property of Type Float.
+ Float *PropertyTypeFloat `protobuf:"bytes,4,opt,name=float,proto3" json:"float,omitempty"`
+ // Property of Type Boolean.
+ Boolean *PropertyTypeBoolean `protobuf:"bytes,5,opt,name=boolean,proto3" json:"boolean,omitempty"`
+ // Property of Type Bytes.
+ Bytes *PropertyTypeBytes `protobuf:"bytes,6,opt,name=bytes,proto3" json:"bytes,omitempty"`
+}
+
+func (x *PropertyType) Reset() {
+ *x = PropertyType{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyType) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyType) ProtoMessage() {}
+
+func (x *PropertyType) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyType.ProtoReflect.Descriptor instead.
+func (*PropertyType) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *PropertyType) GetInt() *PropertyTypeInt64 {
+ if x != nil {
+ return x.Int
+ }
+ return nil
+}
+
+func (x *PropertyType) GetString_() *PropertyTypeString {
+ if x != nil {
+ return x.String_
+ }
+ return nil
+}
+
+func (x *PropertyType) GetDouble() *PropertyTypeDouble {
+ if x != nil {
+ return x.Double
+ }
+ return nil
+}
+
+func (x *PropertyType) GetFloat() *PropertyTypeFloat {
+ if x != nil {
+ return x.Float
+ }
+ return nil
+}
+
+func (x *PropertyType) GetBoolean() *PropertyTypeBoolean {
+ if x != nil {
+ return x.Boolean
+ }
+ return nil
+}
+
+func (x *PropertyType) GetBytes() *PropertyTypeBytes {
+ if x != nil {
+ return x.Bytes
+ }
+ return nil
+}
+
+// The Specification of property of Int64.
+type PropertyTypeInt64 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,1,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+ // The default value of this property.
+ DefaultValue int64 `protobuf:"varint,2,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"`
+ // The minimum value of this property.
+ Minimum int64 `protobuf:"varint,3,opt,name=minimum,proto3" json:"minimum,omitempty"`
+ // The maximum value of this property.
+ Maximum int64 `protobuf:"varint,4,opt,name=maximum,proto3" json:"maximum,omitempty"`
+ // The unit of this property.
+ Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
+}
+
+func (x *PropertyTypeInt64) Reset() {
+ *x = PropertyTypeInt64{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyTypeInt64) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyTypeInt64) ProtoMessage() {}
+
+func (x *PropertyTypeInt64) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyTypeInt64.ProtoReflect.Descriptor instead.
+func (*PropertyTypeInt64) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *PropertyTypeInt64) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+func (x *PropertyTypeInt64) GetDefaultValue() int64 {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return 0
+}
+
+func (x *PropertyTypeInt64) GetMinimum() int64 {
+ if x != nil {
+ return x.Minimum
+ }
+ return 0
+}
+
+func (x *PropertyTypeInt64) GetMaximum() int64 {
+ if x != nil {
+ return x.Maximum
+ }
+ return 0
+}
+
+func (x *PropertyTypeInt64) GetUnit() string {
+ if x != nil {
+ return x.Unit
+ }
+ return ""
+}
+
+// The Specification of property of String.
+type PropertyTypeString struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,1,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+ // The default value of this property.
+ DefaultValue string `protobuf:"bytes,2,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"`
+}
+
+func (x *PropertyTypeString) Reset() {
+ *x = PropertyTypeString{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyTypeString) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyTypeString) ProtoMessage() {}
+
+func (x *PropertyTypeString) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyTypeString.ProtoReflect.Descriptor instead.
+func (*PropertyTypeString) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *PropertyTypeString) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+func (x *PropertyTypeString) GetDefaultValue() string {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return ""
+}
+
+// The Specification of property of Double.
+type PropertyTypeDouble struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,1,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+ // The default value of this property.
+ DefaultValue float64 `protobuf:"fixed64,2,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"`
+ // The minimum value of this property.
+ Minimum float64 `protobuf:"fixed64,3,opt,name=minimum,proto3" json:"minimum,omitempty"`
+ // The maximum value of this property.
+ Maximum float64 `protobuf:"fixed64,4,opt,name=maximum,proto3" json:"maximum,omitempty"`
+ // The unit of this property.
+ Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
+}
+
+func (x *PropertyTypeDouble) Reset() {
+ *x = PropertyTypeDouble{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyTypeDouble) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyTypeDouble) ProtoMessage() {}
+
+func (x *PropertyTypeDouble) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyTypeDouble.ProtoReflect.Descriptor instead.
+func (*PropertyTypeDouble) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *PropertyTypeDouble) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+func (x *PropertyTypeDouble) GetDefaultValue() float64 {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return 0
+}
+
+func (x *PropertyTypeDouble) GetMinimum() float64 {
+ if x != nil {
+ return x.Minimum
+ }
+ return 0
+}
+
+func (x *PropertyTypeDouble) GetMaximum() float64 {
+ if x != nil {
+ return x.Maximum
+ }
+ return 0
+}
+
+func (x *PropertyTypeDouble) GetUnit() string {
+ if x != nil {
+ return x.Unit
+ }
+ return ""
+}
+
+// The Specification of property of Float.
+type PropertyTypeFloat struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,1,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+ // The default value of this property.
+ DefaultValue float32 `protobuf:"fixed32,2,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"`
+ // The minimum value of this property.
+ Minimum float32 `protobuf:"fixed32,3,opt,name=minimum,proto3" json:"minimum,omitempty"`
+ // The maximum value of this property.
+ Maximum float32 `protobuf:"fixed32,4,opt,name=maximum,proto3" json:"maximum,omitempty"`
+ // The unit of this property.
+ Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
+}
+
+func (x *PropertyTypeFloat) Reset() {
+ *x = PropertyTypeFloat{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyTypeFloat) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyTypeFloat) ProtoMessage() {}
+
+func (x *PropertyTypeFloat) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyTypeFloat.ProtoReflect.Descriptor instead.
+func (*PropertyTypeFloat) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *PropertyTypeFloat) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+func (x *PropertyTypeFloat) GetDefaultValue() float32 {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return 0
+}
+
+func (x *PropertyTypeFloat) GetMinimum() float32 {
+ if x != nil {
+ return x.Minimum
+ }
+ return 0
+}
+
+func (x *PropertyTypeFloat) GetMaximum() float32 {
+ if x != nil {
+ return x.Maximum
+ }
+ return 0
+}
+
+func (x *PropertyTypeFloat) GetUnit() string {
+ if x != nil {
+ return x.Unit
+ }
+ return ""
+}
+
+// The Specification of property of Boolean.
+type PropertyTypeBoolean struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,1,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+ // The default value of this property.
+ DefaultValue bool `protobuf:"varint,2,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"`
+}
+
+func (x *PropertyTypeBoolean) Reset() {
+ *x = PropertyTypeBoolean{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyTypeBoolean) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyTypeBoolean) ProtoMessage() {}
+
+func (x *PropertyTypeBoolean) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyTypeBoolean.ProtoReflect.Descriptor instead.
+func (*PropertyTypeBoolean) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *PropertyTypeBoolean) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+func (x *PropertyTypeBoolean) GetDefaultValue() bool {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return false
+}
+
+// The Specification of property of Bytes.
+type PropertyTypeBytes struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,1,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+}
+
+func (x *PropertyTypeBytes) Reset() {
+ *x = PropertyTypeBytes{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PropertyTypeBytes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PropertyTypeBytes) ProtoMessage() {}
+
+func (x *PropertyTypeBytes) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PropertyTypeBytes.ProtoReflect.Descriptor instead.
+func (*PropertyTypeBytes) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *PropertyTypeBytes) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+// DeviceCommond is the description of a command which the device supports.
+type DeviceCommand struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the command.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Url of the command to access.
+ Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
+ // Method of the command.
+ Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
+ // Status code list which the command can return.
+ StatusCode []string `protobuf:"bytes,4,rep,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
+ // Parameter list which the command carries.
+ Parameters []string `protobuf:"bytes,5,rep,name=parameters,proto3" json:"parameters,omitempty"`
+ // Response examples of the command.
+ Response []byte `protobuf:"bytes,6,opt,name=response,proto3" json:"response,omitempty"`
+}
+
+func (x *DeviceCommand) Reset() {
+ *x = DeviceCommand{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceCommand) ProtoMessage() {}
+
+func (x *DeviceCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceCommand.ProtoReflect.Descriptor instead.
+func (*DeviceCommand) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *DeviceCommand) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeviceCommand) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *DeviceCommand) GetMethod() string {
+ if x != nil {
+ return x.Method
+ }
+ return ""
+}
+
+func (x *DeviceCommand) GetStatusCode() []string {
+ if x != nil {
+ return x.StatusCode
+ }
+ return nil
+}
+
+func (x *DeviceCommand) GetParameters() []string {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+func (x *DeviceCommand) GetResponse() []byte {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+// Device is the description of a device instance.
+type Device struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the device.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Specification of the device.
+ Spec *DeviceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
+ // Status of the device.
+ Status *DeviceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
+}
+
+func (x *Device) Reset() {
+ *x = Device{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Device) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Device) ProtoMessage() {}
+
+func (x *Device) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Device.ProtoReflect.Descriptor instead.
+func (*Device) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *Device) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Device) GetSpec() *DeviceSpec {
+ if x != nil {
+ return x.Spec
+ }
+ return nil
+}
+
+func (x *Device) GetStatus() *DeviceStatus {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+// DeviceSpec is the specification of the device.
+type DeviceSpec struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The device model which the device references.
+ DeviceModelReference string `protobuf:"bytes,1,opt,name=deviceModelReference,proto3" json:"deviceModelReference,omitempty"`
+ // The specific config of the protocol to access to the device.
+ Protocol *ProtocolConfig `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
+ // The visitor to collect the properties of the device.
+ PropertyVisitors []*DevicePropertyVisitor `protobuf:"bytes,3,rep,name=propertyVisitors,proto3" json:"propertyVisitors,omitempty"`
+}
+
+func (x *DeviceSpec) Reset() {
+ *x = DeviceSpec{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceSpec) ProtoMessage() {}
+
+func (x *DeviceSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceSpec.ProtoReflect.Descriptor instead.
+func (*DeviceSpec) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *DeviceSpec) GetDeviceModelReference() string {
+ if x != nil {
+ return x.DeviceModelReference
+ }
+ return ""
+}
+
+func (x *DeviceSpec) GetProtocol() *ProtocolConfig {
+ if x != nil {
+ return x.Protocol
+ }
+ return nil
+}
+
+func (x *DeviceSpec) GetPropertyVisitors() []*DevicePropertyVisitor {
+ if x != nil {
+ return x.PropertyVisitors
+ }
+ return nil
+}
+
+// ProtocolConfig is the specific config of the protocol to access to the device.
+type ProtocolConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The specific config of the protocol of OpcUA.
+ Opcua *ProtocolConfigOpcUA `protobuf:"bytes,1,opt,name=opcua,proto3" json:"opcua,omitempty"`
+ // The specific config of the protocol of Modbus.
+ Modbus *ProtocolConfigModbus `protobuf:"bytes,2,opt,name=modbus,proto3" json:"modbus,omitempty"`
+ // The specific config of the protocol of Bluetooth.
+ Bluetooth *ProtocolConfigBluetooth `protobuf:"bytes,3,opt,name=bluetooth,proto3" json:"bluetooth,omitempty"`
+ // The common config for device.
+ Common *ProtocolConfigCommon `protobuf:"bytes,4,opt,name=common,proto3" json:"common,omitempty"`
+ // The specific config of the customized protocol.
+ CustomizedProtocol *ProtocolConfigCustomized `protobuf:"bytes,5,opt,name=customizedProtocol,proto3" json:"customizedProtocol,omitempty"`
+}
+
+func (x *ProtocolConfig) Reset() {
+ *x = ProtocolConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfig) ProtoMessage() {}
+
+func (x *ProtocolConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfig.ProtoReflect.Descriptor instead.
+func (*ProtocolConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *ProtocolConfig) GetOpcua() *ProtocolConfigOpcUA {
+ if x != nil {
+ return x.Opcua
+ }
+ return nil
+}
+
+func (x *ProtocolConfig) GetModbus() *ProtocolConfigModbus {
+ if x != nil {
+ return x.Modbus
+ }
+ return nil
+}
+
+func (x *ProtocolConfig) GetBluetooth() *ProtocolConfigBluetooth {
+ if x != nil {
+ return x.Bluetooth
+ }
+ return nil
+}
+
+func (x *ProtocolConfig) GetCommon() *ProtocolConfigCommon {
+ if x != nil {
+ return x.Common
+ }
+ return nil
+}
+
+func (x *ProtocolConfig) GetCustomizedProtocol() *ProtocolConfigCustomized {
+ if x != nil {
+ return x.CustomizedProtocol
+ }
+ return nil
+}
+
+// ProtocolConfigOpcUA is the config of the protocol of OpcUA.
+type ProtocolConfigOpcUA struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // URL of the device.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+ // The user name to access to the device.
+ UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
+ // The file path to store the password to access to the device like /ca/paas.
+ Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
+ // The security policy of the device like Basic256Sha256.
+ SecurityPolicy string `protobuf:"bytes,4,opt,name=securityPolicy,proto3" json:"securityPolicy,omitempty"`
+ // The security mode of the device like Sign.
+ SecurityMode string `protobuf:"bytes,5,opt,name=securityMode,proto3" json:"securityMode,omitempty"`
+ // The file path to store the certificate to access to the device like /ca/clientcert.pem.
+ Certificate string `protobuf:"bytes,6,opt,name=certificate,proto3" json:"certificate,omitempty"`
+ // The file path to store the private key to access to the device like /ca/clientkey.pem.
+ PrivateKey string `protobuf:"bytes,7,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
+ Timeout int64 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"`
+}
+
+func (x *ProtocolConfigOpcUA) Reset() {
+ *x = ProtocolConfigOpcUA{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigOpcUA) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigOpcUA) ProtoMessage() {}
+
+func (x *ProtocolConfigOpcUA) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigOpcUA.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigOpcUA) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ProtocolConfigOpcUA) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetUserName() string {
+ if x != nil {
+ return x.UserName
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetPassword() string {
+ if x != nil {
+ return x.Password
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetSecurityPolicy() string {
+ if x != nil {
+ return x.SecurityPolicy
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetSecurityMode() string {
+ if x != nil {
+ return x.SecurityMode
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetCertificate() string {
+ if x != nil {
+ return x.Certificate
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetPrivateKey() string {
+ if x != nil {
+ return x.PrivateKey
+ }
+ return ""
+}
+
+func (x *ProtocolConfigOpcUA) GetTimeout() int64 {
+ if x != nil {
+ return x.Timeout
+ }
+ return 0
+}
+
+// ProtocolConfigModbus is the config of the protocol of Modbus.
+type ProtocolConfigModbus struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the slave.
+ SlaveID int64 `protobuf:"varint,1,opt,name=slaveID,proto3" json:"slaveID,omitempty"`
+}
+
+func (x *ProtocolConfigModbus) Reset() {
+ *x = ProtocolConfigModbus{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigModbus) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigModbus) ProtoMessage() {}
+
+func (x *ProtocolConfigModbus) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigModbus.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigModbus) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ProtocolConfigModbus) GetSlaveID() int64 {
+ if x != nil {
+ return x.SlaveID
+ }
+ return 0
+}
+
+// The specific config of the protocol of Bluetooth.
+type ProtocolConfigBluetooth struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The mac address of the bluetooth device.
+ MacAddress string `protobuf:"bytes,1,opt,name=macAddress,proto3" json:"macAddress,omitempty"`
+}
+
+func (x *ProtocolConfigBluetooth) Reset() {
+ *x = ProtocolConfigBluetooth{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigBluetooth) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigBluetooth) ProtoMessage() {}
+
+func (x *ProtocolConfigBluetooth) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[18]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigBluetooth.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigBluetooth) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *ProtocolConfigBluetooth) GetMacAddress() string {
+ if x != nil {
+ return x.MacAddress
+ }
+ return ""
+}
+
+// The common config for device.
+type ProtocolConfigCommon struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // ProtocolConfigCOM is the config of com.
+ Com *ProtocolConfigCOM `protobuf:"bytes,1,opt,name=com,proto3" json:"com,omitempty"`
+ // ProtocolConfigTCP is the config of tcp.
+ Tcp *ProtocolConfigTCP `protobuf:"bytes,2,opt,name=tcp,proto3" json:"tcp,omitempty"`
+ // commType is the type of the communication.
+ CommType string `protobuf:"bytes,3,opt,name=commType,proto3" json:"commType,omitempty"`
+ // reconnTimeout is the time out of reconnection.
+ ReconnTimeout int64 `protobuf:"varint,4,opt,name=reconnTimeout,proto3" json:"reconnTimeout,omitempty"`
+ // reconnRetryTimes is the retry times of reconnection.
+ ReconnRetryTimes int64 `protobuf:"varint,5,opt,name=reconnRetryTimes,proto3" json:"reconnRetryTimes,omitempty"`
+ // collectTimeout is the time out of collection.
+ CollectTimeout int64 `protobuf:"varint,6,opt,name=collectTimeout,proto3" json:"collectTimeout,omitempty"`
+ // collectRetryTimes is the retry times of collection.
+ CollectRetryTimes int64 `protobuf:"varint,7,opt,name=collectRetryTimes,proto3" json:"collectRetryTimes,omitempty"`
+ // collectType is the type of collection.
+ CollectType string `protobuf:"bytes,8,opt,name=collectType,proto3" json:"collectType,omitempty"`
+ // CustomizedValue is the customized value for developers.
+ CustomizedValues *CustomizedValue `protobuf:"bytes,9,opt,name=customizedValues,proto3" json:"customizedValues,omitempty"`
+}
+
+func (x *ProtocolConfigCommon) Reset() {
+ *x = ProtocolConfigCommon{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigCommon) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigCommon) ProtoMessage() {}
+
+func (x *ProtocolConfigCommon) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigCommon.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigCommon) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *ProtocolConfigCommon) GetCom() *ProtocolConfigCOM {
+ if x != nil {
+ return x.Com
+ }
+ return nil
+}
+
+func (x *ProtocolConfigCommon) GetTcp() *ProtocolConfigTCP {
+ if x != nil {
+ return x.Tcp
+ }
+ return nil
+}
+
+func (x *ProtocolConfigCommon) GetCommType() string {
+ if x != nil {
+ return x.CommType
+ }
+ return ""
+}
+
+func (x *ProtocolConfigCommon) GetReconnTimeout() int64 {
+ if x != nil {
+ return x.ReconnTimeout
+ }
+ return 0
+}
+
+func (x *ProtocolConfigCommon) GetReconnRetryTimes() int64 {
+ if x != nil {
+ return x.ReconnRetryTimes
+ }
+ return 0
+}
+
+func (x *ProtocolConfigCommon) GetCollectTimeout() int64 {
+ if x != nil {
+ return x.CollectTimeout
+ }
+ return 0
+}
+
+func (x *ProtocolConfigCommon) GetCollectRetryTimes() int64 {
+ if x != nil {
+ return x.CollectRetryTimes
+ }
+ return 0
+}
+
+func (x *ProtocolConfigCommon) GetCollectType() string {
+ if x != nil {
+ return x.CollectType
+ }
+ return ""
+}
+
+func (x *ProtocolConfigCommon) GetCustomizedValues() *CustomizedValue {
+ if x != nil {
+ return x.CustomizedValues
+ }
+ return nil
+}
+
+// ProtocolConfigCOM is the config of com.
+type ProtocolConfigCOM struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // serialPort is the port of serial.
+ SerialPort string `protobuf:"bytes,1,opt,name=serialPort,proto3" json:"serialPort,omitempty"`
+ // baudRate is the rate of baud.
+ BaudRate int64 `protobuf:"varint,2,opt,name=baudRate,proto3" json:"baudRate,omitempty"`
+ // dataBits is the bits of data.
+ DataBits int64 `protobuf:"varint,3,opt,name=dataBits,proto3" json:"dataBits,omitempty"`
+ // parity is the bit of parity.
+ Parity string `protobuf:"bytes,4,opt,name=parity,proto3" json:"parity,omitempty"`
+ // stopBits is the bit of stop.
+ StopBits int64 `protobuf:"varint,5,opt,name=stopBits,proto3" json:"stopBits,omitempty"`
+}
+
+func (x *ProtocolConfigCOM) Reset() {
+ *x = ProtocolConfigCOM{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigCOM) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigCOM) ProtoMessage() {}
+
+func (x *ProtocolConfigCOM) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigCOM.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigCOM) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *ProtocolConfigCOM) GetSerialPort() string {
+ if x != nil {
+ return x.SerialPort
+ }
+ return ""
+}
+
+func (x *ProtocolConfigCOM) GetBaudRate() int64 {
+ if x != nil {
+ return x.BaudRate
+ }
+ return 0
+}
+
+func (x *ProtocolConfigCOM) GetDataBits() int64 {
+ if x != nil {
+ return x.DataBits
+ }
+ return 0
+}
+
+func (x *ProtocolConfigCOM) GetParity() string {
+ if x != nil {
+ return x.Parity
+ }
+ return ""
+}
+
+func (x *ProtocolConfigCOM) GetStopBits() int64 {
+ if x != nil {
+ return x.StopBits
+ }
+ return 0
+}
+
+// ProtocolConfigTCP is the config of tcp.
+type ProtocolConfigTCP struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // IP of tcp for the device.
+ Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
+ // port of tcp for the device.
+ Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
+}
+
+func (x *ProtocolConfigTCP) Reset() {
+ *x = ProtocolConfigTCP{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigTCP) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigTCP) ProtoMessage() {}
+
+func (x *ProtocolConfigTCP) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[21]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigTCP.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigTCP) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ProtocolConfigTCP) GetIp() string {
+ if x != nil {
+ return x.Ip
+ }
+ return ""
+}
+
+func (x *ProtocolConfigTCP) GetPort() int64 {
+ if x != nil {
+ return x.Port
+ }
+ return 0
+}
+
+// CustomizedValue is the customized value for developers.
+type CustomizedValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // data is the customized value and it can be any form.
+ Data map[string]*anypb.Any `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *CustomizedValue) Reset() {
+ *x = CustomizedValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomizedValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomizedValue) ProtoMessage() {}
+
+func (x *CustomizedValue) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[22]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomizedValue.ProtoReflect.Descriptor instead.
+func (*CustomizedValue) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *CustomizedValue) GetData() map[string]*anypb.Any {
+ if x != nil {
+ return x.Data
+ }
+ return nil
+}
+
+// The specific config of the customized protocol.
+type ProtocolConfigCustomized struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the name of the customized protocol.
+ ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
+ // the config data of the customized protocol.
+ ConfigData *CustomizedValue `protobuf:"bytes,2,opt,name=configData,proto3" json:"configData,omitempty"`
+}
+
+func (x *ProtocolConfigCustomized) Reset() {
+ *x = ProtocolConfigCustomized{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfigCustomized) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfigCustomized) ProtoMessage() {}
+
+func (x *ProtocolConfigCustomized) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[23]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfigCustomized.ProtoReflect.Descriptor instead.
+func (*ProtocolConfigCustomized) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *ProtocolConfigCustomized) GetProtocolName() string {
+ if x != nil {
+ return x.ProtocolName
+ }
+ return ""
+}
+
+func (x *ProtocolConfigCustomized) GetConfigData() *CustomizedValue {
+ if x != nil {
+ return x.ConfigData
+ }
+ return nil
+}
+
+// The visitor to collect the properties of the device.
+type DevicePropertyVisitor struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the name of the property.
+ PropertyName string `protobuf:"bytes,1,opt,name=propertyName,proto3" json:"propertyName,omitempty"`
+ // the cycle to report data.
+ ReportCycle int64 `protobuf:"varint,2,opt,name=reportCycle,proto3" json:"reportCycle,omitempty"`
+ // the cycle to collect data.
+ CollectCycle int64 `protobuf:"varint,3,opt,name=collectCycle,proto3" json:"collectCycle,omitempty"`
+ // CustomizedValue is the customized value for developers.
+ CustomizedValues *CustomizedValue `protobuf:"bytes,4,opt,name=customizedValues,proto3" json:"customizedValues,omitempty"`
+ // the visitor to collect the properties of the device of OPC UA.
+ Opcua *VisitorConfigOPCUA `protobuf:"bytes,5,opt,name=opcua,proto3" json:"opcua,omitempty"`
+ // the visitor to collect the properties of the device of Modbus.
+ Modbus *VisitorConfigModbus `protobuf:"bytes,6,opt,name=modbus,proto3" json:"modbus,omitempty"`
+ // the visitor to collect the properties of the device of Bluetooth.
+ Bluetooth *VisitorConfigBluetooth `protobuf:"bytes,7,opt,name=bluetooth,proto3" json:"bluetooth,omitempty"`
+ // the visitor to collect the properties of the device of customized protocol.
+ CustomizedProtocol *VisitorConfigCustomized `protobuf:"bytes,8,opt,name=customizedProtocol,proto3" json:"customizedProtocol,omitempty"`
+}
+
+func (x *DevicePropertyVisitor) Reset() {
+ *x = DevicePropertyVisitor{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DevicePropertyVisitor) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DevicePropertyVisitor) ProtoMessage() {}
+
+func (x *DevicePropertyVisitor) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[24]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DevicePropertyVisitor.ProtoReflect.Descriptor instead.
+func (*DevicePropertyVisitor) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *DevicePropertyVisitor) GetPropertyName() string {
+ if x != nil {
+ return x.PropertyName
+ }
+ return ""
+}
+
+func (x *DevicePropertyVisitor) GetReportCycle() int64 {
+ if x != nil {
+ return x.ReportCycle
+ }
+ return 0
+}
+
+func (x *DevicePropertyVisitor) GetCollectCycle() int64 {
+ if x != nil {
+ return x.CollectCycle
+ }
+ return 0
+}
+
+func (x *DevicePropertyVisitor) GetCustomizedValues() *CustomizedValue {
+ if x != nil {
+ return x.CustomizedValues
+ }
+ return nil
+}
+
+func (x *DevicePropertyVisitor) GetOpcua() *VisitorConfigOPCUA {
+ if x != nil {
+ return x.Opcua
+ }
+ return nil
+}
+
+func (x *DevicePropertyVisitor) GetModbus() *VisitorConfigModbus {
+ if x != nil {
+ return x.Modbus
+ }
+ return nil
+}
+
+func (x *DevicePropertyVisitor) GetBluetooth() *VisitorConfigBluetooth {
+ if x != nil {
+ return x.Bluetooth
+ }
+ return nil
+}
+
+func (x *DevicePropertyVisitor) GetCustomizedProtocol() *VisitorConfigCustomized {
+ if x != nil {
+ return x.CustomizedProtocol
+ }
+ return nil
+}
+
+// the visitor to collect the properties of the device of OPC UA.
+type VisitorConfigOPCUA struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // ID of the node.
+ NodeID string `protobuf:"bytes,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
+ // name of browse.
+ BrowseName string `protobuf:"bytes,2,opt,name=browseName,proto3" json:"browseName,omitempty"`
+}
+
+func (x *VisitorConfigOPCUA) Reset() {
+ *x = VisitorConfigOPCUA{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisitorConfigOPCUA) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisitorConfigOPCUA) ProtoMessage() {}
+
+func (x *VisitorConfigOPCUA) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[25]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisitorConfigOPCUA.ProtoReflect.Descriptor instead.
+func (*VisitorConfigOPCUA) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *VisitorConfigOPCUA) GetNodeID() string {
+ if x != nil {
+ return x.NodeID
+ }
+ return ""
+}
+
+func (x *VisitorConfigOPCUA) GetBrowseName() string {
+ if x != nil {
+ return x.BrowseName
+ }
+ return ""
+}
+
+// the visitor to collect the properties of the device of Modbus.
+type VisitorConfigModbus struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // register of Modbus
+ Register string `protobuf:"bytes,1,opt,name=register,proto3" json:"register,omitempty"`
+ // offset of Modbus.
+ Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
+ // limit of Modbus.
+ Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
+ // scale of Modbus.
+ Scale float64 `protobuf:"fixed64,4,opt,name=scale,proto3" json:"scale,omitempty"`
+ // isSwap of Modbus.
+ IsSwap bool `protobuf:"varint,5,opt,name=isSwap,proto3" json:"isSwap,omitempty"`
+ // isRegisterSwap of Modbus.
+ IsRegisterSwap bool `protobuf:"varint,6,opt,name=isRegisterSwap,proto3" json:"isRegisterSwap,omitempty"`
+}
+
+func (x *VisitorConfigModbus) Reset() {
+ *x = VisitorConfigModbus{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisitorConfigModbus) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisitorConfigModbus) ProtoMessage() {}
+
+func (x *VisitorConfigModbus) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[26]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisitorConfigModbus.ProtoReflect.Descriptor instead.
+func (*VisitorConfigModbus) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *VisitorConfigModbus) GetRegister() string {
+ if x != nil {
+ return x.Register
+ }
+ return ""
+}
+
+func (x *VisitorConfigModbus) GetOffset() int64 {
+ if x != nil {
+ return x.Offset
+ }
+ return 0
+}
+
+func (x *VisitorConfigModbus) GetLimit() int64 {
+ if x != nil {
+ return x.Limit
+ }
+ return 0
+}
+
+func (x *VisitorConfigModbus) GetScale() float64 {
+ if x != nil {
+ return x.Scale
+ }
+ return 0
+}
+
+func (x *VisitorConfigModbus) GetIsSwap() bool {
+ if x != nil {
+ return x.IsSwap
+ }
+ return false
+}
+
+func (x *VisitorConfigModbus) GetIsRegisterSwap() bool {
+ if x != nil {
+ return x.IsRegisterSwap
+ }
+ return false
+}
+
+// the visitor to collect the properties of the device of Bluetooth.
+type VisitorConfigBluetooth struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // characteristicUUID of Bluetooth.
+ CharacteristicUUID string `protobuf:"bytes,1,opt,name=characteristicUUID,proto3" json:"characteristicUUID,omitempty"`
+ // dataWrite of Bluetooth.
+ DataWrite map[string][]byte `protobuf:"bytes,2,rep,name=dataWrite,proto3" json:"dataWrite,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // BluetoothReadConverter of Bluetooth.
+ DataConverter *BluetoothReadConverter `protobuf:"bytes,3,opt,name=dataConverter,proto3" json:"dataConverter,omitempty"`
+}
+
+func (x *VisitorConfigBluetooth) Reset() {
+ *x = VisitorConfigBluetooth{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisitorConfigBluetooth) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisitorConfigBluetooth) ProtoMessage() {}
+
+func (x *VisitorConfigBluetooth) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[27]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisitorConfigBluetooth.ProtoReflect.Descriptor instead.
+func (*VisitorConfigBluetooth) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *VisitorConfigBluetooth) GetCharacteristicUUID() string {
+ if x != nil {
+ return x.CharacteristicUUID
+ }
+ return ""
+}
+
+func (x *VisitorConfigBluetooth) GetDataWrite() map[string][]byte {
+ if x != nil {
+ return x.DataWrite
+ }
+ return nil
+}
+
+func (x *VisitorConfigBluetooth) GetDataConverter() *BluetoothReadConverter {
+ if x != nil {
+ return x.DataConverter
+ }
+ return nil
+}
+
+// BluetoothReadConverter of Bluetooth.
+type BluetoothReadConverter struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ StartIndex int64 `protobuf:"varint,1,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
+ EndIndex int64 `protobuf:"varint,2,opt,name=endIndex,proto3" json:"endIndex,omitempty"`
+ ShiftLeft uint64 `protobuf:"varint,3,opt,name=shiftLeft,proto3" json:"shiftLeft,omitempty"`
+ ShiftRight uint64 `protobuf:"varint,4,opt,name=shiftRight,proto3" json:"shiftRight,omitempty"`
+ OrderOfOperations []*BluetoothOperations `protobuf:"bytes,5,rep,name=orderOfOperations,proto3" json:"orderOfOperations,omitempty"`
+}
+
+func (x *BluetoothReadConverter) Reset() {
+ *x = BluetoothReadConverter{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BluetoothReadConverter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BluetoothReadConverter) ProtoMessage() {}
+
+func (x *BluetoothReadConverter) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[28]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BluetoothReadConverter.ProtoReflect.Descriptor instead.
+func (*BluetoothReadConverter) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *BluetoothReadConverter) GetStartIndex() int64 {
+ if x != nil {
+ return x.StartIndex
+ }
+ return 0
+}
+
+func (x *BluetoothReadConverter) GetEndIndex() int64 {
+ if x != nil {
+ return x.EndIndex
+ }
+ return 0
+}
+
+func (x *BluetoothReadConverter) GetShiftLeft() uint64 {
+ if x != nil {
+ return x.ShiftLeft
+ }
+ return 0
+}
+
+func (x *BluetoothReadConverter) GetShiftRight() uint64 {
+ if x != nil {
+ return x.ShiftRight
+ }
+ return 0
+}
+
+func (x *BluetoothReadConverter) GetOrderOfOperations() []*BluetoothOperations {
+ if x != nil {
+ return x.OrderOfOperations
+ }
+ return nil
+}
+
+// BluetoothOperations of Bluetooth.
+type BluetoothOperations struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OperationType string `protobuf:"bytes,1,opt,name=operationType,proto3" json:"operationType,omitempty"`
+ OperationValue float64 `protobuf:"fixed64,2,opt,name=operationValue,proto3" json:"operationValue,omitempty"`
+}
+
+func (x *BluetoothOperations) Reset() {
+ *x = BluetoothOperations{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BluetoothOperations) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BluetoothOperations) ProtoMessage() {}
+
+func (x *BluetoothOperations) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[29]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BluetoothOperations.ProtoReflect.Descriptor instead.
+func (*BluetoothOperations) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *BluetoothOperations) GetOperationType() string {
+ if x != nil {
+ return x.OperationType
+ }
+ return ""
+}
+
+func (x *BluetoothOperations) GetOperationValue() float64 {
+ if x != nil {
+ return x.OperationValue
+ }
+ return 0
+}
+
+// the visitor to collect the properties of the device of customized protocol.
+type VisitorConfigCustomized struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
+ ConfigData *CustomizedValue `protobuf:"bytes,2,opt,name=configData,proto3" json:"configData,omitempty"`
+}
+
+func (x *VisitorConfigCustomized) Reset() {
+ *x = VisitorConfigCustomized{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisitorConfigCustomized) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisitorConfigCustomized) ProtoMessage() {}
+
+func (x *VisitorConfigCustomized) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[30]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisitorConfigCustomized.ProtoReflect.Descriptor instead.
+func (*VisitorConfigCustomized) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *VisitorConfigCustomized) GetProtocolName() string {
+ if x != nil {
+ return x.ProtocolName
+ }
+ return ""
+}
+
+func (x *VisitorConfigCustomized) GetConfigData() *CustomizedValue {
+ if x != nil {
+ return x.ConfigData
+ }
+ return nil
+}
+
+// MapperInfo is the information of mapper.
+type MapperInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // name of the mapper.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // version of the mapper.
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+ // api version of the mapper.
+ ApiVersion string `protobuf:"bytes,3,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
+ // the protocol of the mapper.
+ Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
+ // the address of the mapper. it is a unix domain socket of grpc.
+ Address []byte `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
+ // the state of the mapper.
+ State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
+}
+
+func (x *MapperInfo) Reset() {
+ *x = MapperInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapperInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapperInfo) ProtoMessage() {}
+
+func (x *MapperInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[31]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapperInfo.ProtoReflect.Descriptor instead.
+func (*MapperInfo) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *MapperInfo) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetApiVersion() string {
+ if x != nil {
+ return x.ApiVersion
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetProtocol() string {
+ if x != nil {
+ return x.Protocol
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetAddress() []byte {
+ if x != nil {
+ return x.Address
+ }
+ return nil
+}
+
+func (x *MapperInfo) GetState() string {
+ if x != nil {
+ return x.State
+ }
+ return ""
+}
+
+type ReportDeviceStatusRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ ReportedDevice *DeviceStatus `protobuf:"bytes,2,opt,name=reportedDevice,proto3" json:"reportedDevice,omitempty"`
+}
+
+func (x *ReportDeviceStatusRequest) Reset() {
+ *x = ReportDeviceStatusRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReportDeviceStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReportDeviceStatusRequest) ProtoMessage() {}
+
+func (x *ReportDeviceStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[32]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReportDeviceStatusRequest.ProtoReflect.Descriptor instead.
+func (*ReportDeviceStatusRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *ReportDeviceStatusRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *ReportDeviceStatusRequest) GetReportedDevice() *DeviceStatus {
+ if x != nil {
+ return x.ReportedDevice
+ }
+ return nil
+}
+
+// DeviceStatus is the status of the device.
+type DeviceStatus struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the device twins of the device.
+ Twins []*Twin `protobuf:"bytes,1,rep,name=twins,proto3" json:"twins,omitempty"`
+ // the state of the device like Online or Offline.
+ State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
+}
+
+func (x *DeviceStatus) Reset() {
+ *x = DeviceStatus{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceStatus) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceStatus) ProtoMessage() {}
+
+func (x *DeviceStatus) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[33]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceStatus.ProtoReflect.Descriptor instead.
+func (*DeviceStatus) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *DeviceStatus) GetTwins() []*Twin {
+ if x != nil {
+ return x.Twins
+ }
+ return nil
+}
+
+func (x *DeviceStatus) GetState() string {
+ if x != nil {
+ return x.State
+ }
+ return ""
+}
+
+// Twin is the digital model of a device. It contains a series of properties.
+type Twin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the name of the property.
+ PropertyName string `protobuf:"bytes,1,opt,name=propertyName,proto3" json:"propertyName,omitempty"`
+ // the desired value of the property configured by device manager.
+ Desired *TwinProperty `protobuf:"bytes,2,opt,name=desired,proto3" json:"desired,omitempty"`
+ // the reported value of the property from the real device.
+ Reported *TwinProperty `protobuf:"bytes,3,opt,name=reported,proto3" json:"reported,omitempty"`
+}
+
+func (x *Twin) Reset() {
+ *x = Twin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Twin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Twin) ProtoMessage() {}
+
+func (x *Twin) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[34]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Twin.ProtoReflect.Descriptor instead.
+func (*Twin) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *Twin) GetPropertyName() string {
+ if x != nil {
+ return x.PropertyName
+ }
+ return ""
+}
+
+func (x *Twin) GetDesired() *TwinProperty {
+ if x != nil {
+ return x.Desired
+ }
+ return nil
+}
+
+func (x *Twin) GetReported() *TwinProperty {
+ if x != nil {
+ return x.Reported
+ }
+ return nil
+}
+
+// TwinProperty is the specification of the property.
+type TwinProperty struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the value of the property.
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ // the metadata to describe this property.
+ Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *TwinProperty) Reset() {
+ *x = TwinProperty{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TwinProperty) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TwinProperty) ProtoMessage() {}
+
+func (x *TwinProperty) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[35]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TwinProperty.ProtoReflect.Descriptor instead.
+func (*TwinProperty) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *TwinProperty) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+func (x *TwinProperty) GetMetadata() map[string]string {
+ if x != nil {
+ return x.Metadata
+ }
+ return nil
+}
+
+type ReportDeviceStatusResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ReportDeviceStatusResponse) Reset() {
+ *x = ReportDeviceStatusResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReportDeviceStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReportDeviceStatusResponse) ProtoMessage() {}
+
+func (x *ReportDeviceStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[36]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReportDeviceStatusResponse.ProtoReflect.Descriptor instead.
+func (*ReportDeviceStatusResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{36}
+}
+
+type RegisterDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+}
+
+func (x *RegisterDeviceRequest) Reset() {
+ *x = RegisterDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegisterDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegisterDeviceRequest) ProtoMessage() {}
+
+func (x *RegisterDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[37]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegisterDeviceRequest.ProtoReflect.Descriptor instead.
+func (*RegisterDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *RegisterDeviceRequest) GetDevice() *Device {
+ if x != nil {
+ return x.Device
+ }
+ return nil
+}
+
+type RegisterDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+}
+
+func (x *RegisterDeviceResponse) Reset() {
+ *x = RegisterDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegisterDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegisterDeviceResponse) ProtoMessage() {}
+
+func (x *RegisterDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[38]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegisterDeviceResponse.ProtoReflect.Descriptor instead.
+func (*RegisterDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *RegisterDeviceResponse) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+type CreateDeviceModelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Model *DeviceModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
+}
+
+func (x *CreateDeviceModelRequest) Reset() {
+ *x = CreateDeviceModelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateDeviceModelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateDeviceModelRequest) ProtoMessage() {}
+
+func (x *CreateDeviceModelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[39]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateDeviceModelRequest.ProtoReflect.Descriptor instead.
+func (*CreateDeviceModelRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *CreateDeviceModelRequest) GetModel() *DeviceModel {
+ if x != nil {
+ return x.Model
+ }
+ return nil
+}
+
+type CreateDeviceModelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceModelName string `protobuf:"bytes,1,opt,name=deviceModelName,proto3" json:"deviceModelName,omitempty"`
+}
+
+func (x *CreateDeviceModelResponse) Reset() {
+ *x = CreateDeviceModelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateDeviceModelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateDeviceModelResponse) ProtoMessage() {}
+
+func (x *CreateDeviceModelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[40]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateDeviceModelResponse.ProtoReflect.Descriptor instead.
+func (*CreateDeviceModelResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *CreateDeviceModelResponse) GetDeviceModelName() string {
+ if x != nil {
+ return x.DeviceModelName
+ }
+ return ""
+}
+
+type RemoveDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+}
+
+func (x *RemoveDeviceRequest) Reset() {
+ *x = RemoveDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceRequest) ProtoMessage() {}
+
+func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[41]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceRequest.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *RemoveDeviceRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+type RemoveDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RemoveDeviceResponse) Reset() {
+ *x = RemoveDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceResponse) ProtoMessage() {}
+
+func (x *RemoveDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[42]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceResponse.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{42}
+}
+
+type RemoveDeviceModelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ModelName string `protobuf:"bytes,1,opt,name=modelName,proto3" json:"modelName,omitempty"`
+}
+
+func (x *RemoveDeviceModelRequest) Reset() {
+ *x = RemoveDeviceModelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceModelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceModelRequest) ProtoMessage() {}
+
+func (x *RemoveDeviceModelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[43]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceModelRequest.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceModelRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *RemoveDeviceModelRequest) GetModelName() string {
+ if x != nil {
+ return x.ModelName
+ }
+ return ""
+}
+
+type RemoveDeviceModelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RemoveDeviceModelResponse) Reset() {
+ *x = RemoveDeviceModelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceModelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceModelResponse) ProtoMessage() {}
+
+func (x *RemoveDeviceModelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[44]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceModelResponse.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceModelResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{44}
+}
+
+type UpdateDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+}
+
+func (x *UpdateDeviceRequest) Reset() {
+ *x = UpdateDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceRequest) ProtoMessage() {}
+
+func (x *UpdateDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[45]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{45}
+}
+
+func (x *UpdateDeviceRequest) GetDevice() *Device {
+ if x != nil {
+ return x.Device
+ }
+ return nil
+}
+
+type UpdateDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateDeviceResponse) Reset() {
+ *x = UpdateDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceResponse) ProtoMessage() {}
+
+func (x *UpdateDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[46]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceResponse.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{46}
+}
+
+type UpdateDeviceModelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Model *DeviceModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
+}
+
+func (x *UpdateDeviceModelRequest) Reset() {
+ *x = UpdateDeviceModelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceModelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceModelRequest) ProtoMessage() {}
+
+func (x *UpdateDeviceModelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[47]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceModelRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceModelRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{47}
+}
+
+func (x *UpdateDeviceModelRequest) GetModel() *DeviceModel {
+ if x != nil {
+ return x.Model
+ }
+ return nil
+}
+
+type UpdateDeviceModelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateDeviceModelResponse) Reset() {
+ *x = UpdateDeviceModelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceModelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceModelResponse) ProtoMessage() {}
+
+func (x *UpdateDeviceModelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[48]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceModelResponse.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceModelResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{48}
+}
+
+type UpdateDeviceStatusRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ DesiredDevice *DeviceStatus `protobuf:"bytes,2,opt,name=desiredDevice,proto3" json:"desiredDevice,omitempty"`
+}
+
+func (x *UpdateDeviceStatusRequest) Reset() {
+ *x = UpdateDeviceStatusRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceStatusRequest) ProtoMessage() {}
+
+func (x *UpdateDeviceStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[49]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceStatusRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceStatusRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{49}
+}
+
+func (x *UpdateDeviceStatusRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *UpdateDeviceStatusRequest) GetDesiredDevice() *DeviceStatus {
+ if x != nil {
+ return x.DesiredDevice
+ }
+ return nil
+}
+
+type UpdateDeviceStatusResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateDeviceStatusResponse) Reset() {
+ *x = UpdateDeviceStatusResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceStatusResponse) ProtoMessage() {}
+
+func (x *UpdateDeviceStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[50]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceStatusResponse.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceStatusResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{50}
+}
+
+type GetDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+}
+
+func (x *GetDeviceRequest) Reset() {
+ *x = GetDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDeviceRequest) ProtoMessage() {}
+
+func (x *GetDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[51]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDeviceRequest.ProtoReflect.Descriptor instead.
+func (*GetDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{51}
+}
+
+func (x *GetDeviceRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+type GetDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+}
+
+func (x *GetDeviceResponse) Reset() {
+ *x = GetDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDeviceResponse) ProtoMessage() {}
+
+func (x *GetDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[52]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDeviceResponse.ProtoReflect.Descriptor instead.
+func (*GetDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{52}
+}
+
+func (x *GetDeviceResponse) GetDevice() *Device {
+ if x != nil {
+ return x.Device
+ }
+ return nil
+}
+
+var File_api_proto protoreflect.FileDescriptor
+
+var file_api_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x61, 0x0a, 0x15, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x74,
+ 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74,
+ 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x70,
+ 0x70, 0x65, 0x72, 0x22, 0x7f, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a,
+ 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x15, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4c, 0x69,
+ 0x73, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4c, 0x69, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f,
+ 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63,
+ 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x9c, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, 0x38, 0x0a, 0x0a, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52,
+ 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x72, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x0c, 0x50, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x69, 0x6e,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x49,
+ 0x6e, 0x74, 0x36, 0x34, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12,
+ 0x34, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x64,
+ 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x6f, 0x61,
+ 0x74, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6c,
+ 0x65, 0x61, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61,
+ 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x05, 0x62,
+ 0x79, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18,
+ 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69,
+ 0x6d, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d,
+ 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x58, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c,
+ 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70,
+ 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64,
+ 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d,
+ 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69,
+ 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12,
+ 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75,
+ 0x6e, 0x69, 0x74, 0x22, 0x9f, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52,
+ 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07,
+ 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d,
+ 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75,
+ 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x59, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c,
+ 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0x33, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65,
+ 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d,
+ 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75,
+ 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a,
+ 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
+ 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f,
+ 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x76, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x28, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d,
+ 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a,
+ 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x18, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x12, 0x4b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56,
+ 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x10,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x73,
+ 0x22, 0xca, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x70, 0x63, 0x75, 0x61, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x70, 0x63, 0x55,
+ 0x41, 0x52, 0x05, 0x6f, 0x70, 0x63, 0x75, 0x61, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x62,
+ 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x62, 0x75, 0x73,
+ 0x12, 0x3f, 0x0a, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6c, 0x75,
+ 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x52, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74,
+ 0x68, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x12, 0x63, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f,
+ 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x87, 0x02,
+ 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x4f, 0x70, 0x63, 0x55, 0x41, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12,
+ 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63,
+ 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
+ 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x75, 0x72,
+ 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73,
+ 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a,
+ 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
+ 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x30, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x07, 0x73, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x22, 0x39, 0x0a, 0x17, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6c, 0x75, 0x65, 0x74,
+ 0x6f, 0x6f, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65,
+ 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x41, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x22, 0xa1, 0x03, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
+ 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2d, 0x0a,
+ 0x03, 0x63, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x43, 0x4f, 0x4d, 0x52, 0x03, 0x63, 0x6f, 0x6d, 0x12, 0x2d, 0x0a, 0x03,
+ 0x74, 0x63, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x54, 0x43, 0x50, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d,
+ 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, 0x0a,
+ 0x10, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x52,
+ 0x65, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6c,
+ 0x6c, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
+ 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x72,
+ 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x6f,
+ 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12,
+ 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65,
+ 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a,
+ 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x4f, 0x4d, 0x12, 0x1e,
+ 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a,
+ 0x0a, 0x08, 0x62, 0x61, 0x75, 0x64, 0x52, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x08, 0x62, 0x61, 0x75, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61,
+ 0x74, 0x61, 0x42, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61,
+ 0x74, 0x61, 0x42, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1a,
+ 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x69, 0x74, 0x73, 0x22, 0x37, 0x0a, 0x11, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x43, 0x50, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12,
+ 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70,
+ 0x6f, 0x72, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a,
+ 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
+ 0x1a, 0x4d, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
+ 0x79, 0x0a, 0x18, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x39, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc6, 0x03, 0x0a, 0x15, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6f,
+ 0x72, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72,
+ 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f,
+ 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x45,
+ 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x6f, 0x70, 0x63, 0x75, 0x61, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x50, 0x43,
+ 0x55, 0x41, 0x52, 0x05, 0x6f, 0x70, 0x63, 0x75, 0x61, 0x12, 0x35, 0x0a, 0x06, 0x6d, 0x6f, 0x64,
+ 0x62, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x62, 0x75, 0x73,
+ 0x12, 0x3e, 0x0a, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56,
+ 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6c, 0x75, 0x65,
+ 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x52, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68,
+ 0x12, 0x51, 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x52,
+ 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x22, 0x4c, 0x0a, 0x12, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x50, 0x43, 0x55, 0x41, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64,
+ 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,
+ 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x13, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a,
+ 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69,
+ 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x01, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53,
+ 0x77, 0x61, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x77, 0x61,
+ 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
+ 0x77, 0x61, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x77, 0x61, 0x70, 0x22, 0x9d, 0x02, 0x0a, 0x16, 0x56, 0x69,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6c, 0x75, 0x65, 0x74,
+ 0x6f, 0x6f, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65,
+ 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x12, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63,
+ 0x55, 0x55, 0x49, 0x44, 0x12, 0x4d, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74,
+ 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x42, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x57, 0x72,
+ 0x69, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x57, 0x72,
+ 0x69, 0x74, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x76, 0x65,
+ 0x72, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x52,
+ 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x64, 0x61,
+ 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3c, 0x0a, 0x0e, 0x44,
+ 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdf, 0x01, 0x0a, 0x16, 0x42, 0x6c,
+ 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65,
+ 0x72, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64,
+ 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49,
+ 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78,
+ 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x69, 0x66, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x68, 0x69, 0x66, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x12, 0x1e,
+ 0x0a, 0x0a, 0x73, 0x68, 0x69, 0x66, 0x74, 0x52, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x04, 0x52, 0x0a, 0x73, 0x68, 0x69, 0x66, 0x74, 0x52, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4b,
+ 0x0a, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4f, 0x66, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x4f, 0x70,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4f,
+ 0x66, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x42,
+ 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54,
+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
+ 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0x78, 0x0a, 0x17, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x39, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa7, 0x01, 0x0a, 0x0a, 0x4d,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70,
+ 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14,
+ 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x22, 0x7b, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x3e, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x22, 0x4a, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x12, 0x24, 0x0a, 0x05, 0x74, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e,
+ 0x52, 0x05, 0x74, 0x77, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x90, 0x01,
+ 0x0a, 0x04, 0x54, 0x77, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x65,
+ 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x52, 0x07, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x08,
+ 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64,
+ 0x22, 0xa3, 0x01, 0x0a, 0x0c, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a,
+ 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52,
+ 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x38, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x22, 0x47, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a,
+ 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f,
+ 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x45, 0x0a, 0x19, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d,
+ 0x65, 0x22, 0x35, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f,
+ 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x38, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
+ 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65,
+ 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28,
+ 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x47, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05,
+ 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e,
+ 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x32, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e,
+ 0x61, 0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x32, 0xd0, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x4d,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xd9, 0x05, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a,
+ 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12,
+ 0x1f, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x20, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52,
+ 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x23, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x23, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
+ 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x23, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x09, 0x47, 0x65, 0x74,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_api_proto_rawDescOnce sync.Once
+ file_api_proto_rawDescData = file_api_proto_rawDesc
+)
+
+func file_api_proto_rawDescGZIP() []byte {
+ file_api_proto_rawDescOnce.Do(func() {
+ file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData)
+ })
+ return file_api_proto_rawDescData
+}
+
+var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 56)
+var file_api_proto_goTypes = []interface{}{
+ (*MapperRegisterRequest)(nil), // 0: v1alpha1.MapperRegisterRequest
+ (*MapperRegisterResponse)(nil), // 1: v1alpha1.MapperRegisterResponse
+ (*DeviceModel)(nil), // 2: v1alpha1.DeviceModel
+ (*DeviceModelSpec)(nil), // 3: v1alpha1.DeviceModelSpec
+ (*DeviceProperty)(nil), // 4: v1alpha1.DeviceProperty
+ (*PropertyType)(nil), // 5: v1alpha1.PropertyType
+ (*PropertyTypeInt64)(nil), // 6: v1alpha1.PropertyTypeInt64
+ (*PropertyTypeString)(nil), // 7: v1alpha1.PropertyTypeString
+ (*PropertyTypeDouble)(nil), // 8: v1alpha1.PropertyTypeDouble
+ (*PropertyTypeFloat)(nil), // 9: v1alpha1.PropertyTypeFloat
+ (*PropertyTypeBoolean)(nil), // 10: v1alpha1.PropertyTypeBoolean
+ (*PropertyTypeBytes)(nil), // 11: v1alpha1.PropertyTypeBytes
+ (*DeviceCommand)(nil), // 12: v1alpha1.DeviceCommand
+ (*Device)(nil), // 13: v1alpha1.Device
+ (*DeviceSpec)(nil), // 14: v1alpha1.DeviceSpec
+ (*ProtocolConfig)(nil), // 15: v1alpha1.ProtocolConfig
+ (*ProtocolConfigOpcUA)(nil), // 16: v1alpha1.ProtocolConfigOpcUA
+ (*ProtocolConfigModbus)(nil), // 17: v1alpha1.ProtocolConfigModbus
+ (*ProtocolConfigBluetooth)(nil), // 18: v1alpha1.ProtocolConfigBluetooth
+ (*ProtocolConfigCommon)(nil), // 19: v1alpha1.ProtocolConfigCommon
+ (*ProtocolConfigCOM)(nil), // 20: v1alpha1.ProtocolConfigCOM
+ (*ProtocolConfigTCP)(nil), // 21: v1alpha1.ProtocolConfigTCP
+ (*CustomizedValue)(nil), // 22: v1alpha1.CustomizedValue
+ (*ProtocolConfigCustomized)(nil), // 23: v1alpha1.ProtocolConfigCustomized
+ (*DevicePropertyVisitor)(nil), // 24: v1alpha1.DevicePropertyVisitor
+ (*VisitorConfigOPCUA)(nil), // 25: v1alpha1.VisitorConfigOPCUA
+ (*VisitorConfigModbus)(nil), // 26: v1alpha1.VisitorConfigModbus
+ (*VisitorConfigBluetooth)(nil), // 27: v1alpha1.VisitorConfigBluetooth
+ (*BluetoothReadConverter)(nil), // 28: v1alpha1.BluetoothReadConverter
+ (*BluetoothOperations)(nil), // 29: v1alpha1.BluetoothOperations
+ (*VisitorConfigCustomized)(nil), // 30: v1alpha1.VisitorConfigCustomized
+ (*MapperInfo)(nil), // 31: v1alpha1.MapperInfo
+ (*ReportDeviceStatusRequest)(nil), // 32: v1alpha1.ReportDeviceStatusRequest
+ (*DeviceStatus)(nil), // 33: v1alpha1.DeviceStatus
+ (*Twin)(nil), // 34: v1alpha1.Twin
+ (*TwinProperty)(nil), // 35: v1alpha1.TwinProperty
+ (*ReportDeviceStatusResponse)(nil), // 36: v1alpha1.ReportDeviceStatusResponse
+ (*RegisterDeviceRequest)(nil), // 37: v1alpha1.RegisterDeviceRequest
+ (*RegisterDeviceResponse)(nil), // 38: v1alpha1.RegisterDeviceResponse
+ (*CreateDeviceModelRequest)(nil), // 39: v1alpha1.CreateDeviceModelRequest
+ (*CreateDeviceModelResponse)(nil), // 40: v1alpha1.CreateDeviceModelResponse
+ (*RemoveDeviceRequest)(nil), // 41: v1alpha1.RemoveDeviceRequest
+ (*RemoveDeviceResponse)(nil), // 42: v1alpha1.RemoveDeviceResponse
+ (*RemoveDeviceModelRequest)(nil), // 43: v1alpha1.RemoveDeviceModelRequest
+ (*RemoveDeviceModelResponse)(nil), // 44: v1alpha1.RemoveDeviceModelResponse
+ (*UpdateDeviceRequest)(nil), // 45: v1alpha1.UpdateDeviceRequest
+ (*UpdateDeviceResponse)(nil), // 46: v1alpha1.UpdateDeviceResponse
+ (*UpdateDeviceModelRequest)(nil), // 47: v1alpha1.UpdateDeviceModelRequest
+ (*UpdateDeviceModelResponse)(nil), // 48: v1alpha1.UpdateDeviceModelResponse
+ (*UpdateDeviceStatusRequest)(nil), // 49: v1alpha1.UpdateDeviceStatusRequest
+ (*UpdateDeviceStatusResponse)(nil), // 50: v1alpha1.UpdateDeviceStatusResponse
+ (*GetDeviceRequest)(nil), // 51: v1alpha1.GetDeviceRequest
+ (*GetDeviceResponse)(nil), // 52: v1alpha1.GetDeviceResponse
+ nil, // 53: v1alpha1.CustomizedValue.DataEntry
+ nil, // 54: v1alpha1.VisitorConfigBluetooth.DataWriteEntry
+ nil, // 55: v1alpha1.TwinProperty.MetadataEntry
+ (*anypb.Any)(nil), // 56: google.protobuf.Any
+}
+var file_api_proto_depIdxs = []int32{
+ 31, // 0: v1alpha1.MapperRegisterRequest.mapper:type_name -> v1alpha1.MapperInfo
+ 2, // 1: v1alpha1.MapperRegisterResponse.modelList:type_name -> v1alpha1.DeviceModel
+ 13, // 2: v1alpha1.MapperRegisterResponse.deviceList:type_name -> v1alpha1.Device
+ 3, // 3: v1alpha1.DeviceModel.spec:type_name -> v1alpha1.DeviceModelSpec
+ 4, // 4: v1alpha1.DeviceModelSpec.properties:type_name -> v1alpha1.DeviceProperty
+ 12, // 5: v1alpha1.DeviceModelSpec.commands:type_name -> v1alpha1.DeviceCommand
+ 5, // 6: v1alpha1.DeviceProperty.type:type_name -> v1alpha1.PropertyType
+ 6, // 7: v1alpha1.PropertyType.int:type_name -> v1alpha1.PropertyTypeInt64
+ 7, // 8: v1alpha1.PropertyType.string:type_name -> v1alpha1.PropertyTypeString
+ 8, // 9: v1alpha1.PropertyType.double:type_name -> v1alpha1.PropertyTypeDouble
+ 9, // 10: v1alpha1.PropertyType.float:type_name -> v1alpha1.PropertyTypeFloat
+ 10, // 11: v1alpha1.PropertyType.boolean:type_name -> v1alpha1.PropertyTypeBoolean
+ 11, // 12: v1alpha1.PropertyType.bytes:type_name -> v1alpha1.PropertyTypeBytes
+ 14, // 13: v1alpha1.Device.spec:type_name -> v1alpha1.DeviceSpec
+ 33, // 14: v1alpha1.Device.status:type_name -> v1alpha1.DeviceStatus
+ 15, // 15: v1alpha1.DeviceSpec.protocol:type_name -> v1alpha1.ProtocolConfig
+ 24, // 16: v1alpha1.DeviceSpec.propertyVisitors:type_name -> v1alpha1.DevicePropertyVisitor
+ 16, // 17: v1alpha1.ProtocolConfig.opcua:type_name -> v1alpha1.ProtocolConfigOpcUA
+ 17, // 18: v1alpha1.ProtocolConfig.modbus:type_name -> v1alpha1.ProtocolConfigModbus
+ 18, // 19: v1alpha1.ProtocolConfig.bluetooth:type_name -> v1alpha1.ProtocolConfigBluetooth
+ 19, // 20: v1alpha1.ProtocolConfig.common:type_name -> v1alpha1.ProtocolConfigCommon
+ 23, // 21: v1alpha1.ProtocolConfig.customizedProtocol:type_name -> v1alpha1.ProtocolConfigCustomized
+ 20, // 22: v1alpha1.ProtocolConfigCommon.com:type_name -> v1alpha1.ProtocolConfigCOM
+ 21, // 23: v1alpha1.ProtocolConfigCommon.tcp:type_name -> v1alpha1.ProtocolConfigTCP
+ 22, // 24: v1alpha1.ProtocolConfigCommon.customizedValues:type_name -> v1alpha1.CustomizedValue
+ 53, // 25: v1alpha1.CustomizedValue.data:type_name -> v1alpha1.CustomizedValue.DataEntry
+ 22, // 26: v1alpha1.ProtocolConfigCustomized.configData:type_name -> v1alpha1.CustomizedValue
+ 22, // 27: v1alpha1.DevicePropertyVisitor.customizedValues:type_name -> v1alpha1.CustomizedValue
+ 25, // 28: v1alpha1.DevicePropertyVisitor.opcua:type_name -> v1alpha1.VisitorConfigOPCUA
+ 26, // 29: v1alpha1.DevicePropertyVisitor.modbus:type_name -> v1alpha1.VisitorConfigModbus
+ 27, // 30: v1alpha1.DevicePropertyVisitor.bluetooth:type_name -> v1alpha1.VisitorConfigBluetooth
+ 30, // 31: v1alpha1.DevicePropertyVisitor.customizedProtocol:type_name -> v1alpha1.VisitorConfigCustomized
+ 54, // 32: v1alpha1.VisitorConfigBluetooth.dataWrite:type_name -> v1alpha1.VisitorConfigBluetooth.DataWriteEntry
+ 28, // 33: v1alpha1.VisitorConfigBluetooth.dataConverter:type_name -> v1alpha1.BluetoothReadConverter
+ 29, // 34: v1alpha1.BluetoothReadConverter.orderOfOperations:type_name -> v1alpha1.BluetoothOperations
+ 22, // 35: v1alpha1.VisitorConfigCustomized.configData:type_name -> v1alpha1.CustomizedValue
+ 33, // 36: v1alpha1.ReportDeviceStatusRequest.reportedDevice:type_name -> v1alpha1.DeviceStatus
+ 34, // 37: v1alpha1.DeviceStatus.twins:type_name -> v1alpha1.Twin
+ 35, // 38: v1alpha1.Twin.desired:type_name -> v1alpha1.TwinProperty
+ 35, // 39: v1alpha1.Twin.reported:type_name -> v1alpha1.TwinProperty
+ 55, // 40: v1alpha1.TwinProperty.metadata:type_name -> v1alpha1.TwinProperty.MetadataEntry
+ 13, // 41: v1alpha1.RegisterDeviceRequest.device:type_name -> v1alpha1.Device
+ 2, // 42: v1alpha1.CreateDeviceModelRequest.model:type_name -> v1alpha1.DeviceModel
+ 13, // 43: v1alpha1.UpdateDeviceRequest.device:type_name -> v1alpha1.Device
+ 2, // 44: v1alpha1.UpdateDeviceModelRequest.model:type_name -> v1alpha1.DeviceModel
+ 33, // 45: v1alpha1.UpdateDeviceStatusRequest.desiredDevice:type_name -> v1alpha1.DeviceStatus
+ 13, // 46: v1alpha1.GetDeviceResponse.device:type_name -> v1alpha1.Device
+ 56, // 47: v1alpha1.CustomizedValue.DataEntry.value:type_name -> google.protobuf.Any
+ 0, // 48: v1alpha1.DeviceManagerService.MapperRegister:input_type -> v1alpha1.MapperRegisterRequest
+ 32, // 49: v1alpha1.DeviceManagerService.ReportDeviceStatus:input_type -> v1alpha1.ReportDeviceStatusRequest
+ 37, // 50: v1alpha1.DeviceMapperService.RegisterDevice:input_type -> v1alpha1.RegisterDeviceRequest
+ 41, // 51: v1alpha1.DeviceMapperService.RemoveDevice:input_type -> v1alpha1.RemoveDeviceRequest
+ 45, // 52: v1alpha1.DeviceMapperService.UpdateDevice:input_type -> v1alpha1.UpdateDeviceRequest
+ 39, // 53: v1alpha1.DeviceMapperService.CreateDeviceModel:input_type -> v1alpha1.CreateDeviceModelRequest
+ 43, // 54: v1alpha1.DeviceMapperService.RemoveDeviceModel:input_type -> v1alpha1.RemoveDeviceModelRequest
+ 47, // 55: v1alpha1.DeviceMapperService.UpdateDeviceModel:input_type -> v1alpha1.UpdateDeviceModelRequest
+ 49, // 56: v1alpha1.DeviceMapperService.UpdateDeviceStatus:input_type -> v1alpha1.UpdateDeviceStatusRequest
+ 51, // 57: v1alpha1.DeviceMapperService.GetDevice:input_type -> v1alpha1.GetDeviceRequest
+ 1, // 58: v1alpha1.DeviceManagerService.MapperRegister:output_type -> v1alpha1.MapperRegisterResponse
+ 36, // 59: v1alpha1.DeviceManagerService.ReportDeviceStatus:output_type -> v1alpha1.ReportDeviceStatusResponse
+ 38, // 60: v1alpha1.DeviceMapperService.RegisterDevice:output_type -> v1alpha1.RegisterDeviceResponse
+ 42, // 61: v1alpha1.DeviceMapperService.RemoveDevice:output_type -> v1alpha1.RemoveDeviceResponse
+ 46, // 62: v1alpha1.DeviceMapperService.UpdateDevice:output_type -> v1alpha1.UpdateDeviceResponse
+ 40, // 63: v1alpha1.DeviceMapperService.CreateDeviceModel:output_type -> v1alpha1.CreateDeviceModelResponse
+ 44, // 64: v1alpha1.DeviceMapperService.RemoveDeviceModel:output_type -> v1alpha1.RemoveDeviceModelResponse
+ 48, // 65: v1alpha1.DeviceMapperService.UpdateDeviceModel:output_type -> v1alpha1.UpdateDeviceModelResponse
+ 50, // 66: v1alpha1.DeviceMapperService.UpdateDeviceStatus:output_type -> v1alpha1.UpdateDeviceStatusResponse
+ 52, // 67: v1alpha1.DeviceMapperService.GetDevice:output_type -> v1alpha1.GetDeviceResponse
+ 58, // [58:68] is the sub-list for method output_type
+ 48, // [48:58] is the sub-list for method input_type
+ 48, // [48:48] is the sub-list for extension type_name
+ 48, // [48:48] is the sub-list for extension extendee
+ 0, // [0:48] is the sub-list for field type_name
+}
+
+func init() { file_api_proto_init() }
+func file_api_proto_init() {
+ if File_api_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapperRegisterRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapperRegisterResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceModel); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceModelSpec); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceProperty); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyType); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyTypeInt64); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyTypeString); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyTypeDouble); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyTypeFloat); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyTypeBoolean); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PropertyTypeBytes); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceCommand); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Device); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceSpec); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigOpcUA); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigModbus); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigBluetooth); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigCommon); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigCOM); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigTCP); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomizedValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfigCustomized); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DevicePropertyVisitor); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisitorConfigOPCUA); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisitorConfigModbus); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisitorConfigBluetooth); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BluetoothReadConverter); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BluetoothOperations); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisitorConfigCustomized); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapperInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReportDeviceStatusRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceStatus); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Twin); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TwinProperty); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReportDeviceStatusResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegisterDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegisterDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateDeviceModelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateDeviceModelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceModelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceModelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceModelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceModelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceStatusRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceStatusResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_api_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 56,
+ NumExtensions: 0,
+ NumServices: 2,
+ },
+ GoTypes: file_api_proto_goTypes,
+ DependencyIndexes: file_api_proto_depIdxs,
+ MessageInfos: file_api_proto_msgTypes,
+ }.Build()
+ File_api_proto = out.File
+ file_api_proto_rawDesc = nil
+ file_api_proto_goTypes = nil
+ file_api_proto_depIdxs = nil
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConnInterface
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion6
+
+// DeviceManagerServiceClient is the client API for DeviceManagerService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type DeviceManagerServiceClient interface {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ MapperRegister(ctx context.Context, in *MapperRegisterRequest, opts ...grpc.CallOption) (*MapperRegisterResponse, error)
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ ReportDeviceStatus(ctx context.Context, in *ReportDeviceStatusRequest, opts ...grpc.CallOption) (*ReportDeviceStatusResponse, error)
+}
+
+type deviceManagerServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewDeviceManagerServiceClient(cc grpc.ClientConnInterface) DeviceManagerServiceClient {
+ return &deviceManagerServiceClient{cc}
+}
+
+func (c *deviceManagerServiceClient) MapperRegister(ctx context.Context, in *MapperRegisterRequest, opts ...grpc.CallOption) (*MapperRegisterResponse, error) {
+ out := new(MapperRegisterResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceManagerService/MapperRegister", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceManagerServiceClient) ReportDeviceStatus(ctx context.Context, in *ReportDeviceStatusRequest, opts ...grpc.CallOption) (*ReportDeviceStatusResponse, error) {
+ out := new(ReportDeviceStatusResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceManagerService/ReportDeviceStatus", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// DeviceManagerServiceServer is the server API for DeviceManagerService service.
+type DeviceManagerServiceServer interface {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ MapperRegister(context.Context, *MapperRegisterRequest) (*MapperRegisterResponse, error)
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ ReportDeviceStatus(context.Context, *ReportDeviceStatusRequest) (*ReportDeviceStatusResponse, error)
+}
+
+// UnimplementedDeviceManagerServiceServer can be embedded to have forward compatible implementations.
+type UnimplementedDeviceManagerServiceServer struct {
+}
+
+func (*UnimplementedDeviceManagerServiceServer) MapperRegister(context.Context, *MapperRegisterRequest) (*MapperRegisterResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method MapperRegister not implemented")
+}
+func (*UnimplementedDeviceManagerServiceServer) ReportDeviceStatus(context.Context, *ReportDeviceStatusRequest) (*ReportDeviceStatusResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ReportDeviceStatus not implemented")
+}
+
+func RegisterDeviceManagerServiceServer(s *grpc.Server, srv DeviceManagerServiceServer) {
+ s.RegisterService(&_DeviceManagerService_serviceDesc, srv)
+}
+
+func _DeviceManagerService_MapperRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MapperRegisterRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceManagerServiceServer).MapperRegister(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceManagerService/MapperRegister",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceManagerServiceServer).MapperRegister(ctx, req.(*MapperRegisterRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceManagerService_ReportDeviceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ReportDeviceStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceManagerServiceServer).ReportDeviceStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceManagerService/ReportDeviceStatus",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceManagerServiceServer).ReportDeviceStatus(ctx, req.(*ReportDeviceStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _DeviceManagerService_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "v1alpha1.DeviceManagerService",
+ HandlerType: (*DeviceManagerServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "MapperRegister",
+ Handler: _DeviceManagerService_MapperRegister_Handler,
+ },
+ {
+ MethodName: "ReportDeviceStatus",
+ Handler: _DeviceManagerService_ReportDeviceStatus_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api.proto",
+}
+
+// DeviceMapperServiceClient is the client API for DeviceMapperService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type DeviceMapperServiceClient interface {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceResponse, error)
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error)
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ UpdateDevice(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*UpdateDeviceResponse, error)
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ CreateDeviceModel(ctx context.Context, in *CreateDeviceModelRequest, opts ...grpc.CallOption) (*CreateDeviceModelResponse, error)
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ RemoveDeviceModel(ctx context.Context, in *RemoveDeviceModelRequest, opts ...grpc.CallOption) (*RemoveDeviceModelResponse, error)
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ UpdateDeviceModel(ctx context.Context, in *UpdateDeviceModelRequest, opts ...grpc.CallOption) (*UpdateDeviceModelResponse, error)
+ // UpdateDeviceStatus update a device status to the device mapper
+ // Device manager sends the new device status to the mapper
+ // through the interface of UpdateDeviceStatus.
+ // The device status represents the properties of device twins.
+ // When the mapper gets the request of updating with the new device status,
+ // it should update the device status of the device list and the real device status of the physical device via the updated information.
+ UpdateDeviceStatus(ctx context.Context, in *UpdateDeviceStatusRequest, opts ...grpc.CallOption) (*UpdateDeviceStatusResponse, error)
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error)
+}
+
+type deviceMapperServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewDeviceMapperServiceClient(cc grpc.ClientConnInterface) DeviceMapperServiceClient {
+ return &deviceMapperServiceClient{cc}
+}
+
+func (c *deviceMapperServiceClient) RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceResponse, error) {
+ out := new(RegisterDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/RegisterDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) {
+ out := new(RemoveDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/RemoveDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) UpdateDevice(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*UpdateDeviceResponse, error) {
+ out := new(UpdateDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/UpdateDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) CreateDeviceModel(ctx context.Context, in *CreateDeviceModelRequest, opts ...grpc.CallOption) (*CreateDeviceModelResponse, error) {
+ out := new(CreateDeviceModelResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/CreateDeviceModel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) RemoveDeviceModel(ctx context.Context, in *RemoveDeviceModelRequest, opts ...grpc.CallOption) (*RemoveDeviceModelResponse, error) {
+ out := new(RemoveDeviceModelResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/RemoveDeviceModel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) UpdateDeviceModel(ctx context.Context, in *UpdateDeviceModelRequest, opts ...grpc.CallOption) (*UpdateDeviceModelResponse, error) {
+ out := new(UpdateDeviceModelResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/UpdateDeviceModel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) UpdateDeviceStatus(ctx context.Context, in *UpdateDeviceStatusRequest, opts ...grpc.CallOption) (*UpdateDeviceStatusResponse, error) {
+ out := new(UpdateDeviceStatusResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/UpdateDeviceStatus", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error) {
+ out := new(GetDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1alpha1.DeviceMapperService/GetDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// DeviceMapperServiceServer is the server API for DeviceMapperService service.
+type DeviceMapperServiceServer interface {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceResponse, error)
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error)
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ UpdateDevice(context.Context, *UpdateDeviceRequest) (*UpdateDeviceResponse, error)
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ CreateDeviceModel(context.Context, *CreateDeviceModelRequest) (*CreateDeviceModelResponse, error)
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ RemoveDeviceModel(context.Context, *RemoveDeviceModelRequest) (*RemoveDeviceModelResponse, error)
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ UpdateDeviceModel(context.Context, *UpdateDeviceModelRequest) (*UpdateDeviceModelResponse, error)
+ // UpdateDeviceStatus update a device status to the device mapper
+ // Device manager sends the new device status to the mapper
+ // through the interface of UpdateDeviceStatus.
+ // The device status represents the properties of device twins.
+ // When the mapper gets the request of updating with the new device status,
+ // it should update the device status of the device list and the real device status of the physical device via the updated information.
+ UpdateDeviceStatus(context.Context, *UpdateDeviceStatusRequest) (*UpdateDeviceStatusResponse, error)
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error)
+}
+
+// UnimplementedDeviceMapperServiceServer can be embedded to have forward compatible implementations.
+type UnimplementedDeviceMapperServiceServer struct {
+}
+
+func (*UnimplementedDeviceMapperServiceServer) RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RegisterDevice not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveDevice not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) UpdateDevice(context.Context, *UpdateDeviceRequest) (*UpdateDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDevice not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) CreateDeviceModel(context.Context, *CreateDeviceModelRequest) (*CreateDeviceModelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceModel not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) RemoveDeviceModel(context.Context, *RemoveDeviceModelRequest) (*RemoveDeviceModelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveDeviceModel not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) UpdateDeviceModel(context.Context, *UpdateDeviceModelRequest) (*UpdateDeviceModelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDeviceModel not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) UpdateDeviceStatus(context.Context, *UpdateDeviceStatusRequest) (*UpdateDeviceStatusResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDeviceStatus not implemented")
+}
+func (*UnimplementedDeviceMapperServiceServer) GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDevice not implemented")
+}
+
+func RegisterDeviceMapperServiceServer(s *grpc.Server, srv DeviceMapperServiceServer) {
+ s.RegisterService(&_DeviceMapperService_serviceDesc, srv)
+}
+
+func _DeviceMapperService_RegisterDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RegisterDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).RegisterDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/RegisterDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).RegisterDevice(ctx, req.(*RegisterDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).RemoveDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/RemoveDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_UpdateDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).UpdateDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/UpdateDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).UpdateDevice(ctx, req.(*UpdateDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_CreateDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateDeviceModelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).CreateDeviceModel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/CreateDeviceModel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).CreateDeviceModel(ctx, req.(*CreateDeviceModelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_RemoveDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveDeviceModelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).RemoveDeviceModel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/RemoveDeviceModel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).RemoveDeviceModel(ctx, req.(*RemoveDeviceModelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_UpdateDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDeviceModelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).UpdateDeviceModel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/UpdateDeviceModel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).UpdateDeviceModel(ctx, req.(*UpdateDeviceModelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_UpdateDeviceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDeviceStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).UpdateDeviceStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/UpdateDeviceStatus",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).UpdateDeviceStatus(ctx, req.(*UpdateDeviceStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_GetDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).GetDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1alpha1.DeviceMapperService/GetDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).GetDevice(ctx, req.(*GetDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _DeviceMapperService_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "v1alpha1.DeviceMapperService",
+ HandlerType: (*DeviceMapperServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "RegisterDevice",
+ Handler: _DeviceMapperService_RegisterDevice_Handler,
+ },
+ {
+ MethodName: "RemoveDevice",
+ Handler: _DeviceMapperService_RemoveDevice_Handler,
+ },
+ {
+ MethodName: "UpdateDevice",
+ Handler: _DeviceMapperService_UpdateDevice_Handler,
+ },
+ {
+ MethodName: "CreateDeviceModel",
+ Handler: _DeviceMapperService_CreateDeviceModel_Handler,
+ },
+ {
+ MethodName: "RemoveDeviceModel",
+ Handler: _DeviceMapperService_RemoveDeviceModel_Handler,
+ },
+ {
+ MethodName: "UpdateDeviceModel",
+ Handler: _DeviceMapperService_UpdateDeviceModel_Handler,
+ },
+ {
+ MethodName: "UpdateDeviceStatus",
+ Handler: _DeviceMapperService_UpdateDeviceStatus_Handler,
+ },
+ {
+ MethodName: "GetDevice",
+ Handler: _DeviceMapperService_GetDevice_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api.proto",
+}
+
+func NewMapperClient(cc grpc.ClientConnInterface) DeviceMapperServiceClient {
+ return &deviceMapperServiceClient{cc}
+}
+
+func NewDeviceManageClient(cc grpc.ClientConnInterface) DeviceManagerServiceClient {
+ return &deviceManagerServiceClient{cc}
+}
diff --git a/staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.proto b/staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.proto
new file mode 100644
index 000000000..55fad3bee
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/dmi/v1alpha1/api.proto
@@ -0,0 +1,539 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// To regenerate api.pb.go run hack/generate-dmi.sh
+syntax = "proto3";
+
+//option go_package = "path;name";
+option go_package="./;v1alpha1";
+package v1alpha1;
+
+import "google/protobuf/any.proto";
+
+// DeviceManagerService defines the public APIS for remote device management.
+// The server is implemented by the module of device manager in edgecore
+// and the client is implemented by the device mapper for upstreaming.
+// The mapper should register itself to the device manager when it is online
+// to get the list of devices. And then the mapper can report the device status to the device manager.
+service DeviceManagerService {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ rpc MapperRegister(MapperRegisterRequest) returns (MapperRegisterResponse) {}
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ rpc ReportDeviceStatus(ReportDeviceStatusRequest) returns (ReportDeviceStatusResponse) {}
+}
+
+// DeviceMapperService defines the public APIS for remote device management.
+// The server is implemented by the device mapper
+// and the client is implemented by the module of device manager in edgecore for downstreaming.
+// The device manager can manage the device life cycle through these interfaces provided by DeviceMapperService.
+// When device manager gets a message of device management from cloudcore, it should call the corresponding grpc interface
+// to make the mapper maintain the list of device information.
+service DeviceMapperService {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ rpc RegisterDevice(RegisterDeviceRequest) returns (RegisterDeviceResponse) {}
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceResponse) {}
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ rpc UpdateDevice(UpdateDeviceRequest) returns (UpdateDeviceResponse) {}
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ rpc CreateDeviceModel(CreateDeviceModelRequest) returns (CreateDeviceModelResponse) {}
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ rpc RemoveDeviceModel(RemoveDeviceModelRequest) returns (RemoveDeviceModelResponse) {}
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ rpc UpdateDeviceModel(UpdateDeviceModelRequest) returns (UpdateDeviceModelResponse) {}
+ // UpdateDeviceStatus update a device status to the device mapper
+ // Device manager sends the new device status to the mapper
+ // through the interface of UpdateDeviceStatus.
+ // The device status represents the properties of device twins.
+ // When the mapper gets the request of updating with the new device status,
+ // it should update the device status of the device list and the real device status of the physical device via the updated information.
+ rpc UpdateDeviceStatus(UpdateDeviceStatusRequest) returns (UpdateDeviceStatusResponse) {}
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ rpc GetDevice(GetDeviceRequest) returns (GetDeviceResponse) {}
+}
+
+message MapperRegisterRequest {
+ // The flag to show how device manager returns.
+ // True means device manager should return the device list in the response.
+ // False means device manager should just return nothing.
+ bool withData = 1;
+ // Mapper information to be registered to the device manager.
+ MapperInfo mapper = 2;
+}
+
+message MapperRegisterResponse {
+ // List of device models which the mapper maintains.
+ repeated DeviceModel modelList = 1;
+ // List of devices which the mapper maintains.
+ repeated Device deviceList = 2;
+}
+// DeviceModel specifies the information of a device model.
+message DeviceModel {
+ // Name of a device model.
+ string name = 1;
+ // Specification of a device model.
+ DeviceModelSpec spec = 2;
+}
+
+// DeviceModelSpec is the specification of a device model.
+message DeviceModelSpec {
+ // The properties provided by the device of this device model.
+ repeated DeviceProperty properties = 1;
+ // The commands executed by the device of this device model.
+ repeated DeviceCommand commands = 2;
+ // The protocol name used by the device of this device model.
+ string protocol = 3;
+}
+
+// DeviceProperty is the property of a device.
+message DeviceProperty {
+ // The name of this property.
+ string name = 1;
+ // The description of this property.
+ string description = 2;
+ // The specific type of this property.
+ PropertyType type = 3;
+}
+
+// PropertyType is the type of a property.
+message PropertyType {
+ // Property of Type Int64.
+ PropertyTypeInt64 int = 1;
+ // Property of Type String.
+ PropertyTypeString string = 2;
+ // Property of Type Double.
+ PropertyTypeDouble double = 3;
+ // Property of Type Float.
+ PropertyTypeFloat float = 4;
+ // Property of Type Boolean.
+ PropertyTypeBoolean boolean = 5;
+ // Property of Type Bytes.
+ PropertyTypeBytes bytes = 6;
+}
+
+// The Specification of property of Int64.
+message PropertyTypeInt64 {
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 1;
+ // The default value of this property.
+ int64 defaultValue =2;
+ // The minimum value of this property.
+ int64 minimum =3;
+ // The maximum value of this property.
+ int64 maximum = 4;
+ // The unit of this property.
+ string unit = 5;
+}
+
+// The Specification of property of String.
+message PropertyTypeString {
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 1;
+ // The default value of this property.
+ string defaultValue = 2;
+}
+
+// The Specification of property of Double.
+message PropertyTypeDouble {
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 1;
+ // The default value of this property.
+ double defaultValue = 2;
+ // The minimum value of this property.
+ double minimum = 3;
+ // The maximum value of this property.
+ double maximum = 4;
+ // The unit of this property.
+ string unit = 5;
+}
+
+// The Specification of property of Float.
+message PropertyTypeFloat {
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 1;
+ // The default value of this property.
+ float defaultValue = 2;
+ // The minimum value of this property.
+ float minimum = 3;
+ // The maximum value of this property.
+ float maximum = 4;
+ // The unit of this property.
+ string unit = 5;
+}
+
+// The Specification of property of Boolean.
+message PropertyTypeBoolean {
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 1;
+ // The default value of this property.
+ bool defaultValue = 2;
+}
+
+// The Specification of property of Bytes.
+message PropertyTypeBytes {
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 1;
+}
+
+// DeviceCommond is the description of a command which the device supports.
+message DeviceCommand {
+ // Name of the command.
+ string name = 1;
+ // Url of the command to access.
+ string url = 2;
+ // Method of the command.
+ string method = 3;
+ // Status code list which the command can return.
+ repeated string status_code = 4;
+ // Parameter list which the command carries.
+ repeated string parameters = 5;
+ // Response examples of the command.
+ bytes response = 6;
+}
+
+// Device is the description of a device instance.
+message Device {
+ // Name of the device.
+ string name = 1;
+ // Specification of the device.
+ DeviceSpec spec = 2;
+ // Status of the device.
+ DeviceStatus status = 3;
+}
+
+// DeviceSpec is the specification of the device.
+message DeviceSpec {
+ // The device model which the device references.
+ string deviceModelReference = 1;
+ // The specific config of the protocol to access to the device.
+ ProtocolConfig protocol = 2;
+ // The visitor to collect the properties of the device.
+ repeated DevicePropertyVisitor propertyVisitors = 3;
+}
+
+// ProtocolConfig is the specific config of the protocol to access to the device.
+message ProtocolConfig {
+ // The specific config of the protocol of OpcUA.
+ ProtocolConfigOpcUA opcua = 1;
+ // The specific config of the protocol of Modbus.
+ ProtocolConfigModbus modbus = 2;
+ // The specific config of the protocol of Bluetooth.
+ ProtocolConfigBluetooth bluetooth = 3;
+ // The common config for device.
+ ProtocolConfigCommon common = 4;
+ // The specific config of the customized protocol.
+ ProtocolConfigCustomized customizedProtocol = 5;
+}
+
+// ProtocolConfigOpcUA is the config of the protocol of OpcUA.
+message ProtocolConfigOpcUA {
+ // URL of the device.
+ string url = 1;
+ // The user name to access to the device.
+ string userName = 2;
+ // The file path to store the password to access to the device like /ca/paas.
+ string password = 3;
+ // The security policy of the device like Basic256Sha256.
+ string securityPolicy = 4;
+ // The security mode of the device like Sign.
+ string securityMode = 5;
+ // The file path to store the certificate to access to the device like /ca/clientcert.pem.
+ string certificate = 6;
+ // The file path to store the private key to access to the device like /ca/clientkey.pem.
+ string privateKey = 7;
+ int64 timeout = 8;
+}
+
+// ProtocolConfigModbus is the config of the protocol of Modbus.
+message ProtocolConfigModbus {
+ // The ID of the slave.
+ int64 slaveID = 1;
+}
+// The specific config of the protocol of Bluetooth.
+message ProtocolConfigBluetooth {
+ // The mac address of the bluetooth device.
+ string macAddress = 1;
+}
+
+// The common config for device.
+message ProtocolConfigCommon {
+ // ProtocolConfigCOM is the config of com.
+ ProtocolConfigCOM com = 1;
+ // ProtocolConfigTCP is the config of tcp.
+ ProtocolConfigTCP tcp = 2;
+ // commType is the type of the communication.
+ string commType = 3;
+ // reconnTimeout is the time out of reconnection.
+ int64 reconnTimeout = 4;
+ // reconnRetryTimes is the retry times of reconnection.
+ int64 reconnRetryTimes = 5;
+ // collectTimeout is the time out of collection.
+ int64 collectTimeout = 6;
+ // collectRetryTimes is the retry times of collection.
+ int64 collectRetryTimes = 7;
+ // collectType is the type of collection.
+ string collectType = 8;
+ // CustomizedValue is the customized value for developers.
+ CustomizedValue customizedValues = 9;
+}
+
+// ProtocolConfigCOM is the config of com.
+message ProtocolConfigCOM {
+ // serialPort is the port of serial.
+ string serialPort = 1;
+ // baudRate is the rate of baud.
+ int64 baudRate = 2;
+ // dataBits is the bits of data.
+ int64 dataBits= 3;
+ // parity is the bit of parity.
+ string parity = 4;
+ // stopBits is the bit of stop.
+ int64 stopBits = 5;
+}
+
+// ProtocolConfigTCP is the config of tcp.
+message ProtocolConfigTCP {
+ // IP of tcp for the device.
+ string ip = 1;
+ // port of tcp for the device.
+ int64 port = 2;
+}
+
+// CustomizedValue is the customized value for developers.
+message CustomizedValue {
+ // data is the customized value and it can be any form.
+ map<string, google.protobuf.Any> data = 1;
+}
+
+// The specific config of the customized protocol.
+message ProtocolConfigCustomized {
+ // the name of the customized protocol.
+ string protocolName = 1;
+ // the config data of the customized protocol.
+ CustomizedValue configData = 2;
+}
+
+// The visitor to collect the properties of the device.
+message DevicePropertyVisitor {
+ // the name of the property.
+ string propertyName = 1;
+ // the cycle to report data.
+ int64 reportCycle = 2;
+ // the cycle to collect data.
+ int64 collectCycle = 3;
+ // CustomizedValue is the customized value for developers.
+ CustomizedValue customizedValues = 4;
+ // the visitor to collect the properties of the device of OPC UA.
+ VisitorConfigOPCUA opcua = 5;
+ // the visitor to collect the properties of the device of Modbus.
+ VisitorConfigModbus modbus = 6;
+ // the visitor to collect the properties of the device of Bluetooth.
+ VisitorConfigBluetooth bluetooth = 7;
+ // the visitor to collect the properties of the device of customized protocol.
+ VisitorConfigCustomized customizedProtocol = 8;
+}
+
+// the visitor to collect the properties of the device of OPC UA.
+message VisitorConfigOPCUA {
+ // ID of the node.
+ string nodeID = 1;
+ // name of browse.
+ string browseName = 2;
+}
+
+// the visitor to collect the properties of the device of Modbus.
+message VisitorConfigModbus {
+ // register of Modbus
+ string register =1;
+ // offset of Modbus.
+ int64 offset = 2;
+ // limit of Modbus.
+ int64 limit = 3;
+ // scale of Modbus.
+ double scale = 4;
+ // isSwap of Modbus.
+ bool isSwap = 5;
+ // isRegisterSwap of Modbus.
+ bool isRegisterSwap = 6;
+}
+
+// the visitor to collect the properties of the device of Bluetooth.
+message VisitorConfigBluetooth {
+ // characteristicUUID of Bluetooth.
+ string characteristicUUID = 1;
+ // dataWrite of Bluetooth.
+ map<string, bytes> dataWrite = 2;
+ // BluetoothReadConverter of Bluetooth.
+ BluetoothReadConverter dataConverter =3;
+}
+
+// BluetoothReadConverter of Bluetooth.
+message BluetoothReadConverter {
+ int64 startIndex = 1;
+ int64 endIndex = 2;
+ uint64 shiftLeft = 3;
+ uint64 shiftRight = 4;
+ repeated BluetoothOperations orderOfOperations =5;
+}
+
+// BluetoothOperations of Bluetooth.
+message BluetoothOperations {
+ string operationType = 1;
+ double operationValue = 2;
+}
+
+// the visitor to collect the properties of the device of customized protocol.
+message VisitorConfigCustomized {
+ string protocolName = 1;
+ CustomizedValue configData =2;
+}
+
+// MapperInfo is the information of mapper.
+message MapperInfo {
+ // name of the mapper.
+ string name = 1;
+ // version of the mapper.
+ string version = 2;
+ // api version of the mapper.
+ string api_version = 3;
+ // the protocol of the mapper.
+ string protocol = 4;
+ // the address of the mapper. it is a unix domain socket of grpc.
+ bytes address = 5;
+ // the state of the mapper.
+ string state = 6;
+}
+
+message ReportDeviceStatusRequest {
+ string deviceName = 1;
+ DeviceStatus reportedDevice = 2;
+}
+
+// DeviceStatus is the status of the device.
+message DeviceStatus {
+ // the device twins of the device.
+ repeated Twin twins = 1;
+ // the state of the device like Online or Offline.
+ string state = 2;
+}
+
+// Twin is the digital model of a device. It contains a series of properties.
+message Twin {
+ // the name of the property.
+ string propertyName = 1;
+ // the desired value of the property configured by device manager.
+ TwinProperty desired = 2;
+ // the reported value of the property from the real device.
+ TwinProperty reported = 3;
+}
+
+// TwinProperty is the specification of the property.
+message TwinProperty {
+ // the value of the property.
+ string value = 1;
+ // the metadata to describe this property.
+ map<string,string> metadata = 2;
+}
+
+message ReportDeviceStatusResponse {}
+
+message RegisterDeviceRequest {
+ Device device = 1;
+}
+
+message RegisterDeviceResponse {
+ string deviceName = 1;
+}
+
+message CreateDeviceModelRequest {
+ DeviceModel model = 1;
+}
+
+message CreateDeviceModelResponse {
+ string deviceModelName = 1;
+}
+
+message RemoveDeviceRequest {
+ string deviceName =1;
+}
+
+message RemoveDeviceResponse {}
+
+message RemoveDeviceModelRequest {
+ string modelName =1;
+}
+
+message RemoveDeviceModelResponse {}
+
+message UpdateDeviceRequest {
+ Device device = 1;
+}
+
+message UpdateDeviceResponse {}
+
+message UpdateDeviceModelRequest {
+ DeviceModel model = 1;
+}
+
+message UpdateDeviceModelResponse {}
+
+message UpdateDeviceStatusRequest {
+ string deviceName = 1;
+ DeviceStatus desiredDevice = 2;
+}
+
+message UpdateDeviceStatusResponse {}
+
+message GetDeviceRequest {
+ string deviceName = 1;
+}
+
+message GetDeviceResponse {
+ Device device = 1;
+}
diff --git a/staging/src/github.com/kubeedge/api/dmi/v1beta1/api.pb.go b/staging/src/github.com/kubeedge/api/dmi/v1beta1/api.pb.go
new file mode 100644
index 000000000..d9b99a6f6
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/dmi/v1beta1/api.pb.go
@@ -0,0 +1,3964 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+// To regenerate api.pb.go run hack/generate-dmi.sh
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.19.4
+// source: api.proto
+
+package v1beta1
+
+import (
+ "google.golang.org/grpc"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MapperRegisterRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The flag to show how device manager returns.
+ // True means device manager should return the device list in the response.
+ // False means device manager should just return nothing.
+ WithData bool `protobuf:"varint,1,opt,name=withData,proto3" json:"withData,omitempty"`
+ // Mapper information to be registered to the device manager.
+ Mapper *MapperInfo `protobuf:"bytes,2,opt,name=mapper,proto3" json:"mapper,omitempty"`
+}
+
+func (x *MapperRegisterRequest) Reset() {
+ *x = MapperRegisterRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapperRegisterRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapperRegisterRequest) ProtoMessage() {}
+
+func (x *MapperRegisterRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapperRegisterRequest.ProtoReflect.Descriptor instead.
+func (*MapperRegisterRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MapperRegisterRequest) GetWithData() bool {
+ if x != nil {
+ return x.WithData
+ }
+ return false
+}
+
+func (x *MapperRegisterRequest) GetMapper() *MapperInfo {
+ if x != nil {
+ return x.Mapper
+ }
+ return nil
+}
+
+type MapperRegisterResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // List of device models which the mapper maintains.
+ ModelList []*DeviceModel `protobuf:"bytes,1,rep,name=modelList,proto3" json:"modelList,omitempty"`
+ // List of devices which the mapper maintains.
+ DeviceList []*Device `protobuf:"bytes,2,rep,name=deviceList,proto3" json:"deviceList,omitempty"`
+}
+
+func (x *MapperRegisterResponse) Reset() {
+ *x = MapperRegisterResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapperRegisterResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapperRegisterResponse) ProtoMessage() {}
+
+func (x *MapperRegisterResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapperRegisterResponse.ProtoReflect.Descriptor instead.
+func (*MapperRegisterResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *MapperRegisterResponse) GetModelList() []*DeviceModel {
+ if x != nil {
+ return x.ModelList
+ }
+ return nil
+}
+
+func (x *MapperRegisterResponse) GetDeviceList() []*Device {
+ if x != nil {
+ return x.DeviceList
+ }
+ return nil
+}
+
+// DeviceModel specifies the information of a device model.
+type DeviceModel struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of a device model.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Specification of a device model.
+ Spec *DeviceModelSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
+ // Namespace of the device model.
+ Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
+}
+
+func (x *DeviceModel) Reset() {
+ *x = DeviceModel{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceModel) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceModel) ProtoMessage() {}
+
+func (x *DeviceModel) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceModel.ProtoReflect.Descriptor instead.
+func (*DeviceModel) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DeviceModel) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeviceModel) GetSpec() *DeviceModelSpec {
+ if x != nil {
+ return x.Spec
+ }
+ return nil
+}
+
+func (x *DeviceModel) GetNamespace() string {
+ if x != nil {
+ return x.Namespace
+ }
+ return ""
+}
+
+// DeviceModelSpec is the specification of a device model.
+type DeviceModelSpec struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The properties provided by the device of this device model.
+ Properties []*ModelProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
+ // The commands executed by the device of this device model.
+ Commands []*DeviceCommand `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"`
+}
+
+func (x *DeviceModelSpec) Reset() {
+ *x = DeviceModelSpec{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceModelSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceModelSpec) ProtoMessage() {}
+
+func (x *DeviceModelSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceModelSpec.ProtoReflect.Descriptor instead.
+func (*DeviceModelSpec) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *DeviceModelSpec) GetProperties() []*ModelProperty {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+func (x *DeviceModelSpec) GetCommands() []*DeviceCommand {
+ if x != nil {
+ return x.Commands
+ }
+ return nil
+}
+
+// ModelProperty is the property of a device.
+type ModelProperty struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of this property.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The description of this property.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ // The specific type of this property.
+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+ // The access mode of this property, ReadOnly or ReadWrite.
+ AccessMode string `protobuf:"bytes,4,opt,name=accessMode,proto3" json:"accessMode,omitempty"`
+ // The minimum value of this property.
+ Minimum string `protobuf:"bytes,5,opt,name=minimum,proto3" json:"minimum,omitempty"`
+ // The maximum value of this property.
+ Maximum string `protobuf:"bytes,6,opt,name=maximum,proto3" json:"maximum,omitempty"`
+ // The unit of this property.
+ Unit string `protobuf:"bytes,7,opt,name=unit,proto3" json:"unit,omitempty"`
+}
+
+func (x *ModelProperty) Reset() {
+ *x = ModelProperty{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModelProperty) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModelProperty) ProtoMessage() {}
+
+func (x *ModelProperty) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ModelProperty.ProtoReflect.Descriptor instead.
+func (*ModelProperty) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ModelProperty) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ModelProperty) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *ModelProperty) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *ModelProperty) GetAccessMode() string {
+ if x != nil {
+ return x.AccessMode
+ }
+ return ""
+}
+
+func (x *ModelProperty) GetMinimum() string {
+ if x != nil {
+ return x.Minimum
+ }
+ return ""
+}
+
+func (x *ModelProperty) GetMaximum() string {
+ if x != nil {
+ return x.Maximum
+ }
+ return ""
+}
+
+func (x *ModelProperty) GetUnit() string {
+ if x != nil {
+ return x.Unit
+ }
+ return ""
+}
+
+// DeviceCommond is the description of a command which the device supports.
+type DeviceCommand struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the command.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Url of the command to access.
+ Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
+ // Method of the command.
+ Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
+ // Status code list which the command can return.
+ StatusCode []string `protobuf:"bytes,4,rep,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
+ // Parameter list which the command carries.
+ Parameters []string `protobuf:"bytes,5,rep,name=parameters,proto3" json:"parameters,omitempty"`
+ // Response examples of the command.
+ Response []byte `protobuf:"bytes,6,opt,name=response,proto3" json:"response,omitempty"`
+}
+
+func (x *DeviceCommand) Reset() {
+ *x = DeviceCommand{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceCommand) ProtoMessage() {}
+
+func (x *DeviceCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceCommand.ProtoReflect.Descriptor instead.
+func (*DeviceCommand) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *DeviceCommand) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeviceCommand) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *DeviceCommand) GetMethod() string {
+ if x != nil {
+ return x.Method
+ }
+ return ""
+}
+
+func (x *DeviceCommand) GetStatusCode() []string {
+ if x != nil {
+ return x.StatusCode
+ }
+ return nil
+}
+
+func (x *DeviceCommand) GetParameters() []string {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+func (x *DeviceCommand) GetResponse() []byte {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+// Device is the description of a device instance.
+type Device struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the device.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Specification of the device.
+ Spec *DeviceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
+ // Status of the device.
+ Status *DeviceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
+ // Namespace of the device.
+ Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
+}
+
+func (x *Device) Reset() {
+ *x = Device{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Device) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Device) ProtoMessage() {}
+
+func (x *Device) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Device.ProtoReflect.Descriptor instead.
+func (*Device) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *Device) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Device) GetSpec() *DeviceSpec {
+ if x != nil {
+ return x.Spec
+ }
+ return nil
+}
+
+func (x *Device) GetStatus() *DeviceStatus {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+func (x *Device) GetNamespace() string {
+ if x != nil {
+ return x.Namespace
+ }
+ return ""
+}
+
+// DeviceSpec is the specification of the device.
+type DeviceSpec struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The device model which the device references.
+ DeviceModelReference string `protobuf:"bytes,1,opt,name=deviceModelReference,proto3" json:"deviceModelReference,omitempty"`
+ // The specific config of the protocol to access to the device.
+ Protocol *ProtocolConfig `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
+ // List of properties which describe the device properties.
+ Properties []*DeviceProperty `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"`
+}
+
+func (x *DeviceSpec) Reset() {
+ *x = DeviceSpec{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceSpec) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceSpec) ProtoMessage() {}
+
+func (x *DeviceSpec) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceSpec.ProtoReflect.Descriptor instead.
+func (*DeviceSpec) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *DeviceSpec) GetDeviceModelReference() string {
+ if x != nil {
+ return x.DeviceModelReference
+ }
+ return ""
+}
+
+func (x *DeviceSpec) GetProtocol() *ProtocolConfig {
+ if x != nil {
+ return x.Protocol
+ }
+ return nil
+}
+
+func (x *DeviceSpec) GetProperties() []*DeviceProperty {
+ if x != nil {
+ return x.Properties
+ }
+ return nil
+}
+
+// DeviceProperty describes the specifics all the properties of the device.
+type DeviceProperty struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The device property name to be accessed. It must be unique.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // the desired value of the property configured by device manager.
+ Desired *TwinProperty `protobuf:"bytes,2,opt,name=desired,proto3" json:"desired,omitempty"`
+ // Visitors are intended to be consumed by device mappers which connect to devices
+ // and collect data / perform actions on the device.
+ Visitors *VisitorConfig `protobuf:"bytes,3,opt,name=visitors,proto3" json:"visitors,omitempty"`
+ // Define how frequent mapper will report the value.
+ ReportCycle int64 `protobuf:"varint,4,opt,name=reportCycle,proto3" json:"reportCycle,omitempty"`
+ // Define how frequent mapper will collect from device.
+ CollectCycle int64 `protobuf:"varint,5,opt,name=collectCycle,proto3" json:"collectCycle,omitempty"`
+ // whether be reported to the cloud
+ ReportToCloud bool `protobuf:"varint,6,opt,name=reportToCloud,proto3" json:"reportToCloud,omitempty"`
+ // PushMethod represents the protocol used to push data,
+ PushMethod *PushMethod `protobuf:"bytes,7,opt,name=pushMethod,proto3" json:"pushMethod,omitempty"`
+}
+
+func (x *DeviceProperty) Reset() {
+ *x = DeviceProperty{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceProperty) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceProperty) ProtoMessage() {}
+
+func (x *DeviceProperty) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceProperty.ProtoReflect.Descriptor instead.
+func (*DeviceProperty) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *DeviceProperty) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeviceProperty) GetDesired() *TwinProperty {
+ if x != nil {
+ return x.Desired
+ }
+ return nil
+}
+
+func (x *DeviceProperty) GetVisitors() *VisitorConfig {
+ if x != nil {
+ return x.Visitors
+ }
+ return nil
+}
+
+func (x *DeviceProperty) GetReportCycle() int64 {
+ if x != nil {
+ return x.ReportCycle
+ }
+ return 0
+}
+
+func (x *DeviceProperty) GetCollectCycle() int64 {
+ if x != nil {
+ return x.CollectCycle
+ }
+ return 0
+}
+
+func (x *DeviceProperty) GetReportToCloud() bool {
+ if x != nil {
+ return x.ReportToCloud
+ }
+ return false
+}
+
+func (x *DeviceProperty) GetPushMethod() *PushMethod {
+ if x != nil {
+ return x.PushMethod
+ }
+ return nil
+}
+
+// ProtocolConfig is the specific config of the protocol to access to the device.
+type ProtocolConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the name of the customized protocol.
+ ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
+ // the config data of the customized protocol.
+ ConfigData *CustomizedValue `protobuf:"bytes,2,opt,name=configData,proto3" json:"configData,omitempty"`
+}
+
+func (x *ProtocolConfig) Reset() {
+ *x = ProtocolConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProtocolConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolConfig) ProtoMessage() {}
+
+func (x *ProtocolConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolConfig.ProtoReflect.Descriptor instead.
+func (*ProtocolConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ProtocolConfig) GetProtocolName() string {
+ if x != nil {
+ return x.ProtocolName
+ }
+ return ""
+}
+
+func (x *ProtocolConfig) GetConfigData() *CustomizedValue {
+ if x != nil {
+ return x.ConfigData
+ }
+ return nil
+}
+
+// the visitor to collect the properties of the device of customized protocol.
+type VisitorConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the name of the customized protocol.
+ ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
+ // the config data of the customized protocol.
+ ConfigData *CustomizedValue `protobuf:"bytes,2,opt,name=configData,proto3" json:"configData,omitempty"`
+}
+
+func (x *VisitorConfig) Reset() {
+ *x = VisitorConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisitorConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisitorConfig) ProtoMessage() {}
+
+func (x *VisitorConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisitorConfig.ProtoReflect.Descriptor instead.
+func (*VisitorConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *VisitorConfig) GetProtocolName() string {
+ if x != nil {
+ return x.ProtocolName
+ }
+ return ""
+}
+
+func (x *VisitorConfig) GetConfigData() *CustomizedValue {
+ if x != nil {
+ return x.ConfigData
+ }
+ return nil
+}
+
+// CustomizedValue is the customized value for developers.
+type CustomizedValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // data is the customized value and it can be any form.
+ Data map[string]*anypb.Any `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *CustomizedValue) Reset() {
+ *x = CustomizedValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomizedValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomizedValue) ProtoMessage() {}
+
+func (x *CustomizedValue) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomizedValue.ProtoReflect.Descriptor instead.
+func (*CustomizedValue) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *CustomizedValue) GetData() map[string]*anypb.Any {
+ if x != nil {
+ return x.Data
+ }
+ return nil
+}
+
+type PushMethod struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Http *PushMethodHTTP `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"`
+ Mqtt *PushMethodMQTT `protobuf:"bytes,2,opt,name=mqtt,proto3" json:"mqtt,omitempty"`
+ DbMethod *DBMethod `protobuf:"bytes,3,opt,name=dbMethod,proto3" json:"dbMethod,omitempty"`
+}
+
+func (x *PushMethod) Reset() {
+ *x = PushMethod{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PushMethod) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PushMethod) ProtoMessage() {}
+
+func (x *PushMethod) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PushMethod.ProtoReflect.Descriptor instead.
+func (*PushMethod) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *PushMethod) GetHttp() *PushMethodHTTP {
+ if x != nil {
+ return x.Http
+ }
+ return nil
+}
+
+func (x *PushMethod) GetMqtt() *PushMethodMQTT {
+ if x != nil {
+ return x.Mqtt
+ }
+ return nil
+}
+
+func (x *PushMethod) GetDbMethod() *DBMethod {
+ if x != nil {
+ return x.DbMethod
+ }
+ return nil
+}
+
+type PushMethodHTTP struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
+ Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
+ Requestpath string `protobuf:"bytes,3,opt,name=requestpath,proto3" json:"requestpath,omitempty"`
+ Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
+}
+
+func (x *PushMethodHTTP) Reset() {
+ *x = PushMethodHTTP{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PushMethodHTTP) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PushMethodHTTP) ProtoMessage() {}
+
+func (x *PushMethodHTTP) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PushMethodHTTP.ProtoReflect.Descriptor instead.
+func (*PushMethodHTTP) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *PushMethodHTTP) GetHostname() string {
+ if x != nil {
+ return x.Hostname
+ }
+ return ""
+}
+
+func (x *PushMethodHTTP) GetPort() int64 {
+ if x != nil {
+ return x.Port
+ }
+ return 0
+}
+
+func (x *PushMethodHTTP) GetRequestpath() string {
+ if x != nil {
+ return x.Requestpath
+ }
+ return ""
+}
+
+func (x *PushMethodHTTP) GetTimeout() int64 {
+ if x != nil {
+ return x.Timeout
+ }
+ return 0
+}
+
+type PushMethodMQTT struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // broker address, like mqtt://127.0.0.1:1883
+ Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
+ // publish topic for mqtt
+ Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
+ // qos of mqtt publish param
+ Qos int32 `protobuf:"varint,3,opt,name=qos,proto3" json:"qos,omitempty"`
+ // Is the message retained
+ Retained bool `protobuf:"varint,4,opt,name=retained,proto3" json:"retained,omitempty"`
+}
+
+func (x *PushMethodMQTT) Reset() {
+ *x = PushMethodMQTT{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PushMethodMQTT) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PushMethodMQTT) ProtoMessage() {}
+
+func (x *PushMethodMQTT) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PushMethodMQTT.ProtoReflect.Descriptor instead.
+func (*PushMethodMQTT) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *PushMethodMQTT) GetAddress() string {
+ if x != nil {
+ return x.Address
+ }
+ return ""
+}
+
+func (x *PushMethodMQTT) GetTopic() string {
+ if x != nil {
+ return x.Topic
+ }
+ return ""
+}
+
+func (x *PushMethodMQTT) GetQos() int32 {
+ if x != nil {
+ return x.Qos
+ }
+ return 0
+}
+
+func (x *PushMethodMQTT) GetRetained() bool {
+ if x != nil {
+ return x.Retained
+ }
+ return false
+}
+
+type DBMethod struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the config of database .
+ Influxdb2 *DBMethodInfluxdb2 `protobuf:"bytes,1,opt,name=influxdb2,proto3" json:"influxdb2,omitempty"`
+ Redis *DBMethodRedis `protobuf:"bytes,2,opt,name=redis,proto3" json:"redis,omitempty"`
+ Tdengine *DBMethodTDEngine `protobuf:"bytes,3,opt,name=tdengine,proto3" json:"tdengine,omitempty"`
+ Mysql *DBMethodMySQL `protobuf:"bytes,4,opt,name=mysql,proto3" json:"mysql,omitempty"`
+}
+
+func (x *DBMethod) Reset() {
+ *x = DBMethod{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBMethod) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBMethod) ProtoMessage() {}
+
+func (x *DBMethod) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DBMethod.ProtoReflect.Descriptor instead.
+func (*DBMethod) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *DBMethod) GetInfluxdb2() *DBMethodInfluxdb2 {
+ if x != nil {
+ return x.Influxdb2
+ }
+ return nil
+}
+
+func (x *DBMethod) GetRedis() *DBMethodRedis {
+ if x != nil {
+ return x.Redis
+ }
+ return nil
+}
+
+func (x *DBMethod) GetTdengine() *DBMethodTDEngine {
+ if x != nil {
+ return x.Tdengine
+ }
+ return nil
+}
+
+func (x *DBMethod) GetMysql() *DBMethodMySQL {
+ if x != nil {
+ return x.Mysql
+ }
+ return nil
+}
+
+type DBMethodInfluxdb2 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the config of influx database.
+ Influxdb2ClientConfig *Influxdb2ClientConfig `protobuf:"bytes,1,opt,name=influxdb2ClientConfig,proto3" json:"influxdb2ClientConfig,omitempty"`
+ Influxdb2DataConfig *Influxdb2DataConfig `protobuf:"bytes,2,opt,name=influxdb2DataConfig,proto3" json:"influxdb2DataConfig,omitempty"`
+}
+
+func (x *DBMethodInfluxdb2) Reset() {
+ *x = DBMethodInfluxdb2{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBMethodInfluxdb2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBMethodInfluxdb2) ProtoMessage() {}
+
+func (x *DBMethodInfluxdb2) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DBMethodInfluxdb2.ProtoReflect.Descriptor instead.
+func (*DBMethodInfluxdb2) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *DBMethodInfluxdb2) GetInfluxdb2ClientConfig() *Influxdb2ClientConfig {
+ if x != nil {
+ return x.Influxdb2ClientConfig
+ }
+ return nil
+}
+
+func (x *DBMethodInfluxdb2) GetInfluxdb2DataConfig() *Influxdb2DataConfig {
+ if x != nil {
+ return x.Influxdb2DataConfig
+ }
+ return nil
+}
+
+type Influxdb2DataConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // data config when push data to influx
+ Measurement string `protobuf:"bytes,1,opt,name=measurement,proto3" json:"measurement,omitempty"`
+ Tag map[string]string `protobuf:"bytes,2,rep,name=tag,proto3" json:"tag,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ FieldKey string `protobuf:"bytes,3,opt,name=fieldKey,proto3" json:"fieldKey,omitempty"`
+}
+
+func (x *Influxdb2DataConfig) Reset() {
+ *x = Influxdb2DataConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Influxdb2DataConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Influxdb2DataConfig) ProtoMessage() {}
+
+func (x *Influxdb2DataConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Influxdb2DataConfig.ProtoReflect.Descriptor instead.
+func (*Influxdb2DataConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *Influxdb2DataConfig) GetMeasurement() string {
+ if x != nil {
+ return x.Measurement
+ }
+ return ""
+}
+
+func (x *Influxdb2DataConfig) GetTag() map[string]string {
+ if x != nil {
+ return x.Tag
+ }
+ return nil
+}
+
+func (x *Influxdb2DataConfig) GetFieldKey() string {
+ if x != nil {
+ return x.FieldKey
+ }
+ return ""
+}
+
+type Influxdb2ClientConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // influx database url
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+ // usr org in influx database
+ Org string `protobuf:"bytes,2,opt,name=org,proto3" json:"org,omitempty"`
+ // usr bucket in influx database
+ Bucket string `protobuf:"bytes,3,opt,name=bucket,proto3" json:"bucket,omitempty"`
+}
+
+func (x *Influxdb2ClientConfig) Reset() {
+ *x = Influxdb2ClientConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Influxdb2ClientConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Influxdb2ClientConfig) ProtoMessage() {}
+
+func (x *Influxdb2ClientConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[18]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Influxdb2ClientConfig.ProtoReflect.Descriptor instead.
+func (*Influxdb2ClientConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *Influxdb2ClientConfig) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *Influxdb2ClientConfig) GetOrg() string {
+ if x != nil {
+ return x.Org
+ }
+ return ""
+}
+
+func (x *Influxdb2ClientConfig) GetBucket() string {
+ if x != nil {
+ return x.Bucket
+ }
+ return ""
+}
+
+type DBMethodRedis struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // data config when push data to redis
+ RedisClientConfig *RedisClientConfig `protobuf:"bytes,1,opt,name=redisClientConfig,proto3" json:"redisClientConfig,omitempty"`
+}
+
+func (x *DBMethodRedis) Reset() {
+ *x = DBMethodRedis{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBMethodRedis) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBMethodRedis) ProtoMessage() {}
+
+func (x *DBMethodRedis) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DBMethodRedis.ProtoReflect.Descriptor instead.
+func (*DBMethodRedis) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *DBMethodRedis) GetRedisClientConfig() *RedisClientConfig {
+ if x != nil {
+ return x.RedisClientConfig
+ }
+ return nil
+}
+
+type RedisClientConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // redis address
+ Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
+ // number of redis db
+ Db int32 `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"`
+ // number of redis poolsize
+ Poolsize int32 `protobuf:"varint,3,opt,name=poolsize,proto3" json:"poolsize,omitempty"`
+ // number of redis minidleconns
+ MinIdleConns int32 `protobuf:"varint,4,opt,name=minIdleConns,proto3" json:"minIdleConns,omitempty"`
+}
+
+func (x *RedisClientConfig) Reset() {
+ *x = RedisClientConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RedisClientConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RedisClientConfig) ProtoMessage() {}
+
+func (x *RedisClientConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RedisClientConfig.ProtoReflect.Descriptor instead.
+func (*RedisClientConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *RedisClientConfig) GetAddr() string {
+ if x != nil {
+ return x.Addr
+ }
+ return ""
+}
+
+func (x *RedisClientConfig) GetDb() int32 {
+ if x != nil {
+ return x.Db
+ }
+ return 0
+}
+
+func (x *RedisClientConfig) GetPoolsize() int32 {
+ if x != nil {
+ return x.Poolsize
+ }
+ return 0
+}
+
+func (x *RedisClientConfig) GetMinIdleConns() int32 {
+ if x != nil {
+ return x.MinIdleConns
+ }
+ return 0
+}
+
+type DBMethodTDEngine struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // data config when push data to tdengine
+ TdEngineClientConfig *TDEngineClientConfig `protobuf:"bytes,1,opt,name=tdEngineClientConfig,proto3" json:"tdEngineClientConfig,omitempty"`
+}
+
+func (x *DBMethodTDEngine) Reset() {
+ *x = DBMethodTDEngine{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBMethodTDEngine) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBMethodTDEngine) ProtoMessage() {}
+
+func (x *DBMethodTDEngine) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[21]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DBMethodTDEngine.ProtoReflect.Descriptor instead.
+func (*DBMethodTDEngine) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *DBMethodTDEngine) GetTdEngineClientConfig() *TDEngineClientConfig {
+ if x != nil {
+ return x.TdEngineClientConfig
+ }
+ return nil
+}
+
+type TDEngineClientConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // tdengine address,like 127.0.0.1:6041
+ Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
+ // tdengine database name
+ Dbname string `protobuf:"bytes,2,opt,name=dbname,proto3" json:"dbname,omitempty"`
+}
+
+func (x *TDEngineClientConfig) Reset() {
+ *x = TDEngineClientConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TDEngineClientConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TDEngineClientConfig) ProtoMessage() {}
+
+func (x *TDEngineClientConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[22]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TDEngineClientConfig.ProtoReflect.Descriptor instead.
+func (*TDEngineClientConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *TDEngineClientConfig) GetAddr() string {
+ if x != nil {
+ return x.Addr
+ }
+ return ""
+}
+
+func (x *TDEngineClientConfig) GetDbname() string {
+ if x != nil {
+ return x.Dbname
+ }
+ return ""
+}
+
+type DBMethodMySQL struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MysqlClientConfig *MySQLClientConfig `protobuf:"bytes,1,opt,name=mysqlClientConfig,proto3" json:"mysqlClientConfig,omitempty"`
+}
+
+func (x *DBMethodMySQL) Reset() {
+ *x = DBMethodMySQL{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBMethodMySQL) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBMethodMySQL) ProtoMessage() {}
+
+func (x *DBMethodMySQL) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[23]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DBMethodMySQL.ProtoReflect.Descriptor instead.
+func (*DBMethodMySQL) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *DBMethodMySQL) GetMysqlClientConfig() *MySQLClientConfig {
+ if x != nil {
+ return x.MysqlClientConfig
+ }
+ return nil
+}
+
+type MySQLClientConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // mysql address,like localhost:3306
+ Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
+ // database name
+ Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
+ // user name
+ UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName,omitempty"`
+}
+
+func (x *MySQLClientConfig) Reset() {
+ *x = MySQLClientConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MySQLClientConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MySQLClientConfig) ProtoMessage() {}
+
+func (x *MySQLClientConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[24]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MySQLClientConfig.ProtoReflect.Descriptor instead.
+func (*MySQLClientConfig) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *MySQLClientConfig) GetAddr() string {
+ if x != nil {
+ return x.Addr
+ }
+ return ""
+}
+
+func (x *MySQLClientConfig) GetDatabase() string {
+ if x != nil {
+ return x.Database
+ }
+ return ""
+}
+
+func (x *MySQLClientConfig) GetUserName() string {
+ if x != nil {
+ return x.UserName
+ }
+ return ""
+}
+
+// MapperInfo is the information of mapper.
+type MapperInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // name of the mapper.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // version of the mapper.
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+ // api version of the mapper.
+ ApiVersion string `protobuf:"bytes,3,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
+ // the protocol of the mapper.
+ Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
+ // the address of the mapper. it is a unix domain socket of grpc.
+ Address []byte `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
+ // the state of the mapper.
+ State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
+}
+
+func (x *MapperInfo) Reset() {
+ *x = MapperInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapperInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapperInfo) ProtoMessage() {}
+
+func (x *MapperInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[25]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapperInfo.ProtoReflect.Descriptor instead.
+func (*MapperInfo) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *MapperInfo) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetApiVersion() string {
+ if x != nil {
+ return x.ApiVersion
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetProtocol() string {
+ if x != nil {
+ return x.Protocol
+ }
+ return ""
+}
+
+func (x *MapperInfo) GetAddress() []byte {
+ if x != nil {
+ return x.Address
+ }
+ return nil
+}
+
+func (x *MapperInfo) GetState() string {
+ if x != nil {
+ return x.State
+ }
+ return ""
+}
+
+type ReportDeviceStatusRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ ReportedDevice *DeviceStatus `protobuf:"bytes,2,opt,name=reportedDevice,proto3" json:"reportedDevice,omitempty"`
+ DeviceNamespace string `protobuf:"bytes,3,opt,name=deviceNamespace,proto3" json:"deviceNamespace,omitempty"`
+}
+
+func (x *ReportDeviceStatusRequest) Reset() {
+ *x = ReportDeviceStatusRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReportDeviceStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReportDeviceStatusRequest) ProtoMessage() {}
+
+func (x *ReportDeviceStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[26]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReportDeviceStatusRequest.ProtoReflect.Descriptor instead.
+func (*ReportDeviceStatusRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *ReportDeviceStatusRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *ReportDeviceStatusRequest) GetReportedDevice() *DeviceStatus {
+ if x != nil {
+ return x.ReportedDevice
+ }
+ return nil
+}
+
+func (x *ReportDeviceStatusRequest) GetDeviceNamespace() string {
+ if x != nil {
+ return x.DeviceNamespace
+ }
+ return ""
+}
+
+type ReportDeviceStatesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ DeviceNamespace string `protobuf:"bytes,2,opt,name=deviceNamespace,proto3" json:"deviceNamespace,omitempty"`
+ State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
+}
+
+func (x *ReportDeviceStatesRequest) Reset() {
+ *x = ReportDeviceStatesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReportDeviceStatesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReportDeviceStatesRequest) ProtoMessage() {}
+
+func (x *ReportDeviceStatesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[27]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReportDeviceStatesRequest.ProtoReflect.Descriptor instead.
+func (*ReportDeviceStatesRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *ReportDeviceStatesRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *ReportDeviceStatesRequest) GetDeviceNamespace() string {
+ if x != nil {
+ return x.DeviceNamespace
+ }
+ return ""
+}
+
+func (x *ReportDeviceStatesRequest) GetState() string {
+ if x != nil {
+ return x.State
+ }
+ return ""
+}
+
+// DeviceStatus is the status of the device.
+type DeviceStatus struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the device twins of the device.
+ Twins []*Twin `protobuf:"bytes,1,rep,name=twins,proto3" json:"twins,omitempty"`
+}
+
+func (x *DeviceStatus) Reset() {
+ *x = DeviceStatus{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeviceStatus) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceStatus) ProtoMessage() {}
+
+func (x *DeviceStatus) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[28]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceStatus.ProtoReflect.Descriptor instead.
+func (*DeviceStatus) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *DeviceStatus) GetTwins() []*Twin {
+ if x != nil {
+ return x.Twins
+ }
+ return nil
+}
+
+// Twin is the digital model of a device. It contains a series of properties.
+type Twin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the name of the property.
+ PropertyName string `protobuf:"bytes,1,opt,name=propertyName,proto3" json:"propertyName,omitempty"`
+ // the observedDesired value of the property configured by mapper.
+ ObservedDesired *TwinProperty `protobuf:"bytes,2,opt,name=observedDesired,proto3" json:"observedDesired,omitempty"`
+ // the reported value of the property from the real device.
+ Reported *TwinProperty `protobuf:"bytes,3,opt,name=reported,proto3" json:"reported,omitempty"`
+}
+
+func (x *Twin) Reset() {
+ *x = Twin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Twin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Twin) ProtoMessage() {}
+
+func (x *Twin) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[29]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Twin.ProtoReflect.Descriptor instead.
+func (*Twin) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *Twin) GetPropertyName() string {
+ if x != nil {
+ return x.PropertyName
+ }
+ return ""
+}
+
+func (x *Twin) GetObservedDesired() *TwinProperty {
+ if x != nil {
+ return x.ObservedDesired
+ }
+ return nil
+}
+
+func (x *Twin) GetReported() *TwinProperty {
+ if x != nil {
+ return x.Reported
+ }
+ return nil
+}
+
+// TwinProperty is the specification of the property.
+type TwinProperty struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the value of the property.
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ // the metadata to describe this property.
+ Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *TwinProperty) Reset() {
+ *x = TwinProperty{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TwinProperty) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TwinProperty) ProtoMessage() {}
+
+func (x *TwinProperty) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[30]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TwinProperty.ProtoReflect.Descriptor instead.
+func (*TwinProperty) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *TwinProperty) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+func (x *TwinProperty) GetMetadata() map[string]string {
+ if x != nil {
+ return x.Metadata
+ }
+ return nil
+}
+
+type ReportDeviceStatusResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ReportDeviceStatusResponse) Reset() {
+ *x = ReportDeviceStatusResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReportDeviceStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReportDeviceStatusResponse) ProtoMessage() {}
+
+func (x *ReportDeviceStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[31]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReportDeviceStatusResponse.ProtoReflect.Descriptor instead.
+func (*ReportDeviceStatusResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{31}
+}
+
+type ReportDeviceStatesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ReportDeviceStatesResponse) Reset() {
+ *x = ReportDeviceStatesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ReportDeviceStatesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReportDeviceStatesResponse) ProtoMessage() {}
+
+func (x *ReportDeviceStatesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[32]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReportDeviceStatesResponse.ProtoReflect.Descriptor instead.
+func (*ReportDeviceStatesResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{32}
+}
+
+type RegisterDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+}
+
+func (x *RegisterDeviceRequest) Reset() {
+ *x = RegisterDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegisterDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegisterDeviceRequest) ProtoMessage() {}
+
+func (x *RegisterDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[33]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegisterDeviceRequest.ProtoReflect.Descriptor instead.
+func (*RegisterDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *RegisterDeviceRequest) GetDevice() *Device {
+ if x != nil {
+ return x.Device
+ }
+ return nil
+}
+
+type RegisterDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ DeviceNamespace string `protobuf:"bytes,2,opt,name=deviceNamespace,proto3" json:"deviceNamespace,omitempty"`
+}
+
+func (x *RegisterDeviceResponse) Reset() {
+ *x = RegisterDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegisterDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegisterDeviceResponse) ProtoMessage() {}
+
+func (x *RegisterDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[34]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegisterDeviceResponse.ProtoReflect.Descriptor instead.
+func (*RegisterDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *RegisterDeviceResponse) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *RegisterDeviceResponse) GetDeviceNamespace() string {
+ if x != nil {
+ return x.DeviceNamespace
+ }
+ return ""
+}
+
+type CreateDeviceModelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Model *DeviceModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
+}
+
+func (x *CreateDeviceModelRequest) Reset() {
+ *x = CreateDeviceModelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateDeviceModelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateDeviceModelRequest) ProtoMessage() {}
+
+func (x *CreateDeviceModelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[35]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateDeviceModelRequest.ProtoReflect.Descriptor instead.
+func (*CreateDeviceModelRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *CreateDeviceModelRequest) GetModel() *DeviceModel {
+ if x != nil {
+ return x.Model
+ }
+ return nil
+}
+
+type CreateDeviceModelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceModelName string `protobuf:"bytes,1,opt,name=deviceModelName,proto3" json:"deviceModelName,omitempty"`
+ DeviceModelNamespace string `protobuf:"bytes,2,opt,name=deviceModelNamespace,proto3" json:"deviceModelNamespace,omitempty"`
+}
+
+func (x *CreateDeviceModelResponse) Reset() {
+ *x = CreateDeviceModelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateDeviceModelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateDeviceModelResponse) ProtoMessage() {}
+
+func (x *CreateDeviceModelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[36]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateDeviceModelResponse.ProtoReflect.Descriptor instead.
+func (*CreateDeviceModelResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *CreateDeviceModelResponse) GetDeviceModelName() string {
+ if x != nil {
+ return x.DeviceModelName
+ }
+ return ""
+}
+
+func (x *CreateDeviceModelResponse) GetDeviceModelNamespace() string {
+ if x != nil {
+ return x.DeviceModelNamespace
+ }
+ return ""
+}
+
+type RemoveDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ DeviceNamespace string `protobuf:"bytes,2,opt,name=deviceNamespace,proto3" json:"deviceNamespace,omitempty"`
+}
+
+func (x *RemoveDeviceRequest) Reset() {
+ *x = RemoveDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceRequest) ProtoMessage() {}
+
+func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[37]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceRequest.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *RemoveDeviceRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *RemoveDeviceRequest) GetDeviceNamespace() string {
+ if x != nil {
+ return x.DeviceNamespace
+ }
+ return ""
+}
+
+type RemoveDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RemoveDeviceResponse) Reset() {
+ *x = RemoveDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceResponse) ProtoMessage() {}
+
+func (x *RemoveDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[38]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceResponse.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{38}
+}
+
+type RemoveDeviceModelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ModelName string `protobuf:"bytes,1,opt,name=modelName,proto3" json:"modelName,omitempty"`
+ ModelNamespace string `protobuf:"bytes,2,opt,name=modelNamespace,proto3" json:"modelNamespace,omitempty"`
+}
+
+func (x *RemoveDeviceModelRequest) Reset() {
+ *x = RemoveDeviceModelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceModelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceModelRequest) ProtoMessage() {}
+
+func (x *RemoveDeviceModelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[39]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceModelRequest.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceModelRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *RemoveDeviceModelRequest) GetModelName() string {
+ if x != nil {
+ return x.ModelName
+ }
+ return ""
+}
+
+func (x *RemoveDeviceModelRequest) GetModelNamespace() string {
+ if x != nil {
+ return x.ModelNamespace
+ }
+ return ""
+}
+
+type RemoveDeviceModelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RemoveDeviceModelResponse) Reset() {
+ *x = RemoveDeviceModelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveDeviceModelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveDeviceModelResponse) ProtoMessage() {}
+
+func (x *RemoveDeviceModelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[40]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveDeviceModelResponse.ProtoReflect.Descriptor instead.
+func (*RemoveDeviceModelResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{40}
+}
+
+type UpdateDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+}
+
+func (x *UpdateDeviceRequest) Reset() {
+ *x = UpdateDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceRequest) ProtoMessage() {}
+
+func (x *UpdateDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[41]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *UpdateDeviceRequest) GetDevice() *Device {
+ if x != nil {
+ return x.Device
+ }
+ return nil
+}
+
+type UpdateDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateDeviceResponse) Reset() {
+ *x = UpdateDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceResponse) ProtoMessage() {}
+
+func (x *UpdateDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[42]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceResponse.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{42}
+}
+
+type UpdateDeviceModelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Model *DeviceModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
+}
+
+func (x *UpdateDeviceModelRequest) Reset() {
+ *x = UpdateDeviceModelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceModelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceModelRequest) ProtoMessage() {}
+
+func (x *UpdateDeviceModelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[43]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceModelRequest.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceModelRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *UpdateDeviceModelRequest) GetModel() *DeviceModel {
+ if x != nil {
+ return x.Model
+ }
+ return nil
+}
+
+type UpdateDeviceModelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateDeviceModelResponse) Reset() {
+ *x = UpdateDeviceModelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateDeviceModelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateDeviceModelResponse) ProtoMessage() {}
+
+func (x *UpdateDeviceModelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[44]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateDeviceModelResponse.ProtoReflect.Descriptor instead.
+func (*UpdateDeviceModelResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{44}
+}
+
+type GetDeviceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
+ DeviceNamespace string `protobuf:"bytes,2,opt,name=deviceNamespace,proto3" json:"deviceNamespace,omitempty"`
+}
+
+func (x *GetDeviceRequest) Reset() {
+ *x = GetDeviceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDeviceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDeviceRequest) ProtoMessage() {}
+
+func (x *GetDeviceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[45]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDeviceRequest.ProtoReflect.Descriptor instead.
+func (*GetDeviceRequest) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{45}
+}
+
+func (x *GetDeviceRequest) GetDeviceName() string {
+ if x != nil {
+ return x.DeviceName
+ }
+ return ""
+}
+
+func (x *GetDeviceRequest) GetDeviceNamespace() string {
+ if x != nil {
+ return x.DeviceNamespace
+ }
+ return ""
+}
+
+type GetDeviceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+}
+
+func (x *GetDeviceResponse) Reset() {
+ *x = GetDeviceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetDeviceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetDeviceResponse) ProtoMessage() {}
+
+func (x *GetDeviceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_proto_msgTypes[46]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetDeviceResponse.ProtoReflect.Descriptor instead.
+func (*GetDeviceResponse) Descriptor() ([]byte, []int) {
+ return file_api_proto_rawDescGZIP(), []int{46}
+}
+
+func (x *GetDeviceResponse) GetDevice() *Device {
+ if x != nil {
+ return x.Device
+ }
+ return nil
+}
+
+var File_api_proto protoreflect.FileDescriptor
+
+var file_api_proto_rawDesc = []byte{
+ 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x76, 0x31, 0x62,
+ 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x60, 0x0a, 0x15, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68,
+ 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68,
+ 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65,
+ 0x72, 0x22, 0x7d, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x6d,
+ 0x6f, 0x64, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d,
+ 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12,
+ 0x2f, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74,
+ 0x22, 0x6d, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65,
+ 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22,
+ 0x7d, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x70,
+ 0x65, 0x63, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
+ 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d,
+ 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0xc1,
+ 0x01, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69,
+ 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x6e,
+ 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x12,
+ 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e,
+ 0x69, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d,
+ 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65,
+ 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68,
+ 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64,
+ 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43,
+ 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
+ 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
+ 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x92, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27,
+ 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x70, 0x65,
+ 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
+ 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
+ 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73,
+ 0x70, 0x61, 0x63, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53,
+ 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x37, 0x0a, 0x0a,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xaa, 0x02, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x07,
+ 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
+ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x52, 0x07, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a,
+ 0x08, 0x76, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x76, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x79,
+ 0x63, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x79,
+ 0x63, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
+ 0x63, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d,
+ 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x33, 0x0a,
+ 0x0a, 0x70, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68,
+ 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68,
+ 0x6f, 0x64, 0x22, 0x6e, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
+ 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65,
+ 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61,
+ 0x74, 0x61, 0x22, 0x6d, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x31,
+ 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74,
+ 0x61, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75,
+ 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x44, 0x61,
+ 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x4d, 0x0a,
+ 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
+ 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x95, 0x01, 0x0a,
+ 0x0a, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x68,
+ 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x54,
+ 0x54, 0x50, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x2b, 0x0a, 0x04, 0x6d, 0x71, 0x74, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
+ 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x51, 0x54, 0x54, 0x52,
+ 0x04, 0x6d, 0x71, 0x74, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x64, 0x62, 0x4d, 0x65, 0x74, 0x68, 0x6f,
+ 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
+ 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x08, 0x64, 0x62, 0x4d, 0x65,
+ 0x74, 0x68, 0x6f, 0x64, 0x22, 0x7c, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68,
+ 0x6f, 0x64, 0x48, 0x54, 0x54, 0x50, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65,
+ 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
+ 0x75, 0x74, 0x22, 0x6e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x4d, 0x51, 0x54, 0x54, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14,
+ 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
+ 0x6f, 0x70, 0x69, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x03, 0x71, 0x6f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e,
+ 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e,
+ 0x65, 0x64, 0x22, 0xd7, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
+ 0x38, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d,
+ 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x52, 0x09,
+ 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x12, 0x2c, 0x0a, 0x05, 0x72, 0x65, 0x64,
+ 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
+ 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x64, 0x69, 0x73,
+ 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x64, 0x65, 0x6e, 0x67,
+ 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x44, 0x45, 0x6e,
+ 0x67, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, 0x64, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x2c,
+ 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
+ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x22, 0xb9, 0x01, 0x0a,
+ 0x11, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64,
+ 0x62, 0x32, 0x12, 0x54, 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x43,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6c,
+ 0x75, 0x78, 0x64, 0x62, 0x32, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x52, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x13, 0x69, 0x6e, 0x66, 0x6c,
+ 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
+ 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x52, 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61,
+ 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc4, 0x01, 0x0a, 0x13, 0x49, 0x6e, 0x66,
+ 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x25, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78,
+ 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x61,
+ 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x1a, 0x36, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
+ 0x53, 0x0a, 0x15, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72,
+ 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x12, 0x16, 0x0a, 0x06,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75,
+ 0x63, 0x6b, 0x65, 0x74, 0x22, 0x59, 0x0a, 0x0d, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x48, 0x0a, 0x11, 0x72, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c,
+ 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73,
+ 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x72, 0x65,
+ 0x64, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22,
+ 0x77, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6f, 0x6c,
+ 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c,
+ 0x73, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x49,
+ 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x22, 0x65, 0x0a, 0x10, 0x44, 0x42, 0x4d, 0x65,
+ 0x74, 0x68, 0x6f, 0x64, 0x54, 0x44, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x51, 0x0a, 0x14,
+ 0x74, 0x64, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x62,
+ 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x44, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, 0x74, 0x64, 0x45, 0x6e, 0x67,
+ 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22,
+ 0x42, 0x0a, 0x14, 0x54, 0x44, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64,
+ 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x6e,
+ 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x0d, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d,
+ 0x79, 0x53, 0x51, 0x4c, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x43,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x6d, 0x79, 0x73,
+ 0x71, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5f,
+ 0x0a, 0x11, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22,
+ 0xa7, 0x01, 0x0a, 0x0a, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
+ 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
+ 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x19, 0x52, 0x65,
+ 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
+ 0x22, 0x7b, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a,
+ 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61,
+ 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x33, 0x0a,
+ 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a,
+ 0x05, 0x74, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x52, 0x05, 0x74, 0x77, 0x69,
+ 0x6e, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x04, 0x54, 0x77, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x3f, 0x0a, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x44, 0x65, 0x73, 0x69, 0x72,
+ 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
+ 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52,
+ 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64,
+ 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69,
+ 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x65, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x70, 0x6f,
+ 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a,
+ 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
+ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06,
+ 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x62, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
+ 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x46, 0x0a, 0x18, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x22, 0x79, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d,
+ 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5f, 0x0a,
+ 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61,
+ 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x16,
+ 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
+ 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e,
+ 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f,
+ 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x06,
+ 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x64,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a,
+ 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
+ 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05,
+ 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
+ 0x22, 0x3c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x32, 0xad,
+ 0x02, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x70, 0x65,
+ 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12,
+ 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70,
+ 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
+ 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a,
+ 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61,
+ 0x74, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65,
+ 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74,
+ 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xe8,
+ 0x04, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
+ 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
+ 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x52,
+ 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x31,
+ 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x62,
+ 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
+ 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21,
+ 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76,
+ 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x76,
+ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
+ 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x76, 0x31, 0x62,
+ 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e,
+ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x19, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31,
+ 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b,
+ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_api_proto_rawDescOnce sync.Once
+ file_api_proto_rawDescData = file_api_proto_rawDesc
+)
+
+func file_api_proto_rawDescGZIP() []byte {
+ file_api_proto_rawDescOnce.Do(func() {
+ file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData)
+ })
+ return file_api_proto_rawDescData
+}
+
+var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 50)
+var file_api_proto_goTypes = []interface{}{
+ (*MapperRegisterRequest)(nil), // 0: v1beta1.MapperRegisterRequest
+ (*MapperRegisterResponse)(nil), // 1: v1beta1.MapperRegisterResponse
+ (*DeviceModel)(nil), // 2: v1beta1.DeviceModel
+ (*DeviceModelSpec)(nil), // 3: v1beta1.DeviceModelSpec
+ (*ModelProperty)(nil), // 4: v1beta1.ModelProperty
+ (*DeviceCommand)(nil), // 5: v1beta1.DeviceCommand
+ (*Device)(nil), // 6: v1beta1.Device
+ (*DeviceSpec)(nil), // 7: v1beta1.DeviceSpec
+ (*DeviceProperty)(nil), // 8: v1beta1.DeviceProperty
+ (*ProtocolConfig)(nil), // 9: v1beta1.ProtocolConfig
+ (*VisitorConfig)(nil), // 10: v1beta1.VisitorConfig
+ (*CustomizedValue)(nil), // 11: v1beta1.CustomizedValue
+ (*PushMethod)(nil), // 12: v1beta1.PushMethod
+ (*PushMethodHTTP)(nil), // 13: v1beta1.PushMethodHTTP
+ (*PushMethodMQTT)(nil), // 14: v1beta1.PushMethodMQTT
+ (*DBMethod)(nil), // 15: v1beta1.DBMethod
+ (*DBMethodInfluxdb2)(nil), // 16: v1beta1.DBMethodInfluxdb2
+ (*Influxdb2DataConfig)(nil), // 17: v1beta1.Influxdb2DataConfig
+ (*Influxdb2ClientConfig)(nil), // 18: v1beta1.Influxdb2ClientConfig
+ (*DBMethodRedis)(nil), // 19: v1beta1.DBMethodRedis
+ (*RedisClientConfig)(nil), // 20: v1beta1.RedisClientConfig
+ (*DBMethodTDEngine)(nil), // 21: v1beta1.DBMethodTDEngine
+ (*TDEngineClientConfig)(nil), // 22: v1beta1.TDEngineClientConfig
+ (*DBMethodMySQL)(nil), // 23: v1beta1.DBMethodMySQL
+ (*MySQLClientConfig)(nil), // 24: v1beta1.MySQLClientConfig
+ (*MapperInfo)(nil), // 25: v1beta1.MapperInfo
+ (*ReportDeviceStatusRequest)(nil), // 26: v1beta1.ReportDeviceStatusRequest
+ (*ReportDeviceStatesRequest)(nil), // 27: v1beta1.ReportDeviceStatesRequest
+ (*DeviceStatus)(nil), // 28: v1beta1.DeviceStatus
+ (*Twin)(nil), // 29: v1beta1.Twin
+ (*TwinProperty)(nil), // 30: v1beta1.TwinProperty
+ (*ReportDeviceStatusResponse)(nil), // 31: v1beta1.ReportDeviceStatusResponse
+ (*ReportDeviceStatesResponse)(nil), // 32: v1beta1.ReportDeviceStatesResponse
+ (*RegisterDeviceRequest)(nil), // 33: v1beta1.RegisterDeviceRequest
+ (*RegisterDeviceResponse)(nil), // 34: v1beta1.RegisterDeviceResponse
+ (*CreateDeviceModelRequest)(nil), // 35: v1beta1.CreateDeviceModelRequest
+ (*CreateDeviceModelResponse)(nil), // 36: v1beta1.CreateDeviceModelResponse
+ (*RemoveDeviceRequest)(nil), // 37: v1beta1.RemoveDeviceRequest
+ (*RemoveDeviceResponse)(nil), // 38: v1beta1.RemoveDeviceResponse
+ (*RemoveDeviceModelRequest)(nil), // 39: v1beta1.RemoveDeviceModelRequest
+ (*RemoveDeviceModelResponse)(nil), // 40: v1beta1.RemoveDeviceModelResponse
+ (*UpdateDeviceRequest)(nil), // 41: v1beta1.UpdateDeviceRequest
+ (*UpdateDeviceResponse)(nil), // 42: v1beta1.UpdateDeviceResponse
+ (*UpdateDeviceModelRequest)(nil), // 43: v1beta1.UpdateDeviceModelRequest
+ (*UpdateDeviceModelResponse)(nil), // 44: v1beta1.UpdateDeviceModelResponse
+ (*GetDeviceRequest)(nil), // 45: v1beta1.GetDeviceRequest
+ (*GetDeviceResponse)(nil), // 46: v1beta1.GetDeviceResponse
+ nil, // 47: v1beta1.CustomizedValue.DataEntry
+ nil, // 48: v1beta1.Influxdb2DataConfig.TagEntry
+ nil, // 49: v1beta1.TwinProperty.MetadataEntry
+ (*anypb.Any)(nil), // 50: google.protobuf.Any
+}
+var file_api_proto_depIdxs = []int32{
+ 25, // 0: v1beta1.MapperRegisterRequest.mapper:type_name -> v1beta1.MapperInfo
+ 2, // 1: v1beta1.MapperRegisterResponse.modelList:type_name -> v1beta1.DeviceModel
+ 6, // 2: v1beta1.MapperRegisterResponse.deviceList:type_name -> v1beta1.Device
+ 3, // 3: v1beta1.DeviceModel.spec:type_name -> v1beta1.DeviceModelSpec
+ 4, // 4: v1beta1.DeviceModelSpec.properties:type_name -> v1beta1.ModelProperty
+ 5, // 5: v1beta1.DeviceModelSpec.commands:type_name -> v1beta1.DeviceCommand
+ 7, // 6: v1beta1.Device.spec:type_name -> v1beta1.DeviceSpec
+ 28, // 7: v1beta1.Device.status:type_name -> v1beta1.DeviceStatus
+ 9, // 8: v1beta1.DeviceSpec.protocol:type_name -> v1beta1.ProtocolConfig
+ 8, // 9: v1beta1.DeviceSpec.properties:type_name -> v1beta1.DeviceProperty
+ 30, // 10: v1beta1.DeviceProperty.desired:type_name -> v1beta1.TwinProperty
+ 10, // 11: v1beta1.DeviceProperty.visitors:type_name -> v1beta1.VisitorConfig
+ 12, // 12: v1beta1.DeviceProperty.pushMethod:type_name -> v1beta1.PushMethod
+ 11, // 13: v1beta1.ProtocolConfig.configData:type_name -> v1beta1.CustomizedValue
+ 11, // 14: v1beta1.VisitorConfig.configData:type_name -> v1beta1.CustomizedValue
+ 47, // 15: v1beta1.CustomizedValue.data:type_name -> v1beta1.CustomizedValue.DataEntry
+ 13, // 16: v1beta1.PushMethod.http:type_name -> v1beta1.PushMethodHTTP
+ 14, // 17: v1beta1.PushMethod.mqtt:type_name -> v1beta1.PushMethodMQTT
+ 15, // 18: v1beta1.PushMethod.dbMethod:type_name -> v1beta1.DBMethod
+ 16, // 19: v1beta1.DBMethod.influxdb2:type_name -> v1beta1.DBMethodInfluxdb2
+ 19, // 20: v1beta1.DBMethod.redis:type_name -> v1beta1.DBMethodRedis
+ 21, // 21: v1beta1.DBMethod.tdengine:type_name -> v1beta1.DBMethodTDEngine
+ 23, // 22: v1beta1.DBMethod.mysql:type_name -> v1beta1.DBMethodMySQL
+ 18, // 23: v1beta1.DBMethodInfluxdb2.influxdb2ClientConfig:type_name -> v1beta1.Influxdb2ClientConfig
+ 17, // 24: v1beta1.DBMethodInfluxdb2.influxdb2DataConfig:type_name -> v1beta1.Influxdb2DataConfig
+ 48, // 25: v1beta1.Influxdb2DataConfig.tag:type_name -> v1beta1.Influxdb2DataConfig.TagEntry
+ 20, // 26: v1beta1.DBMethodRedis.redisClientConfig:type_name -> v1beta1.RedisClientConfig
+ 22, // 27: v1beta1.DBMethodTDEngine.tdEngineClientConfig:type_name -> v1beta1.TDEngineClientConfig
+ 24, // 28: v1beta1.DBMethodMySQL.mysqlClientConfig:type_name -> v1beta1.MySQLClientConfig
+ 28, // 29: v1beta1.ReportDeviceStatusRequest.reportedDevice:type_name -> v1beta1.DeviceStatus
+ 29, // 30: v1beta1.DeviceStatus.twins:type_name -> v1beta1.Twin
+ 30, // 31: v1beta1.Twin.observedDesired:type_name -> v1beta1.TwinProperty
+ 30, // 32: v1beta1.Twin.reported:type_name -> v1beta1.TwinProperty
+ 49, // 33: v1beta1.TwinProperty.metadata:type_name -> v1beta1.TwinProperty.MetadataEntry
+ 6, // 34: v1beta1.RegisterDeviceRequest.device:type_name -> v1beta1.Device
+ 2, // 35: v1beta1.CreateDeviceModelRequest.model:type_name -> v1beta1.DeviceModel
+ 6, // 36: v1beta1.UpdateDeviceRequest.device:type_name -> v1beta1.Device
+ 2, // 37: v1beta1.UpdateDeviceModelRequest.model:type_name -> v1beta1.DeviceModel
+ 6, // 38: v1beta1.GetDeviceResponse.device:type_name -> v1beta1.Device
+ 50, // 39: v1beta1.CustomizedValue.DataEntry.value:type_name -> google.protobuf.Any
+ 0, // 40: v1beta1.DeviceManagerService.MapperRegister:input_type -> v1beta1.MapperRegisterRequest
+ 26, // 41: v1beta1.DeviceManagerService.ReportDeviceStatus:input_type -> v1beta1.ReportDeviceStatusRequest
+ 27, // 42: v1beta1.DeviceManagerService.ReportDeviceStates:input_type -> v1beta1.ReportDeviceStatesRequest
+ 33, // 43: v1beta1.DeviceMapperService.RegisterDevice:input_type -> v1beta1.RegisterDeviceRequest
+ 37, // 44: v1beta1.DeviceMapperService.RemoveDevice:input_type -> v1beta1.RemoveDeviceRequest
+ 41, // 45: v1beta1.DeviceMapperService.UpdateDevice:input_type -> v1beta1.UpdateDeviceRequest
+ 35, // 46: v1beta1.DeviceMapperService.CreateDeviceModel:input_type -> v1beta1.CreateDeviceModelRequest
+ 39, // 47: v1beta1.DeviceMapperService.RemoveDeviceModel:input_type -> v1beta1.RemoveDeviceModelRequest
+ 43, // 48: v1beta1.DeviceMapperService.UpdateDeviceModel:input_type -> v1beta1.UpdateDeviceModelRequest
+ 45, // 49: v1beta1.DeviceMapperService.GetDevice:input_type -> v1beta1.GetDeviceRequest
+ 1, // 50: v1beta1.DeviceManagerService.MapperRegister:output_type -> v1beta1.MapperRegisterResponse
+ 31, // 51: v1beta1.DeviceManagerService.ReportDeviceStatus:output_type -> v1beta1.ReportDeviceStatusResponse
+ 32, // 52: v1beta1.DeviceManagerService.ReportDeviceStates:output_type -> v1beta1.ReportDeviceStatesResponse
+ 34, // 53: v1beta1.DeviceMapperService.RegisterDevice:output_type -> v1beta1.RegisterDeviceResponse
+ 38, // 54: v1beta1.DeviceMapperService.RemoveDevice:output_type -> v1beta1.RemoveDeviceResponse
+ 42, // 55: v1beta1.DeviceMapperService.UpdateDevice:output_type -> v1beta1.UpdateDeviceResponse
+ 36, // 56: v1beta1.DeviceMapperService.CreateDeviceModel:output_type -> v1beta1.CreateDeviceModelResponse
+ 40, // 57: v1beta1.DeviceMapperService.RemoveDeviceModel:output_type -> v1beta1.RemoveDeviceModelResponse
+ 44, // 58: v1beta1.DeviceMapperService.UpdateDeviceModel:output_type -> v1beta1.UpdateDeviceModelResponse
+ 46, // 59: v1beta1.DeviceMapperService.GetDevice:output_type -> v1beta1.GetDeviceResponse
+ 50, // [50:60] is the sub-list for method output_type
+ 40, // [40:50] is the sub-list for method input_type
+ 40, // [40:40] is the sub-list for extension type_name
+ 40, // [40:40] is the sub-list for extension extendee
+ 0, // [0:40] is the sub-list for field type_name
+}
+
+func init() { file_api_proto_init() }
+func file_api_proto_init() {
+ if File_api_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapperRegisterRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapperRegisterResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceModel); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceModelSpec); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModelProperty); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceCommand); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Device); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceSpec); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceProperty); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProtocolConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisitorConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomizedValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PushMethod); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PushMethodHTTP); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PushMethodMQTT); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBMethod); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBMethodInfluxdb2); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Influxdb2DataConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Influxdb2ClientConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBMethodRedis); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RedisClientConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBMethodTDEngine); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TDEngineClientConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBMethodMySQL); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MySQLClientConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapperInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReportDeviceStatusRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReportDeviceStatesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeviceStatus); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Twin); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TwinProperty); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReportDeviceStatusResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReportDeviceStatesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegisterDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegisterDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateDeviceModelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateDeviceModelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceModelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveDeviceModelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceModelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateDeviceModelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDeviceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetDeviceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_api_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 50,
+ NumExtensions: 0,
+ NumServices: 2,
+ },
+ GoTypes: file_api_proto_goTypes,
+ DependencyIndexes: file_api_proto_depIdxs,
+ MessageInfos: file_api_proto_msgTypes,
+ }.Build()
+ File_api_proto = out.File
+ file_api_proto_rawDesc = nil
+ file_api_proto_goTypes = nil
+ file_api_proto_depIdxs = nil
+}
+
+func NewMapperClient(cc grpc.ClientConnInterface) DeviceMapperServiceClient {
+ return &deviceMapperServiceClient{cc}
+}
+
+func NewDeviceManageClient(cc grpc.ClientConnInterface) DeviceManagerServiceClient {
+ return &deviceManagerServiceClient{cc}
+}
diff --git a/staging/src/github.com/kubeedge/api/dmi/v1beta1/api.proto b/staging/src/github.com/kubeedge/api/dmi/v1beta1/api.proto
new file mode 100644
index 000000000..1542c7b84
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/dmi/v1beta1/api.proto
@@ -0,0 +1,433 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// To regenerate api.pb.go run hack/generate-dmi.sh
+syntax = "proto3";
+
+//option go_package = "path;name";
+option go_package = "./;v1beta1";
+package v1beta1;
+
+import "google/protobuf/any.proto";
+
+// DeviceManagerService defines the public APIS for remote device management.
+// The server is implemented by the module of device manager in edgecore
+// and the client is implemented by the device mapper for upstreaming.
+// The mapper should register itself to the device manager when it is online
+// to get the list of devices. And then the mapper can report the device status to the device manager.
+service DeviceManagerService {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ rpc MapperRegister(MapperRegisterRequest) returns (MapperRegisterResponse) {}
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ rpc ReportDeviceStatus(ReportDeviceStatusRequest) returns (ReportDeviceStatusResponse) {}
+ // TODO Rename ReportDeviceStatus to ReportDeviceTwins
+ // ReportDeviceStates reports the state of devices to device manager.
+ rpc ReportDeviceStates(ReportDeviceStatesRequest) returns (ReportDeviceStatesResponse) {}
+}
+
+// DeviceMapperService defines the public APIS for remote device management.
+// The server is implemented by the device mapper
+// and the client is implemented by the module of device manager in edgecore for downstreaming.
+// The device manager can manage the device life cycle through these interfaces provided by DeviceMapperService.
+// When device manager gets a message of device management from cloudcore, it should call the corresponding grpc interface
+// to make the mapper maintain the list of device information.
+service DeviceMapperService {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ rpc RegisterDevice(RegisterDeviceRequest) returns (RegisterDeviceResponse) {}
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceResponse) {}
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ rpc UpdateDevice(UpdateDeviceRequest) returns (UpdateDeviceResponse) {}
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ rpc CreateDeviceModel(CreateDeviceModelRequest) returns (CreateDeviceModelResponse) {}
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ rpc RemoveDeviceModel(RemoveDeviceModelRequest) returns (RemoveDeviceModelResponse) {}
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ rpc UpdateDeviceModel(UpdateDeviceModelRequest) returns (UpdateDeviceModelResponse) {}
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ rpc GetDevice(GetDeviceRequest) returns (GetDeviceResponse) {}
+}
+
+message MapperRegisterRequest {
+ // The flag to show how device manager returns.
+ // True means device manager should return the device list in the response.
+ // False means device manager should just return nothing.
+ bool withData = 1;
+ // Mapper information to be registered to the device manager.
+ MapperInfo mapper = 2;
+}
+
+message MapperRegisterResponse {
+ // List of device models which the mapper maintains.
+ repeated DeviceModel modelList = 1;
+ // List of devices which the mapper maintains.
+ repeated Device deviceList = 2;
+}
+
+// DeviceModel specifies the information of a device model.
+message DeviceModel {
+ // Name of a device model.
+ string name = 1;
+ // Specification of a device model.
+ DeviceModelSpec spec = 2;
+ // Namespace of the device model.
+ string namespace = 3;
+}
+
+// DeviceModelSpec is the specification of a device model.
+message DeviceModelSpec {
+ // The properties provided by the device of this device model.
+ repeated ModelProperty properties = 1;
+ // The commands executed by the device of this device model.
+ repeated DeviceCommand commands = 2;
+}
+
+// ModelProperty is the property of a device.
+message ModelProperty {
+ // The name of this property.
+ string name = 1;
+ // The description of this property.
+ string description = 2;
+ // The specific type of this property.
+ string type = 3;
+ // The access mode of this property, ReadOnly or ReadWrite.
+ string accessMode = 4;
+ // The minimum value of this property.
+ string minimum = 5;
+ // The maximum value of this property.
+ string maximum = 6;
+ // The unit of this property.
+ string unit = 7;
+}
+
+// DeviceCommond is the description of a command which the device supports.
+message DeviceCommand {
+ // Name of the command.
+ string name = 1;
+ // Url of the command to access.
+ string url = 2;
+ // Method of the command.
+ string method = 3;
+ // Status code list which the command can return.
+ repeated string status_code = 4;
+ // Parameter list which the command carries.
+ repeated string parameters = 5;
+ // Response examples of the command.
+ bytes response = 6;
+}
+
+// Device is the description of a device instance.
+message Device {
+ // Name of the device.
+ string name = 1;
+ // Specification of the device.
+ DeviceSpec spec = 2;
+ // Status of the device.
+ DeviceStatus status = 3;
+ // Namespace of the device.
+ string namespace = 4;
+}
+
+// DeviceSpec is the specification of the device.
+message DeviceSpec {
+ // The device model which the device references.
+ string deviceModelReference = 1;
+ // The specific config of the protocol to access to the device.
+ ProtocolConfig protocol = 2;
+ // List of properties which describe the device properties.
+ repeated DeviceProperty properties = 3;
+}
+
+// DeviceProperty describes the specifics all the properties of the device.
+message DeviceProperty {
+ // The device property name to be accessed. It must be unique.
+ string name = 1;
+ // the desired value of the property configured by device manager.
+ TwinProperty desired = 2;
+ // Visitors are intended to be consumed by device mappers which connect to devices
+ // and collect data / perform actions on the device.
+ VisitorConfig visitors = 3;
+ // Define how frequent mapper will report the value.
+ int64 reportCycle = 4;
+ // Define how frequent mapper will collect from device.
+ int64 collectCycle = 5;
+ // whether be reported to the cloud
+ bool reportToCloud = 6;
+ // PushMethod represents the protocol used to push data,
+ PushMethod pushMethod = 7;
+}
+
+// ProtocolConfig is the specific config of the protocol to access to the device.
+message ProtocolConfig {
+ // the name of the customized protocol.
+ string protocolName = 1;
+ // the config data of the customized protocol.
+ CustomizedValue configData = 2;
+}
+
+// the visitor to collect the properties of the device of customized protocol.
+message VisitorConfig {
+ // the name of the customized protocol.
+ string protocolName = 1;
+ // the config data of the customized protocol.
+ CustomizedValue configData = 2;
+}
+
+// CustomizedValue is the customized value for developers.
+message CustomizedValue {
+ // data is the customized value and it can be any form.
+ map<string, google.protobuf.Any> data = 1;
+}
+
+message PushMethod {
+ PushMethodHTTP http = 1;
+ PushMethodMQTT mqtt = 2;
+ DBMethod dbMethod = 3;
+}
+
+message PushMethodHTTP {
+ string hostname = 1;
+ int64 port = 2;
+ string requestpath = 3;
+ int64 timeout = 4;
+}
+
+message PushMethodMQTT {
+ // broker address, like mqtt://127.0.0.1:1883
+ string address = 1;
+ // publish topic for mqtt
+ string topic = 2;
+ // qos of mqtt publish param
+ int32 qos = 3;
+ // Is the message retained
+ bool retained = 4;
+}
+
+message DBMethod{
+ // the config of database .
+ DBMethodInfluxdb2 influxdb2 = 1;
+ DBMethodRedis redis = 2;
+ DBMethodTDEngine tdengine = 3;
+ DBMethodMySQL mysql = 4;
+}
+
+message DBMethodInfluxdb2{
+ // the config of influx database.
+ Influxdb2ClientConfig influxdb2ClientConfig = 1;
+ Influxdb2DataConfig influxdb2DataConfig = 2;
+}
+
+message Influxdb2DataConfig{
+ // data config when push data to influx
+ string measurement = 1;
+ map<string, string> tag = 2;
+ string fieldKey = 3;
+}
+
+message Influxdb2ClientConfig{
+ // influx database url
+ string url = 1;
+ // usr org in influx database
+ string org = 2;
+ // usr bucket in influx database
+ string bucket = 3;
+}
+
+message DBMethodRedis{
+ // data config when push data to redis
+ RedisClientConfig redisClientConfig = 1;
+}
+
+message RedisClientConfig{
+ // redis address
+ string addr = 1;
+ // number of redis db
+ int32 db = 2;
+ // number of redis poolsize
+ int32 poolsize = 3;
+ // number of redis minidleconns
+ int32 minIdleConns =4;
+}
+
+message DBMethodTDEngine{
+ // data config when push data to tdengine
+ TDEngineClientConfig tdEngineClientConfig = 1;
+}
+
+message TDEngineClientConfig{
+ // tdengine address,like 127.0.0.1:6041
+ string addr = 1;
+ // tdengine database name
+ string dbname = 2;
+}
+
+
+message DBMethodMySQL{
+ MySQLClientConfig mysqlClientConfig = 1;
+}
+
+message MySQLClientConfig{
+ //mysql address,like localhost:3306
+ string addr = 1;
+ //database name
+ string database = 2;
+ //user name
+ string userName = 3;
+}
+
+// MapperInfo is the information of mapper.
+message MapperInfo {
+ // name of the mapper.
+ string name = 1;
+ // version of the mapper.
+ string version = 2;
+ // api version of the mapper.
+ string api_version = 3;
+ // the protocol of the mapper.
+ string protocol = 4;
+ // the address of the mapper. it is a unix domain socket of grpc.
+ bytes address = 5;
+ // the state of the mapper.
+ string state = 6;
+}
+
+message ReportDeviceStatusRequest {
+ string deviceName = 1;
+ DeviceStatus reportedDevice = 2;
+ string deviceNamespace = 3;
+}
+
+
+message ReportDeviceStatesRequest {
+ string deviceName = 1;
+ string deviceNamespace = 2;
+ string state = 3;
+}
+
+
+// DeviceStatus is the status of the device.
+message DeviceStatus {
+ // the device twins of the device.
+ repeated Twin twins = 1;
+}
+
+// Twin is the digital model of a device. It contains a series of properties.
+message Twin {
+ // the name of the property.
+ string propertyName = 1;
+ // the observedDesired value of the property configured by mapper.
+ TwinProperty observedDesired = 2;
+ // the reported value of the property from the real device.
+ TwinProperty reported = 3;
+}
+
+// TwinProperty is the specification of the property.
+message TwinProperty {
+ // the value of the property.
+ string value = 1;
+ // the metadata to describe this property.
+ map<string, string> metadata = 2;
+}
+
+message ReportDeviceStatusResponse {}
+
+message ReportDeviceStatesResponse {}
+
+message RegisterDeviceRequest {
+ Device device = 1;
+}
+
+message RegisterDeviceResponse {
+ string deviceName = 1;
+ string deviceNamespace = 2;
+}
+
+message CreateDeviceModelRequest {
+ DeviceModel model = 1;
+}
+
+message CreateDeviceModelResponse {
+ string deviceModelName = 1;
+ string deviceModelNamespace = 2;
+}
+
+message RemoveDeviceRequest {
+ string deviceName = 1;
+ string deviceNamespace = 2;
+}
+
+message RemoveDeviceResponse {}
+
+message RemoveDeviceModelRequest {
+ string modelName = 1;
+ string modelNamespace = 2;
+}
+
+message RemoveDeviceModelResponse {}
+
+message UpdateDeviceRequest {
+ Device device = 1;
+}
+
+message UpdateDeviceResponse {}
+
+message UpdateDeviceModelRequest {
+ DeviceModel model = 1;
+}
+
+message UpdateDeviceModelResponse {}
+
+message GetDeviceRequest {
+ string deviceName = 1;
+ string deviceNamespace = 2;
+}
+
+message GetDeviceResponse {
+ Device device = 1;
+}
diff --git a/staging/src/github.com/kubeedge/api/dmi/v1beta1/api_grpc.pb.go b/staging/src/github.com/kubeedge/api/dmi/v1beta1/api_grpc.pb.go
new file mode 100644
index 000000000..31ae67626
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/dmi/v1beta1/api_grpc.pb.go
@@ -0,0 +1,583 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+// To regenerate api.pb.go run hack/generate-dmi.sh
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.19.4
+// source: api.proto
+
+package v1beta1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// DeviceManagerServiceClient is the client API for DeviceManagerService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type DeviceManagerServiceClient interface {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ MapperRegister(ctx context.Context, in *MapperRegisterRequest, opts ...grpc.CallOption) (*MapperRegisterResponse, error)
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ ReportDeviceStatus(ctx context.Context, in *ReportDeviceStatusRequest, opts ...grpc.CallOption) (*ReportDeviceStatusResponse, error)
+ // ReportDeviceStates reports the state of devices to device manager.
+ ReportDeviceStates(ctx context.Context, in *ReportDeviceStatesRequest, opts ...grpc.CallOption) (*ReportDeviceStatesResponse, error)
+}
+
+type deviceManagerServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewDeviceManagerServiceClient(cc grpc.ClientConnInterface) DeviceManagerServiceClient {
+ return &deviceManagerServiceClient{cc}
+}
+
+func (c *deviceManagerServiceClient) MapperRegister(ctx context.Context, in *MapperRegisterRequest, opts ...grpc.CallOption) (*MapperRegisterResponse, error) {
+ out := new(MapperRegisterResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceManagerService/MapperRegister", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceManagerServiceClient) ReportDeviceStatus(ctx context.Context, in *ReportDeviceStatusRequest, opts ...grpc.CallOption) (*ReportDeviceStatusResponse, error) {
+ out := new(ReportDeviceStatusResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceManagerService/ReportDeviceStatus", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceManagerServiceClient) ReportDeviceStates(ctx context.Context, in *ReportDeviceStatesRequest, opts ...grpc.CallOption) (*ReportDeviceStatesResponse, error) {
+ out := new(ReportDeviceStatesResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceManagerService/ReportDeviceStates", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// DeviceManagerServiceServer is the server API for DeviceManagerService service.
+// All implementations must embed UnimplementedDeviceManagerServiceServer
+// for forward compatibility
+type DeviceManagerServiceServer interface {
+ // MapperRegister registers the information of the mapper to device manager
+ // when the mapper is online. Device manager returns the list of devices and device models which
+ // this mapper should manage.
+ MapperRegister(context.Context, *MapperRegisterRequest) (*MapperRegisterResponse, error)
+ // ReportDeviceStatus reports the status of devices to device manager.
+ // When the mapper collects some properties of a device, it can make them a map of device twins
+ // and report it to the device manager through the interface of ReportDeviceStatus.
+ ReportDeviceStatus(context.Context, *ReportDeviceStatusRequest) (*ReportDeviceStatusResponse, error)
+ // ReportDeviceStates reports the state of devices to device manager.
+ ReportDeviceStates(context.Context, *ReportDeviceStatesRequest) (*ReportDeviceStatesResponse, error)
+ mustEmbedUnimplementedDeviceManagerServiceServer()
+}
+
+// UnimplementedDeviceManagerServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedDeviceManagerServiceServer struct {
+}
+
+func (UnimplementedDeviceManagerServiceServer) MapperRegister(context.Context, *MapperRegisterRequest) (*MapperRegisterResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method MapperRegister not implemented")
+}
+func (UnimplementedDeviceManagerServiceServer) ReportDeviceStatus(context.Context, *ReportDeviceStatusRequest) (*ReportDeviceStatusResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ReportDeviceStatus not implemented")
+}
+func (UnimplementedDeviceManagerServiceServer) ReportDeviceStates(context.Context, *ReportDeviceStatesRequest) (*ReportDeviceStatesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ReportDeviceStates not implemented")
+}
+func (UnimplementedDeviceManagerServiceServer) mustEmbedUnimplementedDeviceManagerServiceServer() {}
+
+// UnsafeDeviceManagerServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to DeviceManagerServiceServer will
+// result in compilation errors.
+type UnsafeDeviceManagerServiceServer interface {
+ mustEmbedUnimplementedDeviceManagerServiceServer()
+}
+
+func RegisterDeviceManagerServiceServer(s grpc.ServiceRegistrar, srv DeviceManagerServiceServer) {
+ s.RegisterService(&DeviceManagerService_ServiceDesc, srv)
+}
+
+func _DeviceManagerService_MapperRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MapperRegisterRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceManagerServiceServer).MapperRegister(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceManagerService/MapperRegister",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceManagerServiceServer).MapperRegister(ctx, req.(*MapperRegisterRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceManagerService_ReportDeviceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ReportDeviceStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceManagerServiceServer).ReportDeviceStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceManagerService/ReportDeviceStatus",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceManagerServiceServer).ReportDeviceStatus(ctx, req.(*ReportDeviceStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceManagerService_ReportDeviceStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ReportDeviceStatesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceManagerServiceServer).ReportDeviceStates(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceManagerService/ReportDeviceStates",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceManagerServiceServer).ReportDeviceStates(ctx, req.(*ReportDeviceStatesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// DeviceManagerService_ServiceDesc is the grpc.ServiceDesc for DeviceManagerService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var DeviceManagerService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "v1beta1.DeviceManagerService",
+ HandlerType: (*DeviceManagerServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "MapperRegister",
+ Handler: _DeviceManagerService_MapperRegister_Handler,
+ },
+ {
+ MethodName: "ReportDeviceStatus",
+ Handler: _DeviceManagerService_ReportDeviceStatus_Handler,
+ },
+ {
+ MethodName: "ReportDeviceStates",
+ Handler: _DeviceManagerService_ReportDeviceStates_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api.proto",
+}
+
+// DeviceMapperServiceClient is the client API for DeviceMapperService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type DeviceMapperServiceClient interface {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceResponse, error)
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error)
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ UpdateDevice(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*UpdateDeviceResponse, error)
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ CreateDeviceModel(ctx context.Context, in *CreateDeviceModelRequest, opts ...grpc.CallOption) (*CreateDeviceModelResponse, error)
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ RemoveDeviceModel(ctx context.Context, in *RemoveDeviceModelRequest, opts ...grpc.CallOption) (*RemoveDeviceModelResponse, error)
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ UpdateDeviceModel(ctx context.Context, in *UpdateDeviceModelRequest, opts ...grpc.CallOption) (*UpdateDeviceModelResponse, error)
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error)
+}
+
+type deviceMapperServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewDeviceMapperServiceClient(cc grpc.ClientConnInterface) DeviceMapperServiceClient {
+ return &deviceMapperServiceClient{cc}
+}
+
+func (c *deviceMapperServiceClient) RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceResponse, error) {
+ out := new(RegisterDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/RegisterDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) {
+ out := new(RemoveDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/RemoveDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) UpdateDevice(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*UpdateDeviceResponse, error) {
+ out := new(UpdateDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/UpdateDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) CreateDeviceModel(ctx context.Context, in *CreateDeviceModelRequest, opts ...grpc.CallOption) (*CreateDeviceModelResponse, error) {
+ out := new(CreateDeviceModelResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/CreateDeviceModel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) RemoveDeviceModel(ctx context.Context, in *RemoveDeviceModelRequest, opts ...grpc.CallOption) (*RemoveDeviceModelResponse, error) {
+ out := new(RemoveDeviceModelResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/RemoveDeviceModel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) UpdateDeviceModel(ctx context.Context, in *UpdateDeviceModelRequest, opts ...grpc.CallOption) (*UpdateDeviceModelResponse, error) {
+ out := new(UpdateDeviceModelResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/UpdateDeviceModel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *deviceMapperServiceClient) GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error) {
+ out := new(GetDeviceResponse)
+ err := c.cc.Invoke(ctx, "/v1beta1.DeviceMapperService/GetDevice", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// DeviceMapperServiceServer is the server API for DeviceMapperService service.
+// All implementations must embed UnimplementedDeviceMapperServiceServer
+// for forward compatibility
+type DeviceMapperServiceServer interface {
+ // RegisterDevice registers a device to the device mapper.
+ // Device manager registers a device instance with the information of device
+ // to the mapper through the interface of RegisterDevice.
+ // When the mapper gets the request of register with device information,
+ // it should add the device to the device list and connect to the real physical device via the specific protocol.
+ RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceResponse, error)
+ // RemoveDevice unregisters a device to the device mapper.
+ // Device manager unregisters a device instance with the name of device
+ // to the mapper through the interface of RemoveDevice.
+ // When the mapper gets the request of unregister with device name,
+ // it should remove the device from the device list and disconnect to the real physical device.
+ RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error)
+ // UpdateDevice updates a device to the device mapper
+ // Device manager updates the information of a device used by the mapper
+ // through the interface of UpdateDevice.
+ // The information of a device includes the meta data and the status data of a device.
+ // When the mapper gets the request of updating with the information of a device,
+ // it should update the device of the device list and connect to the real physical device via the updated information.
+ UpdateDevice(context.Context, *UpdateDeviceRequest) (*UpdateDeviceResponse, error)
+ // CreateDeviceModel creates a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of CreateDeviceModel.
+ // When the mapper gets the request of creating with the information of device model,
+ // it should create a new device model to the list of device models.
+ CreateDeviceModel(context.Context, *CreateDeviceModelRequest) (*CreateDeviceModelResponse, error)
+ // RemoveDeviceModel remove a device model to the device mapper.
+ // Device manager sends the name of device model to the mapper
+ // through the interface of RemoveDeviceModel.
+ // When the mapper gets the request of removing with the name of device model,
+ // it should remove the device model to the list of device models.
+ RemoveDeviceModel(context.Context, *RemoveDeviceModelRequest) (*RemoveDeviceModelResponse, error)
+ // UpdateDeviceModel update a device model to the device mapper.
+ // Device manager sends the information of device model to the mapper
+ // through the interface of UpdateDeviceModel.
+ // When the mapper gets the request of updating with the information of device model,
+ // it should update the device model to the list of device models.
+ UpdateDeviceModel(context.Context, *UpdateDeviceModelRequest) (*UpdateDeviceModelResponse, error)
+ // GetDevice get the information of a device from the device mapper.
+ // Device sends the request of querying device information with the device name to the mapper
+ // through the interface of GetDevice.
+ // When the mapper gets the request of querying with the device name,
+ // it should return the device information.
+ GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error)
+ mustEmbedUnimplementedDeviceMapperServiceServer()
+}
+
+// UnimplementedDeviceMapperServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedDeviceMapperServiceServer struct {
+}
+
+func (UnimplementedDeviceMapperServiceServer) RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RegisterDevice not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveDevice not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) UpdateDevice(context.Context, *UpdateDeviceRequest) (*UpdateDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDevice not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) CreateDeviceModel(context.Context, *CreateDeviceModelRequest) (*CreateDeviceModelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceModel not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) RemoveDeviceModel(context.Context, *RemoveDeviceModelRequest) (*RemoveDeviceModelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveDeviceModel not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) UpdateDeviceModel(context.Context, *UpdateDeviceModelRequest) (*UpdateDeviceModelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateDeviceModel not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetDevice not implemented")
+}
+func (UnimplementedDeviceMapperServiceServer) mustEmbedUnimplementedDeviceMapperServiceServer() {}
+
+// UnsafeDeviceMapperServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to DeviceMapperServiceServer will
+// result in compilation errors.
+type UnsafeDeviceMapperServiceServer interface {
+ mustEmbedUnimplementedDeviceMapperServiceServer()
+}
+
+func RegisterDeviceMapperServiceServer(s grpc.ServiceRegistrar, srv DeviceMapperServiceServer) {
+ s.RegisterService(&DeviceMapperService_ServiceDesc, srv)
+}
+
+func _DeviceMapperService_RegisterDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RegisterDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).RegisterDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/RegisterDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).RegisterDevice(ctx, req.(*RegisterDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).RemoveDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/RemoveDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_UpdateDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).UpdateDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/UpdateDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).UpdateDevice(ctx, req.(*UpdateDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_CreateDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateDeviceModelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).CreateDeviceModel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/CreateDeviceModel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).CreateDeviceModel(ctx, req.(*CreateDeviceModelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_RemoveDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveDeviceModelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).RemoveDeviceModel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/RemoveDeviceModel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).RemoveDeviceModel(ctx, req.(*RemoveDeviceModelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_UpdateDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateDeviceModelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).UpdateDeviceModel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/UpdateDeviceModel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).UpdateDeviceModel(ctx, req.(*UpdateDeviceModelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _DeviceMapperService_GetDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetDeviceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DeviceMapperServiceServer).GetDevice(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/v1beta1.DeviceMapperService/GetDevice",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DeviceMapperServiceServer).GetDevice(ctx, req.(*GetDeviceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// DeviceMapperService_ServiceDesc is the grpc.ServiceDesc for DeviceMapperService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var DeviceMapperService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "v1beta1.DeviceMapperService",
+ HandlerType: (*DeviceMapperServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "RegisterDevice",
+ Handler: _DeviceMapperService_RegisterDevice_Handler,
+ },
+ {
+ MethodName: "RemoveDevice",
+ Handler: _DeviceMapperService_RemoveDevice_Handler,
+ },
+ {
+ MethodName: "UpdateDevice",
+ Handler: _DeviceMapperService_UpdateDevice_Handler,
+ },
+ {
+ MethodName: "CreateDeviceModel",
+ Handler: _DeviceMapperService_CreateDeviceModel_Handler,
+ },
+ {
+ MethodName: "RemoveDeviceModel",
+ Handler: _DeviceMapperService_RemoveDeviceModel_Handler,
+ },
+ {
+ MethodName: "UpdateDeviceModel",
+ Handler: _DeviceMapperService_UpdateDeviceModel_Handler,
+ },
+ {
+ MethodName: "GetDevice",
+ Handler: _DeviceMapperService_GetDevice_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api.proto",
+}
diff --git a/staging/src/github.com/kubeedge/api/fsm/v1alpha1/backup_task.go b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/backup_task.go
new file mode 100644
index 000000000..1fd6c3983
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/backup_task.go
@@ -0,0 +1,31 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+const (
+ BackingUpState State = "BackingUp"
+)
+
+var BackupRule = map[string]State{
+ "/Init/Success": TaskChecking,
+
+ "Checking/Check/Success": BackingUpState,
+ "Checking/Check/Failure": TaskFailed,
+
+ "BackingUp/Backup/Success": TaskSuccessful,
+ "BackingUp/Backup/Failure": TaskFailed,
+}
diff --git a/staging/src/github.com/kubeedge/api/fsm/v1alpha1/fsm.go b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/fsm.go
new file mode 100644
index 000000000..f93c6a870
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/fsm.go
@@ -0,0 +1,45 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type State string
+
+type Action string
+
+const (
+ NodeAvailable State = "Available"
+ NodeUpgrading State = "Upgrading"
+ NodeRollingBack State = "RollingBack"
+ NodeConfigUpdating State = "ConfigUpdating"
+)
+
+const (
+ TaskInit State = "Init"
+ TaskChecking State = "Checking"
+ TaskSuccessful State = "Successful"
+ TaskFailed State = "Failed"
+ TaskPause State = "Pause"
+)
+
+const (
+ ActionSuccess Action = "Success"
+ ActionFailure Action = "Failure"
+)
+
+const (
+ EventTimeOut = "TimeOut"
+)
diff --git a/staging/src/github.com/kubeedge/api/fsm/v1alpha1/image_prepull_task.go b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/image_prepull_task.go
new file mode 100644
index 000000000..30b91be3a
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/image_prepull_task.go
@@ -0,0 +1,42 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+const (
+ PullingState State = "Pulling"
+)
+
+// CurrentState/Event/Action: NextState
+var PrePullRule = map[string]State{
+ "Init/Init/Success": TaskChecking,
+ "Init/Init/Failure": TaskFailed,
+ "Init/TimeOut/Failure": TaskFailed,
+
+ "Checking/Check/Success": PullingState,
+ "Checking/Check/Failure": TaskFailed,
+ "Checking/TimeOut/Failure": TaskFailed,
+
+ "Pulling/Pull/Success": TaskSuccessful,
+ "Pulling/Pull/Failure": TaskFailed,
+ "Pulling/TimeOut/Failure": TaskFailed,
+}
+
+var PrePullStageSequence = map[State]State{
+ "": TaskChecking,
+ TaskInit: TaskChecking,
+ TaskChecking: PullingState,
+}
diff --git a/staging/src/github.com/kubeedge/api/fsm/v1alpha1/rollback_task.go b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/rollback_task.go
new file mode 100644
index 000000000..f90d50583
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/rollback_task.go
@@ -0,0 +1,31 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+const (
+ RollingBackState State = "RollingBack"
+)
+
+var RollbackRule = map[string]State{
+ "/Init/Success": TaskChecking,
+
+ "Checking/Check/Success": RollingBackState,
+ "Checking/Check/Failure": TaskFailed,
+
+ "RollingBack/Rollback/Failure": TaskFailed,
+ "RollingBack/Rollback/Success": TaskFailed,
+}
diff --git a/staging/src/github.com/kubeedge/api/fsm/v1alpha1/upgrade_task.go b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/upgrade_task.go
new file mode 100644
index 000000000..0f1102fb4
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/fsm/v1alpha1/upgrade_task.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+const (
+ UpgradingState State = "Upgrading"
+)
+
+// CurrentState/Event/Action: NextState
+var UpgradeRule = map[string]State{
+ "Init/Init/Success": TaskChecking,
+ "Init/Init/Failure": TaskFailed,
+ "Init/TimeOut/Failure": TaskFailed,
+ "Init/Upgrade/Success": TaskSuccessful,
+
+ "Checking/Check/Success": BackingUpState,
+ "Checking/Check/Failure": TaskFailed,
+ "Checking/TimeOut/Failure": TaskFailed,
+
+ "BackingUp/Backup/Success": UpgradingState,
+ "BackingUp/Backup/Failure": TaskFailed,
+ "BackingUp/TimeOut/Failure": TaskFailed,
+
+ "Upgrading/Upgrade/Success": TaskSuccessful,
+ "Upgrading/Upgrade/Failure": TaskFailed,
+ "Upgrading/TimeOut/Failure": TaskFailed,
+
+ // TODO provide options for task failure, such as successful node upgrade rollback.
+ "RollingBack/Rollback/Failure": TaskFailed,
+ "RollingBack/TimeOut/Failure": TaskFailed,
+ "RollingBack/Rollback/Success": TaskFailed,
+
+ "Upgrading/Rollback/Failure": TaskFailed,
+ "Upgrading/Rollback/Success": TaskFailed,
+
+ //TODO delete in version 1.18
+ "Init/Rollback/Failure": TaskFailed,
+ "Init/Rollback/Success": TaskFailed,
+}
+
+var UpdateStageSequence = map[State]State{
+ "": TaskChecking,
+ TaskInit: TaskChecking,
+ TaskChecking: BackingUpState,
+ BackingUpState: UpgradingState,
+ UpgradingState: RollingBackState,
+}
diff --git a/staging/src/github.com/kubeedge/api/go.mod b/staging/src/github.com/kubeedge/api/go.mod
new file mode 100644
index 000000000..b7a2939d2
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/go.mod
@@ -0,0 +1,206 @@
+module github.com/kubeedge/api
+
+go 1.21
+
+require (
+ github.com/cilium/ebpf v0.9.1 // indirect
+ github.com/docker/docker v23.0.1+incompatible // indirect
+ github.com/spf13/pflag v1.0.5
+ google.golang.org/grpc v1.63.0
+ google.golang.org/protobuf v1.33.0
+ k8s.io/api v0.29.6
+ k8s.io/apimachinery v0.29.6
+ k8s.io/component-base v0.29.6
+ k8s.io/component-helpers v0.0.0
+ k8s.io/klog/v2 v2.110.1
+ k8s.io/kubelet v0.29.6
+ k8s.io/kubernetes v1.29.6
+ k8s.io/utils v0.0.0-20230726121419-3b25d923346b
+ sigs.k8s.io/yaml v1.3.0
+)
+
+require github.com/distribution/reference v0.5.0 // indirect
+
+require (
+ cloud.google.com/go/compute v1.24.0 // indirect
+ cloud.google.com/go/compute/metadata v0.2.3 // indirect
+ github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
+ github.com/Microsoft/go-winio v0.6.0 // indirect
+ github.com/NYTimes/gziphandler v1.1.1 // indirect
+ github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
+ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/blang/semver/v4 v4.0.0 // indirect
+ github.com/cenkalti/backoff/v4 v4.2.1 // indirect
+ github.com/cespare/xxhash/v2 v2.2.0 // indirect
+ github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
+ github.com/containerd/console v1.0.3 // indirect
+ github.com/containerd/ttrpc v1.2.2 // indirect
+ github.com/coreos/go-semver v0.3.1 // indirect
+ github.com/coreos/go-systemd/v22 v22.5.0 // indirect
+ github.com/cyphar/filepath-securejoin v0.2.4 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/docker/go-units v0.5.0 // indirect
+ github.com/emicklei/go-restful/v3 v3.11.0 // indirect
+ github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect
+ github.com/evanphx/json-patch v4.12.0+incompatible // indirect
+ github.com/felixge/httpsnoop v1.0.4 // indirect
+ github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
+ github.com/fsnotify/fsnotify v1.7.0 // indirect
+ github.com/go-logr/logr v1.4.1 // indirect
+ github.com/go-logr/stdr v1.2.2 // indirect
+ github.com/go-openapi/jsonpointer v0.19.6 // indirect
+ github.com/go-openapi/jsonreference v0.20.2 // indirect
+ github.com/go-openapi/swag v0.22.3 // indirect
+ github.com/godbus/dbus/v5 v5.1.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
+ github.com/golang/protobuf v1.5.4 // indirect
+ github.com/google/cadvisor v0.48.1 // indirect
+ github.com/google/cel-go v0.17.7 // indirect
+ github.com/google/gnostic-models v0.6.8 // indirect
+ github.com/google/go-cmp v0.6.0 // indirect
+ github.com/google/gofuzz v1.2.0 // indirect
+ github.com/google/uuid v1.6.0 // indirect
+ github.com/gorilla/websocket v1.5.0 // indirect
+ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
+ github.com/imdario/mergo v0.3.13 // indirect
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
+ github.com/josharian/intern v1.0.0 // indirect
+ github.com/json-iterator/go v1.1.12 // indirect
+ github.com/karrick/godirwalk v1.17.0 // indirect
+ github.com/mailru/easyjson v0.7.7 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
+ github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
+ github.com/moby/spdystream v0.2.0 // indirect
+ github.com/moby/sys/mountinfo v0.6.2 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/mrunalp/fileutils v0.5.1 // indirect
+ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
+ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
+ github.com/opencontainers/runc v1.1.10 // indirect
+ github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect
+ github.com/opencontainers/selinux v1.11.0 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/prometheus/client_golang v1.16.0 // indirect
+ github.com/prometheus/client_model v0.5.0 // indirect
+ github.com/prometheus/common v0.44.0 // indirect
+ github.com/prometheus/procfs v0.12.0 // indirect
+ github.com/seccomp/libseccomp-golang v0.10.0 // indirect
+ github.com/sirupsen/logrus v1.9.0 // indirect
+ github.com/spf13/cobra v1.7.0 // indirect
+ github.com/stoewer/go-strcase v1.2.0 // indirect
+ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
+ github.com/vishvananda/netlink v1.1.0 // indirect
+ github.com/vishvananda/netns v0.0.4 // indirect
+ go.etcd.io/etcd/api/v3 v3.5.10 // indirect
+ go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
+ go.etcd.io/etcd/client/v3 v3.5.10 // indirect
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
+ go.opentelemetry.io/otel v1.22.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect
+ go.opentelemetry.io/otel/metric v1.22.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.22.0 // indirect
+ go.opentelemetry.io/otel/trace v1.22.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.0.0 // indirect
+ go.uber.org/atomic v1.10.0 // indirect
+ go.uber.org/multierr v1.11.0 // indirect
+ go.uber.org/zap v1.24.0 // indirect
+ golang.org/x/crypto v0.22.0 // indirect
+ golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
+ golang.org/x/mod v0.14.0 // indirect
+ golang.org/x/net v0.23.0 // indirect
+ golang.org/x/oauth2 v0.17.0 // indirect
+ golang.org/x/sync v0.7.0 // indirect
+ golang.org/x/sys v0.19.0 // indirect
+ golang.org/x/term v0.19.0 // indirect
+ golang.org/x/text v0.14.0 // indirect
+ golang.org/x/time v0.3.0 // indirect
+ golang.org/x/tools v0.16.1 // indirect
+ google.golang.org/appengine v1.6.8 // indirect
+ google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+ k8s.io/apiextensions-apiserver v0.0.0 // indirect
+ k8s.io/apiserver v0.0.0 // indirect
+ k8s.io/client-go v0.0.0 // indirect
+ k8s.io/cloud-provider v0.29.6 // indirect
+ k8s.io/controller-manager v0.0.0 // indirect
+ k8s.io/cri-api v0.0.0 // indirect
+ k8s.io/csi-translation-lib v0.29.6 // indirect
+ k8s.io/dynamic-resource-allocation v0.0.0 // indirect
+ k8s.io/kms v0.29.6 //indirect
+ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
+ k8s.io/kube-scheduler v0.29.6 // indirect
+ k8s.io/mount-utils v0.0.0 // indirect
+ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect
+ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
+)
+
+replace (
+ github.com/Sirupsen/logrus v1.0.5 => github.com/sirupsen/logrus v1.0.5
+ github.com/Sirupsen/logrus v1.3.0 => github.com/Sirupsen/logrus v1.0.6
+ github.com/Sirupsen/logrus v1.4.0 => github.com/sirupsen/logrus v1.0.6
+ github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd
+ github.com/gopherjs/gopherjs v0.0.0 => github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
+ github.com/spf13/viper => github.com/spf13/viper v1.8.1
+ go.etcd.io/bbolt => go.etcd.io/bbolt v1.3.6
+ go.etcd.io/etcd/api/v3 => go.etcd.io/etcd/api/v3 v3.5.5
+ go.etcd.io/etcd/client/pkg/v3 => go.etcd.io/etcd/client/pkg/v3 v3.5.5
+ go.etcd.io/etcd/client/v2 => go.etcd.io/etcd/client/v2 v2.305.0
+ go.etcd.io/etcd/client/v3 => go.etcd.io/etcd/client/v3 v3.5.5
+ go.etcd.io/etcd/pkg/v3 => go.etcd.io/etcd/pkg/v3 v3.5.5
+ go.etcd.io/etcd/raft/v3 => go.etcd.io/etcd/raft/v3 v3.5.5
+ go.etcd.io/etcd/server/v3 => go.etcd.io/etcd/server/v3 v3.5.5
+ golang.org/x/sys => golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
+ k8s.io/api => github.com/kubeedge/kubernetes/staging/src/k8s.io/api v1.29.6-kubeedge1
+ k8s.io/apiextensions-apiserver => github.com/kubeedge/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.29.6-kubeedge1
+ k8s.io/apimachinery => github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery v1.29.6-kubeedge1
+ k8s.io/apiserver => github.com/kubeedge/kubernetes/staging/src/k8s.io/apiserver v1.29.6-kubeedge1
+ k8s.io/cli-runtime => github.com/kubeedge/kubernetes/staging/src/k8s.io/cli-runtime v1.29.6-kubeedge1
+ k8s.io/client-go => github.com/kubeedge/kubernetes/staging/src/k8s.io/client-go v1.29.6-kubeedge1
+ k8s.io/cloud-provider => github.com/kubeedge/kubernetes/staging/src/k8s.io/cloud-provider v1.29.6-kubeedge1
+ k8s.io/cluster-bootstrap => github.com/kubeedge/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.29.6-kubeedge1
+ k8s.io/code-generator => github.com/kubeedge/kubernetes/staging/src/k8s.io/code-generator v1.29.6-kubeedge1
+ k8s.io/component-base => github.com/kubeedge/kubernetes/staging/src/k8s.io/component-base v1.29.6-kubeedge1
+ k8s.io/component-helpers => github.com/kubeedge/kubernetes/staging/src/k8s.io/component-helpers v1.29.6-kubeedge1
+ k8s.io/controller-manager => github.com/kubeedge/kubernetes/staging/src/k8s.io/controller-manager v1.29.6-kubeedge1
+ k8s.io/cri-api => github.com/kubeedge/kubernetes/staging/src/k8s.io/cri-api v1.29.6-kubeedge1
+ k8s.io/csi-api => github.com/kubeedge/kubernetes/staging/src/k8s.io/csi-api v1.29.6-kubeedge1
+ k8s.io/csi-translation-lib => github.com/kubeedge/kubernetes/staging/src/k8s.io/csi-translation-lib v1.29.6-kubeedge1
+ k8s.io/dynamic-resource-allocation => github.com/kubeedge/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.29.6-kubeedge1
+ k8s.io/endpointslice => github.com/kubeedge/kubernetes/staging/src/k8s.io/endpointslice v1.29.6-kubeedge1
+ k8s.io/gengo v0.0.0 => k8s.io/gengo v0.29.6
+ k8s.io/heapster => k8s.io/heapster v1.2.0-beta.1 // indirect
+ k8s.io/kms => github.com/kubeedge/kubernetes/staging/src/k8s.io/kms v1.29.6-kubeedge1
+ k8s.io/kube-aggregator => github.com/kubeedge/kubernetes/staging/src/k8s.io/kube-aggregator v1.29.6-kubeedge1
+ k8s.io/kube-controller-manager => github.com/kubeedge/kubernetes/staging/src/k8s.io/kube-controller-manager v1.29.6-kubeedge1
+ k8s.io/kube-proxy => github.com/kubeedge/kubernetes/staging/src/k8s.io/kube-proxy v1.29.6-kubeedge1
+ k8s.io/kube-scheduler => github.com/kubeedge/kubernetes/staging/src/k8s.io/kube-scheduler v1.29.6-kubeedge1
+ k8s.io/kubectl => github.com/kubeedge/kubernetes/staging/src/k8s.io/kubectl v1.29.6-kubeedge1
+ k8s.io/kubelet => github.com/kubeedge/kubernetes/staging/src/k8s.io/kubelet v1.29.6-kubeedge1
+ k8s.io/kubernetes => github.com/kubeedge/kubernetes v1.29.6-kubeedge1
+ k8s.io/legacy-cloud-providers => github.com/kubeedge/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.29.6-kubeedge1
+ k8s.io/metrics => github.com/kubeedge/kubernetes/staging/src/k8s.io/metrics v1.29.6-kubeedge1
+ k8s.io/mount-utils => github.com/kubeedge/kubernetes/staging/src/k8s.io/mount-utils v1.29.6-kubeedge1
+ k8s.io/node-api => github.com/kubeedge/kubernetes/staging/src/k8s.io/node-api v1.29.6-kubeedge1
+ k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.29.6
+ k8s.io/repo-infra => github.com/kubeedge/kubernetes/staging/src/k8s.io/repo-infra v1.29.6-kubeedge1
+ k8s.io/sample-apiserver => github.com/kubeedge/kubernetes/staging/src/k8s.io/sample-apiserver v1.29.6-kubeedge1
+ k8s.io/utils v0.0.0 => k8s.io/utils v0.29.6
+ sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37
+ sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 => sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2
+ sigs.k8s.io/kustomize/api v0.12.1 => sigs.k8s.io/kustomize/api v0.11.4
+ sigs.k8s.io/kustomize/kyaml v0.13.9 => sigs.k8s.io/kustomize/kyaml v0.13.6
+)
diff --git a/staging/src/github.com/kubeedge/api/go.sum b/staging/src/github.com/kubeedge/api/go.sum
new file mode 100644
index 000000000..44c189866
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/go.sum
@@ -0,0 +1,596 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg=
+cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40=
+cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
+cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab h1:UKkYhof1njT1/xq4SEg5z+VpTgjmNeHwPGRQl7takDI=
+github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA=
+github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
+github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
+github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
+github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18=
+github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
+github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
+github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
+github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY=
+github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
+github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
+github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
+github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8=
+github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E=
+github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4=
+github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ=
+github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=
+github.com/container-storage-interface/spec v1.8.0 h1:D0vhF3PLIZwlwZEf2eNbpujGCNwspwTYf2idJRJx4xI=
+github.com/container-storage-interface/spec v1.8.0/go.mod h1:ROLik+GhPslwwWRNFF1KasPzroNARibH2rfz1rkg4H0=
+github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
+github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
+github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs=
+github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
+github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY=
+github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
+github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
+github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
+github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
+github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
+github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
+github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY=
+github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
+github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
+github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
+github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
+github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd h1:iKIUl3SetleviJ07WJdKqdvVBzmfYgaADXHHrONYPOY=
+github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
+github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
+github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY=
+github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw=
+github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
+github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
+github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
+github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8=
+github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
+github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss=
+github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og=
+github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
+github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
+github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A=
+github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4=
+github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
+github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
+github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
+github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
+github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
+github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
+github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
+github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
+github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
+github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
+github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
+github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
+github.com/google/cadvisor v0.48.1 h1:eyYTxKBd+KxI1kh6rst4JSTLUhfHQM34qGpp+0AMlSg=
+github.com/google/cadvisor v0.48.1/go.mod h1:ZkYbiiVdyoqBmI2ahZI8GlmirT78OAOER0z4EQugkxQ=
+github.com/google/cel-go v0.17.7 h1:6ebJFzu1xO2n7TLtN+UBqShGBhlD85bhvglh5DpcfqQ=
+github.com/google/cel-go v0.17.7/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY=
+github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
+github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
+github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
+github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
+github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
+github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
+github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
+github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
+github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
+github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
+github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ=
+github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
+github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI=
+github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/kubeedge/kubernetes v1.29.6-kubeedge1 h1:/iPEoe9uus7vjcIWMt9axgmgBA/S8p4qrMOaMDSJFBg=
+github.com/kubeedge/kubernetes v1.29.6-kubeedge1/go.mod h1:28sDhcb87LX5z3GWAKYmLrhrifxi4W9bEWua4DRTIvk=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/api v1.29.6-kubeedge1 h1:0jx3RK+u4tt/XffNW0BADDB7qtxxOahscd/hZj1F9eA=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/api v1.29.6-kubeedge1/go.mod h1:5QkiNrCD00SOAgo8cbr43DKfW7NqRF9NpGKMO5TnQ8U=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.29.6-kubeedge1 h1:54cUloeueExuz9LjjNrmdX+sZOWAXk+A7OTk7e2pl6U=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.29.6-kubeedge1/go.mod h1:PsITwF8Ox/3gLX4kJsonfI15kansSVgDJ8CMw8QIiNI=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery v1.29.6-kubeedge1 h1:Zz0Ha1H0MNLuv8ID5CTaPzHJBA58V55EVhHNqlQV9k8=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/apimachinery v1.29.6-kubeedge1/go.mod h1:166Zl0XJZbCvhEHvgP+h2m9Gm5xHxyQdgT9CyQRI9gw=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/apiserver v1.29.6-kubeedge1 h1:P4PIXwOxMWDnqxsk4zFfgam0GmwZWWuUeMHyUZfH33k=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/apiserver v1.29.6-kubeedge1/go.mod h1:8oHn4XNhYd8BeMxP6iXndQKKHaWPh8q8hIhKPSKd9KE=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/client-go v1.29.6-kubeedge1 h1:YeSdP1vyX8fTjYpVkt3Ls5NxIXE9Awp4p5P53lATYW8=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/client-go v1.29.6-kubeedge1/go.mod h1:vizyXfZHS/27DtTTjZ5mPXS5geAMGB4kj5iZtIk+GdY=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/cloud-provider v1.29.6-kubeedge1 h1:7P66Cz59URC+K3ZOMaWOI380ASwtmZHuprj3r8ZOz2E=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/cloud-provider v1.29.6-kubeedge1/go.mod h1:N4Rw9sJ86OQXDc5dUFx2MnIOSttMkGPtLZyEoCzry8Q=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/component-base v1.29.6-kubeedge1 h1:lBg/gF1OVCGc2Okb3u61PLfSzlv7OPQfthwBI/OVHlg=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/component-base v1.29.6-kubeedge1/go.mod h1:6oRMFYEkMBlkkBVznsi7HH/kV5F7nhyd6cqXCRCdzdo=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/component-helpers v1.29.6-kubeedge1 h1:n3fwXzn2BlV3ZVsVWn/wQ5yFO0lpzCKeYhc4e+RK8lk=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/component-helpers v1.29.6-kubeedge1/go.mod h1:Qbpzsy+Ip0ceNppIQKfluwnEJ7UDjGmNeHqI4zn8H0E=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/controller-manager v1.29.6-kubeedge1 h1:mlOG2M+Cdlg7wF6ADl1ToS4fdQN4joDACex+hH6Q/sQ=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/controller-manager v1.29.6-kubeedge1/go.mod h1:trkLHxYEftqdW4UG3vwDLSMOV2yZeDGh0dD6jdc32aM=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/cri-api v1.29.6-kubeedge1 h1:UONz+IA6Vu0Z/p4Pi4/VN0L+vP9zz5yRoYopTEwYwoo=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/cri-api v1.29.6-kubeedge1/go.mod h1:9Tgle7RkZOzgRM2VCSvvXZZjsQqOC6dxLtYy6BF+5PE=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/csi-translation-lib v1.29.6-kubeedge1 h1:hFEfsBLlG+CYlmdW9HwVIM0fJKQIJ0ulti1XiAw/MWU=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/csi-translation-lib v1.29.6-kubeedge1/go.mod h1:r3eLoJhpPmT1wErodG1VONmI2pSfblZu1YWg7pWFZHE=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.29.6-kubeedge1 h1:tbnkW0KdVNFfvDh/YaNBA4f8UjcpVr71a9+i2+gkfpE=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.29.6-kubeedge1/go.mod h1:bffvbAY3XpW5Fu6GQjVfvhXpHQSqUfsqeNW8BwdX3LI=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/kms v1.29.6-kubeedge1 h1:Gq+Odx1D/DRI3eR/WmAGIC7leGeg5/dzTZcUnzLCtgY=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/kms v1.29.6-kubeedge1/go.mod h1:4pCpiW+pKMCqRLVoGPw11lrvEriSyd8o7DSvCw2u9vY=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/kube-scheduler v1.29.6-kubeedge1 h1:SLg5n28s1pDVpbgRbb/cf+AFlHWXYqVtFphGwWjp0rs=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/kube-scheduler v1.29.6-kubeedge1/go.mod h1:2vDuSYmBuOfKFZ/R0632vKiomLKN5cLtyxuqA62Rlos=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/kubelet v1.29.6-kubeedge1 h1:VkFhHRBkQgJ0BWrZXKyq6hJargG9e7DBt5WpQJIvL7I=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/kubelet v1.29.6-kubeedge1/go.mod h1:BIgdnnHLOvfduD5ggrkXS1GlUPsRdw5YblFcmhouhgQ=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/mount-utils v1.29.6-kubeedge1 h1:NELwYejbU2qiWJfmfrWqZTa/O2/VjxD1oejHyJAKkqc=
+github.com/kubeedge/kubernetes/staging/src/k8s.io/mount-utils v1.29.6-kubeedge1/go.mod h1:4KmkE88Y4LDYrotr6iqMrolXDcWWY7UqmroXTO/sxFw=
+github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
+github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
+github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
+github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk=
+github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
+github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
+github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
+github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78=
+github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q=
+github.com/mrunalp/fileutils v0.5.1/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
+github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
+github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
+github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
+github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
+github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
+github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
+github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
+github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
+github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
+github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
+github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40=
+github.com/opencontainers/runc v1.1.10/go.mod h1:+/R6+KmDlh+hOO8NkjmgkG9Qzvypzk0yXxAPYYR65+M=
+github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 h1:R5M2qXZiK/mWPMT4VldCOiSL9HIAMuxQZWdG0CSM5+4=
+github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
+github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
+github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
+github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
+github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
+github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
+github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
+github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
+github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
+github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
+github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/seccomp/libseccomp-golang v0.10.0 h1:aA4bp+/Zzi0BnWZ2F1wgNBs5gTpm+na2rWM6M9YjLpY=
+github.com/seccomp/libseccomp-golang v0.10.0/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
+github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
+github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
+github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=
+github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
+github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU=
+github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
+github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
+github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0=
+github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
+github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
+github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
+github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
+go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
+go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0=
+go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ=
+go.etcd.io/etcd/client/v2 v2.305.0 h1:ftQ0nOOHMcbMS3KIaDQ0g5Qcd6bhaBrQT6b89DfwLTs=
+go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
+go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI=
+go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c=
+go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU=
+go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE=
+go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I=
+go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI=
+go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0=
+go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw=
+go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y=
+go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 h1:H2JFgRcGiyHg7H7bwcwaQJYrNFqCqrbTQ8K4p1OvDu8=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ=
+go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg=
+go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY=
+go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw=
+go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc=
+go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0=
+go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
+go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
+go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
+go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
+go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
+go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
+go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
+go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
+go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
+golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw=
+golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
+golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
+golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
+golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
+golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
+golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
+golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
+golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
+google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=
+google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
+google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0=
+google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
+google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8=
+google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
+google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
+k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
+k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
+k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
+k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
+k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37 h1:fAPTNEpzQMOLMGwOHNbUkR2xXTQwMJOZYNx+/mLlOh0=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37/go.mod h1:vfnxT4FXNT8eGvO+xi/DsyC/qHmdujqwrUa1WSspCsk=
+sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
+sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
+sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
+sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
+sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
+sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
diff --git a/staging/src/github.com/kubeedge/api/operations/v1alpha1/doc.go b/staging/src/github.com/kubeedge/api/operations/v1alpha1/doc.go
new file mode 100644
index 000000000..0f4731fc3
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/operations/v1alpha1/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package
+package v1alpha1
diff --git a/staging/src/github.com/kubeedge/api/operations/v1alpha1/imageprepull_types.go b/staging/src/github.com/kubeedge/api/operations/v1alpha1/imageprepull_types.go
new file mode 100644
index 000000000..6e1c50ca6
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/operations/v1alpha1/imageprepull_types.go
@@ -0,0 +1,164 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ api "github.com/kubeedge/api/fsm/v1alpha1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ImagePrePullJob is used to prepull images on edge node.
+// +k8s:openapi-gen=true
+// +kubebuilder:subresource:status
+// +kubebuilder:resource:scope=Cluster
+type ImagePrePullJob struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec represents the specification of the desired behavior of ImagePrePullJob.
+ // +required
+ Spec ImagePrePullJobSpec `json:"spec"`
+
+ // Status represents the status of ImagePrePullJob.
+ // +optional
+ Status ImagePrePullJobStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ImagePrePullJobList is a list of ImagePrePullJob.
+type ImagePrePullJobList struct {
+ // Standard type metadata.
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ metav1.ListMeta `json:"metadata,omitempty"`
+
+ // List of ImagePrePullJob.
+ Items []ImagePrePullJob `json:"items"`
+}
+
+// ImagePrePullSpec represents the specification of the desired behavior of ImagePrePullJob.
+type ImagePrePullJobSpec struct {
+ // ImagePrepullTemplate represents original templates of imagePrePull
+ ImagePrePullTemplate ImagePrePullTemplate `json:"imagePrePullTemplate,omitempty"`
+}
+
+// ImagePrePullTemplate represents original templates of imagePrePull
+type ImagePrePullTemplate struct {
+ // Images is the image list to be prepull
+ Images []string `json:"images,omitempty"`
+
+ // NodeNames is a request to select some specific nodes. If it is non-empty,
+ // the upgrade job simply select these edge nodes to do upgrade operation.
+ // Please note that sets of NodeNames and LabelSelector are ORed.
+ // Users must set one and can only set one.
+ // +optional
+ NodeNames []string `json:"nodeNames,omitempty"`
+ // LabelSelector is a filter to select member clusters by labels.
+ // It must match a node's labels for the NodeUpgradeJob to be operated on that node.
+ // Please note that sets of NodeNames and LabelSelector are ORed.
+ // Users must set one and can only set one.
+ // +optional
+ LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
+
+ // CheckItems specifies the items need to be checked before the task is executed.
+ // The default CheckItems value is disk.
+ // +optional
+ CheckItems []string `json:"checkItems,omitempty"`
+
+ // FailureTolerate specifies the task tolerance failure ratio.
+ // The default FailureTolerate value is 0.1.
+ // +optional
+ FailureTolerate string `json:"failureTolerate,omitempty"`
+
+ // Concurrency specifies the maximum number of edge nodes that can pull images at the same time.
+ // The default Concurrency value is 1.
+ // +optional
+ Concurrency int32 `json:"concurrency,omitempty"`
+
+ // TimeoutSeconds limits the duration of the node prepull job on each edgenode.
+ // Default to 300.
+ // If set to 0, we'll use the default value 300.
+ // +optional
+ TimeoutSeconds *uint32 `json:"timeoutSeconds,omitempty"`
+
+ // ImageSecret specifies the secret for image pull if private registry used.
+ // Use {namespace}/{secretName} in format.
+ // +optional
+ ImageSecret string `json:"imageSecrets,omitempty"`
+
+ // RetryTimes specifies the retry times if image pull failed on each edgenode.
+ // Default to 0
+ // +optional
+ RetryTimes int32 `json:"retryTimes,omitempty"`
+}
+
+// ImagePrePullJobStatus stores the status of ImagePrePullJob.
+// contains images prepull status on multiple edge nodes.
+// +kubebuilder:validation:Type=object
+type ImagePrePullJobStatus struct {
+ // State represents for the state phase of the ImagePrePullJob.
+ // There are five possible state values: "", checking, pulling, successful, failed.
+ State api.State `json:"state,omitempty"`
+
+ // Event represents for the event of the ImagePrePullJob.
+ // There are four possible event values: Init, Check, Pull, TimeOut.
+ Event string `json:"event,omitempty"`
+
+ // Action represents for the action of the ImagePrePullJob.
+ // There are two possible action values: Success, Failure.
+ Action api.Action `json:"action,omitempty"`
+
+ // Reason represents for the reason of the ImagePrePullJob.
+ Reason string `json:"reason,omitempty"`
+
+ // Time represents for the running time of the ImagePrePullJob.
+ Time string `json:"time,omitempty"`
+
+ // Status contains image prepull status for each edge node.
+ Status []ImagePrePullStatus `json:"status,omitempty"`
+}
+
+// ImagePrePullStatus stores image prepull status for each edge node.
+// +kubebuilder:validation:Type=object
+type ImagePrePullStatus struct {
+ // TaskStatus represents the status for each node
+ *TaskStatus `json:"nodeStatus,omitempty"`
+ // ImageStatus represents the prepull status for each image
+ ImageStatus []ImageStatus `json:"imageStatus,omitempty"`
+}
+
+// ImageStatus stores the prepull status for each image.
+// +kubebuilder:validation:Type=object
+type ImageStatus struct {
+ // Image is the name of the image
+ Image string `json:"image,omitempty"`
+
+ // State represents for the state phase of this image pull on the edge node
+ // There are two possible state values: successful, failed.
+ State api.State `json:"state,omitempty"`
+
+ // Reason represents the fail reason if image pull failed
+ // +optional
+ Reason string `json:"reason,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/operations/v1alpha1/register.go b/staging/src/github.com/kubeedge/api/operations/v1alpha1/register.go
new file mode 100644
index 000000000..d78a1013d
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/operations/v1alpha1/register.go
@@ -0,0 +1,73 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// NOTE: Boilerplate only. Ignore this file.
+
+// Package v1alpha1 contains API Schema definitions for the Operations v1alpha1 API group
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=kubeedge/pkg/apis/operations
+// +k8s:defaulter-gen=TypeMeta
+// +groupName=operations.kubeedge.io
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+const (
+ // GroupName is the group name use in this package.
+ GroupName = "operations.kubeedge.io"
+ // Version is the API version.
+ Version = "v1alpha1"
+)
+
+var (
+ // SchemeGroupVersion is the group version used to register these objects.
+ SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// addKnownTypes adds the set of types defined in this package to the supplied scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &NodeUpgradeJob{},
+ &NodeUpgradeJobList{},
+ &ImagePrePullJob{},
+ &ImagePrePullJobList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/operations/v1alpha1/type.go b/staging/src/github.com/kubeedge/api/operations/v1alpha1/type.go
new file mode 100644
index 000000000..83260618c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/operations/v1alpha1/type.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2022 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ api "github.com/kubeedge/api/fsm/v1alpha1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// NodeUpgradeJob is used to upgrade edge node from cloud side.
+// +k8s:openapi-gen=true
+// +kubebuilder:subresource:status
+// +kubebuilder:resource:scope=Cluster
+type NodeUpgradeJob struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // Specification of the desired behavior of NodeUpgradeJob.
+ // +optional
+ Spec NodeUpgradeJobSpec `json:"spec,omitempty"`
+ // Most recently observed status of the NodeUpgradeJob.
+ // +optional
+ Status NodeUpgradeJobStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// NodeUpgradeJobList is a list of NodeUpgradeJob.
+type NodeUpgradeJobList struct {
+ // Standard type metadata.
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ metav1.ListMeta `json:"metadata,omitempty"`
+
+ // List of NodeUpgradeJobs.
+ Items []NodeUpgradeJob `json:"items"`
+}
+
+// NodeUpgradeJobSpec is the specification of the desired behavior of the NodeUpgradeJob.
+type NodeUpgradeJobSpec struct {
+ // +Required: Version is the EdgeCore version to upgrade.
+ Version string `json:"version,omitempty"`
+ // TimeoutSeconds limits the duration of the node upgrade job.
+ // Default to 300.
+ // If set to 0, we'll use the default value 300.
+ // +optional
+ TimeoutSeconds *uint32 `json:"timeoutSeconds,omitempty"`
+ // NodeNames is a request to select some specific nodes. If it is non-empty,
+ // the upgrade job simply select these edge nodes to do upgrade operation.
+ // Please note that sets of NodeNames and LabelSelector are ORed.
+ // Users must set one and can only set one.
+ // +optional
+ NodeNames []string `json:"nodeNames,omitempty"`
+ // LabelSelector is a filter to select member clusters by labels.
+ // It must match a node's labels for the NodeUpgradeJob to be operated on that node.
+ // Please note that sets of NodeNames and LabelSelector are ORed.
+ // Users must set one and can only set one.
+ // +optional
+ LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
+ // Image specifies a container image name, the image contains: keadm and edgecore.
+ // keadm is used as upgradetool, to install the new version of edgecore.
+ // The image name consists of registry hostname and repository name,
+ // if it includes the tag or digest, the tag or digest will be overwritten by Version field above.
+ // If the registry hostname is empty, docker.io will be used as default.
+ // The default image name is: kubeedge/installation-package.
+ // +optional
+ Image string `json:"image,omitempty"`
+ // Concurrency specifies the max number of edge nodes that can be upgraded at the same time.
+ // The default Concurrency value is 1.
+ // +optional
+ Concurrency int32 `json:"concurrency,omitempty"`
+
+ // CheckItems specifies the items need to be checked before the task is executed.
+ // The default CheckItems value is nil.
+ // +optional
+ CheckItems []string `json:"checkItems,omitempty"`
+
+ // FailureTolerate specifies the task tolerance failure ratio.
+ // The default FailureTolerate value is 0.1.
+ // +optional
+ FailureTolerate string `json:"failureTolerate,omitempty"`
+}
+
+// NodeUpgradeJobStatus stores the status of NodeUpgradeJob.
+// contains multiple edge nodes upgrade status.
+// +kubebuilder:validation:Type=object
+type NodeUpgradeJobStatus struct {
+ // State represents for the state phase of the NodeUpgradeJob.
+ // There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
+ State api.State `json:"state,omitempty"`
+
+ // CurrentVersion represents for the current status of the EdgeCore.
+ CurrentVersion string `json:"currentVersion,omitempty"`
+ // HistoricVersion represents for the historic status of the EdgeCore.
+ HistoricVersion string `json:"historicVersion,omitempty"`
+ // Event represents for the event of the ImagePrePullJob.
+ // There are six possible event values: Init, Check, BackUp, Upgrade, TimeOut, Rollback.
+ Event string `json:"event,omitempty"`
+ // Action represents for the action of the ImagePrePullJob.
+ // There are two possible action values: Success, Failure.
+ Action api.Action `json:"action,omitempty"`
+ // Reason represents for the reason of the ImagePrePullJob.
+ Reason string `json:"reason,omitempty"`
+ // Time represents for the running time of the ImagePrePullJob.
+ Time string `json:"time,omitempty"`
+ // Status contains upgrade Status for each edge node.
+ Status []TaskStatus `json:"nodeStatus,omitempty"`
+}
+
+// TaskStatus stores the status of Upgrade for each edge node.
+// +kubebuilder:validation:Type=object
+type TaskStatus struct {
+ // NodeName is the name of edge node.
+ NodeName string `json:"nodeName,omitempty"`
+ // State represents for the upgrade state phase of the edge node.
+ // There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
+ State api.State `json:"state,omitempty"`
+ // Event represents for the event of the ImagePrePullJob.
+ // There are three possible event values: Init, Check, Pull.
+ Event string `json:"event,omitempty"`
+ // Action represents for the action of the ImagePrePullJob.
+ // There are three possible action values: Success, Failure, TimeOut.
+ Action api.Action `json:"action,omitempty"`
+ // Reason represents for the reason of the ImagePrePullJob.
+ Reason string `json:"reason,omitempty"`
+ // Time represents for the running time of the ImagePrePullJob.
+ Time string `json:"time,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/operations/v1alpha1/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/operations/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..bf26dabe8
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/operations/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,345 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePrePullJob) DeepCopyInto(out *ImagePrePullJob) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJob.
+func (in *ImagePrePullJob) DeepCopy() *ImagePrePullJob {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePrePullJob)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ImagePrePullJob) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePrePullJobList) DeepCopyInto(out *ImagePrePullJobList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ImagePrePullJob, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJobList.
+func (in *ImagePrePullJobList) DeepCopy() *ImagePrePullJobList {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePrePullJobList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ImagePrePullJobList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePrePullJobSpec) DeepCopyInto(out *ImagePrePullJobSpec) {
+ *out = *in
+ in.ImagePrePullTemplate.DeepCopyInto(&out.ImagePrePullTemplate)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJobSpec.
+func (in *ImagePrePullJobSpec) DeepCopy() *ImagePrePullJobSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePrePullJobSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePrePullJobStatus) DeepCopyInto(out *ImagePrePullJobStatus) {
+ *out = *in
+ if in.Status != nil {
+ in, out := &in.Status, &out.Status
+ *out = make([]ImagePrePullStatus, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJobStatus.
+func (in *ImagePrePullJobStatus) DeepCopy() *ImagePrePullJobStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePrePullJobStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePrePullStatus) DeepCopyInto(out *ImagePrePullStatus) {
+ *out = *in
+ if in.TaskStatus != nil {
+ in, out := &in.TaskStatus, &out.TaskStatus
+ *out = new(TaskStatus)
+ **out = **in
+ }
+ if in.ImageStatus != nil {
+ in, out := &in.ImageStatus, &out.ImageStatus
+ *out = make([]ImageStatus, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullStatus.
+func (in *ImagePrePullStatus) DeepCopy() *ImagePrePullStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePrePullStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImagePrePullTemplate) DeepCopyInto(out *ImagePrePullTemplate) {
+ *out = *in
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NodeNames != nil {
+ in, out := &in.NodeNames, &out.NodeNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.LabelSelector != nil {
+ in, out := &in.LabelSelector, &out.LabelSelector
+ *out = new(v1.LabelSelector)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.CheckItems != nil {
+ in, out := &in.CheckItems, &out.CheckItems
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(uint32)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullTemplate.
+func (in *ImagePrePullTemplate) DeepCopy() *ImagePrePullTemplate {
+ if in == nil {
+ return nil
+ }
+ out := new(ImagePrePullTemplate)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImageStatus) DeepCopyInto(out *ImageStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus.
+func (in *ImageStatus) DeepCopy() *ImageStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ImageStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeUpgradeJob) DeepCopyInto(out *NodeUpgradeJob) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJob.
+func (in *NodeUpgradeJob) DeepCopy() *NodeUpgradeJob {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeUpgradeJob)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *NodeUpgradeJob) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeUpgradeJobList) DeepCopyInto(out *NodeUpgradeJobList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NodeUpgradeJob, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJobList.
+func (in *NodeUpgradeJobList) DeepCopy() *NodeUpgradeJobList {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeUpgradeJobList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *NodeUpgradeJobList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeUpgradeJobSpec) DeepCopyInto(out *NodeUpgradeJobSpec) {
+ *out = *in
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(uint32)
+ **out = **in
+ }
+ if in.NodeNames != nil {
+ in, out := &in.NodeNames, &out.NodeNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.LabelSelector != nil {
+ in, out := &in.LabelSelector, &out.LabelSelector
+ *out = new(v1.LabelSelector)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.CheckItems != nil {
+ in, out := &in.CheckItems, &out.CheckItems
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJobSpec.
+func (in *NodeUpgradeJobSpec) DeepCopy() *NodeUpgradeJobSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeUpgradeJobSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeUpgradeJobStatus) DeepCopyInto(out *NodeUpgradeJobStatus) {
+ *out = *in
+ if in.Status != nil {
+ in, out := &in.Status, &out.Status
+ *out = make([]TaskStatus, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJobStatus.
+func (in *NodeUpgradeJobStatus) DeepCopy() *NodeUpgradeJobStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeUpgradeJobStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskStatus) DeepCopyInto(out *TaskStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus.
+func (in *TaskStatus) DeepCopy() *TaskStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskStatus)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/policy/v1alpha1/doc.go b/staging/src/github.com/kubeedge/api/policy/v1alpha1/doc.go
new file mode 100644
index 000000000..2a61807f1
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/policy/v1alpha1/doc.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package v1alpha1 is the v1alpha1 version of the API.
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// +groupName=policy.kubeedge.io
+package v1alpha1
diff --git a/staging/src/github.com/kubeedge/api/policy/v1alpha1/register.go b/staging/src/github.com/kubeedge/api/policy/v1alpha1/register.go
new file mode 100644
index 000000000..103bc4fdd
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/policy/v1alpha1/register.go
@@ -0,0 +1,61 @@
+// Copyright 2023 The KubeEdge Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+const (
+ // GroupName is the group name use in this package.
+ GroupName = "policy.kubeedge.io"
+ // Version is the API version.
+ Version = "v1alpha1"
+)
+
+var (
+ // SchemeGroupVersion is the group version used to register these objects.
+ SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// addKnownTypes adds the set of types defined in this package to the supplied scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &ServiceAccountAccess{},
+ &ServiceAccountAccessList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/policy/v1alpha1/serviceaccountaccess_types.go b/staging/src/github.com/kubeedge/api/policy/v1alpha1/serviceaccountaccess_types.go
new file mode 100644
index 000000000..c052bb82b
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/policy/v1alpha1/serviceaccountaccess_types.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ corev1 "k8s.io/api/core/v1"
+ rbac "k8s.io/api/rbac/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
+// +kubebuilder:subresource:status
+// +kubebuilder:resource:shortName=saaccess
+
+// ServiceAccountAccess is the Schema for the ServiceAccountAccess API
+type ServiceAccountAccess struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec represents the specification of rbac.
+ // +required
+ Spec AccessSpec `json:"spec,omitempty"`
+
+ // Status represents the node list which store the rules.
+ // +optional
+ Status AccessStatus `json:"status,omitempty"`
+}
+
+// AccessStatus defines the observed state of ServiceAccountAccess
+type AccessStatus struct {
+ // NodeList represents the node name which store the rules.
+ NodeList []string `json:"nodeList,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ServiceAccountAccessList contains a list of ServiceAccountAccess
+type ServiceAccountAccessList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []ServiceAccountAccess `json:"items"`
+}
+
+// AccessSpec defines the desired state of AccessSpec
+type AccessSpec struct {
+ // ServiceAccount is one-to-one corresponding relations with the serviceaccountaccess.
+ ServiceAccount corev1.ServiceAccount `json:"serviceAccount,omitempty"`
+ // ServiceAccountUID is the uid of serviceaccount.
+ ServiceAccountUID types.UID `json:"serviceAccountUid,omitempty"`
+ // AccessRoleBinding represents rbac rolebinding plus detailed role info.
+ AccessRoleBinding []AccessRoleBinding `json:"accessRoleBinding,omitempty"`
+ // AccessClusterRoleBinding represents rbac ClusterRoleBinding plus detailed ClusterRole info.
+ AccessClusterRoleBinding []AccessClusterRoleBinding `json:"accessClusterRoleBinding,omitempty"`
+}
+
+// AccessRoleBinding represents rbac rolebinding plus detailed role info.
+type AccessRoleBinding struct {
+ // RoleBinding represents rbac rolebinding.
+ RoleBinding rbac.RoleBinding `json:"roleBinding,omitempty"`
+ // Rules contains role rules.
+ Rules []rbac.PolicyRule `json:"rules,omitempty"`
+}
+
+// AccessClusterRoleBinding represents rbac ClusterRoleBinding plus detailed ClusterRole info.
+type AccessClusterRoleBinding struct {
+ // ClusterRoleBinding represents rbac ClusterRoleBinding.
+ ClusterRoleBinding rbac.ClusterRoleBinding `json:"clusterRoleBinding,omitempty"`
+ // Rules contains role rules.
+ Rules []rbac.PolicyRule `json:"rules,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/policy/v1alpha1/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/policy/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..0acd0afd6
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/policy/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,188 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/api/rbac/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AccessClusterRoleBinding) DeepCopyInto(out *AccessClusterRoleBinding) {
+ *out = *in
+ in.ClusterRoleBinding.DeepCopyInto(&out.ClusterRoleBinding)
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]v1.PolicyRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessClusterRoleBinding.
+func (in *AccessClusterRoleBinding) DeepCopy() *AccessClusterRoleBinding {
+ if in == nil {
+ return nil
+ }
+ out := new(AccessClusterRoleBinding)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AccessRoleBinding) DeepCopyInto(out *AccessRoleBinding) {
+ *out = *in
+ in.RoleBinding.DeepCopyInto(&out.RoleBinding)
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]v1.PolicyRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessRoleBinding.
+func (in *AccessRoleBinding) DeepCopy() *AccessRoleBinding {
+ if in == nil {
+ return nil
+ }
+ out := new(AccessRoleBinding)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AccessSpec) DeepCopyInto(out *AccessSpec) {
+ *out = *in
+ in.ServiceAccount.DeepCopyInto(&out.ServiceAccount)
+ if in.AccessRoleBinding != nil {
+ in, out := &in.AccessRoleBinding, &out.AccessRoleBinding
+ *out = make([]AccessRoleBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.AccessClusterRoleBinding != nil {
+ in, out := &in.AccessClusterRoleBinding, &out.AccessClusterRoleBinding
+ *out = make([]AccessClusterRoleBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessSpec.
+func (in *AccessSpec) DeepCopy() *AccessSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(AccessSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AccessStatus) DeepCopyInto(out *AccessStatus) {
+ *out = *in
+ if in.NodeList != nil {
+ in, out := &in.NodeList, &out.NodeList
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessStatus.
+func (in *AccessStatus) DeepCopy() *AccessStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(AccessStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ServiceAccountAccess) DeepCopyInto(out *ServiceAccountAccess) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountAccess.
+func (in *ServiceAccountAccess) DeepCopy() *ServiceAccountAccess {
+ if in == nil {
+ return nil
+ }
+ out := new(ServiceAccountAccess)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ServiceAccountAccess) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ServiceAccountAccessList) DeepCopyInto(out *ServiceAccountAccessList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ServiceAccountAccess, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountAccessList.
+func (in *ServiceAccountAccessList) DeepCopy() *ServiceAccountAccessList {
+ if in == nil {
+ return nil
+ }
+ out := new(ServiceAccountAccessList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ServiceAccountAccessList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/doc.go b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/doc.go
new file mode 100644
index 000000000..7d097dcb1
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/doc.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2020 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// Package v1alpha1 is the v1alpha1 version of the API.
+// +groupName=reliablesyncs.kubeedge.io
+package v1alpha1
diff --git a/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/register.go b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/register.go
new file mode 100644
index 000000000..d68054406
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/register.go
@@ -0,0 +1,63 @@
+// Copyright 2020 The KubeEdge Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+const (
+ // GroupName is the group name use in this package.
+ GroupName = "reliablesyncs.kubeedge.io"
+ // Version is the API version.
+ Version = "v1alpha1"
+)
+
+var (
+ // SchemeGroupVersion is the group version used to register these objects.
+ SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// addKnownTypes adds the set of types defined in this package to the supplied scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &ObjectSync{},
+ &ObjectSyncList{},
+ &ClusterObjectSync{},
+ &ClusterObjectSyncList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/type.go b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/type.go
new file mode 100644
index 000000000..77cf1b6f9
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/type.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2020 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ClusterObjectSync stores the state of the cluster level, nonNamespaced object that was successfully persisted to the edge node.
+// ClusterObjectSync name is a concatenation of the node name which receiving the object and the object UUID.
+// +k8s:openapi-gen=true
+// +kubebuilder:subresource:status
+// +kubebuilder:resource:scope=Cluster
+type ClusterObjectSync struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec ObjectSyncSpec `json:"spec,omitempty"`
+ Status ObjectSyncStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ClusterObjectSyncList is a list of ObjectSync.
+type ClusterObjectSyncList struct {
+ // Standard type metadata.
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ metav1.ListMeta `json:"metadata,omitempty"`
+
+ // List of ClusterObjectSync.
+ Items []ClusterObjectSync `json:"items"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ObjectSync stores the state of the namespaced object that was successfully persisted to the edge node.
+// ObjectSync name is a concatenation of the node name which receiving the object and the object UUID.
+// +k8s:openapi-gen=true
+// +kubebuilder:subresource:status
+type ObjectSync struct {
+ // Standard Kubernetes type metadata.
+ metav1.TypeMeta `json:",inline"`
+ // Standard Kubernetes object's metadata.
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec ObjectSyncSpec `json:"spec,omitempty"`
+ Status ObjectSyncStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ObjectSyncList is a list of ObjectSync.
+type ObjectSyncList struct {
+ // Standard type metadata.
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ metav1.ListMeta `json:"metadata,omitempty"`
+
+ // List of ObjectSync.
+ Items []ObjectSync `json:"items"`
+}
+
+// ObjectSyncSpec stores the details of objects that persist to the edge.
+type ObjectSyncSpec struct {
+ // ObjectAPIVersion is the APIVersion of the object
+ // that was successfully persist to the edge node.
+ ObjectAPIVersion string `json:"objectAPIVersion,omitempty"`
+ // ObjectType is the kind of the object
+ // that was successfully persist to the edge node.
+ ObjectKind string `json:"objectKind,omitempty"`
+ // ObjectName is the name of the object
+ // that was successfully persist to the edge node.
+ ObjectName string `json:"objectName,omitempty"`
+}
+
+// ObjectSyncStatus stores the resourceversion of objects that persist to the edge.
+type ObjectSyncStatus struct {
+ // ObjectResourceVersion is the resourceversion of the object
+ // that was successfully persist to the edge node.
+ ObjectResourceVersion string `json:"objectResourceVersion,omitempty"`
+}
diff --git a/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..6da2e1fa0
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/reliablesyncs/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,180 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterObjectSync) DeepCopyInto(out *ClusterObjectSync) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ out.Spec = in.Spec
+ out.Status = in.Status
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObjectSync.
+func (in *ClusterObjectSync) DeepCopy() *ClusterObjectSync {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterObjectSync)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ClusterObjectSync) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterObjectSyncList) DeepCopyInto(out *ClusterObjectSyncList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterObjectSync, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObjectSyncList.
+func (in *ClusterObjectSyncList) DeepCopy() *ClusterObjectSyncList {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterObjectSyncList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ClusterObjectSyncList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ObjectSync) DeepCopyInto(out *ObjectSync) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ out.Spec = in.Spec
+ out.Status = in.Status
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSync.
+func (in *ObjectSync) DeepCopy() *ObjectSync {
+ if in == nil {
+ return nil
+ }
+ out := new(ObjectSync)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ObjectSync) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ObjectSyncList) DeepCopyInto(out *ObjectSyncList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ObjectSync, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSyncList.
+func (in *ObjectSyncList) DeepCopy() *ObjectSyncList {
+ if in == nil {
+ return nil
+ }
+ out := new(ObjectSyncList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ObjectSyncList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ObjectSyncSpec) DeepCopyInto(out *ObjectSyncSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSyncSpec.
+func (in *ObjectSyncSpec) DeepCopy() *ObjectSyncSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ObjectSyncSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ObjectSyncStatus) DeepCopyInto(out *ObjectSyncStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSyncStatus.
+func (in *ObjectSyncStatus) DeepCopy() *ObjectSyncStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ObjectSyncStatus)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/rules/v1/doc.go b/staging/src/github.com/kubeedge/api/rules/v1/doc.go
new file mode 100644
index 000000000..8e912c01c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/rules/v1/doc.go
@@ -0,0 +1,4 @@
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package
+// +groupName=rules.kubeedge.io
+package v1
diff --git a/staging/src/github.com/kubeedge/api/rules/v1/register.go b/staging/src/github.com/kubeedge/api/rules/v1/register.go
new file mode 100644
index 000000000..9dbc37fda
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/rules/v1/register.go
@@ -0,0 +1,71 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package v1 contains API Schema definitions for the rules v1 API group
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=kubeedge/cloud/pkg/apis/rules
+// +k8s:defaulter-gen=TypeMeta
+// +groupName=rules.kubeedge.io
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+const (
+ // GroupName is the group name use in this package.
+ GroupName = "rules.kubeedge.io"
+ // Version is the API version.
+ Version = "v1"
+)
+
+var (
+ // SchemeGroupVersion is the group version used to register these objects.
+ SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes)
+}
+
+// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// addKnownTypes adds the set of types defined in this package to the supplied scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Rule{},
+ &RuleList{},
+ &RuleEndpoint{},
+ &RuleEndpointList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/staging/src/github.com/kubeedge/api/rules/v1/types.go b/staging/src/github.com/kubeedge/api/rules/v1/types.go
new file mode 100644
index 000000000..ebefc975d
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/rules/v1/types.go
@@ -0,0 +1,93 @@
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// RuleSpec defines rule of message delivery.
+type RuleSpec struct {
+ // Source represents where the messages come from. Its value is the same with ruleendpoint name.
+ // For example, rest or eventbus.
+ Source string `json:"source"`
+ // SourceResource is a map representing the resource info of source. For rest
+ // ruleendpoint type its value is {"path":"/a/b"}. For eventbus ruleendpoint type its
+ // value is {"topic":"<user define string>","node_name":"xxxx"}
+ SourceResource map[string]string `json:"sourceResource"`
+ // Target represents where the messages go to. its value is the same with ruleendpoint name.
+ // For example, eventbus or api or servicebus.
+ Target string `json:"target"`
+ // targetResource is a map representing the resource info of target. For api
+ // ruleendpoint type its value is {"resource":"http://a.com"}. For eventbus ruleendpoint
+ // type its value is {"topic":"/xxxx"}. For servicebus ruleendpoint type its value is {"path":"/request_path"}.
+ TargetResource map[string]string `json:"targetResource"`
+}
+
+// RuleStatus defines status of message delivery.
+type RuleStatus struct {
+ // SuccessMessages represents success count of message delivery of rule.
+ SuccessMessages int64 `json:"successMessages"`
+ // FailMessages represents failed count of message delivery of rule.
+ FailMessages int64 `json:"failMessages"`
+ // Errors represents failed reasons of message delivery of rule.
+ Errors []string `json:"errors"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// Rule is the Schema for the rules API
+// +k8s:openapi-gen=true
+type Rule struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec RuleSpec `json:"spec"`
+ Status RuleStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// RuleList contains a list of Rule
+type RuleList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []Rule `json:"items"`
+}
+
+// RuleEndpointSpec defines endpoint of rule.
+type RuleEndpointSpec struct {
+ // RuleEndpointType defines type: servicebus, rest
+ RuleEndpointType RuleEndpointTypeDef `json:"ruleEndpointType"`
+ // Properties: properties of endpoint. for example:
+ // servicebus:
+ // {"service_port":"8080"}
+ Properties map[string]string `json:"properties,omitempty"`
+}
+
+// RuleEndpointTypeDef defines ruleEndpoint's type
+type RuleEndpointTypeDef string
+
+// RuleEndpoint's types.
+const (
+ RuleEndpointTypeRest RuleEndpointTypeDef = "rest"
+ RuleEndpointTypeEventBus RuleEndpointTypeDef = "eventbus"
+ RuleEndpointTypeServiceBus RuleEndpointTypeDef = "servicebus"
+)
+
+// +genclient
+// +genclient:noStatus
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// RuleEndpoint is the Schema for the ruleendpoints API
+// +k8s:openapi-gen=true
+type RuleEndpoint struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec RuleEndpointSpec `json:"spec"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// RuleEndpointList contains a list of RuleEndpoint
+type RuleEndpointList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []RuleEndpoint `json:"items"`
+}
diff --git a/staging/src/github.com/kubeedge/api/rules/v1/zz_generated.deepcopy.go b/staging/src/github.com/kubeedge/api/rules/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..b7316db9b
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/rules/v1/zz_generated.deepcopy.go
@@ -0,0 +1,221 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Rule) DeepCopyInto(out *Rule) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
+func (in *Rule) DeepCopy() *Rule {
+ if in == nil {
+ return nil
+ }
+ out := new(Rule)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Rule) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RuleEndpoint) DeepCopyInto(out *RuleEndpoint) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleEndpoint.
+func (in *RuleEndpoint) DeepCopy() *RuleEndpoint {
+ if in == nil {
+ return nil
+ }
+ out := new(RuleEndpoint)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *RuleEndpoint) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RuleEndpointList) DeepCopyInto(out *RuleEndpointList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RuleEndpoint, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleEndpointList.
+func (in *RuleEndpointList) DeepCopy() *RuleEndpointList {
+ if in == nil {
+ return nil
+ }
+ out := new(RuleEndpointList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *RuleEndpointList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RuleEndpointSpec) DeepCopyInto(out *RuleEndpointSpec) {
+ *out = *in
+ if in.Properties != nil {
+ in, out := &in.Properties, &out.Properties
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleEndpointSpec.
+func (in *RuleEndpointSpec) DeepCopy() *RuleEndpointSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(RuleEndpointSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RuleList) DeepCopyInto(out *RuleList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Rule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList.
+func (in *RuleList) DeepCopy() *RuleList {
+ if in == nil {
+ return nil
+ }
+ out := new(RuleList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *RuleList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RuleSpec) DeepCopyInto(out *RuleSpec) {
+ *out = *in
+ if in.SourceResource != nil {
+ in, out := &in.SourceResource, &out.SourceResource
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.TargetResource != nil {
+ in, out := &in.TargetResource, &out.TargetResource
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSpec.
+func (in *RuleSpec) DeepCopy() *RuleSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(RuleSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RuleStatus) DeepCopyInto(out *RuleStatus) {
+ *out = *in
+ if in.Errors != nil {
+ in, out := &in.Errors, &out.Errors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatus.
+func (in *RuleStatus) DeepCopy() *RuleStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(RuleStatus)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/staging/src/github.com/kubeedge/api/util/flag/flags.go b/staging/src/github.com/kubeedge/api/util/flag/flags.go
new file mode 100644
index 000000000..f278241ec
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/flag/flags.go
@@ -0,0 +1,129 @@
+/*
+Copyright 2020 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package flag
+
+import (
+ "fmt"
+ "os"
+ "strconv"
+
+ "github.com/spf13/pflag"
+ "k8s.io/klog/v2"
+ "sigs.k8s.io/yaml"
+)
+
+type ConfigValue int
+
+const (
+ ConfigFalse ConfigValue = 0
+ ConfigTrue ConfigValue = 1
+)
+
+func (m *ConfigValue) IsBoolFlag() bool {
+ return true
+}
+
+func (m *ConfigValue) Get() interface{} {
+ return ConfigValue(*m)
+}
+
+func (m *ConfigValue) Set(s string) error {
+ boolVal, err := strconv.ParseBool(s)
+ if boolVal {
+ *m = ConfigTrue
+ } else {
+ *m = ConfigFalse
+ }
+ return err
+}
+
+func (m *ConfigValue) String() string {
+ return fmt.Sprintf("%v", bool(*m == ConfigTrue))
+}
+
+// The type of the flag as required by the pflag.Value interface
+func (m *ConfigValue) Type() string {
+ return "config"
+}
+
+func ConfigVar(p *ConfigValue, name string, value ConfigValue, usage string) {
+ *p = value
+ pflag.Var(p, name, usage)
+ pflag.Lookup(name).NoOptDefVal = "true"
+}
+
+func Config(name string, value ConfigValue, usage string) *ConfigValue {
+ p := new(ConfigValue)
+ ConfigVar(p, name, value, usage)
+ return p
+}
+
+const minConfigFlagName = "minconfig"
+const defaultConfigFlagName = "defaultconfig"
+
+var (
+ minConfigFlag = Config(minConfigFlagName, ConfigFalse, "Print min configuration for reference, users can refer to it to create their own configuration files, it is suitable for beginners.")
+ defaultConfigFlag = Config(defaultConfigFlagName, ConfigFalse, "Print default configuration for reference, users can refer to it to create their own configuration files, it is suitable for advanced users.")
+)
+
+// AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the
+// same value as the global flags.
+func AddFlags(fs *pflag.FlagSet) {
+ fs.AddFlag(pflag.Lookup(minConfigFlagName))
+ fs.AddFlag(pflag.Lookup(defaultConfigFlagName))
+}
+
+// PrintMinConfigAndExitIfRequested will check if the -minconfig flag was passed
+// and, if so, print the min config and exit.
+func PrintMinConfigAndExitIfRequested(config interface{}) {
+ if *minConfigFlag == ConfigTrue {
+ data, err := yaml.Marshal(config)
+ if err != nil {
+ fmt.Printf("Marshal min config to yaml error %v\n", err)
+ os.Exit(1)
+ }
+ fmt.Println("# With --minconfig , you can easily used this configurations as reference.")
+ fmt.Println("# It's useful to users who are new to KubeEdge, and you can modify/create your own configs accordingly. ")
+ fmt.Println("# This configuration is suitable for beginners.")
+ fmt.Printf("\n%v\n\n", string(data))
+ os.Exit(0)
+ }
+}
+
+// PrintDefaultConfigAndExitIfRequested will check if the --defaultconfig flag was passed
+// and, if so, print the default config and exit.
+func PrintDefaultConfigAndExitIfRequested(config interface{}) {
+ if *defaultConfigFlag == ConfigTrue {
+ data, err := yaml.Marshal(config)
+ if err != nil {
+ fmt.Printf("Marshal default config to yaml error %v\n", err)
+ os.Exit(1)
+ }
+ fmt.Println("# With --defaultconfig flag, users can easily get a default full config file as reference, with all fields (and field descriptions) included and default values set. ")
+ fmt.Println("# Users can modify/create their own configs accordingly as reference. ")
+ fmt.Println("# Because it is a full configuration, it is more suitable for advanced users.")
+ fmt.Printf("\n%v\n\n", string(data))
+ os.Exit(0)
+ }
+}
+
+// PrintFlags logs the flags in the flagset
+func PrintFlags(flags *pflag.FlagSet) {
+ flags.VisitAll(func(flag *pflag.Flag) {
+ klog.V(1).Infof("FLAG: --%s=%q", flag.Name, flag.Value)
+ })
+}
diff --git a/staging/src/github.com/kubeedge/api/util/fsm/fsm.go b/staging/src/github.com/kubeedge/api/util/fsm/fsm.go
new file mode 100644
index 000000000..96bcdcf35
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/fsm/fsm.go
@@ -0,0 +1,139 @@
+/*
+Copyright 2023 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package fsm
+
+import (
+ "fmt"
+
+ "k8s.io/klog/v2"
+
+ api "github.com/kubeedge/api/fsm/v1alpha1"
+)
+
+type FSM struct {
+ id string
+ nodeName string
+ lastState api.State
+ currentFunc func(id, nodeName string) (api.State, error)
+ updateFunc func(id, nodeName string, state api.State, event Event) error
+ guard map[string]api.State
+ stageSequence map[api.State]api.State
+}
+
+func (F *FSM) NodeName(nodeName string) *FSM {
+ F.nodeName = nodeName
+ return F
+}
+
+type Event struct {
+ Type string
+ Action api.Action
+ Msg string
+ ExternalMessage string
+}
+
+func (e Event) UniqueName() string {
+ return e.Type + "/" + string(e.Action)
+}
+
+func (F *FSM) ID(id string) *FSM {
+ F.id = id
+ return F
+}
+
+func (F *FSM) LastState(lastState api.State) {
+ F.lastState = lastState
+}
+
+func (F *FSM) CurrentFunc(currentFunc func(id, nodeName string) (api.State, error)) *FSM {
+ F.currentFunc = currentFunc
+ return F
+}
+
+func (F *FSM) UpdateFunc(updateFunc func(id, nodeName string, state api.State, event Event) error) *FSM {
+ F.updateFunc = updateFunc
+ return F
+}
+
+func (F *FSM) Guard(guard map[string]api.State) *FSM {
+ F.guard = guard
+ return F
+}
+
+func (F *FSM) StageSequence(stageSequence map[api.State]api.State) *FSM {
+ F.stageSequence = stageSequence
+ return F
+}
+
+func (F *FSM) CurrentState() (api.State, error) {
+ if F.currentFunc == nil {
+ return "", fmt.Errorf("currentFunc is nil")
+ }
+ return F.currentFunc(F.id, F.nodeName)
+}
+
+func (F *FSM) transitCheck(event Event) (api.State, api.State, error) {
+ currentState, err := F.CurrentState()
+ if err != nil {
+ return "", "", err
+ }
+ if F.guard == nil {
+ return "", "", fmt.Errorf("guard is nil ")
+ }
+ nextState, ok := F.guard[string(currentState)+"/"+event.UniqueName()]
+ if !ok {
+ return "", "", fmt.Errorf(string(currentState)+"/"+event.UniqueName(), " unsupported event")
+ }
+ return currentState, nextState, nil
+}
+
+func (F *FSM) AllowTransit(event Event) error {
+ _, _, err := F.transitCheck(event)
+ return err
+}
+
+func (F *FSM) Transit(event Event) error {
+ currentState, nextState, err := F.transitCheck(event)
+ if err != nil {
+ return err
+ }
+ if F.updateFunc == nil {
+ return fmt.Errorf("updateFunc is nil")
+ }
+ err = F.updateFunc(F.id, F.nodeName, nextState, event)
+ if err != nil {
+ return err
+ }
+ F.lastState = currentState
+ return nil
+}
+
+func TaskFinish(state api.State) bool {
+ return state == api.TaskFailed || state == api.TaskSuccessful
+}
+
+func (F *FSM) TaskStagCompleted(state api.State) bool {
+ currentState, err := F.CurrentState()
+ if err != nil {
+ klog.Errorf("get %s current state failed: %s", F.id, err.Error())
+ return false
+ }
+ if F.stageSequence[currentState] == state || TaskFinish(state) {
+ return true
+ }
+ return false
+}
diff --git a/staging/src/github.com/kubeedge/api/util/pass-through/pass_through.go b/staging/src/github.com/kubeedge/api/util/pass-through/pass_through.go
new file mode 100644
index 000000000..2ce465afa
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/pass-through/pass_through.go
@@ -0,0 +1,22 @@
+package passthrough
+
+type passRequest string
+
+const (
+ versionRequest passRequest = "/version::get"
+ healthRequest passRequest = "/healthz::get" // deprecated: TODO remove this once it is gone
+ liveRequest passRequest = "/livez::get"
+ readyRequest passRequest = "/readyz::get"
+)
+
+var passThroughMap = map[passRequest]bool{
+ versionRequest: true,
+ healthRequest: true,
+ liveRequest: true,
+ readyRequest: true,
+}
+
+// IsPassThroughPath determining whether the uri can be passed through
+func IsPassThroughPath(path, verb string) bool {
+ return passThroughMap[passRequest(path+"::"+verb)]
+}
diff --git a/staging/src/github.com/kubeedge/api/util/pass-through/pass_through_test.go b/staging/src/github.com/kubeedge/api/util/pass-through/pass_through_test.go
new file mode 100644
index 000000000..04a9ec555
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/pass-through/pass_through_test.go
@@ -0,0 +1,61 @@
+package passthrough
+
+import "testing"
+
+func TestIsPassThroughPath(t *testing.T) {
+ tests := []struct {
+ name string
+ path string
+ verb string
+ want bool
+ }{
+ {
+ name: "/version::post is not pass through path",
+ path: "/version",
+ verb: "post",
+ want: false,
+ }, {
+ name: "/version::get is pass through path",
+ path: "/version",
+ verb: "get",
+ want: true,
+ }, {
+ name: "/healthz::put is not pass through path",
+ path: "/healthz",
+ verb: "put",
+ want: false,
+ }, {
+ name: "/healthz::get is pass through path",
+ path: "/healthz",
+ verb: "get",
+ want: true,
+ }, {
+ name: "/livez::patch is not pass through path",
+ path: "/livez",
+ verb: "patch",
+ want: false,
+ }, {
+ name: "/livez::get is pass through path",
+ path: "/livez",
+ verb: "get",
+ want: true,
+ }, {
+ name: "/readyz::delete is not pass through path",
+ path: "/readyz",
+ verb: "delete",
+ want: false,
+ }, {
+ name: "/readyz::get is pass through path",
+ path: "/readyz",
+ verb: "get",
+ want: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if got := IsPassThroughPath(tt.path, tt.verb); got != tt.want {
+ t.Errorf("IsPassThroughPath() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/util/util.go b/staging/src/github.com/kubeedge/api/util/util.go
new file mode 100644
index 000000000..d7af6d91c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/util.go
@@ -0,0 +1,158 @@
+/*
+Copyright 2018 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+
+ utilnet "k8s.io/apimachinery/pkg/util/net"
+ nodeutil "k8s.io/component-helpers/node/util"
+ "k8s.io/kubernetes/pkg/apis/core/validation"
+
+ "github.com/kubeedge/api/common/constants"
+)
+
+func GetLocalIP(hostName string) (string, error) {
+ var ipAddr net.IP
+ var err error
+
+ // If looks up host failed, will use utilnet.ChooseHostInterface() below,
+ // So ignore the error here
+ addrs, _ := net.LookupIP(hostName)
+ for _, addr := range addrs {
+ if err := ValidateNodeIP(addr); err != nil {
+ continue
+ }
+ if addr.To4() != nil {
+ ipAddr = addr
+ break
+ }
+ if ipAddr == nil && addr.To16() != nil {
+ ipAddr = addr
+ }
+ }
+
+ if ipAddr == nil {
+ ipAddr, err = utilnet.ChooseHostInterface()
+ if err != nil {
+ return "", err
+ }
+ }
+ return ipAddr.String(), nil
+}
+
+// ValidateNodeIP validates given node IP belongs to the current host
+func ValidateNodeIP(nodeIP net.IP) error {
+ // Honor IP limitations set in setNodeStatus()
+ if nodeIP.To4() == nil && nodeIP.To16() == nil {
+ return fmt.Errorf("nodeIP must be a valid IP address")
+ }
+ if nodeIP.IsLoopback() {
+ return fmt.Errorf("nodeIP can't be loopback address")
+ }
+ if nodeIP.IsMulticast() {
+ return fmt.Errorf("nodeIP can't be a multicast address")
+ }
+ if nodeIP.IsLinkLocalUnicast() {
+ return fmt.Errorf("nodeIP can't be a link-local unicast address")
+ }
+ if nodeIP.IsUnspecified() {
+ return fmt.Errorf("nodeIP can't be an all zeros address")
+ }
+
+ addrs, err := net.InterfaceAddrs()
+ if err != nil {
+ return err
+ }
+ for _, addr := range addrs {
+ var ip net.IP
+ switch v := addr.(type) {
+ case *net.IPNet:
+ ip = v.IP
+ case *net.IPAddr:
+ ip = v.IP
+ }
+ if ip != nil && ip.Equal(nodeIP) {
+ return nil
+ }
+ }
+ return fmt.Errorf("node IP: %q not found in the host's network interfaces", nodeIP.String())
+}
+
+// Command executes command and returns output
+func Command(name string, arg []string) (string, error) {
+ cmd := exec.Command(name, arg...)
+ ret, err := cmd.Output()
+ if err != nil {
+ return string(ret), err
+ }
+ return strings.Trim(string(ret), "\n"), nil
+}
+
+// GetCurPath returns filepath
+func GetCurPath() string {
+ file, _ := exec.LookPath(os.Args[0])
+ path, _ := filepath.Abs(file)
+ rst := filepath.Dir(path)
+ return rst
+}
+
+func SpliceErrors(errors []error) string {
+ if len(errors) == 0 {
+ return ""
+ }
+ var stb strings.Builder
+ stb.WriteString("[\n")
+ for _, err := range errors {
+ stb.WriteString(fmt.Sprintf(" %s\n", err.Error()))
+ }
+ stb.WriteString("]\n")
+ return stb.String()
+}
+
+// GetHostname returns a reasonable hostname
+func GetHostname() string {
+ hostnameOverride, err := nodeutil.GetHostname("")
+ if err != nil {
+ return constants.DefaultHostnameOverride
+ }
+ msgs := validation.ValidateNodeName(hostnameOverride, false)
+ if len(msgs) > 0 {
+ return constants.DefaultHostnameOverride
+ }
+ return hostnameOverride
+}
+
+// ConcatStrings use bytes.buffer to concatenate string variable
+func ConcatStrings(ss ...string) string {
+ var bff bytes.Buffer
+ for _, s := range ss {
+ bff.WriteString(s)
+ }
+ return bff.String()
+}
+
+// GetResourceID return resource ID
+func GetResourceID(namespace, name string) string {
+ return namespace + "/" + name
+}
diff --git a/staging/src/github.com/kubeedge/api/util/util_test.go b/staging/src/github.com/kubeedge/api/util/util_test.go
new file mode 100644
index 000000000..03217caee
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/util_test.go
@@ -0,0 +1,165 @@
+package util
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "reflect"
+ "strings"
+ "testing"
+)
+
+func TestValidateNodeIP(t *testing.T) {
+ hostnameOverride := GetHostname()
+ localIP, _ := GetLocalIP(hostnameOverride)
+
+ cases := []struct {
+ name string
+ ip net.IP
+ expected error
+ }{
+ {
+ name: "case1",
+ ip: nil,
+ expected: fmt.Errorf("nodeIP must be a valid IP address"),
+ },
+ {
+ name: "case2",
+ ip: net.IPv4(127, 0, 0, 1),
+ expected: fmt.Errorf("nodeIP can't be loopback address"),
+ },
+ {
+ name: "case3",
+ ip: net.IPv4(239, 0, 0, 254),
+ expected: fmt.Errorf("nodeIP can't be a multicast address"),
+ },
+ {
+ name: "case4",
+ ip: net.IPv4(169, 254, 0, 0),
+ expected: fmt.Errorf("nodeIP can't be a link-local unicast address"),
+ },
+ {
+ name: "case5",
+ ip: net.IPv4(0, 0, 0, 0),
+ expected: fmt.Errorf("nodeIP can't be an all zeros address"),
+ },
+ {
+ name: "case 6",
+ ip: net.ParseIP(localIP),
+ expected: nil,
+ },
+ {
+ name: "case 7",
+ ip: net.IPv4(114, 114, 114, 114),
+ expected: fmt.Errorf("node IP: %q not found in the host's network interfaces", "114.114.114.114"),
+ },
+ }
+ for _, c := range cases {
+ err := ValidateNodeIP(c.ip)
+ if !reflect.DeepEqual(err, c.expected) {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, err)
+ }
+ }
+}
+
+func TestCommand(t *testing.T) {
+ cases := []struct {
+ name string
+ command string
+ expected bool
+ }{
+ {
+ name: "case1",
+ command: "fake_command_test",
+ expected: false,
+ },
+ {
+ name: "case2",
+ command: "ls",
+ expected: true,
+ },
+ }
+ for _, c := range cases {
+ _, err := Command(c.command, nil)
+ isSuccess := err == nil
+ if isSuccess != c.expected {
+ t.Errorf("%v: expected %v, but got %v", c.name, c.expected, isSuccess)
+ }
+ }
+}
+
+func TestGetCurPath(t *testing.T) {
+ path := GetCurPath()
+ if path == "" {
+ t.Errorf("failed to get current path")
+ }
+}
+
+func TestGetHostname(t *testing.T) {
+ name := GetHostname()
+ if name == "" {
+ t.Errorf("get host name failed")
+ }
+}
+
+func TestGetLocalIP(t *testing.T) {
+ _, err := GetLocalIP(GetHostname())
+ if err != nil {
+ t.Errorf("get local ip failed")
+ }
+}
+
+func TestSpliceErrors(t *testing.T) {
+ err1 := errors.New("this is error 1")
+ err2 := errors.New("this is error 2")
+ err3 := errors.New("this is error 3")
+
+ const head = "[\n"
+ var line1 = fmt.Sprintf(" %s\n", err1)
+ var line2 = fmt.Sprintf(" %s\n", err2)
+ var line3 = fmt.Sprintf(" %s\n", err3)
+ const tail = "]\n"
+
+ sliceOutput := SpliceErrors([]error{err1, err2, err3})
+ if strings.Index(sliceOutput, head) != 0 ||
+ strings.Index(sliceOutput, line1) != len(head) ||
+ strings.Index(sliceOutput, line2) != len(head+line1) ||
+ strings.Index(sliceOutput, line3) != len(head+line1+line2) ||
+ strings.Index(sliceOutput, tail) != len(head+line1+line2+line3) {
+ t.Error("the func format the multiple elements error slice unexpected")
+ return
+ }
+
+ if SpliceErrors([]error{}) != "" || SpliceErrors(nil) != "" {
+ t.Error("the func format the zero-length error slice unexpected")
+ return
+ }
+}
+
+func TestConcatStrings(t *testing.T) {
+ cases := []struct {
+ args []string
+ expect string
+ }{
+ {
+ args: []string{},
+ expect: "",
+ },
+ {
+ args: nil,
+ expect: "",
+ },
+ {
+ args: []string{"a", "", "b"},
+ expect: "ab",
+ },
+ }
+ var s string
+ for _, c := range cases {
+ s = ConcatStrings(c.args...)
+ if s != c.expect {
+ t.Errorf("the func return failed. expect: %s, actual: %s\n", c.expect, s)
+ return
+ }
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/util/validation/check.go b/staging/src/github.com/kubeedge/api/util/validation/check.go
new file mode 100644
index 000000000..06c5ce9bf
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/validation/check.go
@@ -0,0 +1,14 @@
+package validation
+
+import (
+ "os"
+)
+
+// FileIsExist check file is exist
+func FileIsExist(path string) bool {
+ _, err := os.Stat(path)
+ if err == nil {
+ return true
+ }
+ return os.IsExist(err)
+}
diff --git a/staging/src/github.com/kubeedge/api/util/validation/check_test.go b/staging/src/github.com/kubeedge/api/util/validation/check_test.go
new file mode 100644
index 000000000..9e58c0d90
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/validation/check_test.go
@@ -0,0 +1,25 @@
+package validation
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+func TestFileIsExist(t *testing.T) {
+ dir := t.TempDir()
+
+ ef, err := os.CreateTemp(dir, "CheckFileIsExist")
+ if err == nil {
+ if !FileIsExist(ef.Name()) {
+ t.Fatalf("file %v should exist", ef.Name())
+ }
+ }
+
+ nonexistentDir := filepath.Join(dir, "not_exist_dir")
+ notExistFile := filepath.Join(nonexistentDir, "not_exist_file")
+
+ if FileIsExist(notExistFile) {
+ t.Fatalf("file %v should not exist", notExistFile)
+ }
+}
diff --git a/staging/src/github.com/kubeedge/api/util/validation/validation.go b/staging/src/github.com/kubeedge/api/util/validation/validation.go
new file mode 100644
index 000000000..a5959146c
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/validation/validation.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 The KubeEdge Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "net"
+)
+
+// IsValidIP tests that the argument is a valid IP address.
+func IsValidIP(value string) []string {
+ if net.ParseIP(value) == nil {
+ return []string{"must be a valid IP address, (e.g. 10.9.8.7)"}
+ }
+ return nil
+}
+
+// IsValidPortNum tests that the argument is a valid, non-zero port number.
+func IsValidPortNum(port int) []string {
+ if 1 <= port && port <= 65535 {
+ return nil
+ }
+ return []string{InclusiveRangeError(1, 65535)}
+}
+
+// InclusiveRangeError returns a string explanation of a numeric "must be
+// between" validation failure.
+func InclusiveRangeError(lo, hi int) string {
+ return fmt.Sprintf(`must be between %d and %d, inclusive`, lo, hi)
+}
diff --git a/staging/src/github.com/kubeedge/api/util/validation/validation_test.go b/staging/src/github.com/kubeedge/api/util/validation/validation_test.go
new file mode 100644
index 000000000..2a50fbe71
--- /dev/null
+++ b/staging/src/github.com/kubeedge/api/util/validation/validation_test.go
@@ -0,0 +1,96 @@
+package validation
+
+import (
+ "reflect"
+ "testing"
+)
+
+func TestIsValidIP(t *testing.T) {
+ cases := []struct {
+ Name string
+ IP string
+ Expect bool
+ }{
+ {
+ Name: "valid ip",
+ IP: "1.1.1.1",
+ Expect: true,
+ },
+ {
+ Name: "invalid have port",
+ IP: "1.1.1.1:1234",
+ Expect: false,
+ },
+ {
+ Name: "invalid ip1",
+ IP: "1.1.1.",
+ Expect: false,
+ },
+ {
+ Name: "invalid unit socket",
+ IP: "unix:///var/run/docker.sock",
+ Expect: false,
+ },
+ {
+ Name: "invalid http",
+ IP: "http://127.0.0.1",
+ Expect: false,
+ },
+ }
+
+ for _, c := range cases {
+ t.Run(c.Name, func(t *testing.T) {
+ v := IsValidIP(c.IP)
+ get := len(v) == 0
+ if get != c.Expect {
+ t.Errorf("Input %s Expect %v while get %v", c.IP, c.Expect, v)
+ }
+ })
+ }
+}
+
+func TestIsValidPortNum(t *testing.T) {
+ cases := []struct {
+ Name string
+ Port int
+ Expect []string
+ }{
+ {
+ Name: "invalid port",
+ Port: 0,
+ Expect: []string{"must be between 1 and 65535, inclusive"},
+ },
+ {
+ Name: "valid port",
+ Port: 1,
+ Expect: nil,
+ },
+ {
+ Name: "valid port",
+ Port: 65535,
+ Expect: nil,
+ },
+ {
+ Name: "invalid port",
+ Port: 65536,
+ Expect: []string{"must be between 1 and 65535, inclusive"},
+ },
+ }
+
+ for _, c := range cases {
+ t.Run(c.Name, func(t *testing.T) {
+ v := IsValidPortNum(c.Port)
+ if !reflect.DeepEqual(v, c.Expect) {
+ t.Errorf("Input %d Expect %v while get %v", c.Port, c.Expect, v)
+ }
+ })
+ }
+}
+
+func TestInclusiveRangeError(t *testing.T) {
+ result := InclusiveRangeError(1, 65535)
+ expect := "must be between 1 and 65535, inclusive"
+ if !reflect.DeepEqual(result, expect) {
+ t.Errorf("Expected %v while get %v", expect, result)
+ }
+}
diff --git a/vendor/github.com/kubeedge/api b/vendor/github.com/kubeedge/api
new file mode 120000
index 000000000..91c2b6071
--- /dev/null
+++ b/vendor/github.com/kubeedge/api
@@ -0,0 +1 @@
+../../../staging/src/github.com/kubeedge/api/ \ No newline at end of file