dp-frontend-dataset-controller

command module
v1.94.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 34 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dp-frontend-dataset-controller

An HTTP service for the controlling of data and rendering templates relevant to a particular dataset.

Configuration

Environment variable Default Description
API_ROUTER_URL http://localhost:23200/v1 The URL of the dp-api-router
BIND_ADDR :20200 The host and port to bind to.
CACHE_NAVIGATION_UPDATE_INTERVAL 10s How often the navigation cache is updated
DEBUG false Enable debug mode
DOWNLOAD_SERVICE_URL http://localhost:23600 The URL of dp-download-service.
ENABLE_MULTIVARIATE false Enable 2021 multivariate datasets
ENABLE_NEW_NAV_BAR false Enable new nav bar
ENABLE_PROFILER false Flag to enable go profiler
FEEDBACK_API_URL http://localhost:23200/v1/feedback The public dp-api-router address for feedback, not the internal one
GRACEFUL_SHUTDOWN_TIMEOUT 5s The graceful shutdown timeout in seconds
HEALTHCHECK_CRITICAL_TIMEOUT 90s The time taken for the health changes from warning state to critical due to subsystem check failures
HEALTHCHECK_INTERVAL 30s The time between calling healthcheck endpoints for check subsystems
OTEL_BATCH_TIMEOUT 5s Interval between pushes to OT Collector
OTEL_EXPORTER_OTLP_ENDPOINT http://localhost:4317 URL for OpenTelemetry endpoint
OTEL_SERVICE_NAME "dp-frontend-dataset-controller" Service name to report to telemetry tools
OTEL_ENABLED false Feature flag to enable OpenTelemetry
PATTERN_LIBRARY_ASSETS_PATH "" Pattern library location
PPROF_TOKEN "" The profiling token to access service profiling
SITE_DOMAIN localhost
SUPPORTED_LANGUAGES []string{"en", "cy"} Supported languages

Profiling

An optional /debug endpoint has been added, in order to profile this service via pprof go library. In order to use this endpoint, you will need to enable profiler flag and set a PPROF_TOKEN:

export ENABLE_PROFILER=true
export PPROF_TOKEN={generated uuid}

Then you can us the profiler as follows:

1- Start service, load test or if on environment wait for a number of requests to be made.

2- Send authenticated request and store response in a file (this can be best done in command line like so: curl <host>:<port>/debug/pprof/heap -H "Authorization: Bearer {generated uuid} > heap.out - see pprof documentation on other endpoints

3- View profile either using a web ui to navigate data (a) or using pprof on command line to navigate data (b) a) go tool pprof -http=:8080 heap.out b) go tool pprof heap.out, -o flag to see various options

Licence

Copyright © 2025, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package clients is a generated GoMock package.
Package clients is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL