connectors

package
v0.0.0-...-23b4f48 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaConnector

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

func NewKafkaConnector

func NewKafkaConnector(ctx context.Context, args *NewKafkaConnectorArgs) *KafkaConnector

func (*KafkaConnector) Healthcheck

func (k *KafkaConnector) Healthcheck() error

func (*KafkaConnector) Shutdown

func (k *KafkaConnector) Shutdown()

type NewKafkaConnectorArgs

type NewKafkaConnectorArgs struct {
	SeedBrokerURLs []string `yaml:"seedBrokerURLs" validate:"required,gt=0,dive,notblank"`
}

type NewPostgresConnectorArgs

type NewPostgresConnectorArgs struct {
	URL string `yaml:"url" validate:"required,notblank"`
}

type NewRedisConnectorArgs

type NewRedisConnectorArgs struct {
	NodeAddresses []string `yaml:"nodeAddresses" validate:"required,gt=0,dive,notblank"`

	Username string `yaml:"username" validate:"required,notblank"`
	Password string `yaml:"password" validate:"required,notblank"`
}

type PostgresConnector

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

func (*PostgresConnector) GetConnection

func (p *PostgresConnector) GetConnection() *sql.DB

func (*PostgresConnector) Healthcheck

func (p *PostgresConnector) Healthcheck() error

func (*PostgresConnector) Shutdown

func (p *PostgresConnector) Shutdown()

type RedisConnector

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

func NewRedisConnector

func NewRedisConnector(ctx context.Context, args *NewRedisConnectorArgs) *RedisConnector

func (*RedisConnector) Del

func (r *RedisConnector) Del(ctx context.Context, keys ...string) error

func (*RedisConnector) Get

func (r *RedisConnector) Get(ctx context.Context, key string) (string, error)

func (*RedisConnector) Healthcheck

func (r *RedisConnector) Healthcheck() error

func (*RedisConnector) Set

func (r *RedisConnector) Set(ctx context.Context,
	key string,
	value interface{},
	expiration time.Duration,
) error

func (*RedisConnector) Shutdown

func (r *RedisConnector) Shutdown()

Jump to

Keyboard shortcuts

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