sensor

package
v0.0.0-...-bcda716 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 15 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.

Documentation

Overview

Package sensor hosts the cobra commands under `meho sensor ...` for Task #2503 of Initiative #2416 (parent goal #221, the deterministic check layer). Three operator-facing verbs wrap the Sensor admin REST surface (`backend/src/meho_backplane/api/v1/sensors.py`):

  • `meho sensor list [--status <s>] [--cadence-kind <k>] [--tenant <id>] [--limit N] [--offset N] [--json]` — list sensors via GET /api/v1/sensors. Role: operator. The list carries each sensor's latest-result projection, so it is also the status view.
  • `meho sensor create --name <n> --connector-id <id> --op-id <op> --assertion <json> --cadence-kind <interval|cron> (--interval-seconds N | --cron-expr <expr>) [--timezone <tz>] [--severity <degraded|critical>] [--for-seconds N] [--target <json>] [--params <json>] [--identity-sub <sub>] [--tenant <id>] [--json]` — create one sensor via POST /api/v1/sensors. Role: tenant_admin. The op must resolve to a safety_level='safe' descriptor.
  • `meho sensor delete <sensor_id> [--tenant <id>] [--json]` — hard-delete one sensor via DELETE /api/v1/sensors/{id}. Role: tenant_admin.
  • `meho sensor edit <sensor_id> [--name ...] [--connector-id ...] ...` — change some fields in place via PATCH /api/v1/sensors/{id}; the id, the result history and the dashboard memberships stay. Role: tenant_admin.
  • `meho sensor pause|resume <sensor_id> [--tenant <id>] [--json]` — stop or restart the runner's checks of one sensor via PATCH /api/v1/sensors/{id} with status. Role: tenant_admin.
  • `meho sensor run <sensor_id> [--tenant <id>] [--json]` — make one sensor due now via POST /api/v1/sensors/{id}/run; the runner runs it at its next tick. Role: tenant_admin.
  • `meho sensor results <sensor_id> [--from T] [--to T] [--state S] [--limit N] [--cursor C] [--json]` — the per-tick evidence trend query (#2756) via GET /api/v1/sensors/{id}/results: raw rows in evaluated_at ASC order, binary filters only, keyset-cursor paging. Role: operator, own-tenant only.

Every verb drives the generated `api.ClientWithResponses` surface directly (the G0.12-T13 typed-client discipline): consumer-side struct drift can't recur because we consume `api.SensorRead`, `api.SensorListResponse`, and `api.SensorCreate` directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd returns the `meho sensor` parent command, grafted onto the top-level meho tree by cmd/root.go alongside `meho scheduler`, etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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