Add per path metadata

This commit is contained in:
Eran Gonen 2025-11-27 14:07:07 +02:00
parent b4e4f54729
commit 078b3aa29b
3 changed files with 5 additions and 0 deletions

View file

@ -229,6 +229,9 @@ type Path struct {
RunOnUnread string `json:"runOnUnread"` RunOnUnread string `json:"runOnUnread"`
RunOnRecordSegmentCreate string `json:"runOnRecordSegmentCreate"` RunOnRecordSegmentCreate string `json:"runOnRecordSegmentCreate"`
RunOnRecordSegmentComplete string `json:"runOnRecordSegmentComplete"` RunOnRecordSegmentComplete string `json:"runOnRecordSegmentComplete"`
// Custom metadata
Metadata map[string]any `json:"metadata"`
} }
func (pconf *Path) setDefaults() { func (pconf *Path) setDefaults() {

View file

@ -590,6 +590,7 @@ func (pa *path) doAPIPathsGet(req pathAPIPathsGetReq) {
} }
return ret return ret
}(), }(),
Metadata: pa.conf.Metadata,
}, },
} }
} }

View file

@ -85,6 +85,7 @@ type APIPath struct {
BytesReceived uint64 `json:"bytesReceived"` BytesReceived uint64 `json:"bytesReceived"`
BytesSent uint64 `json:"bytesSent"` BytesSent uint64 `json:"bytesSent"`
Readers []APIPathSourceOrReader `json:"readers"` Readers []APIPathSourceOrReader `json:"readers"`
Metadata map[string]any `json:"metadata" yaml:"metadata"`
} }
// APIPathList is a list of paths. // APIPathList is a list of paths.