Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
67abe6b5
Commit
67abe6b5
authored
4 years ago
by
aliiohs
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
bdf48c7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config_loader.go
+7
-0
7 additions, 0 deletions
config/config_loader.go
config/protocol_config.go
+3
-4
3 additions, 4 deletions
config/protocol_config.go
config/service_config.go
+1
-1
1 addition, 1 deletion
config/service_config.go
with
11 additions
and
5 deletions
config/config_loader.go
+
7
−
0
View file @
67abe6b5
...
...
@@ -42,6 +42,7 @@ var (
providerConfig
*
ProviderConfig
// baseConfig = providerConfig.BaseConfig or consumerConfig
baseConfig
*
BaseConfig
sslEnabled
=
false
// configAccessMutex is used to make sure that xxxxConfig will only be created once if needed.
// it should be used combine with double-check to avoid the race condition
...
...
@@ -325,6 +326,12 @@ func GetBaseConfig() *BaseConfig {
return
baseConfig
}
func
GetSslEnabled
()
bool
{
return
sslEnabled
}
func
SetSslEnabled
(
enabled
bool
)
{
sslEnabled
=
enabled
}
func
IsProvider
()
bool
{
return
providerConfig
!=
nil
}
This diff is collapsed.
Click to expand it.
config/protocol_config.go
+
3
−
4
View file @
67abe6b5
...
...
@@ -27,10 +27,9 @@ import (
// ProtocolConfig is protocol configuration
type
ProtocolConfig
struct
{
Name
string
`required:"true" yaml:"name" json:"name,omitempty" property:"name"`
Ip
string
`required:"true" yaml:"ip" json:"ip,omitempty" property:"ip"`
Port
string
`required:"true" yaml:"port" json:"port,omitempty" property:"port"`
SslEnabled
bool
`required:"false" yaml:"sslEnabled" json:"sslEnabled,omitempty" property:"sslEnabled"`
Name
string
`required:"true" yaml:"name" json:"name,omitempty" property:"name"`
Ip
string
`required:"true" yaml:"ip" json:"ip,omitempty" property:"ip"`
Port
string
`required:"true" yaml:"port" json:"port,omitempty" property:"port"`
}
// nolint
...
...
This diff is collapsed.
Click to expand it.
config/service_config.go
+
1
−
1
View file @
67abe6b5
...
...
@@ -188,7 +188,7 @@ func (c *ServiceConfig) Export() error {
common
.
WithPort
(
port
),
common
.
WithParams
(
urlMap
),
common
.
WithParamsValue
(
constant
.
BEAN_NAME_KEY
,
c
.
id
),
common
.
WithParamsValue
(
constant
.
SSL_ENABLED_KEY
,
strconv
.
FormatBool
(
proto
.
SslEnabled
)),
common
.
WithParamsValue
(
constant
.
SSL_ENABLED_KEY
,
strconv
.
FormatBool
(
Get
SslEnabled
()
)),
common
.
WithMethods
(
strings
.
Split
(
methods
,
","
)),
common
.
WithToken
(
c
.
Token
),
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment