34#ifndef A11_NET_DESCRIBE_ENDPOINT_H_
35#define A11_NET_DESCRIBE_ENDPOINT_H_
43#include <absl/base/nullability.h>
44#include <absl/status/statusor.h>
60 std::string_view
name, std::string_view query)>;
94 const DescribeEndpointOptions& options,
95 std::string* absl_nonnull
name);
113 const DescribeEndpointOptions& options,
const HttpRequest& request,
114 const std::shared_ptr<Http2ResponseWriter>& response,
Completion values used by every asynchronous A11 operation.
A11's nghttp2 HTTP/2 client, server, and streaming primitives.
std::string path
Definition main.cc:133
bool MatchDescribePath(std::string_view path, const DescribeEndpointOptions &options, std::string *absl_nonnull name)
Whether path addresses the describe endpoint, and what it names.
Definition describe_endpoint.cc:56
constexpr std::string_view kDefaultDescribeEndpoint
Default path serving the action descriptors.
Definition describe_endpoint.h:63
std::vector< std::pair< std::string, std::string > > HttpHeaders
An ordered list of (name, value) HTTP/2 header fields.
Definition http2.h:70
std::optional< a11::Task > TryDescribeOverHttp(const DescribeEndpointOptions &options, const HttpRequest &request, const std::shared_ptr< Http2ResponseWriter > &response, HttpHeaders extra_headers)
Answers request from options, if it is addressed to it.
Definition describe_endpoint.cc:77
std::string_view QueryOfPath(std::string_view path)
The query part of path, without the ?.
Definition describe_endpoint.cc:46
std::function< absl::StatusOr< std::string >(std::string_view name, std::string_view query)> DescribeActionsHandler
Answers a discovery request without opening a wire stream.
Definition describe_endpoint.h:60
Where and whether a server answers discovery over plain HTTP.
Definition describe_endpoint.h:72
bool Enabled() const
Whether this server should answer discovery at all.
Definition describe_endpoint.h:77
std::string path
Definition describe_endpoint.h:74
DescribeActionsHandler handler
Definition describe_endpoint.h:73