LCOV - code coverage report
Current view: top level - libs/pageserver_api/src - config.rs (source / functions) Coverage Total Hit
Test: f081ec316c96fa98335efd15ef501745aa4f015d.info Lines: 100.0 % 1 1
Test Date: 2024-06-25 15:11:17 Functions: 11.1 % 27 3

            Line data    Source code
       1              : use std::collections::HashMap;
       2              : 
       3              : use const_format::formatcp;
       4              : 
       5              : #[cfg(test)]
       6              : mod tests;
       7              : 
       8              : pub const DEFAULT_PG_LISTEN_PORT: u16 = 64000;
       9              : pub const DEFAULT_PG_LISTEN_ADDR: &str = formatcp!("127.0.0.1:{DEFAULT_PG_LISTEN_PORT}");
      10              : pub const DEFAULT_HTTP_LISTEN_PORT: u16 = 9898;
      11              : pub const DEFAULT_HTTP_LISTEN_ADDR: &str = formatcp!("127.0.0.1:{DEFAULT_HTTP_LISTEN_PORT}");
      12              : 
      13              : // Certain metadata (e.g. externally-addressable name, AZ) is delivered
      14              : // as a separate structure.  This information is not neeed by the pageserver
      15              : // itself, it is only used for registering the pageserver with the control
      16              : // plane and/or storage controller.
      17              : //
      18           10 : #[derive(PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
      19              : pub struct NodeMetadata {
      20              :     #[serde(rename = "host")]
      21              :     pub postgres_host: String,
      22              :     #[serde(rename = "port")]
      23              :     pub postgres_port: u16,
      24              :     pub http_host: String,
      25              :     pub http_port: u16,
      26              : 
      27              :     // Deployment tools may write fields to the metadata file beyond what we
      28              :     // use in this type: this type intentionally only names fields that require.
      29              :     #[serde(flatten)]
      30              :     pub other: HashMap<String, serde_json::Value>,
      31              : }
        

Generated by: LCOV version 2.1-beta