Documentation
¶
Overview ¶
Package dataset exposes the freshness dataset read model and manual advance operation used by the REST controller and operator CLI.
Index ¶
- func NamespaceFromPath(raw string) string
- type AdvanceParams
- type AdvanceResult
- type DerivationsParams
- type DerivationsResult
- type Detail
- type ListParams
- type ListResult
- type ProducingJob
- type SLO
- type Service
- func (s *Service) Advance(p AdvanceParams) (*AdvanceResult, error)
- func (s *Service) Derivations(p DerivationsParams) (*DerivationsResult, error)
- func (s *Service) Get(namespace, name string) (*Detail, error)
- func (s *Service) List(p ListParams) (*ListResult, error)
- func (s *Service) WithDatabase(conn *gorm.DB) *Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamespaceFromPath ¶
NamespaceFromPath maps the REST path convention "_" to the v1 empty namespace. All other values are trimmed and used literally.
Types ¶
type AdvanceParams ¶
AdvanceParams carries a manual dataset arrival.
type AdvanceResult ¶
type AdvanceResult struct {
Outcome freshness.Outcome `json:"outcome"`
State models.DatasetState `json:"state"`
}
AdvanceResult is the manual advance outcome plus the resulting state row.
type DerivationsParams ¶
DerivationsParams filters and paginates the append-only derivation audit.
type DerivationsResult ¶
type DerivationsResult struct {
Derivations []models.DatasetDerivation `json:"derivations"`
Total int64 `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
DerivationsResult is the paginated derivation audit response.
type Detail ¶
type Detail struct {
State models.DatasetState `json:"state"`
Declaration *models.DatasetDeclaration `json:"declaration,omitempty"`
SLO *SLO `json:"slo,omitempty"`
Producing *ProducingJob `json:"producing_job,omitempty"`
LastDecision *models.DatasetDerivation `json:"last_decision,omitempty"`
}
Detail returns the state row plus the declaration metadata operators need to understand the SLO and producer.
type ListParams ¶
ListParams filters and paginates the dataset feed.
type ListResult ¶
type ListResult struct {
Datasets []models.DatasetState `json:"datasets"`
Total int64 `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
ListResult is the paginated dataset state response.
type ProducingJob ¶
type ProducingJob struct {
ID uuid.UUID `json:"id"`
Alias string `json:"alias"`
StepName string `json:"step_name,omitempty"`
}
ProducingJob identifies the Caesium job and step that produce a dataset.
type SLO ¶
type SLO struct {
Freshness string `json:"freshness,omitempty"`
MaxStaleness string `json:"max_staleness,omitempty"`
ExpectedEvery string `json:"expected_every,omitempty"`
}
SLO summarizes the declaration-level freshness contract for a dataset.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wraps read-side dataset queries and the manual advance path.
func (*Service) Advance ¶
func (s *Service) Advance(p AdvanceParams) (*AdvanceResult, error)
Advance applies a manual arrival through the freshness.Store contract.
func (*Service) Derivations ¶
func (s *Service) Derivations(p DerivationsParams) (*DerivationsResult, error)
Derivations returns the append-only derivation audit newest-first.
func (*Service) Get ¶
Get returns one dataset's state plus declaration metadata. A declared dataset with no state row is served as unknown rather than 404.
func (*Service) List ¶
func (s *Service) List(p ListParams) (*ListResult, error)
List returns a bounded, paginated, filtered slice of dataset states newest-first. Declared-but-unobserved produced/source datasets are surfaced as synthetic unknown state so operators can see the declared graph before a run advances anything.