• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang gofig.NewRegistration函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/akutz/gofig.NewRegistration函数的典型用法代码示例。如果您正苦于以下问题:Golang NewRegistration函数的具体用法?Golang NewRegistration怎么用?Golang NewRegistration使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NewRegistration函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: init

func init() {
	r := gofigCore.NewRegistration("EBS")
	r.Key(gofig.String, "", "", "", Name+"."+AccessKey)
	r.Key(gofig.String, "", "", "", Name+"."+SecretKey)
	r.Key(gofig.String, "", "", "", Name+"."+Region)
	r.Key(gofig.String, "", "", "", Name+"."+Endpoint)
	r.Key(gofig.Int, "", DefaultMaxRetries, "", Name+"."+MaxRetries)
	r.Key(gofig.String, "", "", "Tag prefix for EBS naming", Name+"."+Tag)
	r.Key(gofig.String, "", "", "", Name+"."+KmsKeyID)

	r.Key(gofig.String, "", "", "", NameEC2+"."+AccessKey)
	r.Key(gofig.String, "", "", "", NameEC2+"."+SecretKey)
	r.Key(gofig.String, "", "", "", NameEC2+"."+Region)
	r.Key(gofig.String, "", "", "", NameEC2+"."+Endpoint)
	r.Key(gofig.Int, "", DefaultMaxRetries, "", NameEC2+"."+MaxRetries)
	r.Key(gofig.String, "", "", "Tag prefix for EBS naming", NameEC2+"."+Tag)
	r.Key(gofig.String, "", "", "", NameEC2+"."+KmsKeyID)

	r.Key(gofig.String, "", "", "", NameAWS+"."+AccessKey)
	r.Key(gofig.String, "", "", "", NameAWS+"."+SecretKey)
	r.Key(gofig.String, "", "", "", NameAWS+"."+Region)
	r.Key(gofig.String, "", "", "", NameAWS+"."+Endpoint)
	r.Key(gofig.Int, "", DefaultMaxRetries, "", NameAWS+"."+MaxRetries)
	r.Key(gofig.String, "", "", "Tag prefix for EBS naming", NameAWS+"."+Tag)
	r.Key(gofig.String, "", "", "", NameAWS+"."+KmsKeyID)

	gofigCore.Register(r)
}
开发者ID:emccode,项目名称:libstorage,代码行数:28,代码来源:ebs.go


示例2: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Amazon EC2")
	r.Key(gofig.String, "", "", "", "aws.accessKey")
	r.Key(gofig.String, "", "", "", "aws.secretKey")
	r.Key(gofig.String, "", "", "", "aws.region")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:7,代码来源:ec2.go


示例3: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Docker")
	r.Key(gofig.String, "", "", "", "docker.volumeType")
	r.Key(gofig.Int, "", 0, "", "docker.iops")
	r.Key(gofig.Int, "", 0, "", "docker.size")
	r.Key(gofig.String, "", "", "", "docker.availabilityZone")
	r.Key(gofig.String, "", "/data", "", "linux.volume.rootpath")
	return r
}
开发者ID:luk5,项目名称:rexray,代码行数:9,代码来源:volume.go


示例4: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Isilon")
	r.Key(gofig.String, "", "", "", "isilon.endpoint")
	r.Key(gofig.Bool, "", false, "", "isilon.insecure")
	r.Key(gofig.String, "", "", "", "isilon.userName")
	r.Key(gofig.String, "", "", "", "isilon.password")
	r.Key(gofig.String, "", "", "", "isilon.volumePath")
	r.Key(gofig.String, "", "", "", "isilon.nfsHost")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:10,代码来源:isilon.go


示例5: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("virtualbox")
	r.Key(gofig.String, "", "", "", "virtualbox.endpoint")
	r.Key(gofig.String, "", "", "", "virtualbox.volumePath")
	r.Key(gofig.String, "", "", "", "virtualbox.localMachineNameOrId")
	r.Key(gofig.String, "", "", "", "virtualbox.username")
	r.Key(gofig.String, "", "", "", "virtualbox.password")
	r.Key(gofig.Bool, "", false, "", "virtualbox.tls")
	r.Key(gofig.String, "", "", "", "virtualbox.controllerName")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:11,代码来源:virtualbox.go


