rebalance

package
v0.0.0-...-ba2213e Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 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 AllocateMessageQueueAveragely

type AllocateMessageQueueAveragely struct {
}

func (AllocateMessageQueueAveragely) Allocate

func (strategy AllocateMessageQueueAveragely) Allocate(consumerGroup string, currentCID string, mqAll []*message.MessageQueue, cidAll []string) []*message.MessageQueue

func (AllocateMessageQueueAveragely) GetName

func (strategy AllocateMessageQueueAveragely) GetName() string

type AllocateMessageQueueStrategy

type AllocateMessageQueueStrategy interface {
	// Allocating by consumer id
	// consumerGroup current consumer group
	// currentCID    current consumer id
	// mqAll         message queue set in current topic
	// cidAll        consumer set in current consumer group
	Allocate(
		consumerGroup string,
		currentCID string,
		mqAll []*message.MessageQueue,
		cidAll []string) []*message.MessageQueue
	// Algorithm name
	GetName() string
}

Jump to

Keyboard shortcuts

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