GError * conscience_remote_get_types(const char *cs, GSList **out) { MESSAGE req = metautils_message_create_named (NAME_MSGNAME_CS_GET_SRVNAMES); return gridd_client_exec_and_decode (cs, CS_CLIENT_TIMEOUT, message_marshall_gba_and_clean(req), out, strings_unmarshall); }
GError * conscience_remote_get_services(const char *cs, const char *type, gboolean full, GSList **out) { EXTRA_ASSERT(type != NULL); MESSAGE req = metautils_message_create_named(NAME_MSGNAME_CS_GET_SRV); metautils_message_add_field_str (req, NAME_MSGKEY_TYPENAME, type); if (full) metautils_message_add_field_str(req, NAME_MSGKEY_FULL, "1"); return gridd_client_exec_and_decode (cs, CS_CLIENT_TIMEOUT, message_marshall_gba_and_clean(req), out, service_info_unmarshall); }
GSList * gcluster_get_service_types(addr_info_t *addr, long timeout, GError ** error) { EXTRA_ASSERT (addr != NULL); gchar target[STRLEN_ADDRINFO]; grid_addrinfo_to_string (addr, target, sizeof(target)); GSList *out = NULL; MESSAGE req = metautils_message_create_named (NAME_MSGNAME_CS_GET_SRVNAMES); GError *err = gridd_client_exec_and_decode (target, ((gdouble)timeout)/1000.0, message_marshall_gba_and_clean(req), &out, strings_unmarshall); if (err) { g_prefix_error (&err, "Remote: "); g_error_transmit(error, err); } return out; }
static GError * _m0_remote_m0info (const char *m0, GByteArray *req, GSList **out) { EXTRA_ASSERT (m0 != NULL); EXTRA_ASSERT (out != NULL); GSList *result = NULL; GError *e = gridd_client_exec_and_decode (m0, M0V2_CLIENT_TIMEOUT, req, &result, meta0_info_unmarshall); if (!e) { *out = result; return NULL; } else { g_slist_free_full (result, (GDestroyNotify)meta0_info_clean); *out = NULL; return e; } }
GSList * gcluster_get_services(const char *target, gdouble timeout, const gchar *type, gboolean full, GError ** error) { MESSAGE req = metautils_message_create_named(NAME_MSGNAME_CS_GET_SRV); metautils_message_add_field_str (req, NAME_MSGKEY_TYPENAME, type); if (full) metautils_message_add_field_str(req, NAME_MSGKEY_FULL, "1"); GSList *out = NULL; GError *err = gridd_client_exec_and_decode (target, ((gdouble)timeout)/1000.0, message_marshall_gba_and_clean(req), &out, service_info_unmarshall); if (err) { g_error_transmit(error, err); g_slist_free_full (out, (GDestroyNotify)service_info_clean); } return out; }
static GError* _m2v2_request_ex(const char *url, GByteArray *req, gdouble timeout, GSList **out) { EXTRA_ASSERT (req != NULL); return gridd_client_exec_and_decode (url, timeout, req, out, bean_sequence_decoder); }