servicebus

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package servicebus serves Azure Service Bus ARM control-plane requests (Microsoft.ServiceBus/namespaces[/queues]) plus a raw-HTTP data plane for send/receive against a CloudEmu messagequeue driver.

Real azure-sdk-for-go armservicebus clients drive the ARM control plane (PUT/GET/DELETE namespaces and queues). The data-plane azservicebus SDK uses AMQP exclusively and is out of scope; tests that exercise send/receive hit the REST data plane (POST /{namespace}/{queue}/messages, DELETE /{namespace}/{queue}/messages/head) directly with raw HTTP. This matches Microsoft's older "Send/Receive REST" endpoints documented at https://learn.microsoft.com/rest/api/servicebus/.

MVP coverage:

PUT/GET/DELETE  .../namespaces/{ns}                        — namespace lifecycle
GET             .../namespaces                             — list (subscription scope)
PUT/GET/DELETE  .../namespaces/{ns}/queues/{name}          — queue lifecycle
GET             .../namespaces/{ns}/queues                 — list queues in namespace
POST            /{namespace}/{queue}/messages              — send (raw HTTP)
DELETE          /{namespace}/{queue}/messages/head         — receive+ack (raw HTTP)

Topics, subscriptions, rules, AMQP, sessions, and DLQ wire formats are deferred to a follow-up.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves ARM Service Bus + raw-HTTP data-plane requests.

func New

func New(mq mqdriver.MessageQueue) *Handler

New returns a Service Bus handler backed by mq.

func (*Handler) Matches

func (*Handler) Matches(r *http.Request) bool

Matches accepts ARM Microsoft.ServiceBus/namespaces[...] paths plus data-plane URLs ending in /messages or /messages/head.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes by URL shape.

Jump to

Keyboard shortcuts

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