nats

package
v0.0.0-...-c7937d4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: AGPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messaging

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

This implements smile_messaging_go.Messaging

func NewMessaging

func NewMessaging(url string, opts ...Option) (*Messaging, error)

func (*Messaging) Publish

func (m *Messaging) Publish(subj string, data []byte) error

func (*Messaging) Shutdown

func (m *Messaging) Shutdown()

func (*Messaging) Subscribe

func (m *Messaging) Subscribe(con string, subj string, mh smsg.MsgHandler) error

type Option

type Option func(*Options)

An Option is a function operating on the Messaging Options

func WithTLS

func WithTLS(certPath, keyPath, userId, pw string) Option

WithTLS is an Option to enable a TLS channel

type Options

type Options struct {
	UseTLS      bool
	TLSCertPath string
	TLSKeyPath  string
	UserId      string
	Password    string
}

Options for Messaging provider

Jump to

Keyboard shortcuts

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