Documentation
¶
Index ¶
- type BlockType
- type Config
- type Counters
- type Engine
- func (e *Engine) Block(ip, reason string, duration time.Duration) error
- func (e *Engine) ClearStore() error
- func (e *Engine) Close() error
- func (e *Engine) Handler(next http.Handler, contextRoute *alaye.FirewallRoute) http.Handler
- func (e *Engine) List() ([]Rule, error)
- func (e *Engine) PruneStore() (int, error)
- func (e *Engine) Unblock(ip string) error
- type Inspector
- type Rule
- type RuleIterator
- type Store
- func (s *Store) Add(r Rule) error
- func (s *Store) Clear() error
- func (s *Store) Close() error
- func (s *Store) GetBan(ip string) (*Rule, error)
- func (s *Store) IterateActive(iter RuleIterator) error
- func (s *Store) LoadAll() ([]Rule, error)
- func (s *Store) PruneExpired() (int, error)
- func (s *Store) Remove(ip string) error
- func (s *Store) Sync() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counters ¶
type Counters struct {
// contains filtered or unexported fields
}
func NewCounters ¶
func NewCounters() *Counters
NewCounters initializes the rate limit tracking map and garbage collector Ensures bounded memory usage by sweeping expired records periodically
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
New establishes deep packet inspection rules for perimeter security. It orchestrates whitelists, persistent local bans, and distributed dynamic thresholds.
func (*Engine) Block ¶
Block adds an IP to the persistent ban store with a reason and expiry duration.
func (*Engine) ClearStore ¶
ClearStore removes all ban rules from the persistent store.
func (*Engine) Handler ¶
Handler actively checks every packet traversing the mesh configuration boundaries. Applies immediate dropping or payload capturing dependent on rule expressions.
func (*Engine) PruneStore ¶
PruneStore removes expired ban rules from the persistent store.
type Rule ¶
type RuleIterator ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Close ¶
Close shuts down the persist loop and closes the database. Safe to call multiple times; subsequent calls are no-ops.
func (*Store) IterateActive ¶
func (s *Store) IterateActive(iter RuleIterator) error