diff --git a/examples/helloworld/lib/helloworld.pb.ex b/examples/helloworld/lib/helloworld.pb.ex index 7c65811d..3f7c1720 100644 --- a/examples/helloworld/lib/helloworld.pb.ex +++ b/examples/helloworld/lib/helloworld.pb.ex @@ -1,31 +1,25 @@ defmodule Helloworld.HelloRequest do - use Protobuf + @moduledoc false + use Protobuf, protoc_gen_elixir_version: "0.10.0", syntax: :proto3 - @type t :: %__MODULE__{ - name: String.t() - } - defstruct [:name] - - field :name, 1, optional: true, type: :string + field :name, 1, type: :string end defmodule Helloworld.HelloReply do - use Protobuf - - @type t :: %__MODULE__{ - message: String.t() - } - defstruct [:message] + @moduledoc false + use Protobuf, protoc_gen_elixir_version: "0.10.0", syntax: :proto3 - field :message, 1, optional: true, type: :string + field :message, 1, type: :string end defmodule Helloworld.Greeter.Service do - use GRPC.Service, name: "helloworld.Greeter" + @moduledoc false + use GRPC.Service, name: "helloworld.Greeter", protoc_gen_elixir_version: "0.10.0" rpc :SayHello, Helloworld.HelloRequest, Helloworld.HelloReply end defmodule Helloworld.Greeter.Stub do + @moduledoc false use GRPC.Stub, service: Helloworld.Greeter.Service end diff --git a/examples/helloworld/lib/helloworld_app.ex b/examples/helloworld/lib/helloworld_app.ex index 93500609..3295d0d4 100644 --- a/examples/helloworld/lib/helloworld_app.ex +++ b/examples/helloworld/lib/helloworld_app.ex @@ -2,10 +2,8 @@ defmodule HelloworldApp do use Application def start(_type, _args) do - import Supervisor.Spec - children = [ - supervisor(GRPC.Server.Supervisor, [{Helloworld.Endpoint, 50051}]) + {GRPC.Server.Supervisor, {Helloworld.Endpoint, 50051}} ] opts = [strategy: :one_for_one, name: HelloworldApp]