redis_batch

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportSource

func ExportSource(ctx context.Context, connCfg ConnConfig, cfg SourceConfig) ([]string, error)

func ImportReduceOutputs

func ImportReduceOutputs(ctx context.Context, connCfg ConnConfig, cfg SinkConfig) error

Types

type ConnConfig

type ConnConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Password string `json:"password"`
	DB       int    `json:"db"`
}

func (*ConnConfig) WithDefaults

func (c *ConnConfig) WithDefaults()

type SinkAdapter

type SinkAdapter struct {
	// contains filtered or unexported fields
}

func NewSinkAdapter

func NewSinkAdapter(connCfg ConnConfig, cfg SinkConfig) SinkAdapter

func (SinkAdapter) Import

func (a SinkAdapter) Import(ctx context.Context) error

func (SinkAdapter) InputGlob

func (a SinkAdapter) InputGlob() string

type SinkConfig

type SinkConfig struct {
	KeyPrefix  string `json:"key_prefix"`
	ValueField string `json:"value_field"`
	InputGlob  string `json:"inputglob"`
	Replace    bool   `json:"replace"`
}

func (*SinkConfig) WithDefaults

func (c *SinkConfig) WithDefaults()

type SourceAdapter

type SourceAdapter struct {
	// contains filtered or unexported fields
}

func NewSourceAdapter

func NewSourceAdapter(connCfg ConnConfig, cfg SourceConfig) SourceAdapter

func (SourceAdapter) Export

func (a SourceAdapter) Export(ctx context.Context) ([]string, error)

type SourceConfig

type SourceConfig struct {
	KeyPattern string `json:"key_pattern"`
	KeyField   string `json:"key_field"`
	ValField   string `json:"val_field"`
	ScanCount  int    `json:"scan_count"`
	OutputDir  string `json:"outputdir"`
	FilePrefix string `json:"fileprefix"`
}

func (*SourceConfig) WithDefaults

func (c *SourceConfig) WithDefaults()

Jump to

Keyboard shortcuts

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