Annotation Interface GrpcClient
@Target({FIELD,PARAMETER})
@Retention(RUNTIME)
@Documented
@Inherited
@Bean
public @interface GrpcClient
Grpc客户端自定义注解
注释BlockingStub,自动创建GrpcChannel注入
- 作者:
- ok1996
-
必需元素概要
所需元素 -
可选元素概要
可选元素修饰符和类型可选元素说明Class<? extends ClientCallStartHeaders>Grpc设置请求头实现类,当实现类只有一个时可为空long设置Grpc调用超时时间-单位毫秒,默认5000毫秒
-
元素详细资料
-
value
String value获取 simple.grpc.client.channel.{value}.address 配置项- 返回:
- {value}值
-
-
-
timeout
long timeout设置Grpc调用超时时间-单位毫秒,默认5000毫秒优先级高于配置项 simple.grpc.client.timeout
- 返回:
- 超时时间
- 默认值:
- -1L
-
headerClass
Class<? extends ClientCallStartHeaders> headerClassGrpc设置请求头实现类,当实现类只有一个时可为空- 返回:
- 实现类
- 默认值:
- cn.iosd.starter.grpc.client.interceptor.ClientCallStartHeaders.class
-