Class AgentRpcServersAutoConfiguration

java.lang.Object
com.netflix.genie.web.spring.autoconfigure.agent.apis.rpc.servers.AgentRpcServersAutoConfiguration

@Configuration @EnableConfigurationProperties(GRpcServerProperties.class) @AutoConfigureAfter(name="com.netflix.springboot.grpc.server.GrpcServerAutoConfiguration") public class AgentRpcServersAutoConfiguration extends Object
Controls whether a gRPC server is configured and started for this Genie node or not.
Since:
4.0.0
  • Constructor Details

    • AgentRpcServersAutoConfiguration

      public AgentRpcServersAutoConfiguration()
  • Method Details

    • gRpcServer

      @Bean @ConditionalOnMissingBean(io.grpc.Server.class) public io.grpc.Server gRpcServer(@Value("${grpc.server.port:0}") int port, Set<io.grpc.BindableService> services, List<io.grpc.ServerInterceptor> serverInterceptors, brave.Tracing tracing)
      Create a Server if one isn't already present in the context.
      Parameters:
      port - The port this server should listen on
      services - The gRPC services this server should serve
      serverInterceptors - The ServerInterceptor implementations that should be applied to all services
      tracing - The Brave Tracing instance to use
      Returns:
      A Netty server instance based on the provided information
    • gRpcServerManager

      @Bean @ConditionalOnMissingBean(GRpcServerManager.class) public GRpcServerManager gRpcServerManager(io.grpc.Server server)
      Create a GRpcServerManager instance to manage the lifecycle of the gRPC server if one isn't already defined.
      Parameters:
      server - The Server instance to manage
      Returns:
      A GRpcServerManager instance