Documentation ¶
Index ¶
- type Staller
- type StallerCollection
- func (c *StallerCollection) Add(staller Staller) error
- func (c *StallerCollection) Delete(staller Staller)
- func (c *StallerCollection) Len() int
- func (c *StallerCollection) PruneByIdentifier()
- func (c *StallerCollection) PruneByIdentifierGroup(id string)
- func (c *StallerCollection) PruneNByIdentifier(count int)
- type StallerPool
- type StallerPoolOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Staller ¶
type Staller interface { // Binds a given staller instance to the staller pool so that it can be shut down in the event // there are too many active connections and it can deregister itself when it is done BindToPool(chan Staller) // Shuts down the staller instance and cleans up any resources Close() // Gets the group identifier for the staller GetGroupIdentifier() string // Gets the identifier for the staller GetIdentifier() uint64 }
type StallerCollection ¶
type StallerCollection struct {
// contains filtered or unexported fields
}
Structured map for stallers mapped by identifierAddress and Connection ID
func NewStallerCollection ¶
func NewStallerCollection(groupLimit int) *StallerCollection
func (*StallerCollection) Add ¶
func (c *StallerCollection) Add(staller Staller) error
func (*StallerCollection) Delete ¶
func (c *StallerCollection) Delete(staller Staller)
func (*StallerCollection) Len ¶
func (c *StallerCollection) Len() int
func (*StallerCollection) PruneByIdentifier ¶
func (c *StallerCollection) PruneByIdentifier()
func (*StallerCollection) PruneByIdentifierGroup ¶
func (c *StallerCollection) PruneByIdentifierGroup(id string)
func (*StallerCollection) PruneNByIdentifier ¶
func (c *StallerCollection) PruneNByIdentifier(count int)
type StallerPool ¶
type StallerPool struct {
// contains filtered or unexported fields
}
func NewStallerPool ¶
func NewStallerPool(lifecycle fx.Lifecycle, config *config.Config) *StallerPool
func (*StallerPool) Prune ¶
func (s *StallerPool) Prune()
func (*StallerPool) Register ¶
func (s *StallerPool) Register(staller Staller) error
func (*StallerPool) Start ¶
func (s *StallerPool) Start()
func (*StallerPool) Stop ¶
func (s *StallerPool) Stop()
func (*StallerPool) StopByIdentifier ¶
func (s *StallerPool) StopByIdentifier(id string)
type StallerPoolOptions ¶
type StallerPoolOptions struct {
MaximumConnections int
}
Click to show internal directories.
Click to hide internal directories.