Documentation
¶
Index ¶
Constants ¶
View Source
const ( // BatchSize is the number of pubkeys per subscription batch BatchSize = 20 // CatchupWindow is the extra time added to disconnection periods for catch-up CatchupWindow = 30 * time.Minute // ReconnectDelay is the initial delay between reconnection attempts ReconnectDelay = 10 * time.Second // MaxReconnectDelay is the maximum delay before switching to blackout MaxReconnectDelay = 1 * time.Hour // BlackoutPeriod is the duration to blacklist a relay after max backoff is reached BlackoutPeriod = 24 * time.Hour // BatchCreationDelay is the delay between creating each batch subscription BatchCreationDelay = 500 * time.Millisecond // RateLimitBackoffDuration is how long to wait when we get a rate limit error RateLimitBackoffDuration = 1 * time.Minute // RateLimitBackoffMultiplier is the factor by which we increase backoff on repeated rate limits RateLimitBackoffMultiplier = 2 // MaxRateLimitBackoff is the maximum backoff duration for rate limiting MaxRateLimitBackoff = 30 * time.Minute // MainLoopInterval is how often the spider checks for updates MainLoopInterval = 5 * time.Minute // EventHandlerBufferSize is the buffer size for event channels EventHandlerBufferSize = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSubscription ¶ added in v0.17.14
type BatchSubscription struct {
// contains filtered or unexported fields
}
BatchSubscription represents a subscription for a batch of pubkeys
type DisconnectionPeriod ¶ added in v0.17.14
DisconnectionPeriod tracks when a subscription was disconnected
type RelayConnection ¶ added in v0.17.14
type RelayConnection struct {
// contains filtered or unexported fields
}
RelayConnection manages a single relay connection and its subscriptions
type Spider ¶
type Spider struct {
// contains filtered or unexported fields
}
Spider manages connections to admin relays and syncs events for followed pubkeys
func New ¶
New creates a new Spider instance
func (*Spider) NotifyFollowListUpdate ¶ added in v0.29.0
func (s *Spider) NotifyFollowListUpdate()
NotifyFollowListUpdate signals the spider that the follow list has been updated
func (*Spider) SetCallbacks ¶ added in v0.17.14
SetCallbacks sets the callback functions for getting updated admin relays and follow lists
Source Files
¶
- spider.go
Click to show internal directories.
Click to hide internal directories.