Documentation
¶
Index ¶
- type Config
- type Factory
- type Source
- func (s *Source) GetMetadata() adapters.SourceMetadata
- func (s *Source) GetSourceSchema() *adapters.Schema
- func (s *Source) HealthCheck() error
- func (s *Source) Start(ctx context.Context) error
- func (s *Source) Stop(ctx context.Context) error
- func (s *Source) Subscribe(ctx context.Context, factTypes []string) (<-chan *adapters.TypedFact, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
SourceID string `json:"source_id" yaml:"source_id"`
Region string `json:"region" yaml:"region"`
Bucket string `json:"bucket" yaml:"bucket"`
Prefix string `json:"prefix" yaml:"prefix"`
Mode string `json:"mode" yaml:"mode"` // "batch" or "stream"
Format string `json:"format" yaml:"format"` // "json", "ndjson", or "parquet"
PollInterval time.Duration `json:"poll_interval" yaml:"poll_interval"`
MaxObjects int `json:"max_objects" yaml:"max_objects"`
MaxObjectBytes int64 `json:"max_object_bytes" yaml:"max_object_bytes"`
SchemaName string `json:"schema_name" yaml:"schema_name"`
SchemaVersion string `json:"schema_version" yaml:"schema_version"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
ForcePathStyle bool `json:"force_path_style" yaml:"force_path_style"`
AccessKey string `json:"access_key" yaml:"access_key"`
SecretKey string `json:"secret_key" yaml:"secret_key"`
SessionToken string `json:"session_token" yaml:"session_token"`
StartAfter string `json:"start_after" yaml:"start_after"`
StartTime string `json:"start_time" yaml:"start_time"`
MappingStrategy string `json:"mapping_strategy" yaml:"mapping_strategy"` // prefix|exact|suffix|contains
Timeout time.Duration `json:"timeout" yaml:"timeout"`
}
Config holds S3 source configuration.
type Factory ¶
type Factory struct{}
Factory creates S3 sources from generic config.
func (*Factory) Create ¶
func (f *Factory) Create(config adapters.SourceConfig) (adapters.FactSource, error)
func (*Factory) GetConfigSchema ¶
func (f *Factory) GetConfigSchema() adapters.ConfigSchema
func (*Factory) ValidateConfig ¶
func (f *Factory) ValidateConfig(config adapters.SourceConfig) error
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements an S3-backed fact source with batch and streaming modes.
func NewSource ¶
func NewSource(config *Config, mappings []adapters.FactMapping) (*Source, error)
NewSource creates a new S3 source.
func (*Source) GetMetadata ¶
func (s *Source) GetMetadata() adapters.SourceMetadata
GetMetadata returns source metadata.
func (*Source) GetSourceSchema ¶
GetSourceSchema returns schema metadata.
Click to show internal directories.
Click to hide internal directories.