Documentation
¶
Overview ¶
Package url holds the constants for webserver routing
Index ¶
Constants ¶
const ( // LocalPort is the port for only available from Postgres. LocalPort int32 = 8010 // PostgresMetricsPort is the port for the exporter of PostgreSQL related metrics (HTTP) PostgresMetricsPort int32 = 9187 // PgBouncerMetricsPort is the port for the exporter of PgBouncer related metrics (HTTP) PgBouncerMetricsPort int32 = 9127 // PathFailSafe is the path for the failsafe entrypoint PathFailSafe string = "/failsafe" // PathHealth is the URL path for Health State PathHealth string = "/healthz" // PathReady is the URL path for Ready State PathReady string = "/readyz" // PathStartup is the URL path for the Startup probe PathStartup string = "/startupz" // PathPGControlData is the URL path for PostgreSQL pg_controldata output PathPGControlData string = "/pg/controldata" // PathPgStatus is the URL path for PostgreSQL Status PathPgStatus string = "/pg/status" // PathWALArchiveStatusCondition is the URL path for setting the wal-archive condition on the Cluster object PathWALArchiveStatusCondition string = "/cluster/status/condition/wal/archive" // PathPgBackup is the URL path for PostgreSQL Backup PathPgBackup string = "/pg/backup" // PathPgModeBackup is the URL path to interact with pg_start_backup and pg_stop_backup PathPgModeBackup string = "/pg/mode/backup" // PathPgArchivePartial is the URL path to interact with the partial wal archive PathPgArchivePartial string = "/pg/archive/partial" // PathMetrics is the URL path for Metrics PathMetrics string = "/metrics" // PathUpdate is the URL path for the instance manager update function PathUpdate string = "/update" // PathCache is the URL path for cached resources PathCache string = "/cache/" // StatusPort is the port for status HTTP requests StatusPort int32 = 8000 )
Variables ¶
This section is empty.
Functions ¶
func WriteFailSafe ¶
func WriteFailSafe(w http.ResponseWriter, resp FailSafeResponse) error
WriteFailSafe encodes resp as the JSON response body for a PathFailSafe request.
Types ¶
type FailSafeResponse ¶
type FailSafeResponse struct {
TargetPrimary string `json:"targetPrimary,omitempty"`
}
FailSafeResponse is the JSON body of the PathFailSafe endpoint. It reports the responding instance's view of the cluster's target primary, so a peer that can't reach the API server can learn, via this instance, whether it has already been superseded.
func ParseFailSafe ¶
func ParseFailSafe(body []byte) FailSafeResponse
ParseFailSafe decodes a PathFailSafe response body. An unparseable body (e.g. a pre-upgrade peer's plain "OK" response) yields a zero Response, not an error: it carries no signal.