Class GrpcServerConfiguration.Builder

    • Method Detail

      • name

        public GrpcServerConfiguration.Builder name​(String name)
        Set the name of the gRPC server.

        Configuration key: name

        Parameters:
        name - the name of the gRPC server
        Returns:
        an updated builder
      • port

        public GrpcServerConfiguration.Builder port​(int port)
        Sets server port. If port is 0 or less then any available ephemeral port will be used.

        Configuration key: port

        Parameters:
        port - the server port
        Returns:
        an updated builder
      • context

        public GrpcServerConfiguration.Builder context​(Context context)
        Configure the application scoped context to be used as a parent for webserver request contexts.
        Parameters:
        context - top level context
        Returns:
        an updated builder
      • tracer

        public GrpcServerConfiguration.Builder tracer​(Supplier<? extends io.opentracing.Tracer> tracerBuilder)
        Sets an opentracing.io tracer. (Default is GlobalTracer.)
        Parameters:
        tracerBuilder - a tracer builder to set; will be built as a first step of this method execution
        Returns:
        updated builder
      • workersCount

        public GrpcServerConfiguration.Builder workersCount​(int workers)
        Sets a count of threads in pool used to process HTTP requests. Default value is CPU_COUNT * 2.

        Configuration key: workers

        Parameters:
        workers - a workers count
        Returns:
        an updated builder
      • tlsConfig

        public GrpcServerConfiguration.Builder tlsConfig​(GrpcTlsDescriptor tlsConfig)
        Configures TLS configuration to use with the server socket. If not null then the server enforces an TLS communication.
        Parameters:
        tlsConfig - a TLS configuration to use
        Returns:
        this builder
      • context

        public Context context()