natsdaemon

package
v0.0.0-...-6aa13fe Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIncomingMsgHandler

func NewIncomingMsgHandler(logger *logrus.Logger, incomingChan chan *api.ChatMessage) nats.MsgHandler

Types

type ChatConnection

type ChatConnection struct {
	SenderAddress    string
	RecepientAddress string
	// contains filtered or unexported fields
}

func (*ChatConnection) Close

func (c *ChatConnection) Close() (err error)

func (*ChatConnection) Send

type Session

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

func Online

func Online(logger *logrus.Logger, natsUrl string, senderAddress string) (*Session, error)

func (*Session) Close

func (s *Session) Close() (err error)

func (*Session) Dial

func (s *Session) Dial(recepient string) (*ChatConnection, error)

type ShutdownableDaemonServer

type ShutdownableDaemonServer interface {
	api.DaemonServer
	Shutdown() error
}

func NewDaemon

func NewDaemon(logger *logrus.Logger) ShutdownableDaemonServer

Jump to

Keyboard shortcuts

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