本文整理匯總了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",