ing
This commit is contained in:
parent
cae59c7bed
commit
c28149db4b
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# chmod u+x ./.linux_set_cap.sh
|
|
||||||
# sudo chmod u+s ./.linux_set_cap.sh
|
|
||||||
|
|
||||||
setcap cap_net_raw,cap_net_admin=eip ./debug
|
|
5
.vscode/launch.json
vendored
5
.vscode/launch.json
vendored
|
@ -12,10 +12,7 @@
|
||||||
"program": "${workspaceRoot}/main.go",
|
"program": "${workspaceRoot}/main.go",
|
||||||
"env": {},
|
"env": {},
|
||||||
"args": [],
|
"args": [],
|
||||||
"showLog": true,
|
"showLog": true
|
||||||
"linux": {
|
|
||||||
"preLaunchTask": "LinuxSetCap"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "File Debug",
|
"name": "File Debug",
|
||||||
|
|
12
.vscode/tasks.json
vendored
12
.vscode/tasks.json
vendored
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
||||||
// for the documentation about the tasks.json format
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "LinuxSetCap",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceRoot}/.linux_set_cap.sh"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
ossw "git.loafle.net/overflow/server-go/socket/web"
|
ossw "git.loafle.net/overflow/server-go/socket/web"
|
||||||
|
|
||||||
"git.loafle.net/overflow_scanner/probe/annotation"
|
"git.loafle.net/overflow_scanner/probe/annotation"
|
||||||
|
"git.loafle.net/overflow_scanner/probe/discovery"
|
||||||
|
|
||||||
// For service
|
// For service
|
||||||
_ "git.loafle.net/overflow_scanner/probe/service"
|
_ "git.loafle.net/overflow_scanner/probe/service"
|
||||||
|
@ -16,6 +17,8 @@ import (
|
||||||
func New() *ossw.Server {
|
func New() *ossw.Server {
|
||||||
rpcServerCodec := orpj.NewServerCodec()
|
rpcServerCodec := orpj.NewServerCodec()
|
||||||
|
|
||||||
|
od.RegisterResource("Discoverer", discovery.Instance())
|
||||||
|
|
||||||
services, err := od.GetInstancesByAnnotationType(annotation.ServiceAnnotationType)
|
services, err := od.GetInstancesByAnnotationType(annotation.ServiceAnnotationType)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
olog.Logger().Panic(err.Error())
|
olog.Logger().Panic(err.Error())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user