nmq

package module
v0.0.0-...-f6f6772 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: MIT Imports: 5 Imported by: 0

README

nmq

GoDoc Go Report Card

Message Queue based on Redis

See examples

Documentation

Overview

Package nmq provides definition of the NMQ(new message queue) based on Redis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RedisAddress  string
	RedisPassword string
	Name          string
	RedisDB       int
}

Config defines configuration for NMQ

type Consumer

type Consumer interface {
	Do(*Message)
}

Consumer provides interface for consumer from queue

type Message

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

Message defined delivered message

type Queue

type Queue interface {
	AddConsumer(string, Consumer) error
	AddChannel(string) error
	Publish(string, interface{}) error
	Start() error
}

Queue defines abstraction for nmq

func New

func New(c *Config) (Queue, error)

New provides initialization of the app

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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