本文整理匯總了Golang中github.com/flynn/flynn/discoverd/testutil/etcdrunner.TestingT.Fatal方法的典型用法代碼示例。如果您正苦於以下問題:Golang TestingT.Fatal方法的具體用法?Golang TestingT.Fatal怎麽用?Golang TestingT.Fatal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/flynn/flynn/discoverd/testutil/etcdrunner.TestingT
的用法示例。
在下文中一共展示了TestingT.Fatal方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: newTCPListenerClients
func newTCPListenerClients(t etcdrunner.TestingT, etcd EtcdClient, discoverd discoverdClient) (*tcpListener, discoverdClient) {
discoverd, etcd, cleanup := setup(t, etcd, discoverd)
l := &tcpListener{
NewTCPListener("127.0.0.1", firstTCPPort, lastTCPPort, NewEtcdDataStore(etcd, "/router/tcp/"), discoverd),
cleanup,
}
if err := l.Start(); err != nil {
t.Fatal(err)
}
return l, discoverd
}
示例2: newHTTPListenerClients
func newHTTPListenerClients(t etcdrunner.TestingT, etcd EtcdClient, discoverd discoverdClient) (*httpListener, discoverdClient) {
discoverd, etcd, cleanup := setup(t, etcd, discoverd)
l := &httpListener{
NewHTTPListener("127.0.0.1:0", "127.0.0.1:0", nil, NewEtcdDataStore(etcd, "/router/http/"), discoverd),
cleanup,
}
if err := l.Start(); err != nil {
t.Fatal(err)
}
return l, discoverd
}
示例3: newTCPListener
func (s *S) newTCPListener(t etcdrunner.TestingT) *TCPListener {
l := &TCPListener{
IP: "127.0.0.1",
startPort: firstTCPPort,
endPort: lastTCPPort,
ds: NewPostgresDataStore("tcp", s.pgx),
discoverd: s.discoverd,
}
if err := l.Start(); err != nil {
t.Fatal(err)
}
return l
}
示例4: newHTTPListener
func (s *S) newHTTPListener(t etcdrunner.TestingT) *HTTPListener {
pair, err := tls.X509KeyPair(localhostCert, localhostKey)
if err != nil {
t.Fatal(err)
}
l := &HTTPListener{
Addr: "127.0.0.1:0",
TLSAddr: "127.0.0.1:0",
keypair: pair,
ds: NewPostgresDataStore("http", s.pgx),
discoverd: s.discoverd,
}
if err := l.Start(); err != nil {
t.Fatal(err)
}
return l
}