Module Grpc_discovery.Connection_config

The client side of the discovery answers the question: "Where is the service running?"

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 client command.

type t =
  1. | Tcp of {
    1. host : [ `Localhost | `Ipaddr of Eio.Net.Ipaddr.v4v6 ];
    2. port : Base.int;
    }
  2. | Unix of {
    1. path : Fpath_base.Fpath.t;
    }
  3. | Discovery_file of {
    1. path : Fpath_base.Fpath.t;
    }
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 -> env:< fs : [> Eio.Fs.dir_ty ] Eio.Path.t.. > -> Eio.Net.Sockaddr.stream Base.Or_error.t
val to_args : t -> Base.string Base.list

Returns the arguments that a client command needs to be supplied to rebuild t via arg. This is used by tests and by Grpc_test_helpers.Config.grpc_discovery to create the right invocations for clients whose cli uses arg.