services

package
v0.0.0-...-d958ee8 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWrongMessageIndex = fmt.Errorf("wrong message index")

Functions

This section is empty.

Types

type Message

type Message struct {
	FromPublicIdentityKey []byte `json:"from_public_identity_key"`
	Data                  []byte `json:"data"`
	CreatedAt             int64  `json:"created_at"`
}

type NATSService

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

func NewNATSService

func NewNATSService() (*NATSService, error)

func (*NATSService) Close

func (s *NATSService) Close()

func (*NATSService) ReceiveMessages

func (s *NATSService) ReceiveMessages(ctx context.Context, publicIdentityKey []byte) ([]Message, error)

func (*NATSService) Register

func (s *NATSService) Register(ctx context.Context, publicIdentityKey []byte, identityKeys [][]byte) error

func (*NATSService) SendMessage

func (s *NATSService) SendMessage(ctx context.Context, fromPublicIdentityKey []byte, toPublicIdentityKey []byte, data []byte, messageIndex uint64) error

Jump to

Keyboard shortcuts

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