centrifugomessenger

package
v1.1.39 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnectionToken

func GetConnectionToken(secret string) func(http.ResponseWriter, *http.Request)

Types

type CentrifugoMessenger

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

func New

func New(endpoint string, enableTLS bool) *CentrifugoMessenger

func (*CentrifugoMessenger) SendMessage

func (c *CentrifugoMessenger) SendMessage(
	ctx context.Context,
	message *Message,
	recipients []string,
) error

type Message

type Message struct {
	Body any      `json:"body"`
	ID   pulid.ID `json:"id"`
	Type string   `json:"type"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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