servicebus

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReceiverInterface

type ReceiverInterface interface {
	ReceiveMessage(ctx context.Context) ([]byte, error)
}

type SenderInterface

type SenderInterface interface {
	SendMessage(ctx context.Context, message []byte) error
}

type ServiceBus

type ServiceBus struct {
	// In the future, we can add more types of service bus here.
	Client *azservicebus.Client
}

func CreateServiceBusClient

func CreateServiceBusClient(ctx context.Context, clientUrl string) (*ServiceBus, error)

func CreateServiceBusClientFromConnectionString

func CreateServiceBusClientFromConnectionString(ctx context.Context, connectionString string) (*ServiceBus, error)

func (*ServiceBus) NewServiceBusReceiver

func (sb *ServiceBus) NewServiceBusReceiver(ctx context.Context, topicOrQueue string) (*ServiceBusReceiver, error)

func (*ServiceBus) NewServiceBusSender

func (sb *ServiceBus) NewServiceBusSender(ctx context.Context, queue string) (*ServiceBusSender, error)

type ServiceBusClientInterface

type ServiceBusClientInterface interface {
	NewServiceBusReceiver(ctx context.Context, topicOrQueue string) (ReceiverInterface, error)
	NewServiceBusSender(ctx context.Context, queue string) (SenderInterface, error)
}

type ServiceBusReceiver

type ServiceBusReceiver struct {
	Receiver *azservicebus.Receiver
}

func (*ServiceBusReceiver) ReceiveMessage

func (r *ServiceBusReceiver) ReceiveMessage(ctx context.Context) ([]byte, error)

TODO(mheberling): Don't think this is necessary.

type ServiceBusSender

type ServiceBusSender struct {
	Sender *azservicebus.Sender
}

func (*ServiceBusSender) SendMessage

func (s *ServiceBusSender) SendMessage(ctx context.Context, message []byte) error

Jump to

Keyboard shortcuts

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