本文整理汇总了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",
示例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",