本文整理汇总了Golang中doppler/config.Config类的典型用法代码示例。如果您正苦于以下问题:Golang Config类的具体用法?Golang Config怎么用?Golang Config使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Config类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"code.cloudfoundry.org/localip"
"github.com/cloudfoundry/loggregatorlib/loggertesthelper"
"github.com/cloudfoundry/storeadapter"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
ginkgoConfig "github.com/onsi/ginkgo/config"
)
var _ = Describe("Announcer", func() {
var (
localIP string
conf config.Config
etcdRunner *etcdstorerunner.ETCDClusterRunner
etcdAdapter storeadapter.StoreAdapter
)
BeforeSuite(func() {
localIP, _ = localip.LocalIP()
etcdPort := 5500 + ginkgoConfig.GinkgoConfig.ParallelNode*10
etcdRunner = etcdstorerunner.NewETCDClusterRunner(etcdPort, 1, nil)
etcdRunner.Start()
etcdAdapter = etcdRunner.Adapter(nil)
conf = config.Config{
JobName: "doppler_z1",
Index: "0",
开发者ID:kei-yamazaki,项目名称:loggregator,代码行数:32,代码来源:announcer_test.go
示例2:
"net"
"time"
dopplerconfig "doppler/config"
"doppler/dopplerservice"
"github.com/cloudfoundry/gosteno"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Protocol", func() {
var (
protocols []config.Protocol
logger *gosteno.Logger
dopplerConfig *dopplerconfig.Config
stopTheWorld chan struct{}
stopAnnounce chan chan bool
)
BeforeEach(func() {
protocols = nil
logger = gosteno.NewLogger("test")
dopplerConfig = &dopplerconfig.Config{
Index: 0,
JobName: "job",
Zone: "z9",
IncomingUDPPort: uint32(metronRunner.DropsondePort),
TLSListenerConfig: dopplerconfig.TLSListenerConfig{
Port: uint32(port + 5),
CertFile: "../fixtures/server.crt",
开发者ID:yingkitw,项目名称:loggregator,代码行数:32,代码来源:protocol_test.go
注:本文中的doppler/config.Config类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论