Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Mizu
Commits
bf686892
Unverified
Commit
bf686892
authored
3 years ago
by
RoyUP9
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
renamed standalone route to config route (#586)
parent
dbc18b96
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
agent/main.go
+1
-1
agent/main.go
agent/pkg/controllers/config_controller.go
+2
-2
agent/pkg/controllers/config_controller.go
agent/pkg/models/models.go
+1
-1
agent/pkg/models/models.go
agent/pkg/routes/config_routes.go
+2
-2
agent/pkg/routes/config_routes.go
with
6 additions
and
6 deletions
+6
-6
agent/main.go
+
1
-
1
View file @
bf686892
...
...
@@ -261,7 +261,7 @@ func hostApi(socketHarOutputChannel chan<- *tapApi.OutputChannelItem) {
api
.
WebSocketRoutes
(
app
,
&
eventHandlers
,
startTime
)
if
config
.
Config
.
StandaloneMode
{
routes
.
Standalone
Routes
(
app
)
routes
.
Config
Routes
(
app
)
}
routes
.
QueryRoutes
(
app
)
...
...
This diff is collapsed.
Click to expand it.
agent/pkg/controllers/
standalone
_controller.go
→
agent/pkg/controllers/
config
_controller.go
+
2
-
2
View file @
bf686892
...
...
@@ -16,12 +16,12 @@ import (
"time"
)
var
globalTapConfig
*
models
.
Standalone
TapConfig
var
globalTapConfig
*
models
.
TapConfig
var
cancelTapperSyncer
context
.
CancelFunc
var
kubernetesProvider
*
kubernetes
.
Provider
func
PostTapConfig
(
c
*
gin
.
Context
)
{
tapConfig
:=
&
models
.
Standalone
TapConfig
{}
tapConfig
:=
&
models
.
TapConfig
{}
if
err
:=
c
.
Bind
(
tapConfig
);
err
!=
nil
{
c
.
JSON
(
http
.
StatusBadRequest
,
err
)
...
...
This diff is collapsed.
Click to expand it.
agent/pkg/models/models.go
+
1
-
1
View file @
bf686892
...
...
@@ -16,7 +16,7 @@ func GetEntry(r *tapApi.MizuEntry, v tapApi.DataUnmarshaler) error {
return
v
.
UnmarshalData
(
r
)
}
type
Standalone
TapConfig
struct
{
type
TapConfig
struct
{
TappedNamespaces
map
[
string
]
bool
`json:"tappedNamespaces"`
}
...
...
This diff is collapsed.
Click to expand it.
agent/pkg/routes/
standalone
_routes.go
→
agent/pkg/routes/
config
_routes.go
+
2
-
2
View file @
bf686892
...
...
@@ -5,8 +5,8 @@ import (
"mizuserver/pkg/controllers"
)
func
Standalone
Routes
(
ginApp
*
gin
.
Engine
)
{
routeGroup
:=
ginApp
.
Group
(
"/
standalone
"
)
func
Config
Routes
(
ginApp
*
gin
.
Engine
)
{
routeGroup
:=
ginApp
.
Group
(
"/
config
"
)
routeGroup
.
POST
(
"/tapConfig"
,
controllers
.
PostTapConfig
)
routeGroup
.
GET
(
"/tapConfig"
,
controllers
.
GetTapConfig
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help