pub struct Transport { /* private fields */ }Implementations§
Source§impl Transport
impl Transport
pub fn new(profile: &Profile) -> Result<Transport>
Sourcepub fn with_debug(profile: &Profile, debug: bool) -> Result<Transport>
pub fn with_debug(profile: &Profile, debug: bool) -> Result<Transport>
Build a transport with HTTP request logging enabled or disabled.
Keeping debug as a bool prevents CLI clap types entering -core.
Sourcepub fn space_path(space: &str, path: &str) -> String
pub fn space_path(space: &str, path: &str) -> String
Prefix non-default spaces with /s/<name>.
Kibana serves the default space at the bare path.
Sourcepub fn kibana_url(&self) -> &str
pub fn kibana_url(&self) -> &str
The Kibana URL this transport targets, exactly as configured.
Sourcepub async fn capabilities(&self) -> Result<&Capabilities>
pub async fn capabilities(&self) -> Result<&Capabilities>
Probe deployment capabilities once for this transport.
Sourcepub async fn require_feature(&self, feature: Feature) -> Result<()>
pub async fn require_feature(&self, feature: Feature) -> Result<()>
Refuse an unverified feature before its public route is called.
pub async fn get(&self, path: &str) -> Result<Value>
Sourcepub async fn get_with_headers(&self, path: &str) -> Result<Responded>
pub async fn get_with_headers(&self, path: &str) -> Result<Responded>
GET a body with its captured headers.
This is separate from get because only the capability probe needs
headers.
pub async fn post(&self, path: &str, body: Option<&Value>) -> Result<Value>
pub async fn put(&self, path: &str, body: &Value) -> Result<Value>
pub async fn patch(&self, path: &str, body: &Value) -> Result<Value>
pub async fn delete(&self, path: &str) -> Result<Value>
Sourcepub async fn get_absolute_es(&self, path: &str) -> Result<Value>
pub async fn get_absolute_es(&self, path: &str) -> Result<Value>
GET Elasticsearch without a Kibana space prefix.
Cloud deployments use a different Elasticsearch host.
Sourcepub async fn post_absolute_es(&self, path: &str, body: &Value) -> Result<Value>
pub async fn post_absolute_es(&self, path: &str, body: &Value) -> Result<Value>
POST JSON to Elasticsearch without a Kibana space prefix or kbn-xsrf
header.
Sourcepub async fn delete_absolute_es(&self, path: &str) -> Result<Value>
pub async fn delete_absolute_es(&self, path: &str) -> Result<Value>
DELETE from Elasticsearch.
The fixture recorder uses this to remove its scratch index.