broker

package
v0.0.0-...-a506a69 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Users                   []User
	MaxMessageByte          int
	MaxTopicCount           int
	MaxBuffersCountPerTopic int
	BufferLifetime          time.Duration
}

Config is MessageBroker config.

type MessageBroker

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

MessageBroker delivers messages to clients.

func New

func New(config *Config) *MessageBroker

New creates an instance of MessageBroker.

func (*MessageBroker) Start

func (b *MessageBroker) Start(ctx context.Context, addr string, tlsConf *tls.Config) error

Start starts a MessageBroker.

type User

type User struct {
	UserID   string
	Password string
}

User is information used for authentication.

Jump to

Keyboard shortcuts

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