71 lines
1.5 KiB
JSON
71 lines
1.5 KiB
JSON
{
|
|
"module": "mesh-watcher",
|
|
"version": "1",
|
|
"slug": "watch",
|
|
"consumes": [
|
|
"mesh-controller.doctor-heartbeat"
|
|
],
|
|
"invokes": [
|
|
"mesh-watcher.watcher_ping",
|
|
"seat:mesh-controller.seats"
|
|
],
|
|
"own-secrets": {
|
|
"telegram-token": "${dir:state}/telegram-token"
|
|
},
|
|
"tools": [
|
|
"watcher_status",
|
|
"watcher_last_heard",
|
|
"watcher_test",
|
|
"watcher_ping"
|
|
],
|
|
"config": {
|
|
"telegram-chat-id": {
|
|
"type": "string",
|
|
"description": "The Telegram chat the watcher reports to: the chat's id, a number, or @name of a channel; empty reports to none.",
|
|
"trusted": true,
|
|
"default": ""
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "settings",
|
|
"type": "file",
|
|
"path": "${dir:state}/settings.json",
|
|
"mode": "0600",
|
|
"takes-config": ["telegram-chat-id"],
|
|
"merge": "json",
|
|
"template": "files/settings.json"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-watcher",
|
|
"binary": "mesh-watcher",
|
|
"loads": [
|
|
"mesh-watcher"
|
|
],
|
|
"env": {
|
|
"MESH_WATCHER_SETTINGS": "${dir:state}/settings.json",
|
|
"MESH_WATCHER_TELEGRAM_TOKEN_FILE": "${dir:state}/telegram-token"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|