<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>physicalmeasurement :: Chantico</title>
    <link>https://chantico-300062.ci.tno.nl/api/chantico/internal/physicalmeasurement/index.html</link>
    <description>package physicalmeasurement import &#34;chantico/internal/physicalmeasurement&#34; Index ConstantsVariablesfunc DeleteTargetFile(ctx context.Context, physicalMeasurement *chantico.PhysicalMeasurement) *sm.ActionResult func UpdateState(physicalMeasurement *chantico.PhysicalMeasurement) func WriteFileSDTargets(path string, targets []FileSDTarget) error func WriteTargetFile(ctx context.Context, physicalMeasurement *chantico.PhysicalMeasurement) *sm.ActionResult type FileSDTarget func CreateFileSDTarget(deviceId string, ip string) FileSDTarget func LoadFileSDTargets(path string) ([]FileSDTarget, error) type State Constants const ( StateInit = &#34;init&#34; StateRunning = &#34;Running&#34; StateRunningWithWarning = &#34;Running (with warning)&#34; StateDelete = &#34;Delete&#34; StateFailed = &#34;Failed&#34; ) Variables var StateMachine = sm.Machine[*chantico.PhysicalMeasurement]{ Actions: map[string][]sm.ActionFunction[*chantico.PhysicalMeasurement]{ StateInit: { {Type: sm.ActionFunctionPure, Pure: sm.InitializeFinalizer[*chantico.PhysicalMeasurement]}, {Type: sm.ActionFunctionPure, Pure: WriteTargetFile}, }, StateRunning: {}, StateDelete: { {Type: sm.ActionFunctionPure, Pure: DeleteTargetFile}, {Type: sm.ActionFunctionPure, Pure: sm.RemoveFinalizer[*chantico.PhysicalMeasurement]}, }, StateFailed: {}, }, FailState: StateFailed, } ActionMap defines the actions to execute for each state. With file_sd_configs, Prometheus automatically watches the target files for changes — no explicit reload or config merging is needed. Functions func DeleteTargetFile func DeleteTargetFile( ctx context.Context, physicalMeasurement *chantico.PhysicalMeasurement, ) *sm.ActionResult DeleteTargetFile removes the file_sd_configs target file for this PhysicalMeasurement. Prometheus will automatically stop scraping the removed targets. func UpdateState func UpdateState( physicalMeasurement *chantico.PhysicalMeasurement, ) func WriteFileSDTargets func WriteFileSDTargets(path string, targets []FileSDTarget) error WriteFileSDTargets marshals the targets to JSON and writes them to the given path. func WriteTargetFile func WriteTargetFile( ctx context.Context, physicalMeasurement *chantico.PhysicalMeasurement, ) *sm.ActionResult WriteTargetFile writes a file_sd_configs JSON target file for this PhysicalMeasurement. The file is written to prometheus/targets/&lt;name&gt;.json. Prometheus automatically detects changes to these files and updates its scrape targets. Types type FileSDTarget type FileSDTarget struct { Targets []string `json:&#34;targets&#34;` Labels map[string]string `json:&#34;labels&#34;` } FileSDTarget represents a single target group in Prometheus file_sd_configs format. Prometheus watches these JSON files and automatically picks up changes without needing a reload or restart. See: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config func CreateFileSDTarget func CreateFileSDTarget(deviceId string, ip string) FileSDTarget CreateFileSDTarget creates a file_sd_configs target entry for a PhysicalMeasurement. The labels __param_module and __param_auth are used by the SNMP exporter relabel configs in prometheus.yml to route scrapes through the correct SNMP module. func LoadFileSDTargets func LoadFileSDTargets(path string) ([]FileSDTarget, error) LoadFileSDTargets reads and parses a file_sd_configs JSON file. type State type State string</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>Copyright 2025-2026 TNO. Chantico is licensed under the &lt;a href=&#34;https://www.apache.org/licenses/LICENSE-2.0&#34;&gt;Apache License, Version 2.0&lt;/a&gt;. Published documentation is available under &lt;a href=&#34;https://creativecommons.org/licenses/by-sa/4.0/deed.en&#34;&gt;CC-BY-SA 4.0&lt;/a&gt;.</copyright>
    <atom:link href="https://chantico-300062.ci.tno.nl/api/chantico/internal/physicalmeasurement/index.xml" rel="self" type="application/rss+xml" />
  </channel>
</rss>