pulsar

package
v0.0.0-...-fe50809 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPulsarMessageConsumer

func NewPulsarMessageConsumer(
	logger *zap.SugaredLogger,
	pulsarClient PulsarClient,
	pulsarConfig PulsarConfig) (messaging.MessageConsumer, error)

func NewPulsarMessageProducer

func NewPulsarMessageProducer(
	logger *zap.SugaredLogger,
	pulsarClient PulsarClient,
	pulsarConfig PulsarConfig) (messaging.MessageProducer, error)

Types

type PulsarAuthenticationOAuth2Config

type PulsarAuthenticationOAuth2Config struct {
	Type       string `yaml:"type" env:"OMIGA_PULSAR_AUTHENTICATION_TYPE"`
	IssuerUrl  string `yaml:"issuerUrl" env:"OMIGA_PULSAR_AUTHENTICATION_ISSUERURL"`
	Audience   string `yaml:"audience" env:"OMIGA_PULSAR_AUTHENTICATION_AUDIENCE"`
	PrivateKey string `yaml:"privateKey" env:"OMIGA_PULSAR_AUTHENTICATION_PRIVATEKEY"`
	ClientId   string `yaml:"clientId" env:"OMIGA_PULSAR_AUTHENTICATION_CLIENTID"`
}

type PulsarClient

type PulsarClient interface {
	CreatePulsarClient() (pulsar.Client, error)
	Close()
}

func NewPulsarClient

func NewPulsarClient(
	logger *zap.SugaredLogger,
	pulsarConfig PulsarConfig,
	osHelper os.OsHelper) (PulsarClient, error)

type PulsarConfig

type PulsarConfig struct {
	HttpUrl                    string                           `yaml:"httpUrl" env:"OMIGA_PULSAR_HTTPURL"`
	Url                        string                           `yaml:"url" env:"OMIGA_PULSAR_URL"`
	ProducerName               string                           `yaml:"producerName" env:"OMIGA_PULSAR_PRODUCERNAME"`
	SubscriptionName           string                           `yaml:"subscriptionName" env:"OMIGA_PULSAR_SUBSCRIPTIONNAME"`
	OperationTimeout           string                           `yaml:"operationTimeout" env:"OMIGA_PULSAR_OPERATIONTIMEOUT"`
	ConnectionTimeout          string                           `yaml:"connectionTimeout" env:"OMIGA_PULSAR_CONNECTIONTIMEOUT"`
	EnableAuthenticationOAuth2 bool                             `yaml:"enableAuthenticationOAuth2" env:"OMIGA_PULSAR_ENABLEAUTHENTICATIONOAUTH2"`
	AuthenticationOAuth2       PulsarAuthenticationOAuth2Config `yaml:"authenticationOAuth2,omitempty"`
}

Jump to

Keyboard shortcuts

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