chromium/third_party/grpc/src/src/core/ext/gcp/metadata_query.cc

//
//
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

#include <grpc/support/port_platform.h>

#include "src/core/ext/gcp/metadata_query.h"

#include <string.h>

#include <initializer_list>
#include <memory>
#include <utility>

#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"

#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/support/log.h>

#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/uri/uri_parser.h"

namespace grpc_core {

TraceFlag grpc_metadata_query_trace(false, "metadata_query");

constexpr const char MetadataQuery::kZoneAttribute[] =;
constexpr const char MetadataQuery::kClusterNameAttribute[] =;
constexpr const char MetadataQuery::kRegionAttribute[] =;
constexpr const char MetadataQuery::kInstanceIdAttribute[] =;
constexpr const char MetadataQuery::kIPv6Attribute[] =;

MetadataQuery::MetadataQuery(
    std::string attribute, grpc_polling_entity* pollent,
    absl::AnyInvocable<void(std::string /* attribute */,
                            absl::StatusOr<std::string> /* result */)>
        callback,
    Duration timeout)
    :{}

MetadataQuery::MetadataQuery(
    std::string metadata_server_name, std::string attribute,
    grpc_polling_entity* pollent,
    absl::AnyInvocable<void(std::string /* attribute */,
                            absl::StatusOr<std::string> /* result */)>
        callback,
    Duration timeout)
    :{}

MetadataQuery::~MetadataQuery() {}

void MetadataQuery::Orphan() {}

void MetadataQuery::OnDone(void* arg, grpc_error_handle error) {}

}  // namespace grpc_core