redis

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: 9 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 RedisStreamsFactory

type RedisStreamsFactory struct{}

RedisStreamsFactory creates Redis Streams sources.

func (*RedisStreamsFactory) Create

func (*RedisStreamsFactory) GetConfigSchema

func (f *RedisStreamsFactory) GetConfigSchema() adapters.ConfigSchema

func (*RedisStreamsFactory) ValidateConfig

func (f *RedisStreamsFactory) ValidateConfig(config adapters.SourceConfig) error

type RedisStreamsSource

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

RedisStreamsSource consumes events from Redis Streams.

func NewRedisStreamsSource

func NewRedisStreamsSource(sourceID string, config StreamsConfig) (*RedisStreamsSource, error)

NewRedisStreamsSource creates a new Redis Streams source.

func (*RedisStreamsSource) GetMetadata

func (r *RedisStreamsSource) GetMetadata() adapters.SourceMetadata

func (*RedisStreamsSource) GetSourceSchema

func (r *RedisStreamsSource) GetSourceSchema() *adapters.Schema

func (*RedisStreamsSource) HealthCheck

func (r *RedisStreamsSource) HealthCheck() error

func (*RedisStreamsSource) Start

func (r *RedisStreamsSource) Start(ctx context.Context) error

func (*RedisStreamsSource) Stop

func (r *RedisStreamsSource) Stop(ctx context.Context) error

func (*RedisStreamsSource) Subscribe

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

type StreamsConfig

type StreamsConfig struct {
	RedisAddr     string        `json:"redis_addr" yaml:"redis_addr"`
	RedisDB       int           `json:"redis_db" yaml:"redis_db"`
	Password      string        `json:"password" yaml:"password"`
	Streams       []string      `json:"streams" yaml:"streams"`
	ConsumerGroup string        `json:"consumer_group" yaml:"consumer_group"`
	ConsumerName  string        `json:"consumer_name" yaml:"consumer_name"`
	BatchSize     int64         `json:"batch_size" yaml:"batch_size"`
	BlockTime     time.Duration `json:"block_time" yaml:"block_time"`
	ClaimMinIdle  time.Duration `json:"claim_min_idle" yaml:"claim_min_idle"`
	ClaimInterval time.Duration `json:"claim_interval" yaml:"claim_interval"`
	SchemaName    string        `json:"schema_name" yaml:"schema_name"`
}

StreamsConfig holds configuration for Redis Streams.

Jump to

Keyboard shortcuts

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