broker

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

gen for home toolset

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllProvider

func GetAllProvider() []interface{}

Types

type Config

type Config struct {
	Stream     string
	NoMkStream bool
	MaxLen     int64 // MAXLEN N
	// Approx causes MaxLen and MinID to use "~" matcher (instead of "=").
	Approx bool
	Limit  int64
}

type RedisBroker

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

@Bean

func NewRedisBroker

func NewRedisBroker() *RedisBroker

func (*RedisBroker) Consumer

func (r *RedisBroker) Consumer(job constraint.Job)

func (*RedisBroker) Init

func (r *RedisBroker) Init()

func (*RedisBroker) Loop

func (r *RedisBroker) Loop()

Loop 开启消费已经设置的stream

func (*RedisBroker) Push

func (r *RedisBroker) Push(event interface{}, names ...string)

func (*RedisBroker) SetConfig

func (r *RedisBroker) SetConfig(client constraint.RedisClient, config ...Config)

func (*RedisBroker) SetWorker

func (r *RedisBroker) SetWorker(worker constraint.Worker)

Jump to

Keyboard shortcuts

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