Translate all README files to Russian
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
# device-control-service (Go)
|
||||
|
||||
Status: not implemented yet.
|
||||
Статус: пока не реализован.
|
||||
|
||||
Responsibility:
|
||||
- Expose a gRPC API (see `proto/device_control.proto`) for issuing commands
|
||||
to devices — called by Laravel (manual control) and rule-engine-service
|
||||
(rule-triggered actions).
|
||||
- Publish the command to the device's MQTT topic (`devices/{device_id}/commands`)
|
||||
and listen for acknowledgements (`devices/{device_id}/ack`).
|
||||
- Maintain the Device Shadow pattern in Redis: `desired_state` (what the user
|
||||
wants) vs `reported_state` (what the device confirmed), plus `status` and
|
||||
`last_seen`.
|
||||
- Owns the health-check loop (or delegates to health-check-service): a ticker
|
||||
goroutine that flips a device to `offline` when `last_seen` exceeds a
|
||||
timeout, and emits an event for notification-service.
|
||||
Зона ответственности:
|
||||
- Предоставляет gRPC API (см. `proto/device_control.proto`) для отправки
|
||||
команд устройствам — вызывается из Laravel (ручное управление) и из
|
||||
rule-engine-service (действия по срабатыванию правил).
|
||||
- Публикует команду в MQTT-топик устройства (`devices/{device_id}/commands`)
|
||||
и слушает подтверждения (`devices/{device_id}/ack`).
|
||||
- Поддерживает паттерн Device Shadow в Redis: `desired_state` (чего хочет
|
||||
пользователь) против `reported_state` (что подтвердило устройство), плюс
|
||||
`status` и `last_seen`.
|
||||
- Владеет циклом health-check (либо делегирует его health-check-service):
|
||||
горутина-тикер переводит устройство в `offline`, когда `last_seen`
|
||||
превышает таймаут, и генерирует событие для notification-service.
|
||||
|
||||
Not this service's job: deciding *when* to send a command based on sensor
|
||||
thresholds — that's rule-engine-service's logic. This service only executes
|
||||
and tracks state for whatever command it's given.
|
||||
Не входит в зону ответственности: решение о том, *когда* отправлять команду
|
||||
на основе показаний датчиков — это логика rule-engine-service. Этот сервис
|
||||
только исполняет команды и отслеживает состояние для той команды, что ему дали.
|
||||
|
||||
Reference in New Issue
Block a user