示例6: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("XtremIO")
	r.Key(gofig.String, "", "", "", "xtremio.endpoint")
	r.Key(gofig.Bool, "", false, "", "xtremio.insecure")
	r.Key(gofig.String, "", "", "", "xtremio.userName")
	r.Key(gofig.String, "", "", "", "xtremio.password")
	r.Key(gofig.Bool, "", false, "", "xtremio.deviceMapper")
	r.Key(gofig.Bool, "", false, "", "xtremio.multipath")
	r.Key(gofig.Bool, "", false, "", "xtremio.remoteManagement")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:11,代码来源:xtremio.go


示例7: init

func init() {
	r := gofigCore.NewRegistration("Rackspace")
	r.Key(gofig.String, "", "", "", "rackspace.authURL")
	r.Key(gofig.String, "", "", "", "rackspace.userID")
	r.Key(gofig.String, "", "", "", "rackspace.userName")
	r.Key(gofig.String, "", "", "", "rackspace.password")
	r.Key(gofig.String, "", "", "", "rackspace.tenantID")
	r.Key(gofig.String, "", "", "", "rackspace.tenantName")
	r.Key(gofig.String, "", "", "", "rackspace.domainID")
	r.Key(gofig.String, "", "", "", "rackspace.domainName")
	gofigCore.Register(r)
}
开发者ID:emccode,项目名称:libstorage,代码行数:12,代码来源:rackspace.go


示例8: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Rackspace")
	r.Key(gofig.String, "", "", "", "rackspace.authURL")
	r.Key(gofig.String, "", "", "", "rackspace.userID")
	r.Key(gofig.String, "", "", "", "rackspace.userName")
	r.Key(gofig.String, "", "", "", "rackspace.password")
	r.Key(gofig.String, "", "", "", "rackspace.tenantID")
	r.Key(gofig.String, "", "", "", "rackspace.tenantName")
	r.Key(gofig.String, "", "", "", "rackspace.domainID")
	r.Key(gofig.String, "", "", "", "rackspace.domainName")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:12,代码来源:rackspace.go


示例9: init

func init() {
	r := gofigCore.NewRegistration("EFS")
	r.Key(gofig.String, "", "", "AWS access key", ConfigEFSAccessKey)
	r.Key(gofig.String, "", "", "AWS secret key", ConfigEFSSecretKey)
	r.Key(gofig.String, "", "", "List of security groups", ConfigEFSSecGroups)
	r.Key(gofig.String, "", "", "AWS region", ConfigEFSRegion)
	r.Key(gofig.String, "", "", "AWS EFS endpoint", ConfigEFSEndpoint)
	r.Key(gofig.String, "", `elasticfilesystem.%s.amazonaws.com`,
		"AWS EFS endpoint format", ConfigEFSEndpointFormat)
	r.Key(gofig.String, "", "", "Tag prefix for EFS naming", ConfigEFSTag)
	r.Key(gofig.Bool, "", false,
		"A flag that disables the session cache", ConfigEFSDisableSessionCache)
	gofigCore.Register(r)
}
开发者ID:emccode,项目名称:libstorage,代码行数:14,代码来源:efs.go


示例10: init

func init() {
	r := gofigCore.NewRegistration("VirtualBox")
	r.Key(gofig.String, "", "", "", "virtualbox.username")
	r.Key(gofig.String, "", "", "", "virtualbox.password")
	r.Key(gofig.String, "", "http://10.0.2.2:18083", "", "virtualbox.endpoint")
	r.Key(gofig.String, "", "", "", "virtualbox.volumePath")
	r.Key(gofig.String, "", "", "", "virtualbox.localMachineNameOrId")
	r.Key(gofig.Bool, "", false, "", "virtualbox.tls")
	r.Key(gofig.String, "", "SATA", "", "virtualbox.controllerName")
	r.Key(gofig.String, "", "/dev/disk/by-id", "", "virtualbox.diskIDPath")
	r.Key(gofig.String,
		"", "/sys/class/scsi_host/", "", "virtualbox.scsiHostPath")
	gofigCore.Register(r)
}
开发者ID:emccode,项目名称:libstorage,代码行数:14,代码来源:vbox.go


