relay

package
v0.0.0-...-40b14aa Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RejectConnection

type RejectConnection []func(r *http.Request) bool

type RejectEvent

type RejectEvent []func(cctx *cctx.Context, evt *nostr.Event) (reject bool, msg string)

type RejectFilter

type RejectFilter []func(filter *nostr.Filter) (reject bool, msg string)

type Relay

type Relay struct {
	Info *nip11.RelayInformationDocument

	KeepaliveTime      time.Duration
	HandshakeTimeout   time.Duration
	MessageLengthLimit int
	// contains filtered or unexported fields
}

func NewRelay

func NewRelay(rl *Relay) *Relay

NewRelay new relay

func (*Relay) CloseRelay

func (rl *Relay) CloseRelay() error

CloseRelay close relay

func (*Relay) HandleWebsocket

func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request)

HandleWebsocket handle websocket

type StoreEvent

type StoreEvent []func(cctx *cctx.Context, evt *nostr.Event) error

Jump to

Keyboard shortcuts

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