Documentation
¶
Overview ¶
Package relay contains a collection of server for enabling the building of modular nostr relay implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I ¶
type I interface {
// Name is used as the "name" field in NIP-11 and as a prefix in default
// S logging. For other NIP-11 fields, see [Informer].
Name() string
// Init is called at the very beginning by [S.Start], allowing a realy
// to initialize its internal resources.
Init() error
// Storage returns the relay storage implementation.
Storage() store.I
}
I is the main interface for implementing a nostr relay.
type Informer ¶
Informer is called to compose NIP-11 response to an HTTP request with application/nostr+json mime type. See also [I.Name].
type Logger ¶
type Logger interface {
Infof(format string, v ...any)
Warningf(format string, v ...any)
Errorf(format string, v ...any)
}
Logger is what [S] uses to log messages.
type ShutdownAware ¶
ShutdownAware is called during the server shutdown. See [S.Shutdown] for details.
Click to show internal directories.
Click to hide internal directories.