redis_connector

package
v0.0.0-...-388d6c9 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package redis_connector implements a connector with redis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

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

Connector is a redis connector

func NewConnector

func NewConnector(client *rdb.Client) *Connector

NewConnector create a new redis connector

func (*Connector) Close

func (q *Connector) Close() error

Close close the queue

func (*Connector) NewConsumer

func (q *Connector) NewConsumer(topic, group string, batchSize int, fn type2.HandleMessage) error

NewConsumer consume Messages from the queue in real time

func (*Connector) Produce

func (q *Connector) Produce(ctx context.Context, msg *types.Message) error

Produce produce a Message to the queue in realtime

Jump to

Keyboard shortcuts

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