embedded

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginEmbedded = "embedded"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, config cmap.CustomMap) (busPluginTY.Plugin, error)

NewClient func

Types

type Client

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

Client struct

func (*Client) Close

func (c *Client) Close() error

Close implementation

func (*Client) Name

func (c *Client) Name() string

func (*Client) PausePublish

func (c *Client) PausePublish()

func (*Client) Publish

func (c *Client) Publish(topic string, data interface{}) error

Publish a data to a topic

func (*Client) QueueSubscribe

func (c *Client) QueueSubscribe(topic, _queueName string, handler busPluginTY.CallBackFunc) (int64, error)

QueueSubscribe not supported in embedded bus, just call subscribe

func (*Client) QueueUnsubscribe

func (c *Client) QueueUnsubscribe(topic, _queueName string, subscriptionID int64) error

QueueUnsubscribe not supported in embedded bus, just call subscribe

func (*Client) ResumePublish

func (c *Client) ResumePublish()

func (*Client) Subscribe

func (c *Client) Subscribe(topic string, handler busPluginTY.CallBackFunc) (int64, error)

Subscribe a topic

func (*Client) TopicPrefix

func (c *Client) TopicPrefix() string

func (*Client) Unsubscribe

func (c *Client) Unsubscribe(topic string, subscriptionID int64) error

Unsubscribe a topic

func (*Client) UnsubscribeAll

func (c *Client) UnsubscribeAll(topic string) error

UnsubscribeAll topics

type Config

type Config struct {
	Type        string `yaml:"type"`
	TopicPrefix string `yaml:"topic_prefix"`
}

Config details of the client

Jump to

Keyboard shortcuts

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