Skip to content

Commit fb537e9

Browse files
committed
fix(realworld): memory client
1 parent 2714a4a commit fb537e9

File tree

4 files changed

+22
-29
lines changed

4 files changed

+22
-29
lines changed

benchmarks/rps/cmd/orb-rps-server/wire.go

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,44 +33,36 @@ func provideServerOpts() ([]server.ConfigOption, error) {
3333
hRegister := proto.RegisterEchoHandler(hInstance)
3434

3535
opts := []server.ConfigOption{}
36-
opts = append(opts, server.WithEntrypointConfig(mgrpc.NewConfig(
37-
mgrpc.WithName("grpc"),
36+
opts = append(opts, server.WithEntrypointConfig("grpc", mgrpc.NewConfig(
3837
mgrpc.WithInsecure(),
3938
mgrpc.WithHandlers(hRegister),
4039
mgrpc.WithReflection(true),
4140
)))
42-
opts = append(opts, server.WithEntrypointConfig(mgrpc.NewConfig(
43-
mgrpc.WithName("grpcs"),
41+
opts = append(opts, server.WithEntrypointConfig("grpcs", mgrpc.NewConfig(
4442
mgrpc.WithHandlers(hRegister),
4543
mgrpc.WithReflection(true),
4644
)))
47-
opts = append(opts, server.WithEntrypointConfig(mhttp.NewConfig(
48-
mhttp.WithName("http"),
45+
opts = append(opts, server.WithEntrypointConfig("http", mhttp.NewConfig(
4946
mhttp.WithInsecure(),
5047
mhttp.WithHandlers(hRegister),
5148
)))
52-
opts = append(opts, server.WithEntrypointConfig(mhttp.NewConfig(
53-
mhttp.WithName("https"),
49+
opts = append(opts, server.WithEntrypointConfig("https", mhttp.NewConfig(
5450
mhttp.WithDisableHTTP2(),
5551
mhttp.WithHandlers(hRegister),
5652
)))
57-
opts = append(opts, server.WithEntrypointConfig(mhttp.NewConfig(
58-
mhttp.WithName("h2c"),
53+
opts = append(opts, server.WithEntrypointConfig("h2c", mhttp.NewConfig(
5954
mhttp.WithInsecure(),
6055
mhttp.WithAllowH2C(),
6156
mhttp.WithHandlers(hRegister),
6257
)))
63-
opts = append(opts, server.WithEntrypointConfig(mhttp.NewConfig(
64-
mhttp.WithName("http2"),
58+
opts = append(opts, server.WithEntrypointConfig("http2", mhttp.NewConfig(
6559
mhttp.WithHandlers(hRegister),
6660
)))
67-
opts = append(opts, server.WithEntrypointConfig(mhttp.NewConfig(
68-
mhttp.WithName("http3"),
61+
opts = append(opts, server.WithEntrypointConfig("http3", mhttp.NewConfig(
6962
mhttp.WithHTTP3(),
7063
mhttp.WithHandlers(hRegister),
7164
)))
72-
opts = append(opts, server.WithEntrypointConfig(drpc.NewConfig(
73-
drpc.WithName("drpc"),
65+
opts = append(opts, server.WithEntrypointConfig("drpc", drpc.NewConfig(
7466
drpc.WithHandlers(hRegister),
7567
)))
7668

benchmarks/rps/cmd/orb-rps-server/wire_gen.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

realworld/cmd/realworld/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
_ "github.com/go-orb/plugins/client/middleware/retry"
1616
_ "github.com/go-orb/plugins/client/orb"
1717
_ "github.com/go-orb/plugins/client/orb_transport/grpc"
18+
_ "github.com/go-orb/plugins/client/orb_transport/memory"
1819
_ "github.com/go-orb/plugins/codecs/goccyjson"
1920
_ "github.com/go-orb/plugins/codecs/proto"
2021
_ "github.com/go-orb/plugins/codecs/yaml"
@@ -47,8 +48,10 @@ func main() {
4748
Usage: "Set the registry plugin, one of mdns, consul, memory",
4849
},
4950
},
50-
Commands: []*cli.Command{},
51-
HardcodedConfigs: []cli.HardcodedConfig{{Format: "yaml", Data: config}},
51+
Commands: []*cli.Command{},
52+
53+
MultiServiceConfig: true,
54+
HardcodedConfigs: []cli.HardcodedConfig{{Format: "yaml", Data: config}},
5255
}
5356

5457
app.Commands = append(app.Commands, monolith.MainCommands()...)

rest/auth/cmd/server/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ import (
3030
func provideServerOpts() ([]server.ConfigOption, error) {
3131
opts := []server.ConfigOption{}
3232

33-
opts = append(opts, server.WithEntrypointConfig(mdrpc.NewConfig(
34-
mdrpc.WithName("drpc"),
35-
)))
33+
opts = append(opts, server.WithEntrypointConfig("drpc", mdrpc.NewConfig()))
3634

3735
return opts, nil
3836
}

0 commit comments

Comments
 (0)