本文整理汇总了Golang中github.com/cloudfoundry/noaa.Consumer类的典型用法代码示例。如果您正苦于以下问题:Golang Consumer类的具体用法?Golang Consumer怎么用?Golang Consumer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Consumer类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
noaa_errors "github.com/cloudfoundry/noaa/errors"
"github.com/cloudfoundry/noaa/events"
"github.com/gogo/protobuf/proto"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Noaa", func() {
var (
connection *noaa.Consumer
trafficControllerUrl string
testServer *httptest.Server
fakeHandler *FakeHandler
tlsSettings *tls.Config
consumerProxyFunc func(*http.Request) (*url.URL, error)
appGuid string
authToken string
messagesToSend chan []byte
err error
)
BeforeSuite(func() {
buf := &bytes.Buffer{}
log.SetOutput(buf)
})
BeforeEach(func() {
messagesToSend = make(chan []byte, 256)
})
开发者ID:CA-APM,项目名称:epagent-nozzle,代码行数:32,代码来源:consumer_test.go
示例2:
"github.com/cloudfoundry/noaa/events"
"github.com/elazarl/goproxy"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Noaa behind a Proxy", func() {
var (
connection *noaa.Consumer
endpoint string
testServer *httptest.Server
tlsSettings *tls.Config
consumerProxyFunc func(*http.Request) (*url.URL, error)
appGuid string
authToken string
incomingChan chan *events.Envelope
messagesToSend chan []byte
testProxyServer *httptest.Server
goProxyHandler *goproxy.ProxyHttpServer
err error
)
BeforeEach(func() {
messagesToSend = make(chan []byte, 256)
testServer = httptest.NewServer(handlers.NewWebsocketHandler(messagesToSend, 100*time.Millisecond, loggertesthelper.Logger()))
endpoint = "ws://" + testServer.Listener.Addr().String()
goProxyHandler = goproxy.NewProxyHttpServer()
goProxyHandler.Logger = log.New(bytes.NewBufferString(""), "", 0)
开发者ID:cwlbraa,项目名称:cf-acceptance-tests,代码行数:32,代码来源:consumer_proxy_test.go
示例3:
noaa_errors "github.com/cloudfoundry/noaa/errors"
"github.com/cloudfoundry/sonde-go/events"
"github.com/gogo/protobuf/proto"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Noaa", func() {
var (
cnsmr *noaa.Consumer
trafficControllerUrl string
testServer *httptest.Server
fakeHandler *FakeHandler
tlsSettings *tls.Config
consumerProxyFunc func(*http.Request) (*url.URL, error)
appGuid string
authToken string
messagesToSend chan []byte
err error
)
BeforeSuite(func() {
buf := &bytes.Buffer{}
log.SetOutput(buf)
})
BeforeEach(func() {
messagesToSend = make(chan []byte, 256)
})
开发者ID:roxtar,项目名称:influxdb-firehose-nozzle,代码行数:32,代码来源:consumer_test.go
注:本文中的github.com/cloudfoundry/noaa.Consumer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论