Documentation ¶
Index ¶
- func NewAdmin(opts ...AdminOption) (*admin, error)
- type Admin
- type AdminOption
- type DataVersion
- type OptionCreate
- func WithBrokerAddrCreate(BrokerAddr string) OptionCreate
- func WithOrder(Order bool) OptionCreate
- func WithPerm(Perm int) OptionCreate
- func WithReadQueueNums(ReadQueueNums int) OptionCreate
- func WithTopicCreate(Topic string) OptionCreate
- func WithTopicFilterType(TopicFilterType string) OptionCreate
- func WithTopicSysFlag(TopicSysFlag int) OptionCreate
- func WithWriteQueueNums(WriteQueueNums int) OptionCreate
- type OptionDelete
- type RemotingSerializable
- func (r *RemotingSerializable) Decode(data []byte, classOfT interface{}) (interface{}, error)
- func (r *RemotingSerializable) Encode(obj interface{}) ([]byte, error)
- func (r *RemotingSerializable) FromJson(jsonStr string, classOfT interface{}) (interface{}, error)
- func (r *RemotingSerializable) ToJson(obj interface{}, prettyFormat bool) string
- type SubscriptionGroupConfig
- type SubscriptionGroupWrapper
- type TopicConfigCreate
- type TopicConfigDelete
- type TopicList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) //GetBrokerClusterInfo(ctx context.Context) (*remote.RemotingCommand, error) FetchPublishMessageQueues(ctx context.Context, topic string) ([]*primitive.MessageQueue, error) Close() error }
type AdminOption ¶
type AdminOption func(options *adminOptions)
func WithCredentials ¶ added in v2.1.2
func WithCredentials(c primitive.Credentials) AdminOption
func WithNamespace ¶ added in v2.1.2
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 DataVersion ¶ added in v2.1.2
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 RemotingSerializable ¶ added in v2.1.2
type RemotingSerializable struct { }
func (*RemotingSerializable) Decode ¶ added in v2.1.2
func (r *RemotingSerializable) Decode(data []byte, classOfT interface{}) (interface{}, error)
func (*RemotingSerializable) Encode ¶ added in v2.1.2
func (r *RemotingSerializable) Encode(obj interface{}) ([]byte, error)
func (*RemotingSerializable) FromJson ¶ added in v2.1.2
func (r *RemotingSerializable) FromJson(jsonStr string, classOfT interface{}) (interface{}, error)
func (*RemotingSerializable) ToJson ¶ added in v2.1.2
func (r *RemotingSerializable) ToJson(obj interface{}, prettyFormat bool) string
type SubscriptionGroupConfig ¶ added in v2.1.2
type SubscriptionGroupWrapper ¶ added in v2.1.2
type SubscriptionGroupWrapper struct { SubscriptionGroupTable map[string]SubscriptionGroupConfig DataVersion DataVersion RemotingSerializable }
type TopicConfigCreate ¶
type TopicConfigDelete ¶
type TopicList ¶ added in v2.1.2
type TopicList struct { TopicList []string BrokerAddr string RemotingSerializable }
Click to show internal directories.
Click to hide internal directories.