Documentation ¶
Index ¶
- Constants
- type IncomingEvent
- type SimplePool
- func (p *SimplePool) EnsureRelay(url string) (*relay.Relay, error)
- func (p *SimplePool) QuerySingle(c context.T, urls []string, f *filter.T) *IncomingEvent
- func (p *SimplePool) SubMany(c context.T, urls []string, filters filters.T, unique bool) chan IncomingEvent
- func (p *SimplePool) SubManyEose(c context.T, urls []string, filters filters.T) chan IncomingEvent
- func (p *SimplePool) SubManyEoseNonUnique(c context.T, urls []string, filters filters.T) chan IncomingEvent
- func (p *SimplePool) SubManyNonUnique(c context.T, urls []string, filters filters.T, unique bool) chan IncomingEvent
Constants ¶
View Source
const MAX_LOCKS = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimplePool ¶
type SimplePool struct { Relays map[string]*relay.Relay Context context.T // contains filtered or unexported fields }
func NewSimplePool ¶
func NewSimplePool(c context.T) *SimplePool
func (*SimplePool) EnsureRelay ¶
func (p *SimplePool) EnsureRelay(url string) (*relay.Relay, error)
func (*SimplePool) QuerySingle ¶
func (p *SimplePool) QuerySingle(c context.T, urls []string, f *filter.T) *IncomingEvent
QuerySingle returns the first event returned by the first relay, cancels everything else.
func (*SimplePool) SubMany ¶
func (p *SimplePool) SubMany(c context.T, urls []string, filters filters.T, unique bool) chan IncomingEvent
SubMany opens a subscription with the given filters to multiple relays the subscriptions only end when the context is canceled
func (*SimplePool) SubManyEose ¶
func (p *SimplePool) SubManyEose(c context.T, urls []string, filters filters.T) chan IncomingEvent
SubManyEose is like SubMany, but it stops subscriptions and closes the channel when gets a EOSE
func (*SimplePool) SubManyEoseNonUnique ¶
func (p *SimplePool) SubManyEoseNonUnique(c context.T, urls []string, filters filters.T) chan IncomingEvent
SubManyEoseNonUnique is like SubManyEose, but returns duplicate events if they come from different relays
func (*SimplePool) SubManyNonUnique ¶
func (p *SimplePool) SubManyNonUnique(c context.T, urls []string, filters filters.T, unique bool) chan IncomingEvent
SubManyNonUnique is like SubMany, but returns duplicate events if they come from different relays
Click to show internal directories.
Click to hide internal directories.