s3

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func (s *Source) GetSourceSchema() *adapters.Schema

GetSourceSchema returns schema metadata.

func (*Source) HealthCheck

func (s *Source) HealthCheck() error

HealthCheck checks bucket access.

func (*Source) Start

func (s *Source) Start(ctx context.Context) error

Start initializes the S3 client.

func (*Source) Stop

func (s *Source) Stop(ctx context.Context) error

Stop stops the source.

func (*Source) Subscribe

func (s *Source) Subscribe(ctx context.Context, factTypes []string) (<-chan *adapters.TypedFact, error)

Subscribe polls S3 through one serialized worker per source generation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL