RepertoireBuilder#

class rubin.repertoire.RepertoireBuilder(config)#

Bases: object

Construct service discovery information from configuration.

This class is responsible for turning a Repertoire configuration, which contains information about a given Phalanx environment plus generic URL construction rules for Phalanx applications, into Repertoire service discovery information suitable for returning to a client.

Parameters:

config (RepertoireSettings) – Repertoire configuration.

Methods Summary

build_discovery(base_url)

Construct service discovery information from the configuration.

build_influxdb(database)

Construct InfluxDB discovery information from the configuration.

Methods Documentation

build_discovery(base_url)#

Construct service discovery information from the configuration.

Parameters:

base_url (str) – Base URL for Repertoire internal links.

Returns:

Service discovery information.

Return type:

Discovery

build_influxdb(database)#

Construct InfluxDB discovery information from the configuration.

Parameters:
  • database (str) – Name of the InfluxDB database.

  • include_credentials – If set to True, include credential information. This requires the credential secrets be available locally to where this code is running, at the configured paths.

Returns:

InfluxDB connection information or None if no such InfluxDB database was found.

Return type:

InfluxDatabase or None