mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Merge branch 'master' of https://github.com/sogou/workflow into nossl
This commit is contained in:
@@ -69,7 +69,7 @@ static bool parse_list_service_result(const json_value_t *root,
|
||||
std::vector<struct ConsulServiceTags>& result);
|
||||
|
||||
bool WFConsulTask::get_discover_result(
|
||||
std::vector<struct ConsulServiceInstance>& result)
|
||||
std::vector<struct ConsulServiceInstance>& result) const
|
||||
{
|
||||
json_value_t *root;
|
||||
int errno_bak;
|
||||
@@ -97,7 +97,7 @@ bool WFConsulTask::get_discover_result(
|
||||
}
|
||||
|
||||
bool WFConsulTask::get_list_service_result(
|
||||
std::vector<struct ConsulServiceTags>& result)
|
||||
std::vector<struct ConsulServiceTags>& result) const
|
||||
{
|
||||
json_value_t *root;
|
||||
int errno_bak;
|
||||
|
||||
@@ -43,10 +43,10 @@ class WFConsulTask : public WFGenericTask
|
||||
{
|
||||
public:
|
||||
bool get_discover_result(
|
||||
std::vector<struct protocol::ConsulServiceInstance>& result);
|
||||
std::vector<struct protocol::ConsulServiceInstance>& result) const;
|
||||
|
||||
bool get_list_service_result(
|
||||
std::vector<struct protocol::ConsulServiceTags>& result);
|
||||
std::vector<struct protocol::ConsulServiceTags>& result) const;
|
||||
|
||||
public:
|
||||
void set_service(const struct protocol::ConsulService *service);
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
{
|
||||
this->consul_index = consul_index;
|
||||
}
|
||||
|
||||
long long get_consul_index() const { return this->consul_index; }
|
||||
|
||||
const protocol::HttpResponse *get_http_resp() const
|
||||
|
||||
@@ -33,6 +33,11 @@ public:
|
||||
return this->chunk;
|
||||
}
|
||||
|
||||
const protocol::HttpMessageChunk *get_chunk() const
|
||||
{
|
||||
return this->chunk;
|
||||
}
|
||||
|
||||
public:
|
||||
protocol::HttpRequest *get_req()
|
||||
{
|
||||
@@ -44,6 +49,16 @@ public:
|
||||
return this->task->get_resp();
|
||||
}
|
||||
|
||||
const protocol::HttpRequest *get_req() const
|
||||
{
|
||||
return this->task->get_req();
|
||||
}
|
||||
|
||||
const protocol::HttpResponse *get_resp() const
|
||||
{
|
||||
return this->task->get_resp();
|
||||
}
|
||||
|
||||
public:
|
||||
void set_watch_timeout(int timeout)
|
||||
{
|
||||
|
||||
@@ -1647,3 +1647,8 @@ KafkaMetaList *WFKafkaClient::get_meta_list()
|
||||
return &this->member->meta_list;
|
||||
}
|
||||
|
||||
const KafkaMetaList *WFKafkaClient::get_meta_list() const
|
||||
{
|
||||
return &this->member->meta_list;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,11 @@ public:
|
||||
return &this->result;
|
||||
}
|
||||
|
||||
const protocol::KafkaResult *get_result() const
|
||||
{
|
||||
return &this->result;
|
||||
}
|
||||
|
||||
int get_kafka_error() const
|
||||
{
|
||||
return this->kafka_error;
|
||||
@@ -170,7 +175,7 @@ public:
|
||||
public:
|
||||
protocol::KafkaMetaList *get_meta_list();
|
||||
|
||||
protocol::KafkaBrokerList *get_broker_list();
|
||||
const protocol::KafkaMetaList *get_meta_list() const;
|
||||
|
||||
private:
|
||||
class KafkaMember *member;
|
||||
|
||||
@@ -40,6 +40,11 @@ public:
|
||||
return this->task->get_resp();
|
||||
}
|
||||
|
||||
const protocol::RedisResponse *get_resp() const
|
||||
{
|
||||
return this->task->get_resp();
|
||||
}
|
||||
|
||||
public:
|
||||
/* User needs to call 'release()' exactly once, anywhere. */
|
||||
void release()
|
||||
|
||||
@@ -67,6 +67,9 @@ public:
|
||||
INPUT *get_input() { return &this->input; }
|
||||
OUTPUT *get_output() { return &this->output; }
|
||||
|
||||
const INPUT *get_input() const { return &this->input; }
|
||||
const OUTPUT *get_output() const { return &this->output; }
|
||||
|
||||
public:
|
||||
void *user_data;
|
||||
|
||||
@@ -133,6 +136,9 @@ public:
|
||||
REQ *get_req() { return &this->req; }
|
||||
RESP *get_resp() { return &this->resp; }
|
||||
|
||||
const REQ *get_req() const { return &this->req; }
|
||||
const RESP *get_resp() const { return &this->resp; }
|
||||
|
||||
public:
|
||||
void *user_data;
|
||||
|
||||
@@ -330,6 +336,8 @@ public:
|
||||
public:
|
||||
ARGS *get_args() { return &this->args; }
|
||||
|
||||
const ARGS *get_args() const { return &this->args; }
|
||||
|
||||
long get_retval() const
|
||||
{
|
||||
if (this->state == WFT_STATE_SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user