Documentation ¶
Index ¶
Constants ¶
View Source
const (
NftTableName = "cgtproxy"
)
Variables ¶
View Source
var ( ErrNftableConnMissing = errors.New("`nftables.Conn` is missing.") ErrRerouteMarkMissing = errors.New("reroute mark is missing.") ErrLoggerMissing = errors.New("logger is missing.") ErrCGroupRootMissing = errors.New("cgroupv2 file system mount point is missing.") ErrConnFactoryMissing = errors.New("netlink conn factory is missing.") )
Functions ¶
This section is empty.
Types ¶
type NFTManager ¶
type NFTManager struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Opt) (ret *NFTManager, err error)
func (*NFTManager) AddChainAndRulesForTProxy ¶
func (nft *NFTManager) AddChainAndRulesForTProxy(tp *config.TProxy) (err error)
func (*NFTManager) Clear ¶
func (nft *NFTManager) Clear() (err error)
func (*NFTManager) Release ¶
func (nft *NFTManager) Release() (err error)
func (*NFTManager) RemoveCgroups ¶
func (nft *NFTManager) RemoveCgroups(paths []string) (err error)
type Opt ¶
type Opt = (func(*NFTManager) (*NFTManager, error))
func WithBypass ¶
func WithCgroupRoot ¶
func WithCgroupRoot(root config.CGroupRoot) Opt
func WithConnFactory ¶
func WithConnFactory(f interfaces.NetlinkConnector) Opt
func WithLogger ¶
func WithLogger(log *zap.SugaredLogger) Opt
Source Files ¶
Click to show internal directories.
Click to hide internal directories.