MCPcopy Index your code
hub / github.com/deepflowio/deepflow / agentRegiterCommand

Function agentRegiterCommand

cli/ctl/agent_check.go:62–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60type AgentCmdExecute func(response *agent.SyncResponse)
61
62func agentRegiterCommand() []*cobra.Command {
63 agentCacheCmd := &cobra.Command{
64 Use: "agent-cache",
65 Short: "get agent-cache from deepflow-server",
66 Run: func(cmd *cobra.Command, args []string) {
67 agentCache(agentParamData.TeamID, agentParamData.CtrlIP, agentParamData.CtrlMac, cmd)
68 },
69 }
70
71 platformDataCmd := &cobra.Command{
72 Use: "platform-data",
73 Short: "get platform-data from deepflow-server",
74 Run: func(cmd *cobra.Command, args []string) {
75 agentInitCmd(cmd, []AgentCmdExecute{AplatformData})
76 },
77 }
78 ipGroupsCmd := &cobra.Command{
79 Use: "ip-groups",
80 Short: "get ip groups from deepflow-servr",
81 Run: func(cmd *cobra.Command, args []string) {
82 agentInitCmd(cmd, []AgentCmdExecute{AipGroups})
83 },
84 }
85 flowAclsCmd := &cobra.Command{
86 Use: "flow-acls",
87 Short: "get flow-acls from deepflow-server",
88 Run: func(cmd *cobra.Command, args []string) {
89 agentInitCmd(cmd, []AgentCmdExecute{AflowAcls})
90 },
91 }
92 tapTypesCmd := &cobra.Command{
93 Use: "capture-network-types",
94 Short: "get capture-network-types from deepflow-server",
95 Run: func(cmd *cobra.Command, args []string) {
96 initCmd(cmd, []CmdExecute{tapTypes})
97 },
98 }
99 segmentsCmd := &cobra.Command{
100 Use: "segments",
101 Short: "get segments from deepflow-server",
102 Run: func(cmd *cobra.Command, args []string) {
103 agentInitCmd(cmd, []AgentCmdExecute{Asegments})
104 },
105 }
106 containersCmd := &cobra.Command{
107 Use: "containers",
108 Short: "get containers from deepflow-server",
109 Run: func(cmd *cobra.Command, args []string) {
110 agentInitCmd(cmd, []AgentCmdExecute{Acontainers})
111 },
112 }
113 configCmd := &cobra.Command{
114 Use: "config",
115 Short: "get config from deepflow-server",
116 Run: func(cmd *cobra.Command, args []string) {
117 agentInitCmd(cmd, []AgentCmdExecute{AconfigData})
118 },
119 }

Callers 1

Calls 9

agentCacheFunction · 0.85
agentInitCmdFunction · 0.85
initCmdFunction · 0.85
AgpidAgentResponseFunction · 0.85
AgpidGlobalTableFunction · 0.85
AgpidAgentRequestFunction · 0.85
ArealGlobalFunction · 0.85
AripToVipFunction · 0.85
ApluginFunction · 0.85

Tested by

no test coverage detected