Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReceiverInterface ¶
type SenderInterface ¶
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
Click to show internal directories.
Click to hide internal directories.