Documentation ¶
Index ¶
- type Batcher
- type DependentServices
- type DispatcherStatus
- type Service
- func (s *Service) DecActiveAddresses()
- func (s *Service) DecActiveGroups()
- func (s *Service) GetActiveAddresses() int32
- func (s *Service) GetActiveGroups() int32
- func (s *Service) IncActiveAddresses()
- func (s *Service) IncActiveGroups()
- func (s *Service) Init(config []byte) error
- func (s *Service) PushAddresses(ctx context.Context, userContext am.UserContext, scanGroupID int) error
- func (s *Service) ShouldPortScan(ctx context.Context, userContext am.UserContext, group *am.ScanGroup, ...) (string, bool)
- func (s *Service) StartGroupFilter(userContext am.UserContext, scanGroupID int, start time.Time) *am.ScanGroupAddressFilter
- func (s *Service) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batcher ¶
type Batcher struct {
// contains filtered or unexported fields
}
func NewBatcher ¶
func NewBatcher(userContext am.UserContext, addressClient am.AddressService, batchCount int) *Batcher
func (*Batcher) Add ¶
func (b *Batcher) Add(result *am.ScanGroupAddress)
func (*Batcher) InsertBatch ¶
func (b *Batcher) InsertBatch()
type DependentServices ¶
type DependentServices struct { EventClient am.EventService // used for notifying completion of scan groups SgClient am.ScanGroupService // scangroup service connection AddressClient am.AddressService // address service connection WebClient am.WebDataService // webdata service connection ModuleClients map[am.ModuleType]am.ModuleService // map of module service connections PortScanClient am.PortScannerService // port scanner service }
type DispatcherStatus ¶
type DispatcherStatus int32
DispatcherStatus for determining if we are started/stopped
const ( Unknown DispatcherStatus = 0 Started DispatcherStatus = 1 Stopped DispatcherStatus = 2 )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service for dispatching and handling responses from worker modules
func New ¶
func New(services *DependentServices, stater state.Stater) *Service
New for dispatching groups to be analyzed to the modules
func (*Service) DecActiveAddresses ¶
func (s *Service) DecActiveAddresses()
func (*Service) DecActiveGroups ¶
func (s *Service) DecActiveGroups()
func (*Service) GetActiveAddresses ¶
func (*Service) GetActiveGroups ¶
func (*Service) IncActiveAddresses ¶
func (s *Service) IncActiveAddresses()
func (*Service) IncActiveGroups ¶
func (s *Service) IncActiveGroups()
func (*Service) PushAddresses ¶
func (s *Service) PushAddresses(ctx context.Context, userContext am.UserContext, scanGroupID int) error
PushAddresses to state
func (*Service) ShouldPortScan ¶
func (s *Service) ShouldPortScan(ctx context.Context, userContext am.UserContext, group *am.ScanGroup, address *am.ScanGroupAddress) (string, bool)
ShouldPortScan runs a number of checks to determine if we should / are allowed to port scan this address
func (*Service) StartGroupFilter ¶
func (s *Service) StartGroupFilter(userContext am.UserContext, scanGroupID int, start time.Time) *am.ScanGroupAddressFilter
StartGroupFilter for building a filter for this scan group. Depending on subscription level we will only extract addresses that have not been scanned since: default: 30 min, small: 12 hours, medium: 6 hours.
Click to show internal directories.
Click to hide internal directories.