pub struct FeedSpec {
pub id: String,
pub field: String,
pub primary_key: Vec<String>,
}Expand description
#vuln-roadmap: one declarative external-data feed on a feed:
manifest — see Manifest::feed. Unlike inventory ExplodeSpec
(keyed per (pc_id, job_id)), a feed is GLOBAL fleet-wide reference
data: the controller-tier job’s script fetches + shapes it, prints the
array under field inside a #KANADE-FEED-BEGIN/END
fence, and the projector REPLACES that feed’s rows wholesale in the
shared feeds table keyed (feed_id, item_id). The full element JSON
lands in a data column, so a view: SQL json_extracts whatever
shape the feed carries — no per-feed schema, no dynamic DDL. One
manifest may declare several feeds.
Fields§
§id: StringStable feed identifier — the feed_id partition in the shared
feeds table. Operators choose this; namespace it (cisa-kev,
endoflife-windows) so feeds don’t collide. A new result for the
same id replaces that partition wholesale.
field: StringJSON array key under the (fenced) payload to ingest. E.g.
"vulnerabilities" for { vulnerabilities: [{...}, {...}] }.
primary_key: Vec<String>Element-level field(s) whose values uniquely identify an item
within the feed — they form the item_id key (joined for a
composite key). Required: operators must think about uniqueness
(e.g. ["cveID"] for CISA KEV). An element missing any of these is
skipped (it has no stable identity).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FeedSpec
impl<'de> Deserialize<'de> for FeedSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for FeedSpec
impl JsonSchema for FeedSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more