admin

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONSUME_ACTIVELY                                      = ConsumeType("PULL")
	CONSUME_PASSIVELY                                     = ConsumeType("PUSH")
	BROADCASTING                                          = MessageModel("BROADCASTING")
	CLUSTERING                                            = MessageModel("CLUSTERING")
	CONSUME_FROM_LAST_OFFSET                              = ConsumeFromWhere("CONSUME_FROM_LAST_OFFSET")
	CONSUME_FROM_LAST_OFFSET_AND_FROM_MIN_WHEN_BOOT_FIRST = ConsumeFromWhere("CONSUME_FROM_LAST_OFFSET_AND_FROM_MIN_WHEN_BOOT_FIRST")
	CONSUME_FROM_MIN_OFFSET                               = ConsumeFromWhere("CONSUME_FROM_MIN_OFFSET")
	CONSUME_FROM_MAX_OFFSET                               = ConsumeFromWhere("CONSUME_FROM_MAX_OFFSET")
	CONSUME_FROM_FIRST_OFFSET                             = ConsumeFromWhere("CONSUME_FROM_FIRST_OFFSET")
	CONSUME_FROM_TIMESTAMP                                = ConsumeFromWhere("CONSUME_FROM_TIMESTAMP")
)
View Source
const (
	V3_0_0_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_ALPHA1         = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA1          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA2          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA3          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA4          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA5          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA6_SNAPSHOT = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA6          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA7_SNAPSHOT = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA7          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA8_SNAPSHOT = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA8          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA9_SNAPSHOT = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_BETA9          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_0_FINAL          = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_1_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_1                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_2_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_2                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_3_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_3                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_4_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_4                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_5_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_5                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_6_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_6                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_7_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_7                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_8_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_8                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_9_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_9                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_10_SNAPSHOT      = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_10               = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_11_SNAPSHOT      = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_11               = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_12_SNAPSHOT      = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_12               = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_13_SNAPSHOT      = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_13               = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_14_SNAPSHOT      = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_14               = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_15_SNAPSHOT      = ClientVersion("V4_0_0_SNAPSHOT")
	V3_0_15               = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_0_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_0                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_1_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_1                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_2_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_2                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_3_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_3                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_4_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_4                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_5_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_5                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_6_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_6                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_7_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_7                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_8_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_8                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_9_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_1_9                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_0_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_0                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_1_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_1                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_2_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_2                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_3_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_3                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_4_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_4                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_5_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_5                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_6_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_6                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_7_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_7                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_8_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_8                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_9_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_2_9                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_3_1_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_3_1                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_3_2_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_3_2                = ClientVersion("V4_0_0_SNAPSHOT")
	V3_3_3_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V3_3_3                = ClientVersion("V3_3_3")
	V3_3_4_SNAPSHOT       = ClientVersion("V3_3_4_SNAPSHOT")
	V3_3_4                = ClientVersion("V3_3_4")
	V3_3_5_SNAPSHOT       = ClientVersion("V3_3_5_SNAPSHOT")
	V3_3_5                = ClientVersion("V3_3_5")
	V3_3_6_SNAPSHOT       = ClientVersion("V3_3_6_SNAPSHOT")
	V3_3_6                = ClientVersion("V3_3_6")
	V3_3_7_SNAPSHOT       = ClientVersion("V3_3_7_SNAPSHOT")
	V3_3_7                = ClientVersion("V3_3_7")
	V3_3_8_SNAPSHOT       = ClientVersion("V3_3_8_SNAPSHOT")
	V3_3_8                = ClientVersion("V3_3_8")
	V3_3_9_SNAPSHOT       = ClientVersion("V3_3_9_SNAPSHOT")
	V3_3_9                = ClientVersion("V3_3_9")
	V3_4_1_SNAPSHOT       = ClientVersion("V3_4_1_SNAPSHOT")
	V3_4_1                = ClientVersion("V3_4_1")
	V3_4_2_SNAPSHOT       = ClientVersion("V3_4_2_SNAPSHOT")
	V3_4_2                = ClientVersion("V3_4_2")
	V3_4_3_SNAPSHOT       = ClientVersion("V3_4_3_SNAPSHOT")
	V3_4_3                = ClientVersion("V3_4_3")
	V3_4_4_SNAPSHOT       = ClientVersion("V3_4_4_SNAPSHOT")
	V3_4_4                = ClientVersion("V3_4_4")
	V3_4_5_SNAPSHOT       = ClientVersion("V3_4_5_SNAPSHOT")
	V3_4_5                = ClientVersion("V3_4_5")
	V3_4_6_SNAPSHOT       = ClientVersion("V3_4_6_SNAPSHOT")
	V3_4_6                = ClientVersion("V3_4_6")
	V3_4_7_SNAPSHOT       = ClientVersion("V3_4_7_SNAPSHOT")
	V3_4_7                = ClientVersion("V3_4_7")
	V3_4_8_SNAPSHOT       = ClientVersion("V3_4_8_SNAPSHOT")
	V3_4_8                = ClientVersion("V3_4_8")
	V3_4_9_SNAPSHOT       = ClientVersion("V3_4_9_SNAPSHOT")
	V3_4_9                = ClientVersion("V3_4_9")
	V3_5_1_SNAPSHOT       = ClientVersion("V3_5_1_SNAPSHOT")
	V3_5_1                = ClientVersion("V3_5_1")
	V3_5_2_SNAPSHOT       = ClientVersion("V3_5_2_SNAPSHOT")
	V3_5_2                = ClientVersion("V3_5_2")
	V3_5_3_SNAPSHOT       = ClientVersion("V3_5_3_SNAPSHOT")
	V3_5_3                = ClientVersion("V3_5_3")
	V3_5_4_SNAPSHOT       = ClientVersion("V3_5_4_SNAPSHOT")
	V3_5_4                = ClientVersion("V3_5_4")
	V3_5_5_SNAPSHOT       = ClientVersion("V3_5_5_SNAPSHOT")
	V3_5_5                = ClientVersion("V3_5_5")
	V3_5_6_SNAPSHOT       = ClientVersion("V3_5_6_SNAPSHOT")
	V3_5_6                = ClientVersion("V3_5_6")
	V3_5_7_SNAPSHOT       = ClientVersion("V3_5_7_SNAPSHOT")
	V3_5_7                = ClientVersion("V3_5_7")
	V3_5_8_SNAPSHOT       = ClientVersion("V3_5_8_SNAPSHOT")
	V3_5_8                = ClientVersion("V3_5_8")
	V3_5_9_SNAPSHOT       = ClientVersion("V3_5_9_SNAPSHOT")
	V3_5_9                = ClientVersion("V3_5_9")
	V3_6_1_SNAPSHOT       = ClientVersion("V3_6_1_SNAPSHOT")
	V3_6_1                = ClientVersion("V3_6_1")
	V3_6_2_SNAPSHOT       = ClientVersion("V3_6_2_SNAPSHOT")
	V3_6_2                = ClientVersion("V3_6_2")
	V3_6_3_SNAPSHOT       = ClientVersion("V3_6_3_SNAPSHOT")
	V3_6_3                = ClientVersion("V3_6_3")
	V3_6_4_SNAPSHOT       = ClientVersion("V3_6_4_SNAPSHOT")
	V3_6_4                = ClientVersion("V3_6_4")
	V3_6_5_SNAPSHOT       = ClientVersion("V3_6_5_SNAPSHOT")
	V3_6_5                = ClientVersion("V3_6_5")
	V3_6_6_SNAPSHOT       = ClientVersion("V3_6_6_SNAPSHOT")
	V3_6_6                = ClientVersion("V3_6_6")
	V3_6_7_SNAPSHOT       = ClientVersion("V3_6_7_SNAPSHOT")
	V3_6_7                = ClientVersion("V3_6_7")
	V3_6_8_SNAPSHOT       = ClientVersion("V3_6_8_SNAPSHOT")
	V3_6_8                = ClientVersion("V3_6_8")
	V3_6_9_SNAPSHOT       = ClientVersion("V3_6_9_SNAPSHOT")
	V3_6_9                = ClientVersion("V3_6_9")
	V3_7_1_SNAPSHOT       = ClientVersion("V3_7_1_SNAPSHOT")
	V3_7_1                = ClientVersion("V3_7_1")
	V3_7_2_SNAPSHOT       = ClientVersion("V3_7_2_SNAPSHOT")
	V3_7_2                = ClientVersion("V3_7_2")
	V3_7_3_SNAPSHOT       = ClientVersion("V3_7_3_SNAPSHOT")
	V3_7_3                = ClientVersion("V3_7_3")
	V3_7_4_SNAPSHOT       = ClientVersion("V3_7_4_SNAPSHOT")
	V3_7_4                = ClientVersion("V3_7_4")
	V3_7_5_SNAPSHOT       = ClientVersion("V3_7_5_SNAPSHOT")
	V3_7_5                = ClientVersion("V3_7_5")
	V3_7_6_SNAPSHOT       = ClientVersion("V3_7_6_SNAPSHOT")
	V3_7_6                = ClientVersion("V3_7_6")
	V3_7_7_SNAPSHOT       = ClientVersion("V3_7_7_SNAPSHOT")
	V3_7_7                = ClientVersion("V3_7_7")
	V3_7_8_SNAPSHOT       = ClientVersion("V3_7_8_SNAPSHOT")
	V3_7_8                = ClientVersion("V3_7_8")
	V3_7_9_SNAPSHOT       = ClientVersion("V3_7_9_SNAPSHOT")
	V3_7_9                = ClientVersion("V3_7_9")
	V3_8_1_SNAPSHOT       = ClientVersion("V3_8_1_SNAPSHOT")
	V3_8_1                = ClientVersion("V3_8_1")
	V3_8_2_SNAPSHOT       = ClientVersion("V3_8_2_SNAPSHOT")
	V3_8_2                = ClientVersion("V3_8_2")
	V3_8_3_SNAPSHOT       = ClientVersion("V3_8_3_SNAPSHOT")
	V3_8_3                = ClientVersion("V3_8_3")
	V3_8_4_SNAPSHOT       = ClientVersion("V3_8_4_SNAPSHOT")
	V3_8_4                = ClientVersion("V3_8_4")
	V3_8_5_SNAPSHOT       = ClientVersion("V3_8_5_SNAPSHOT")
	V3_8_5                = ClientVersion("V3_8_5")
	V3_8_6_SNAPSHOT       = ClientVersion("V3_8_6_SNAPSHOT")
	V3_8_6                = ClientVersion("V3_8_6")
	V3_8_7_SNAPSHOT       = ClientVersion("V3_8_7_SNAPSHOT")
	V3_8_7                = ClientVersion("V3_8_7")
	V3_8_8_SNAPSHOT       = ClientVersion("V3_8_8_SNAPSHOT")
	V3_8_8                = ClientVersion("V3_8_8")
	V3_8_9_SNAPSHOT       = ClientVersion("V3_8_9_SNAPSHOT")
	V3_8_9                = ClientVersion("V3_8_9")
	V3_9_1_SNAPSHOT       = ClientVersion("V3_9_1_SNAPSHOT")
	V3_9_1                = ClientVersion("V3_9_1")
	V3_9_2_SNAPSHOT       = ClientVersion("V3_9_2_SNAPSHOT")
	V3_9_2                = ClientVersion("V3_9_2")
	V3_9_3_SNAPSHOT       = ClientVersion("V3_9_3_SNAPSHOT")
	V3_9_3                = ClientVersion("V3_9_3")
	V3_9_4_SNAPSHOT       = ClientVersion("V3_9_4_SNAPSHOT")
	V3_9_4                = ClientVersion("V3_9_4")
	V3_9_5_SNAPSHOT       = ClientVersion("V3_9_5_SNAPSHOT")
	V3_9_5                = ClientVersion("V3_9_5")
	V3_9_6_SNAPSHOT       = ClientVersion("V3_9_6_SNAPSHOT")
	V3_9_6                = ClientVersion("V3_9_6")
	V3_9_7_SNAPSHOT       = ClientVersion("V3_9_7_SNAPSHOT")
	V3_9_7                = ClientVersion("V3_9_7")
	V3_9_8_SNAPSHOT       = ClientVersion("V3_9_8_SNAPSHOT")
	V3_9_8                = ClientVersion("V3_9_8")
	V3_9_9_SNAPSHOT       = ClientVersion("V3_9_9_SNAPSHOT")
	V3_9_9                = ClientVersion("V3_9_9")
	V4_0_0_SNAPSHOT       = ClientVersion("V4_0_0_SNAPSHOT")
	V4_0_0                = ClientVersion("V4_0_0")
	V4_1_0_SNAPSHOT       = ClientVersion("V4_1_0_SNAPSHOT")
	V4_1_0                = ClientVersion("V4_1_0")
	V4_2_0_SNAPSHOT       = ClientVersion("V4_2_0_SNAPSHOT")
	V4_2_0                = ClientVersion("V4_2_0")
	V4_3_0_SNAPSHOT       = ClientVersion("V4_3_0_SNAPSHOT")
	V4_3_0                = ClientVersion("V4_3_0")
	V4_4_0_SNAPSHOT       = ClientVersion("V4_4_0_SNAPSHOT")
	V4_4_0                = ClientVersion("V4_4_0")
	V4_5_0_SNAPSHOT       = ClientVersion("V4_5_0_SNAPSHOT")
	V4_6_0                = ClientVersion("V4_6_0")
	V4_7_0                = ClientVersion("V4_7_0")
	V4_8_0                = ClientVersion("V4_8_0")
	V4_9_0                = ClientVersion("V4_9_0")
	V4_9_1                = ClientVersion("V4_9_1")
	V4_9_2                = ClientVersion("V4_9_2")
	V4_9_3                = ClientVersion("V4_9_3")
	V4_9_4                = ClientVersion("V4_9_4")
	V4_9_5                = ClientVersion("V4_9_5")
	V4_9_6                = ClientVersion("V4_9_6")
	V4_9_7                = ClientVersion("V4_9_7")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin interface {
	CreateTopic(ctx context.Context, opts ...OptionCreate) error
	DeleteTopic(ctx context.Context, opts ...OptionDelete) error

	GetAllSubscriptionGroup(ctx context.Context, brokerAddr string, timeoutMillis time.Duration) (*SubscriptionGroupWrapper, error)
	FetchAllTopicList(ctx context.Context) (*TopicList, error)
	QueryTopicRouteInfo(topic string) (*internal.TopicRouteData, error)
	QueryConsumersByTopic(topic string) (*internal.TopicRouteData, error)
	QueryConsumerConnectsByGroup(ctx context.Context, group string) (*ConsumerConnection, error)
	//GetBrokerClusterInfo(ctx context.Context) (*remote.RemotingCommand, error)
	FetchPublishMessageQueues(ctx context.Context, topic string) ([]*primitive.MessageQueue, error)
	Close() error
}

type AdminConsumerRunningInfo added in v1.0.4

type AdminConsumerRunningInfo struct {
	*internal.ConsumerRunningInfo
	RemotingSerializable
}

type AdminOption

type AdminOption func(options *adminOptions)

func WithCredentials

func WithCredentials(c primitive.Credentials) AdminOption

func WithNamespace

func WithNamespace(namespace string) AdminOption

WithNamespace set the namespace of admin

func WithResolver

func WithResolver(resolver primitive.NsResolver) AdminOption

WithResolver nameserver resolver to fetch nameserver addr

type ClientVersion

type ClientVersion string

type ClusterInfo

type ClusterInfo struct {
	BrokerAddrTable  map[string]*internal.BrokerData `json:"brokerAddrTable"`
	ClusterAddrTable map[string][]string             `json:"clusterAddrTable"`
	RemotingSerializable
}

type Connection

type Connection struct {
	ClientId   string
	ClientAddr string
	Language   remote.LanguageCode
	Version    int64
}

type ConsumeFromWhere

type ConsumeFromWhere string

type ConsumeStats

type ConsumeStats struct {
	OffsetTable map[*primitive.MessageQueue]*OffsetWrapper `json:"-"`
	ConsumeTps  float64                                    `json:"consumeTps"`
	RemotingSerializable
}

func (*ConsumeStats) ComputeTotalDiff

func (c *ConsumeStats) ComputeTotalDiff() int64

type ConsumeType

type ConsumeType string

type ConsumerConfigInfo added in v1.0.4

type ConsumerConfigInfo struct {
	ClusterNameList         []string                `json:"clusterNameList"`
	BrokerNameList          []string                `json:"brokerNameList"`
	SubscriptionGroupConfig SubscriptionGroupConfig `json:"subscriptionGroupConfig"`
}

type ConsumerConnection

type ConsumerConnection struct {
	ConnectionSet     []Connection
	SubscriptionTable map[string]SubscriptionData
	ConsumeType       ConsumeType
	MessageModel      MessageModel
	ConsumeFromWhere  ConsumeFromWhere
	RemotingSerializable
}

func (*ConsumerConnection) ComputeMinVersion

func (c *ConsumerConnection) ComputeMinVersion() int64

type ConsumerGroupRollBackStat added in v1.0.4

type ConsumerGroupRollBackStat struct {
	Status            bool             `json:"status"`
	ErrMsg            string           `json:"errMsg"`
	RollbackStatsList []*RollbackStats `json:"rollbackStatsList"`
}

type DataVersion

type DataVersion struct {
	Timestamp int64
	Counter   int32
}

type DeleteSubGroupRequest added in v1.0.4

type DeleteSubGroupRequest struct {
	GroupName      string   `json:"groupName"`
	BrokerNameList []string `json:"brokerNameList"`
}

type GetMaxOffsetResponseHeader added in v1.0.4

type GetMaxOffsetResponseHeader struct {
	Offset int64 `json:"offset"`
	RemotingSerializable
}

type GroupConsumeInfo

type GroupConsumeInfo struct {
	Group        string
	Version      string
	Count        int
	ConsumeType  ConsumeType
	MessageModel MessageModel
	ConsumeTps   int
	DiffTotal    int64
}

type MessageModel

type MessageModel string

type MqAdmin

type MqAdmin struct {
	Cli internal.RMQClient
	// contains filtered or unexported fields
}

func NewAdmin

func NewAdmin(opts ...AdminOption) (*MqAdmin, error)

NewAdmin initialize admin

func (*MqAdmin) Close

func (a *MqAdmin) Close() error

func (*MqAdmin) ConsumerCreateOrUpdateRequest added in v1.0.4

func (a *MqAdmin) ConsumerCreateOrUpdateRequest(config *ConsumerConfigInfo) (bool, error)

func (*MqAdmin) CreateTopic

func (a *MqAdmin) CreateTopic(ctx context.Context, opts ...OptionCreate) error

CreateTopic create topic. TODO: another implementation like sarama, without brokerAddr as input

func (*MqAdmin) DeleteSubGroup added in v1.0.4

func (a *MqAdmin) DeleteSubGroup(request *DeleteSubGroupRequest) bool

func (*MqAdmin) DeleteTopic

func (a *MqAdmin) DeleteTopic(ctx context.Context, opts ...OptionDelete) error

DeleteTopic delete topic in both broker and nameserver.

func (*MqAdmin) ExamineSubscriptionGroupConfig added in v1.0.4

func (a *MqAdmin) ExamineSubscriptionGroupConfig(group string) ([]*ConsumerConfigInfo, error)

func (*MqAdmin) FetchAllTopicList

func (a *MqAdmin) FetchAllTopicList(ctx context.Context) (*TopicList, error)

func (*MqAdmin) FetchBrokerNameSetBySubscriptionGroup added in v1.0.4

func (a *MqAdmin) FetchBrokerNameSetBySubscriptionGroup(group string) ([]string, error)

func (*MqAdmin) FetchPublishMessageQueues

func (a *MqAdmin) FetchPublishMessageQueues(ctx context.Context, topic string) ([]*primitive.MessageQueue, error)

func (*MqAdmin) GetAllSubscriptionGroup

func (a *MqAdmin) GetAllSubscriptionGroup(ctx context.Context, brokerAddr string, timeoutMillis time.Duration) (*SubscriptionGroupWrapper, error)

func (*MqAdmin) GetConsumerConnectionInfo added in v1.0.4

func (a *MqAdmin) GetConsumerConnectionInfo(group string) (*ConsumerConnection, error)

func (*MqAdmin) QueryConsumeStatsList added in v1.0.4

func (a *MqAdmin) QueryConsumeStatsList(topic, group string) ([]*TopicConsumerInfo, error)

func (*MqAdmin) QueryConsumeStatsListByGroup added in v1.0.4

func (a *MqAdmin) QueryConsumeStatsListByGroup(group string) ([]*TopicConsumerInfo, error)

func (*MqAdmin) QueryConsumerRunningInfo added in v1.0.4

func (a *MqAdmin) QueryConsumerRunningInfo(group, clientId string, jstack bool) (*AdminConsumerRunningInfo, error)

func (*MqAdmin) QueryGroup

func (a *MqAdmin) QueryGroup(group string) (*GroupConsumeInfo, error)

func (*MqAdmin) QueryGroupList

func (a *MqAdmin) QueryGroupList() ([]*GroupConsumeInfo, error)

func (*MqAdmin) ResetOffset added in v1.0.4

func (a *MqAdmin) ResetOffset(request *ResetOffsetRequest) (map[string]*ConsumerGroupRollBackStat, error)

func (*MqAdmin) ResetOffsetByTimestamp added in v1.0.4

func (a *MqAdmin) ResetOffsetByTimestamp(topic, group string, timestamp int64, isForce bool) (map[primitive.MessageQueue]int64, error)

func (*MqAdmin) ResetOffsetByTimestamp2 added in v1.0.4

func (a *MqAdmin) ResetOffsetByTimestamp2(topic, group string, timestamp int64, isForce, isC bool) (map[primitive.MessageQueue]int64, error)

func (*MqAdmin) ResetOffsetByTimestampOld added in v1.0.4

func (a *MqAdmin) ResetOffsetByTimestampOld(topic, group string, timestamp int64, isForce bool) []*RollbackStats

type MqClientApi added in v1.0.4

type MqClientApi struct {
	Cli internal.RMQClient
}

func GetClientApi added in v1.0.4

func GetClientApi(cli internal.RMQClient) *MqClientApi

func (*MqClientApi) CreateSubscriptionGroup added in v1.0.4

func (c *MqClientApi) CreateSubscriptionGroup(addr string, config *SubscriptionGroupConfig) error

func (*MqClientApi) DeleteSubscriptionGroup added in v1.0.4

func (c *MqClientApi) DeleteSubscriptionGroup(addr, group string) error

func (*MqClientApi) ExamineConsumeStats added in v1.0.4

func (c *MqClientApi) ExamineConsumeStats(group string) *ConsumeStats

func (*MqClientApi) ExamineConsumeStatsWithTopic added in v1.0.4

func (c *MqClientApi) ExamineConsumeStatsWithTopic(group string, topic string) *ConsumeStats

func (*MqClientApi) ExamineConsumerConnectionInfo added in v1.0.4

func (c *MqClientApi) ExamineConsumerConnectionInfo(ctx context.Context, group string) (*ConsumerConnection, error)

func (*MqClientApi) GetConsumeStats added in v1.0.4

func (c *MqClientApi) GetConsumeStats(addr, group, topic string) (*ConsumeStats, error)

func (*MqClientApi) GetConsumeStatsNoTopic added in v1.0.4

func (c *MqClientApi) GetConsumeStatsNoTopic(addr, group string) (*ConsumeStats, error)

func (*MqClientApi) GetMaxOffset added in v1.0.4

func (c *MqClientApi) GetMaxOffset(addr, topic string, queueId int) (int64, error)

func (*MqClientApi) GetTopicStatsInfo added in v1.0.4

func (c *MqClientApi) GetTopicStatsInfo(addr, topic string) (*TopicStatsTable, error)

func (*MqClientApi) InvokeBrokerToResetOffset added in v1.0.4

func (c *MqClientApi) InvokeBrokerToResetOffset(addr, topic, group string, timestamp int64, isForce bool) (map[primitive.MessageQueue]int64, error)

func (*MqClientApi) InvokeBrokerToResetOffset2 added in v1.0.4

func (c *MqClientApi) InvokeBrokerToResetOffset2(addr, topic, group string, timestamp int64, isForce, isC bool) (map[primitive.MessageQueue]int64, error)

func (*MqClientApi) QueryTopicRouteInfo added in v1.0.4

func (c *MqClientApi) QueryTopicRouteInfo(topic string) (*internal.TopicRouteData, error)

func (*MqClientApi) SearchOffset added in v1.0.4

func (c *MqClientApi) SearchOffset(addr, topic string, queueId int, timestamp int64) (int64, error)

func (*MqClientApi) UpdateConsumerOffset added in v1.0.4

func (c *MqClientApi) UpdateConsumerOffset(addr string, header *internal.UpdateConsumerOffsetRequestHeader) error

type OffsetWrapper

type OffsetWrapper struct {
	BrokerOffset   int64
	ConsumerOffset int64
	LastTimestamp  int64
}

type OptionCreate

type OptionCreate func(*TopicConfigCreate)

func WithBrokerAddrCreate

func WithBrokerAddrCreate(BrokerAddr string) OptionCreate

func WithOrder

func WithOrder(Order bool) OptionCreate

func WithPerm

func WithPerm(Perm int) OptionCreate

func WithReadQueueNums

func WithReadQueueNums(ReadQueueNums int) OptionCreate

func WithTopicCreate

func WithTopicCreate(Topic string) OptionCreate

func WithTopicFilterType

func WithTopicFilterType(TopicFilterType string) OptionCreate

func WithTopicSysFlag

func WithTopicSysFlag(TopicSysFlag int) OptionCreate

func WithWriteQueueNums

func WithWriteQueueNums(WriteQueueNums int) OptionCreate

type OptionDelete

type OptionDelete func(*TopicConfigDelete)

func WithBrokerAddrDelete

func WithBrokerAddrDelete(BrokerAddr string) OptionDelete

func WithClusterName

func WithClusterName(ClusterName string) OptionDelete

func WithNameSrvAddr

func WithNameSrvAddr(NameSrvAddr []string) OptionDelete

func WithTopicDelete

func WithTopicDelete(Topic string) OptionDelete

type QueueStatInfo added in v1.0.4

type QueueStatInfo struct {
	BrokerName     string
	QueueId        int
	BrokerOffset   int64
	ConsumerOffset int64
	ClientInfo     string
	LastTimestamp  int64
}

func (*QueueStatInfo) FromOffsetTableEntry added in v1.0.4

func (q *QueueStatInfo) FromOffsetTableEntry(key *primitive.MessageQueue, value *OffsetWrapper)

type RemotingSerializable

type RemotingSerializable struct {
	ObjToKey bool `json:"-"`
}

func (*RemotingSerializable) Decode

func (r *RemotingSerializable) Decode(data []byte, classOfT interface{}) (interface{}, error)

func (*RemotingSerializable) Encode

func (r *RemotingSerializable) Encode(obj interface{}) ([]byte, error)

func (*RemotingSerializable) FromJson

func (r *RemotingSerializable) FromJson(jsonStr string, classOfT interface{}) (interface{}, error)

func (*RemotingSerializable) ToJson

func (r *RemotingSerializable) ToJson(obj interface{}, prettyFormat bool) string

type ResetOffsetRequest added in v1.0.4

type ResetOffsetRequest struct {
	ConsumerGroupList []string `json:"consumerGroupList"`
	Topic             string   `json:"topic"`
	ResetTime         int64    `json:"resetTime"`
	Force             bool     `json:"force"`
}

type RollbackStats added in v1.0.4

type RollbackStats struct {
	BrokerName      string `json:"brokerName"`
	QueueId         int    `json:"queueId"`
	BrokerOffset    int64  `json:"brokerOffset"`
	ConsumerOffset  int64  `json:"consumerOffset"`
	TimestampOffset int64  `json:"timestampOffset"`
	RollbackOffset  int64  `json:"rollbackOffset"`
}

type SubscriptionData

type SubscriptionData struct {
	ClassFilterMode   bool
	Topic             string
	SubString         string
	TagsSet           []string
	CodeSet           []int
	SubVersion        int64
	FilterClassSource string
}

type SubscriptionGroupConfig

type SubscriptionGroupConfig struct {
	GroupName                      string
	ConsumeEnable                  bool
	ConsumeFromMinEnable           bool
	ConsumeBroadcastEnable         bool
	RetryMaxTimes                  int
	RetryQueueNums                 int
	BrokerId                       int
	WhichBrokerWhenConsumeSlowly   int
	NotifyConsumerIdsChangedEnable bool
}

type SubscriptionGroupWrapper

type SubscriptionGroupWrapper struct {
	SubscriptionGroupTable map[string]SubscriptionGroupConfig
	DataVersion            DataVersion
	RemotingSerializable
}

type TopicConfigCreate

type TopicConfigCreate struct {
	Topic           string
	BrokerAddr      string
	DefaultTopic    string
	ReadQueueNums   int
	WriteQueueNums  int
	Perm            int
	TopicFilterType string
	TopicSysFlag    int
	Order           bool
}

type TopicConfigDelete

type TopicConfigDelete struct {
	Topic       string
	ClusterName string
	NameSrvAddr []string
	BrokerAddr  string
}

type TopicConsumerInfo added in v1.0.4

type TopicConsumerInfo struct {
	Topic             string
	DiffTotal         int64
	LastTimestamp     int64
	QueueStatInfoList []*QueueStatInfo
}

func (*TopicConsumerInfo) AppendQueueStatInfo added in v1.0.4

func (t *TopicConsumerInfo) AppendQueueStatInfo(queueStat *QueueStatInfo)

type TopicList

type TopicList struct {
	TopicList  []string
	BrokerAddr string
	RemotingSerializable
}

type TopicOffset added in v1.0.4

type TopicOffset struct {
	MinOffset           int64
	MaxOffset           int64
	LastUpdateTimestamp int64
}

type TopicStatsTable added in v1.0.4

type TopicStatsTable struct {
	OffsetTable map[*primitive.MessageQueue]*TopicOffset `json:"-"`
	RemotingSerializable
}

Jump to

Keyboard shortcuts

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