class Caco::Prometheus::AdapterInstallPg

Public Instance Methods

build_url(ctx, version:, root:, **) click to toggle source
# File lib/caco/prometheus/adapter_install_pg.rb, line 21
def build_url(ctx, version:, root:, **)
  ctx[:url] = "https://github.com/timescale/pg_prometheus/archive/#{version}.tar.gz"
  ctx[:dest] = "#{root}/pg_prometheus-#{version}.tar.gz"
  ctx[:current_target] = "#{root}/pg_prometheus-#{version}"
  ctx[:current_link] = "#{root}/pg_prometheus-current"
end
check_root(ctx, **) click to toggle source
# File lib/caco/prometheus/adapter_install_pg.rb, line 15
def check_root(ctx, **)
  ctx[:root] = Settings.prometheus.root
  FileUtils.mkdir_p(Settings.prometheus.root)
end
postgresql_shared_library(ctx, **) click to toggle source
# File lib/caco/prometheus/adapter_install_pg.rb, line 99
def postgresql_shared_library(ctx, **)
  Caco::Postgres.add_shared_library("timescaledb")
  Caco::Postgres.add_shared_library("pg_prometheus")
end
postgresql_should_restart(ctx, **) click to toggle source
# File lib/caco/prometheus/adapter_install_pg.rb, line 104
def postgresql_should_restart(ctx, **)
  Caco::Postgres.should_restart!
end