channel

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

nolint because this is temporally here and will be moved under meshkit

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	SingleChannelBufferSize: 1024,
	PublishToChannelDelay:   1 * time.Second,
}

Functions

This section is empty.

Types

type ChannelBrokerHandler

type ChannelBrokerHandler struct {
	Options
	// contains filtered or unexported fields
}

func NewChannelBrokerHandler

func NewChannelBrokerHandler(optsSetters ...OptionsSetter) *ChannelBrokerHandler

func (*ChannelBrokerHandler) CloseConnection

func (h *ChannelBrokerHandler) CloseConnection()

func (*ChannelBrokerHandler) ConnectedEndpoints

func (h *ChannelBrokerHandler) ConnectedEndpoints() (endpoints []string)

func (*ChannelBrokerHandler) DeepCopy

func (h *ChannelBrokerHandler) DeepCopy() realBroker.Handler

DeepCopy is a deepcopy function, copying the receiver, creating a new Nats.

func (*ChannelBrokerHandler) DeepCopyInto

func (h *ChannelBrokerHandler) DeepCopyInto(out realBroker.Handler)

DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChannelBrokerHandler) DeepCopyObject

func (h *ChannelBrokerHandler) DeepCopyObject() realBroker.Handler

DeepCopyObject is a deepcopy function, copying the receiver, creating a new realBroker.Handler.

func (*ChannelBrokerHandler) Info

func (h *ChannelBrokerHandler) Info() string

func (*ChannelBrokerHandler) IsEmpty

func (h *ChannelBrokerHandler) IsEmpty() bool

Check if the connection object is empty

func (*ChannelBrokerHandler) Publish

func (h *ChannelBrokerHandler) Publish(subject string, message *realBroker.Message) error

Publish - to publish messages

func (*ChannelBrokerHandler) PublishWithChannel

func (h *ChannelBrokerHandler) PublishWithChannel(subject string, msgch chan *realBroker.Message) error

PublishWithChannel - to publish messages with channel

func (*ChannelBrokerHandler) Subscribe

func (h *ChannelBrokerHandler) Subscribe(subject, queue string, message []byte) error

Subscribe - for subscribing messages

func (*ChannelBrokerHandler) SubscribeWithChannel

func (h *ChannelBrokerHandler) SubscribeWithChannel(subject, queue string, msgch chan *realBroker.Message) error

SubscribeWithChannel will publish all the messages received to the given channel

type ErrChannelBrokerPublishType

type ErrChannelBrokerPublishType struct {
	Err              error
	SuccessQueueList []string
	FailedQueueList  []string
}

func NewErrChannelBrokerPublish

func NewErrChannelBrokerPublish(
	err error,
	successQueueList []string,
	failedQueueList []string,
) *ErrChannelBrokerPublishType

func (*ErrChannelBrokerPublishType) Error

type Options

type Options struct {
	SingleChannelBufferSize uint
	PublishToChannelDelay   time.Duration
}

type OptionsSetter

type OptionsSetter func(*Options)

func WithPublishToChannelDelay

func WithPublishToChannelDelay(value time.Duration) OptionsSetter

func WithSingleChannelBufferSize

func WithSingleChannelBufferSize(value uint) OptionsSetter

Jump to

Keyboard shortcuts

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