relayHandler

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserAgent string = "bostr2 (https://codeberg.org/Yonle/bostr2) - nostr relay proxy aggregator"

Functions

This section is empty.

Types

type MessageChan

type MessageChan chan []json.RawMessage

type RelaySession

type RelaySession struct {
	UpEVENT     MessageChan
	UpEOSE      MessageChan
	UpConnected chan *websocket.Conn

	HowManyRelaysAreConnected int
	// contains filtered or unexported fields
}

func NewSession

func NewSession(ctx context.Context, ip string) RelaySession

func (*RelaySession) Broadcast

func (s *RelaySession) Broadcast(data []json.RawMessage)

func (*RelaySession) Init

func (s *RelaySession) Init(r []string)

func (*RelaySession) Wait

func (s *RelaySession) Wait()

type SessionRelays

type SessionRelays map[*websocket.Conn]struct{}

Jump to

Keyboard shortcuts

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