solace

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToGetPayloadBytes = errors.New("failed to get payload bytes")
	ErrPublisherNotReady       = errors.New("publisher is not ready")
	ErrReceiverChannelClosed   = errors.New("receiver channel is closed")
)

Functions

This section is empty.

Types

type ClientOption

type ClientOption func(solace.MessagingServiceBuilder)

func WithBasicAuth

func WithBasicAuth(username, password, caDir string) ClientOption

WithBasicAuth configures the client to use basic authentication with the given username and password. The caDir parameter specifies the directory containing CA certificates for TLS validation.

func WithExternalMTLS

func WithExternalMTLS(certFile, keyFile, caDir string) ClientOption

WithExternalMTLS configures the client to use mutual TLS authentication with the given certificate, key, and CA files.

type ConnectionInfo

type ConnectionInfo struct {
	Host      string     // Host is the Solace broker host address
	VPN       string     // VPN is the Solace VPN name
	Target    string     // Target is the topic to publish messages to
	Source    string     // Source is the queue to receive messages from
	QueueType *QueueType // QueueType specifies the type of queue to use, if nil it defaults to QueueTypeDurableNonExclusive.
}

ConnectionInfo holds the connection details for the Solace messaging service.

type QueueType

type QueueType uint

QueueType represents the type of Solace queue to be used.

const (
	QueueTypeDurableNonExclusive QueueType = iota
	QueueTypeDurableExclusive
)

type Solace

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

func NewClient

func NewClient(codec orbital.Codec, connInfo ConnectionInfo, opts ...ClientOption) (*Solace, error)

NewClient creates and returns a new Solace client.

func (*Solace) Close

func (s *Solace) Close(_ context.Context) error

Close terminates the Solace client, including the receiver, publisher, and messaging service.

func (*Solace) ReceiveTaskRequest

func (s *Solace) ReceiveTaskRequest(ctx context.Context) (orbital.TaskRequest, error)

func (*Solace) ReceiveTaskResponse

func (s *Solace) ReceiveTaskResponse(ctx context.Context) (orbital.TaskResponse, error)

func (*Solace) SendTaskRequest

func (s *Solace) SendTaskRequest(ctx context.Context, request orbital.TaskRequest) error

func (*Solace) SendTaskResponse

func (s *Solace) SendTaskResponse(ctx context.Context, response orbital.TaskResponse) error

Jump to

Keyboard shortcuts

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