Documentation
¶
Overview ¶
Package service provides the orchestration layer for pulse operations.
Index ¶
- type Cohort
- type Service
- func (s *Service) Compose(ctx context.Context, composed *types.ComposedRequest) ([]*types.Response, error)
- func (s *Service) Facet(ctx context.Context, path string, field string) ([]string, error)
- func (s *Service) Open(_ context.Context, path string) (*Cohort, error)
- func (s *Service) Process(ctx context.Context, req *types.Request) (*types.Response, error)
- func (s *Service) Sample(ctx context.Context, path string, n int) ([]map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cohort ¶
type Cohort struct {
// contains filtered or unexported fields
}
Cohort represents an opened .pulse file with its parsed schema.
func (*Cohort) RecordCount ¶
RecordCount returns the number of records in the cohort file. It reads the file and counts records based on the schema's per-record byte size.
func (*Cohort) Records ¶
func (c *Cohort) Records(_ context.Context) (processing.RecordIterator, error)
Records returns a streaming iterator over records in the cohort. Records are decoded lazily from disk — the full file is not materialized.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the orchestration layer connecting filesystem, encoding, and processing.
func (*Service) Compose ¶
func (s *Service) Compose(ctx context.Context, composed *types.ComposedRequest) ([]*types.Response, error)
Compose executes multiple requests, returning a response for each.
func (*Service) Facet ¶
Facet returns distinct values for the named field in the cohort. For categorical fields, it returns the dictionary values. For numeric fields, it returns string representations of all distinct values seen.