qos

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpQos

type AmqpQos struct {
	sync.Mutex
	// contains filtered or unexported fields
}

AmqpQos represents qos system

func NewAmqpQos

func NewAmqpQos(prefetchCount uint16, prefetchSize uint32) *AmqpQos

NewAmqpQos returns new instance of AmqpQos

func (*AmqpQos) Copy

func (qos *AmqpQos) Copy() *AmqpQos

Copy safe copy current qos instance to new one

func (*AmqpQos) Dec

func (qos *AmqpQos) Dec(count uint16, size uint32)

Dec decrement current count and size

func (*AmqpQos) Inc

func (qos *AmqpQos) Inc(count uint16, size uint32) bool

Inc increment current count and size Returns true if increment success Returns false if after increment size or count will be more than prefetchCount or prefetchSize

func (*AmqpQos) IsActive

func (qos *AmqpQos) IsActive() bool

IsActive check is qos rules are active both prefetchSize and prefetchCount must be 0

func (*AmqpQos) PrefetchCount

func (qos *AmqpQos) PrefetchCount() uint16

PrefetchCount returns prefetchCount

func (*AmqpQos) PrefetchSize

func (qos *AmqpQos) PrefetchSize() uint32

PrefetchSize returns prefetchSize

func (*AmqpQos) Release

func (qos *AmqpQos) Release()

Release reset current count and size

func (*AmqpQos) Update

func (qos *AmqpQos) Update(prefetchCount uint16, prefetchSize uint32)

Update set new prefetchCount and prefetchSize

Jump to

Keyboard shortcuts

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