示例11: mockRegistration

func mockRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Mock Provider")
	r.Yaml(`mockProvider:
    userName: admin
    useCerts: true
    docker:
        minVolSize: 16
`)
	r.Key(gofig.String, "", "admin", "", "mockProvider.userName")
	r.Key(gofig.String, "", "", "", "mockProvider.password")
	r.Key(gofig.Bool, "", false, "", "mockProvider.useCerts")
	r.Key(gofig.Int, "", 16, "", "mockProvider.docker.minVolSize")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:14,代码来源:mock.go


示例12: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Openstack")
	r.Key(gofig.String, "", "", "", "openstack.authURL")
	r.Key(gofig.String, "", "", "", "openstack.userID")
	r.Key(gofig.String, "", "", "", "openstack.userName")
	r.Key(gofig.String, "", "", "", "openstack.password")
	r.Key(gofig.String, "", "", "", "openstack.tenantID")
	r.Key(gofig.String, "", "", "", "openstack.tenantName")
	r.Key(gofig.String, "", "", "", "openstack.domainID")
	r.Key(gofig.String, "", "", "", "openstack.domainName")
	r.Key(gofig.String, "", "", "", "openstack.regionName")
	r.Key(gofig.String, "", "", "", "openstack.availabilityZoneName")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:14,代码来源:openstack.go


示例13: init

func init() {
	r := gofigCore.NewRegistration("Isilon")
	r.Key(gofig.String, "", "", "", "isilon.endpoint")
	r.Key(gofig.Bool, "", false, "", "isilon.insecure")
	r.Key(gofig.String, "", "", "", "isilon.userName")
	r.Key(gofig.String, "", "", "", "isilon.group")
	r.Key(gofig.String, "", "", "", "isilon.password")
	r.Key(gofig.String, "", "", "", "isilon.volumePath")
	r.Key(gofig.String, "", "", "", "isilon.nfsHost")
	r.Key(gofig.String, "", "", "", "isilon.dataSubnet")
	r.Key(gofig.Bool, "", false, "", "isilon.quotas")
	r.Key(gofig.Bool, "", false, "", "isilon.sharedMounts")
	gofigCore.Register(r)
}
开发者ID:emccode,项目名称:libstorage,代码行数:14,代码来源:isilon.go


示例14: init

func init() {
	cfg := gofigCore.NewRegistration("Module")
	cfg.SetYAML(`
rexray:
    modules:
        default-docker:
            type:     docker
            desc:     The default docker module.
            host:     unix:///run/docker/plugins/rexray.sock
            spec:     /etc/docker/plugins/rexray.spec
            disabled: false
`)
	cfg.Key(gofig.String, "", "10s", "", "rexray.module.startTimeout")
	gofigCore.Register(cfg)
}
开发者ID:akutz,项目名称:rexray,代码行数:15,代码来源:module_docker.go


示例15: globalRegistration

func globalRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Global")
	r.Yaml(`
rexray:
    host: tcp://:7979
    logLevel: warn
`)
	r.Key(gofig.String, "h", "tcp://:7979",
		"The REX-Ray host", "rexray.host",
		"host")
	r.Key(gofig.String, "l", "warn",
		"The log level (error, warn, info, debug)", "rexray.logLevel",
		"logLevel")
	return r
}
开发者ID:bottkars,项目名称:rexray,代码行数:15,代码来源:core.go


示例16: init

func init() {
	r := gofigCore.NewRegistration("Docker")
	r.Key(gofig.String, "", "ext4", "",
		types.ConfigIgVolOpsCreateDefaultFsType)
	r.Key(gofig.String, "", "", "", types.ConfigIgVolOpsCreateDefaultType)
	r.Key(gofig.String, "", "", "", types.ConfigIgVolOpsCreateDefaultIOPS)
	r.Key(gofig.String, "", "16", "", types.ConfigIgVolOpsCreateDefaultSize)
	r.Key(gofig.String, "", "", "", types.ConfigIgVolOpsCreateDefaultAZ)
	r.Key(gofig.String, "", types.Lib.Join("volumes"), "",
		types.ConfigIgVolOpsMountPath)
	r.Key(gofig.String, "", "/data", "", types.ConfigIgVolOpsMountRootPath)
	r.Key(gofig.Bool, "", true, "", types.ConfigIgVolOpsCreateImplicit)
	r.Key(gofig.Bool, "", false, "", types.ConfigIgVolOpsMountPreempt)
	gofigCore.Register(r)
}
开发者ID:emccode,项目名称:libstorage,代码行数:15,代码来源:docker_gofig.go


