stall

package
v1.2.0-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL