Using const() defines constants together (part:3)

This commit is contained in:
xichengliudui 2019-04-20 05:02:21 -04:00
parent b1ca7be105
commit 16ee9c4342
3 changed files with 20 additions and 14 deletions

View File

@ -27,9 +27,11 @@ import (
"github.com/golang/glog" "github.com/golang/glog"
) )
// Not (yet?) in aws-sdk-go const (
const ResourceTypeNatGateway = "nat-gateway" // Not (yet?) in aws-sdk-go
const ResourceTypeAddress = "elastic-ip" ResourceTypeNatGateway = "nat-gateway"
ResourceTypeAddress = "elastic-ip"
)
func (m *MockEC2) CreateTagsRequest(*ec2.CreateTagsInput) (*request.Request, *ec2.CreateTagsOutput) { func (m *MockEC2) CreateTagsRequest(*ec2.CreateTagsInput) (*request.Request, *ec2.CreateTagsOutput) {
panic("Not implemented") panic("Not implemented")

View File

@ -16,10 +16,12 @@ limitations under the License.
package watchers package watchers
// AnnotationNameDNSExternal is used to set up a DNS name for accessing the resource from outside the cluster const (
// For a service of Type=LoadBalancer, it would map to the external LB hostname or IP // AnnotationNameDNSExternal is used to set up a DNS name for accessing the resource from outside the cluster
const AnnotationNameDNSExternal = "dns.alpha.kubernetes.io/external" // For a service of Type=LoadBalancer, it would map to the external LB hostname or IP
AnnotationNameDNSExternal = "dns.alpha.kubernetes.io/external"
// AnnotationNameDNSInternal is used to set up a DNS name for accessing the resource from inside the cluster // AnnotationNameDNSInternal is used to set up a DNS name for accessing the resource from inside the cluster
// This is only supported on Pods currently, and maps to the Internal address // This is only supported on Pods currently, and maps to the Internal address
const AnnotationNameDNSInternal = "dns.alpha.kubernetes.io/internal" AnnotationNameDNSInternal = "dns.alpha.kubernetes.io/internal"
)

View File

@ -29,13 +29,15 @@ import (
"k8s.io/kops/upup/pkg/fi/nodeup/nodetasks" "k8s.io/kops/upup/pkg/fi/nodeup/nodetasks"
) )
const CloudConfigFilePath = "/etc/kubernetes/cloud.config" const (
CloudConfigFilePath = "/etc/kubernetes/cloud.config"
// Required for vSphere CloudProvider // Required for vSphere CloudProvider
const MinimumVersionForVMUUID = "1.5.3" MinimumVersionForVMUUID = "1.5.3"
// VM UUID is set by cloud-init // VM UUID is set by cloud-init
const VM_UUID_FILE_PATH = "/etc/vmware/vm_uuid" VM_UUID_FILE_PATH = "/etc/vmware/vm_uuid"
)
// CloudConfigBuilder creates the cloud configuration file // CloudConfigBuilder creates the cloud configuration file
type CloudConfigBuilder struct { type CloudConfigBuilder struct {