是否可以将服务作为参数传递给Thrift中另一个服务中的方法?将Thrift服务作为参数传递
service MyService {
void foo(1: MyOtherService),
}
service MyOtherService {
void bar(),
}
是否可以将服务作为参数传递给Thrift中另一个服务中的方法?将Thrift服务作为参数传递
service MyService {
void foo(1: MyOtherService),
}
service MyOtherService {
void bar(),
}
服务不是节俭序列化(换句话说:没有意义的经由网络发送服务 - 将与发送参数远程机器上执行你FOO功能)。
我认为不是。
什么是真正的目标? 我有直觉你想要好的OO模式。 这是一种参数化吗?
[Thrift异步函数中的回调?]的可能重复(https://stackoverflow.com/questions/2554999/callbacks-in-thrift-asynchronous-functions) – JensG