clients

package
v2.0.0-dev.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(connectionType string, props map[string]interface{}) (io.MessageClient, error)

func RegisterClientFactory

func RegisterClientFactory(clientType string, creatorFunc ClientFactoryFunc)

func ReleaseClient

func ReleaseClient(ctx api.StreamContext, cli io.MessageClient)

Types

type ClientFactoryFunc

type ClientFactoryFunc func(props map[string]interface{}) (ClientWrapper, error)

type ClientWrapper

type ClientWrapper interface {
	Subscribe(c api.StreamContext, subChan []io.TopicChannel, messageErrors chan error, params map[string]interface{}) error
	Release(c api.StreamContext) bool
	Publish(c api.StreamContext, topic string, message []byte, params map[string]interface{}) error
	SetConnectionSelector(conSelector string)
	GetConnectionSelector() string
	AddRef()
	Ping() error
}

type ConsumerInfo

type ConsumerInfo struct {
	ConsumerId   string
	ConsumerChan chan<- interface{}
	SubErrors    chan error
}

type SubscribedTopics

type SubscribedTopics struct {
	Topics []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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