Skip to content

Commit 24b962d

Browse files
committed
Revert "TLS helloworld sample for gRPC calls to cadence"
This reverts commit 52275ff.
1 parent 52275ff commit 24b962d

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ vendor/
1515
# Executables produced by cadence-samples repo
1616
bin/
1717
docker-compose.yml
18-
# Credentials
19-
new_samples/client_samples/helloworld_tls/credentials/
20-
credentials/

new_samples/worker/worker.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import (
1111
"go.uber.org/cadence/worker"
1212
"go.uber.org/cadence/workflow"
1313
"go.uber.org/yarpc"
14-
"go.uber.org/yarpc/peer"
15-
yarpchostport "go.uber.org/yarpc/peer/hostport"
1614
"go.uber.org/yarpc/transport/grpc"
1715
"go.uber.org/zap"
1816
"go.uber.org/zap/zapcore"
@@ -71,18 +69,11 @@ func StartWorker() {
7169

7270
}
7371

74-
func BuildCadenceClient(dialOptions ...grpc.DialOption) workflowserviceclient.Interface {
75-
grpcTransport := grpc.NewTransport()
76-
myChooser := peer.NewSingle(
77-
yarpchostport.Identify(HostPort),
78-
grpcTransport.NewDialer(dialOptions...),
79-
)
80-
outbound := grpcTransport.NewOutbound(myChooser)
81-
72+
func BuildCadenceClient() workflowserviceclient.Interface {
8273
dispatcher := yarpc.NewDispatcher(yarpc.Config{
8374
Name: ClientName,
8475
Outbounds: yarpc.Outbounds{
85-
CadenceService: {Unary: outbound},
76+
CadenceService: {Unary: grpc.NewTransport().NewSingleOutbound(HostPort)},
8677
},
8778
})
8879
if err := dispatcher.Start(); err != nil {

0 commit comments

Comments
 (0)