Documentation ¶
Index ¶
- type PortCache
- func (p *PortCache) AddPortSpec(s *portspec.PortSpec)
- func (p *PortCache) AddUnique(s *portspec.PortSpec) error
- func (p *PortCache) GetAllSpecValueFromPort(port uint16) ([]interface{}, error)
- func (p *PortCache) GetSpecValueFromPort(port uint16) (interface{}, error)
- func (p *PortCache) Remove(s *portspec.PortSpec) error
- func (p *PortCache) RemoveStringPorts(ports string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PortCache ¶
PortCache is a generic cache of port pairs or exact ports. It can store and do lookups of ports on exact matches or ranges. It returns the stored values
func (*PortCache) AddPortSpec ¶
AddPortSpec adds a port spec into the cache
func (*PortCache) GetAllSpecValueFromPort ¶
GetAllSpecValueFromPort will return all the specs that potentially match. This will allow for overlapping ranges
func (*PortCache) GetSpecValueFromPort ¶
GetSpecValueFromPort searches the cache for a match based on a port It will return the first match found on exact ports or on the ranges of ports. If there are multiple intervals that match it will randomly return one of them.
func (*PortCache) RemoveStringPorts ¶
RemoveStringPorts will remove a port from the cache
Click to show internal directories.
Click to hide internal directories.