resource

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Overview

Package resource contains types and factory functions for various broker resources such as topics and queues.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	// GetName retrieves the name of the destination
	GetName() string
}

Destination represents a message destination on a broker. Some examples of destinations include queues and topics. Destination implementations can be retrieved by the various helper functions, such as TopicOf, QueueDurableExclusive, and TopicSubscriptionOf.

type Queue

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

Queue represents a queue used for guaranteed messaging receivers.

func QueueDurableExclusive

func QueueDurableExclusive(queueName string) *Queue

QueueDurableExclusive creates a new durable, exclusive queue with the specified name.

func QueueDurableNonExclusive

func QueueDurableNonExclusive(queueName string) *Queue

QueueDurableNonExclusive creates a durable, non-exclusive queue with the specified name.

func QueueNonDurableExclusive

func QueueNonDurableExclusive(queueName string) *Queue

QueueNonDurableExclusive creates an exclusive, non-durable queue with the specified name.

func QueueNonDurableExclusiveAnonymous

func QueueNonDurableExclusiveAnonymous() *Queue

QueueNonDurableExclusiveAnonymous creates an anonymous, exclusive, and non-durable queue.

func (*Queue) GetName

func (q *Queue) GetName() string

GetName returns the name of the queue. Implements the Destination interface.

func (*Queue) IsDurable

func (q *Queue) IsDurable() bool

IsDurable determines if the Queue is durable. Durable queues are privisioned objects on the broker that have a lifespan that is independent of any one client session.

func (*Queue) IsExclusivelyAccessible

func (q *Queue) IsExclusivelyAccessible() bool

IsExclusivelyAccessible determines if Queue supports exclusive or shared-access mode. Returns true if the Queue can serve only one consumer at any one time, false if the Queue can serve multiple consumers with each consumer serviced in a round-robin fashion.

func (*Queue) String

func (q *Queue) String() string

type ShareName

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

ShareName is an interface for identifiers that are associated with a shared subscription. See https://docs.solace.com/PubSub-Basics/Direct-Messages.htm#Shared in the Solace documentation.

func ShareNameOf

func ShareNameOf(name string) *ShareName

ShareNameOf returns a new share name with the provided name. Valid share names are not empty and do not contain special characters '>' or '*'. Returns a new ShareName with the given string.

func (*ShareName) GetName

func (sn *ShareName) GetName() string

GetName returns the share name. Implements the Destination interface.

func (*ShareName) String

func (sn *ShareName) String() string

String implements fmt.Stringer

type Subscription

type Subscription interface {
	Destination
	// GetSubscriptionType will return the type of the subscription as a string
	GetSubscriptionType() string
}

Subscription represents the valid subscriptions that can be specified to receivers. Valid subscriptions include *resource.TopicSubscription.

type Topic

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

Topic is an implementation of destination representing a topic that can be published to.

func TopicOf

func TopicOf(expression string) *Topic

TopicOf creates a new topic with the specified name. Topic name must not be empty.

func (*Topic) GetName

func (t *Topic) GetName() string

GetName returns the name of the topic. Implements the Destination interface.

func (*Topic) String

func (t *Topic) String() string

String implements fmt.Stringer

type TopicSubscription

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

TopicSubscription is a subscription to a topic often used for receivers.

func TopicSubscriptionOf

func TopicSubscriptionOf(topic string) *TopicSubscription

TopicSubscriptionOf creates a TopicSubscription of the specified topic string.

func (*TopicSubscription) GetName

func (t *TopicSubscription) GetName() string

GetName returns the topic subscription expression. Implements the Destination interface.

func (*TopicSubscription) GetSubscriptionType

func (t *TopicSubscription) GetSubscriptionType() string

GetSubscriptionType returns the type of the topic subscription as a string

func (*TopicSubscription) String

func (t *TopicSubscription) String() string

String implements fmt.Stringer

Jump to

Keyboard shortcuts

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