Documentation
¶
Index ¶
- Constants
- Variables
- type Adapter
- type Manager
- func (m *Manager) Cleanup() error
- func (m *Manager) Enable() error
- func (m *Manager) FamilyStatus(family string) (bool, bool, error)
- func (m *Manager) List(info, strategy string) ([]Rule, error)
- func (m *Manager) Name() string
- func (m *Manager) Reconcile(rules []Rule) error
- func (m *Manager) Replay() error
- func (m *Manager) Status() (Status, error)
- type OperationType
- type Rule
- type RuntimeClient
- type Status
Constants ¶
View Source
const ( FamilyIPv4 = constant.FirewallFamilyIPv4 FamilyIPv6 = constant.FirewallFamilyIPv6 ChainPreRouting = "1PANEL_PREROUTING" ChainPostRouting = "1PANEL_POSTROUTING" ChainForward = "1PANEL_FORWARD" ForwardFile = "1panel_forward.rules" PreRoutingFile = "1panel_forward_pre.rules" PostRoutingFile = "1panel_forward_post.rules" )
Variables ¶
View Source
var ErrRuleExists = errors.New("forwarding rule already exists")
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(adapter Adapter, runtime RuntimeClient) *Manager
type OperationType ¶
type OperationType string
const ( OperationAdd OperationType = "add" OperationRemove OperationType = "remove" )
type Rule ¶
type Rule struct {
Num string
Family string
Protocol string
Port string
TargetIP string
TargetPort string
Interface string
}
func NormalizeRule ¶
type RuntimeClient ¶
Click to show internal directories.
Click to hide internal directories.