Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
admin-backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
admin-backend
Commits
2feca4dc
Commit
2feca4dc
authored
Mar 05, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add whitelist
parent
5adff703
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
registry.go
libs/registry/registry.go
+5
-5
main.go
main.go
+1
-2
No files found.
libs/registry/registry.go
View file @
2feca4dc
...
@@ -47,11 +47,11 @@ func (d backendService) ServiceType() common.ServiceType {
...
@@ -47,11 +47,11 @@ func (d backendService) ServiceType() common.ServiceType {
return
common
.
SERVICE_BACKEND
return
common
.
SERVICE_BACKEND
}
}
func
(
d
backendService
)
Instance
()
string
{
//
func (d backendService) Instance() string {
hostname
,
_
:=
os
.
Hostname
()
//
hostname, _ := os.Hostname()
port
,
_
:=
beego
.
AppConfig
.
String
(
"httpport"
)
//
port, _ := beego.AppConfig.String("httpport")
return
"http://"
+
hostname
+
":"
+
port
//
return "http://" + hostname + ":" + port
}
//
}
func
(
d
backendService
)
Status
()
string
{
func
(
d
backendService
)
Status
()
string
{
//hostname, _ := os.Hostname()
//hostname, _ := os.Hostname()
...
...
main.go
View file @
2feca4dc
...
@@ -62,9 +62,8 @@ func main() {
...
@@ -62,9 +62,8 @@ func main() {
cronjob
.
Start
()
cronjob
.
Start
()
mysql
.
GetMysqlInstace
()
mysql
.
GetMysqlInstace
()
//postgres.Query("")
//postgres.Query("")
beego
.
Run
()
registry
.
RegistryBackend
()
registry
.
RegistryBackend
()
beego
.
Run
()
//id, err := snowflake.NextId()
//id, err := snowflake.NextId()
//if err != nil {
//if err != nil {
...
...
Write
Preview
Markdown
is supported
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