Documentation
¶
Overview ¶
Package pulsar provides Pulsar connection helpers.
Index ¶
Constants ¶
View Source
const ( // DefaultClientTimeout is the default timeout for Pulsar client operations. DefaultClientTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PulsarContext ¶
type PulsarContext struct {
ServiceURL string
WebServiceURL string
Token string
AuthPlugin string
AuthParams string
TLSAllowInsecureConnection bool
TLSEnableHostnameVerification bool
TLSTrustCertsFilePath string
TLSCertFile string
TLSKeyFile string
}
PulsarContext holds configuration for connecting to a Pulsar cluster.
type Session ¶ added in v0.1.11
type Session struct {
Ctx PulsarContext
Client pulsar.Client
AdminClient cmdutils.Client
AdminV3Client cmdutils.Client
ClientOptions pulsar.ClientOptions
PulsarCtlConfig *cmdutils.ClusterConfig
// contains filtered or unexported fields
}
Session represents a Pulsar session
func NewSession ¶ added in v0.1.11
func NewSession(ctx PulsarContext) (*Session, error)
NewSession creates a new Pulsar session with the given context This function dynamically constructs clients without relying on global state
func (*Session) GetAdminClient ¶ added in v0.1.11
GetAdminClient returns the Pulsar admin v2 client.
func (*Session) GetAdminV3Client ¶ added in v0.1.11
GetAdminV3Client returns the Pulsar admin v3 client.
func (*Session) GetPulsarClient ¶ added in v0.1.11
GetPulsarClient returns the Pulsar data client.
func (*Session) SetPulsarContext ¶ added in v0.1.11
func (s *Session) SetPulsarContext(ctx PulsarContext) error
SetPulsarContext initializes Pulsar clients using the provided context.
Click to show internal directories.
Click to hide internal directories.