using google::protobuf::util::TimeUtil;
-typedef google::protobuf::Map<grpc::string, collectd::types::MetadataValue> grpcMetadata;
+typedef google::protobuf::Map<grpc::string, collectd::types::MetadataValue>
+ grpcMetadata;
/*
* private types
switch (md_type) {
case MD_TYPE_STRING:
char *md_string;
- if (meta_data_get_string(meta, key, &md_string) != 0 || md_string == nullptr) {
+ if (meta_data_get_string(meta, key, &md_string) != 0 ||
+ md_string == nullptr) {
strarray_free(meta_data_keys, meta_data_keys_len);
return grpc::Status(grpc::StatusCode::INTERNAL,
- grpc::string("missing metadata"));
+ grpc::string("missing metadata"));
}
md_value.set_string_value(md_string);
free(md_string);
if (meta_data_get_signed_int(meta, key, &int64_value) != 0) {
strarray_free(meta_data_keys, meta_data_keys_len);
return grpc::Status(grpc::StatusCode::INTERNAL,
- grpc::string("missing metadata"));
+ grpc::string("missing metadata"));
}
md_value.set_int64_value(int64_value);
break;
if (meta_data_get_unsigned_int(meta, key, &uint64_value) != 0) {
strarray_free(meta_data_keys, meta_data_keys_len);
return grpc::Status(grpc::StatusCode::INTERNAL,
- grpc::string("missing metadata"));
+ grpc::string("missing metadata"));
}
md_value.set_uint64_value(uint64_value);
break;
if (meta_data_get_double(meta, key, &double_value) != 0) {
strarray_free(meta_data_keys, meta_data_keys_len);
return grpc::Status(grpc::StatusCode::INTERNAL,
- grpc::string("missing metadata"));
+ grpc::string("missing metadata"));
}
md_value.set_double_value(double_value);
break;
if (meta_data_get_boolean(meta, key, &bool_value) != 0) {
strarray_free(meta_data_keys, meta_data_keys_len);
return grpc::Status(grpc::StatusCode::INTERNAL,
- grpc::string("missing metadata"));
+ grpc::string("missing metadata"));
}
md_value.set_bool_value(bool_value);
break;
return grpc::Status(grpc::StatusCode::RESOURCE_EXHAUSTED,
grpc::string("failed to metadata list"));
}
- for (auto kv: rpc_metadata) {
+ for (auto kv : rpc_metadata) {
auto k = kv.first.c_str();
auto v = kv.second;
break;
default:
meta_data_destroy(*md_out);
- return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT,
- grpc::string("Metadata of unknown type"));
+ return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT,
+ grpc::string("Metadata of unknown type"));
}
}
return grpc::Status::OK;
break;
}
if (uc_iterator_get_meta(iter, &vl.meta) < 0) {
- status = grpc::Status(grpc::StatusCode::INTERNAL,
- grpc::string("failed to retrieve value metadata"));
+ status =
+ grpc::Status(grpc::StatusCode::INTERNAL,
+ grpc::string("failed to retrieve value metadata"));
}
value_lists->push(vl);