pulsarclient

package
v0.20.18 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWebServiceURL       = "http://localhost:8080"
	DefaultHTTPTimeOutDuration = 5 * time.Minute
	ReleaseVersion             = "None"
)
View Source
const (
	PublishTimeHeader = "X-Pulsar-Publish-Time"
	BatchHeader       = "X-Pulsar-Num-Batch-Message"

	// PropertyPrefix is part of the old protocol for message properties.
	PropertyPrefix = "X-Pulsar-Property-"

	// PropertyHeader is part of the new protocol introduced in SNIP-279
	// https://github.com/apache/pulsar/pull/20627
	// The value is a JSON string representing the properties.
	PropertyHeader = "X-Pulsar-Property"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Subscriptions() Subscriptions
}

type PulsarClient

type PulsarClient struct {
	Client     *rest.Client
	APIVersion config.APIVersion
}

func New

func New(config *config.Config) (*PulsarClient, error)

New returns a new client

func NewPulsarClientWithAuthProvider

func NewPulsarClientWithAuthProvider(config *config.Config, authProvider auth.Provider) (*PulsarClient, error)

NewPulsarClientWithAuthProvider create a client with auth provider.

func (*PulsarClient) Subscriptions

func (c *PulsarClient) Subscriptions() Subscriptions

type Subscriptions

type Subscriptions interface {
	// PeekMessages peeks messages from a topic subscription
	PeekMessages(utils.TopicName, string, int) ([]*utils.Message, error)
}

Subscriptions is admin interface for subscriptions management

Jump to

Keyboard shortcuts

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