test

package
v0.0.0-...-7abe817 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SubscriptionPrefix = "kafsar_sub_"
	TopicPrefix        = "kafsar_topic_"
	DefaultTopicType   = "persistent://public/default/"
)
View Source
var (
	PulsarHttpUrl = "http://localhost:8080"
	PulsarTcpUrl  = "pulsar://localhost:6650"
)

Functions

func AcquireUnusedPort

func AcquireUnusedPort() (int, error)

func HttpGetRequest

func HttpGetRequest(url string) ([]byte, error)

func NewPulsarClient

func NewPulsarClient() pulsar.Client

func SetupPulsar

func SetupPulsar()

nolint

Types

type FlowKafsarImpl

type FlowKafsarImpl struct {
}

func (FlowKafsarImpl) Auth

func (k FlowKafsarImpl) Auth(username string, password string, clientId string) (bool, error)

func (FlowKafsarImpl) AuthGroupTopic

func (e FlowKafsarImpl) AuthGroupTopic(topic, groupId string) bool

func (FlowKafsarImpl) AuthTopic

func (k FlowKafsarImpl) AuthTopic(username string, password, clientId, topic, permissionType string) (bool, error)

func (FlowKafsarImpl) AuthTopicGroup

func (k FlowKafsarImpl) AuthTopicGroup(username string, password, clientId, consumerGroup string) (bool, error)

func (FlowKafsarImpl) HasFlowQuota

func (k FlowKafsarImpl) HasFlowQuota(username, topic string) bool

func (FlowKafsarImpl) ListTopic

func (k FlowKafsarImpl) ListTopic(username string) ([]string, error)

func (FlowKafsarImpl) PartitionNum

func (k FlowKafsarImpl) PartitionNum(username, topic string) (int, error)

func (FlowKafsarImpl) PulsarTopic

func (k FlowKafsarImpl) PulsarTopic(username, topic string) (string, error)

func (FlowKafsarImpl) SubscriptionName

func (k FlowKafsarImpl) SubscriptionName(groupId string) (string, error)

type KafsarImpl

type KafsarImpl struct {
}

func (KafsarImpl) Auth

func (k KafsarImpl) Auth(username string, password string, clientId string) (bool, error)

func (KafsarImpl) AuthGroupTopic

func (e KafsarImpl) AuthGroupTopic(topic, groupId string) bool

func (KafsarImpl) AuthTopic

func (k KafsarImpl) AuthTopic(username string, password, clientId, topic, permissionType string) (bool, error)

func (KafsarImpl) AuthTopicGroup

func (k KafsarImpl) AuthTopicGroup(username string, password, clientId, consumerGroup string) (bool, error)

func (KafsarImpl) HasFlowQuota

func (k KafsarImpl) HasFlowQuota(username, topic string) bool

func (KafsarImpl) ListTopic

func (k KafsarImpl) ListTopic(username string) ([]string, error)

func (KafsarImpl) PartitionNum

func (k KafsarImpl) PartitionNum(username, topic string) (int, error)

func (KafsarImpl) PulsarTopic

func (k KafsarImpl) PulsarTopic(username, topic string) (string, error)

func (KafsarImpl) SubscriptionName

func (k KafsarImpl) SubscriptionName(groupId string) (string, error)

Jump to

Keyboard shortcuts

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