Documentation ¶
Index ¶
- Variables
- func MonitorResources(c cx)
- type Relay
- func (r *Relay) AcceptEvent(c cx, evt *event.T, hr *http.Request, origin st, authedPubkey by) (accept bo, notice st, afterSave func())
- func (r *Relay) AcceptReq(c cx, hr *http.Request, id by, ff *filters.T, authedPubkey by) (allowed *filters.T, ok bo)
- func (r *Relay) AuthEnabled() bo
- func (r *Relay) CheckOwnerLists()
- func (r *Relay) Init() (err er)
- func (r *Relay) Name() st
- func (r *Relay) ServiceUrl(req *http.Request) (s st)
- func (r *Relay) Spider()
- func (r *Relay) Storage() store.I
- func (r *Relay) ZeroLists()
Constants ¶
This section is empty.
Variables ¶
View Source
var RelayKinds = &kinds.T{ K: []*kind.T{ kind.RelayListMetadata, kind.DMRelaysList, }, }
RelayKinds are the types of events that we want to search and fetch.
Functions ¶
func MonitorResources ¶
func MonitorResources(c cx)
Types ¶
type Relay ¶
type Relay struct { sync.Mutex Ctx cx *config.C Store store.I MaxLimit no // Owners' pubkeys Owners []by Followed, OwnersFollowed map[st]struct{} // OwnersFollowLists are the event IDs of owners follow lists, which must // not be deleted, only replaced. OwnersFollowLists []by // KnownRelays is a map populated by the Spider from all RelayKinds events // found on the relay. KnownRelays map[st]struct{} SpiderSigner signer.I }
func (*Relay) AcceptEvent ¶
func (*Relay) AuthEnabled ¶
func (r *Relay) AuthEnabled() bo
func (*Relay) CheckOwnerLists ¶
func (r *Relay) CheckOwnerLists()
CheckOwnerLists regenerates the owner follow lists if they are empty.
It also adds the followed npubs of the follows.
func (*Relay) ServiceUrl ¶
ServiceUrl returns the address of the relay to send back in auth responses. If auth is disabled this returns an empty string.
Click to show internal directories.
Click to hide internal directories.