Grpc_discovery.Listening_config
The server side of the discovery specifies where to serve, and how to advertize that information so clients can find you.
The intended usage for this library is to add arg
to you command line parameters, and resolve the t
using sockaddr
in the body of your server command. Also, you should call advertize
after starting to serve, to save the discovery information to a file that clients will load.
module Specification : sig ... end
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val sexp_of_t : t -> Sexplib0.Sexp.t
val arg : t Base.Or_error.t Cmdlang.Command.Arg.t
val sockaddr : t -> Eio.Net.Sockaddr.stream
val advertize :
t ->
env:< fs : [> Eio.Fs.dir_ty ] Eio.Path.t.. > ->
sw:Eio.Switch.t ->
listening_socket:[> 'tag Eio.Net.listening_socket_ty ] Eio.Resource.t ->
Base.unit
To be run on the server after starting to listen for connections. If a discovery file is created it is attempted to be removed when the supplied switch is released.