rmqimpl

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bind

type Bind struct {
	Key      string
	Exchange string
	Nowait   bool
}

type Config

type Config struct {
	Url string

	Logger Logger

	DisconnectRetry         int
	DisconnectRetryInterval time.Duration

	OnDisconnectedRetryFailed func(error)
}

type ConsumeErrFunc

type ConsumeErrFunc func(error)

type ConsumeFunc

type ConsumeFunc func([]byte) error

type Declaration

type Declaration struct {
	Exchanges []Exchange
	Queues    []Queue
}

type Exchange

type Exchange struct {
	Name       string
	Kind       string
	Durable    bool
	AutoDelete bool
	Internal   bool
	Nowait     bool
}

type Logger

type Logger interface {
	Infof(string, ...interface{})
	Errorf(string, ...interface{})
}

type Queue

type Queue struct {
	Name       string
	Durable    bool
	AutoDelete bool
	Exclusive  bool
	Nowait     bool
	Binds      []Bind
}

type Session

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

func NewSession

func NewSession(cfg *Config) (*Session, error)

func NewSessionFromUrl

func NewSessionFromUrl(url string) (*Session, error)

func (*Session) Consume

func (r *Session) Consume(qname, name string, handle ConsumeFunc, errHandle ConsumeErrFunc) error

func (*Session) Declare

func (r *Session) Declare(d Declaration) error

func (*Session) Publish

func (r *Session) Publish(ename, key string, data []byte) error

Jump to

Keyboard shortcuts

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