mqclients

package
v0.0.0-...-5f473f4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const MsgChannelBuffer = 32

Variables

View Source
var MQClients = []string{}

MQClients lists all current mqclients we have available.

Functions

func GetEntry

func GetEntry(m map[string]interface{}, key string) interface{}

Returns first match from a map and handles keys as non case sensitive.

Types

type JetstreamMQClient

type JetstreamMQClient struct {
	JetStreamClient jetstream.JetStream `json:"-"`
	ConsumeContext  *jetstream.ConsumeContext
	// contains filtered or unexported fields
}

func NewJetstreamMQClient

func NewJetstreamMQClient() (mqC *JetstreamMQClient)

func (*JetstreamMQClient) Chan

func (jetstreamMQ *JetstreamMQClient) Chan() (ch chan []byte)

func (*JetstreamMQClient) Channel

func (jetstreamMQ *JetstreamMQClient) Channel() string

func (*JetstreamMQClient) Connect

func (jetstreamMQ *JetstreamMQClient) Connect(ctx context.Context, clientName string, args map[string]interface{}) error

func (*JetstreamMQClient) String

func (jetstreamMQ *JetstreamMQClient) String() string

func (*JetstreamMQClient) Subscribe

func (jetstreamMQ *JetstreamMQClient) Subscribe(ctx context.Context, channelName string) error

func (*JetstreamMQClient) Unsubscribe

func (jetstreamMQ *JetstreamMQClient) Unsubscribe(ctx context.Context)

type KafkaMQClient

type KafkaMQClient struct {
	KafkaClient *kafka.Reader
	// contains filtered or unexported fields
}

func NewKafkaMQClient

func NewKafkaMQClient() (mqC *KafkaMQClient)

func (*KafkaMQClient) Chan

func (kafkaMQ *KafkaMQClient) Chan() (ch chan []byte)

func (*KafkaMQClient) Channel

func (kafkaMQ *KafkaMQClient) Channel() string

func (*KafkaMQClient) Connect

func (kafkaMQ *KafkaMQClient) Connect(ctx context.Context, clientName string, args map[string]interface{}) error

func (*KafkaMQClient) String

func (kafkaMQ *KafkaMQClient) String() string

func (*KafkaMQClient) Subscribe

func (kafkaMQ *KafkaMQClient) Subscribe(ctx context.Context, channelName string) error

func (*KafkaMQClient) Unsubscribe

func (kafkaMQ *KafkaMQClient) Unsubscribe(ctx context.Context)

type RedisMQClient

type RedisMQClient struct {
	RedisClient *redis.Client
	PubSub      *redis.PubSub
	// contains filtered or unexported fields
}

func NewRedisMQClient

func NewRedisMQClient() (mqC *RedisMQClient)

func (*RedisMQClient) Chan

func (redisMQ *RedisMQClient) Chan() (ch chan []byte)

func (*RedisMQClient) Channel

func (redisMQ *RedisMQClient) Channel() string

func (*RedisMQClient) Connect

func (redisMQ *RedisMQClient) Connect(ctx context.Context, clientName string, args map[string]interface{}) error

func (*RedisMQClient) String

func (redisMQ *RedisMQClient) String() string

func (*RedisMQClient) Subscribe

func (redisMQ *RedisMQClient) Subscribe(ctx context.Context, channel string) error

func (*RedisMQClient) Unsubscribe

func (redisMQ *RedisMQClient) Unsubscribe(ctx context.Context)

Jump to

Keyboard shortcuts

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