types

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExchangeTypeDirect  = "direct"
	ExchangeTypeFanout  = "fanout"
	ExchangeTypeTopic   = "topic"
	ExchangeTypeHeaders = "headers"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Exchange            string
	RoutingKey          string
	Queue               string
	Type                string
	Durable             bool
	AutoDeletedExchange bool
	AutoDeletedQueue    bool
	Handler             ConsumerMessageHandle
}

type ConsumerMessageHandle

type ConsumerMessageHandle = func(data []byte) Result

type Producer

type Producer struct {
	Exchange    string
	RoutingKey  string
	Data        any
	Expiration  string //过期时间,毫秒
	Persistence bool   //持久化消息
	Priority    uint8  //优先级0-9
}

type Result added in v0.0.7

type Result = byte

Jump to

Keyboard shortcuts

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