Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureDiffEvent ¶
type FeatureDiffEvent struct {
// EventID is the unique identifier for this specific execution/trigger.
EventID string `json:"event_id"`
// SearchID is the identifier of the saved search that was checked.
SearchID string `json:"search_id"`
// Query is the actual text of the query (e.g. "browsers:chrome").
// Provided here so consumers don't need to look it up.
Query string `json:"query"`
// Reasons contains machine-readable tags explaining why this event was generated
// (e.g. ["DATA_UPDATED", "QUERY_EDITED"]).
Reasons []Reason `json:"reasons"`
// Summary is a JSON string summarizing the changes (e.g. '{"added": 1, "removed": 0}').
Summary []byte `json:"summary"`
// StateID is the ID of the full snapshot blob in storage.
StateID string `json:"state_id"`
// StateBlobPath is the path to the full snapshot blob in storage.
StateBlobPath string `json:"state_blob_path"`
// DiffID is the ID of the diff blob in storage.
DiffID string `json:"diff_id"`
// DiffBlobPath is the path to the diff blob in storage.
DiffBlobPath string `json:"diff_blob_path"`
// GeneratedAt is the timestamp when the event was created.
GeneratedAt time.Time `json:"generated_at"`
// Frequency is the frequency that triggered the generation of this diff.
Frequency JobFrequency `json:"frequency"`
}
FeatureDiffEvent represents a change event for a saved search query. It is the contract between the Event Producer and downstream workers (e.g. Push Delivery Worker).
func (FeatureDiffEvent) APIVersion ¶
func (FeatureDiffEvent) APIVersion() string
func (FeatureDiffEvent) Kind ¶
func (FeatureDiffEvent) Kind() string
type JobFrequency ¶
type JobFrequency string
const ( FrequencyUnknown JobFrequency = "UNKNOWN" FrequencyImmediate JobFrequency = "IMMEDIATE" FrequencyWeekly JobFrequency = "WEEKLY" FrequencyMonthly JobFrequency = "MONTHLY" )
func ToJobFrequency ¶
func ToJobFrequency(freq workertypes.JobFrequency) JobFrequency
func (JobFrequency) ToWorkertypes ¶
func (f JobFrequency) ToWorkertypes() workertypes.JobFrequency
Click to show internal directories.
Click to hide internal directories.