Package com.netflix.genie.agent.rpc
Class GRpcAutoConfiguration
java.lang.Object
com.netflix.genie.agent.rpc.GRpcAutoConfiguration
Spring auto configuration for gRPC components.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.grpc.ManagedChannel
channel
(ArgumentDelegates.ServerArguments serverArguments, List<io.grpc.ClientInterceptor> clientInterceptors) Provide a lazyManagedChannel
bean if none was already defined for communicating with the Genie server.com.netflix.genie.proto.FileStreamServiceGrpc.FileStreamServiceStub
fileStreamClient
(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aFileStreamServiceGrpc.FileStreamServiceStub
.io.grpc.ClientInterceptor
genieGrpcTracingClientInterceptor
(brave.Tracing tracing) Provide aClientInterceptor
which adds tracing information to gRPC calls.com.netflix.genie.proto.HeartBeatServiceGrpc.HeartBeatServiceStub
heartBeatClient
(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aHeartBeatServiceGrpc.HeartBeatServiceStub
.com.netflix.genie.proto.JobServiceGrpc.JobServiceFutureStub
jobClient
(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aJobServiceGrpc.JobServiceFutureStub
.com.netflix.genie.proto.JobKillServiceGrpc.JobKillServiceFutureStub
jobKillClient
(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aJobKillServiceGrpc.JobKillServiceFutureStub
.com.netflix.genie.proto.PingServiceGrpc.PingServiceFutureStub
pingServiceClient
(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aPingServiceGrpc.PingServiceFutureStub
.
-
Constructor Details
-
GRpcAutoConfiguration
public GRpcAutoConfiguration()
-
-
Method Details
-
channel
@Bean @Lazy @ConditionalOnMissingBean(io.grpc.ManagedChannel.class) public io.grpc.ManagedChannel channel(ArgumentDelegates.ServerArguments serverArguments, List<io.grpc.ClientInterceptor> clientInterceptors) Provide a lazyManagedChannel
bean if none was already defined for communicating with the Genie server.- Parameters:
serverArguments
- The server arguments to useclientInterceptors
- The list of available client interceptors that should be added to the generated channel- Returns:
- A
ManagedChannel
instance configured to use plain text over the wire
-
pingServiceClient
@Bean @Scope("prototype") public com.netflix.genie.proto.PingServiceGrpc.PingServiceFutureStub pingServiceClient(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aPingServiceGrpc.PingServiceFutureStub
.- Parameters:
channel
- The managed channel to use to connect to the Genie server- Returns:
- A
PingServiceGrpc.PingServiceFutureStub
instance per use
-
jobClient
@Bean @Scope("prototype") public com.netflix.genie.proto.JobServiceGrpc.JobServiceFutureStub jobClient(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aJobServiceGrpc.JobServiceFutureStub
.- Parameters:
channel
- The managed channel to use to connect to the Genie server- Returns:
- A
JobServiceGrpc.JobServiceFutureStub
instance per use
-
heartBeatClient
@Bean @Scope("prototype") public com.netflix.genie.proto.HeartBeatServiceGrpc.HeartBeatServiceStub heartBeatClient(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aHeartBeatServiceGrpc.HeartBeatServiceStub
.- Parameters:
channel
- The managed channel to use to connect to the Genie server- Returns:
- A
HeartBeatServiceGrpc.HeartBeatServiceStub
instance per use
-
jobKillClient
@Bean @Scope("prototype") public com.netflix.genie.proto.JobKillServiceGrpc.JobKillServiceFutureStub jobKillClient(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aJobKillServiceGrpc.JobKillServiceFutureStub
.- Parameters:
channel
- The managed channel to use to connect to the Genie server- Returns:
- A
JobKillServiceGrpc.JobKillServiceFutureStub
instance per use
-
fileStreamClient
@Bean @Scope("prototype") public com.netflix.genie.proto.FileStreamServiceGrpc.FileStreamServiceStub fileStreamClient(io.grpc.ManagedChannel channel) Provide a prototype bean definition for aFileStreamServiceGrpc.FileStreamServiceStub
.- Parameters:
channel
- The managed channel to use to connect to the Genie server- Returns:
- A
FileStreamServiceGrpc.FileStreamServiceStub
instance per use
-
genieGrpcTracingClientInterceptor
@Bean @ConditionalOnMissingBean(name="genieGrpcTracingClientInterceptor") @Lazy public io.grpc.ClientInterceptor genieGrpcTracingClientInterceptor(brave.Tracing tracing) Provide aClientInterceptor
which adds tracing information to gRPC calls.- Parameters:
tracing
- The BraveTracing
instance- Returns:
- A
ClientInterceptor
for trace propagation
-