示例17: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("ScaleIO")
	r.Key(gofig.String, "", "", "", "scaleio.endpoint")
	r.Key(gofig.Bool, "", false, "", "scaleio.insecure")
	r.Key(gofig.Bool, "", false, "", "scaleio.useCerts")
	r.Key(gofig.String, "", "", "", "scaleio.userID")
	r.Key(gofig.String, "", "", "", "scaleio.userName")
	r.Key(gofig.String, "", "", "", "scaleio.password")
	r.Key(gofig.String, "", "", "", "scaleio.systemID")
	r.Key(gofig.String, "", "", "", "scaleio.systemName")
	r.Key(gofig.String, "", "", "", "scaleio.protectionDomainID")
	r.Key(gofig.String, "", "", "", "scaleio.protectionDomainName")
	r.Key(gofig.String, "", "", "", "scaleio.storagePoolID")
	r.Key(gofig.String, "", "", "", "scaleio.storagePoolName")
	return r
}
开发者ID:lucmichalski,项目名称:rexray,代码行数:16,代码来源:scaleio.go


示例18: configRegistration

func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("GOVMAX")
	r.Key(gofig.String, "", "", "", "vmax.smishost")
	r.Key(gofig.String, "", "", "", "vmax.smisport")
	r.Key(gofig.Bool, "", false, "", "vmax.insecure")
	r.Key(gofig.String, "", "", "", "vmax.userName")
	r.Key(gofig.String, "", "", "", "vmax.password")
	r.Key(gofig.String, "", "", "", "vmax.sid")
	r.Key(gofig.String, "", "", "", "vmax.volumePrefix")
	r.Key(gofig.String, "", "", "", "vmax.storageGroup")
	r.Key(gofig.Bool, "", false, "", "vmax.vmh.insecure")
	r.Key(gofig.String, "", "", "", "vmax.vmh.userName")
	r.Key(gofig.String, "", "", "", "vmax.vmh.password")
	r.Key(gofig.String, "", "", "", "vmax.vmh.host")

	return r
}
开发者ID:luk5,项目名称:rexray,代码行数:17,代码来源:vmax.go


示例19: initConfig

func initConfig() {
	cfg := gofig.NewRegistration("Module")
	cfg.Yaml(`
rexray:
    modules:
        default-admin:
            type:     admin
            desc:     The default admin module.
            host:     tcp://127.0.0.1:7979
            disabled: false
        default-docker:
            type:     docker
            desc:     The default docker module.
            host:     unix:///run/docker/plugins/rexray.sock
            spec:     /etc/docker/plugins/rexray.spec
            disabled: false
`)
	gofig.Register(cfg)
}
开发者ID:luk5,项目名称:rexray,代码行数:19,代码来源:module.go


示例20: init

func init() {
	gofigCore.SetGlobalConfigPath(util.EtcDirPath())
	gofigCore.SetUserConfigPath(path.Join(gotil.HomeDir(), util.DotDirName))
	r := gofigCore.NewRegistration("Global")
	r.SetYAML(`
rexray:
    logLevel: warn
`)
	r.Key(gofig.String, "h", "",
		"The libStorage host.", "rexray.host",
		"host")
	r.Key(gofig.String, "s", "",
		"The libStorage service.", "rexray.service",
		"service")
	r.Key(gofig.String, "l", "warn",
		"The log level (error, warn, info, debug)", "rexray.logLevel",
		"logLevel")
	gofigCore.Register(r)
}
开发者ID:akutz,项目名称:rexray,代码行数:19,代码来源:rexray.go



注:本文中的github.com/akutz/gofig.NewRegistration函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang gofig.Register函数代码示例发布时间:2022-05-24
下一篇:
Golang binutil.Writer类代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap