mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-14 19:50:38 +00:00
Work on https://github.com/neondatabase/cloud/issues/23721 and https://github.com/neondatabase/cloud/issues/23714 Depends on https://github.com/neondatabase/neon/pull/11111 - Add `/configure_telemetry` API endpoint - Support second rsyslog configuration for Postgres logs export - Enable logs export when compute feature is enabled and configure Postgres to send logs to syslog I have used `/configure_telemetry` name because in the future I see it also being used for configuring a `pg_tracing` extension to export traces. Let me know if you'd rather have these APIs separate. In this case we can rename it to `/configure_rsyslog`.
39 lines
1.1 KiB
Rust
39 lines
1.1 KiB
Rust
//! Structs representing the JSON formats used in the compute_ctl's HTTP API.
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::privilege::Privilege;
|
|
use crate::responses::ComputeCtlConfig;
|
|
use crate::spec::{ComputeSpec, ExtVersion, PgIdent};
|
|
|
|
/// Request of the /configure API
|
|
///
|
|
/// We now pass only `spec` in the configuration request, but later we can
|
|
/// extend it and something like `restart: bool` or something else. So put
|
|
/// `spec` into a struct initially to be more flexible in the future.
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct ConfigurationRequest {
|
|
pub spec: ComputeSpec,
|
|
pub compute_ctl_config: ComputeCtlConfig,
|
|
}
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct ExtensionInstallRequest {
|
|
pub extension: PgIdent,
|
|
pub database: PgIdent,
|
|
pub version: ExtVersion,
|
|
}
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct SetRoleGrantsRequest {
|
|
pub database: PgIdent,
|
|
pub schema: PgIdent,
|
|
pub privileges: Vec<Privilege>,
|
|
pub role: PgIdent,
|
|
}
|
|
|
|
/// Request of the /configure_telemetry API
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct ConfigureTelemetryRequest {
|
|
pub logs_export_host: Option<String>,
|
|
}
|