代码拉取完成,页面将自动刷新
package remoteenforcer
import (
"git.cloud.top/DSec/trireme-lib/controller/internal/enforcer/utils/rpcwrapper"
)
const (
// InitEnforcer is string for invoking RPC
InitEnforcer = "RemoteEnforcer.InitEnforcer"
//Unenforce is string for invoking RPC
Unenforce = "RemoteEnforcer.Unenforce"
//Enforce is string for invoking RPC
Enforce = "RemoteEnforcer.Enforce"
// EnforcerExit is string for invoking RPC
EnforcerExit = "RemoteEnforcer.EnforcerExit"
// UpdateSecrets is string for invoking updatesecrets RPC
UpdateSecrets = "RemoteEnforcer.UpdateSecrets"
// SetTargetNetworks is string for invoking SetTargetNetworks RPC
SetTargetNetworks = "RemoteEnforcer.SetTargetNetworks"
// EnableIPTablesPacketTracing enable iptables trace mode
EnableIPTablesPacketTracing = "RemoteEnforcer.EnableIPTablesPacketTracing"
// EnableDatapathPacketTracing enable datapath packet tracing
EnableDatapathPacketTracing = "RemoteEnforcer.EnableDatapathPacketTracing"
// SetLogLevel is string for invoking set log level RPC
SetLogLevel = "RemoteEnforcer.SetLogLevel"
)
// RemoteIntf is the interface implemented by the remote enforcer
type RemoteIntf interface {
// InitEnforcer is a function called from the controller using RPC.
// It intializes data structure required by the remote enforcer
InitEnforcer(req rpcwrapper.Request, resp *rpcwrapper.Response) error
//Unenforce this method calls the unenforce method on the enforcer created from initenforcer
Unenforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error
//Enforce this method calls the enforce method on the enforcer created during initenforcer
Enforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error
// EnforcerExit this method is called when we received a killrpocess message from the controller
// This allows a graceful exit of the enforcer
EnforcerExit(req rpcwrapper.Request, resp *rpcwrapper.Response) error
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。