Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comms
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
comms
Commits
85ab20b2
Commit
85ab20b2
authored
Mar 11, 2022
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
flip lazy connection flag
parent
d95fe890
No related branches found
No related tags found
2 merge requests
!39
Merge release into master
,
!27
add configurable flag for lazy connections to hostParams.go
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
connect/host.go
+1
-1
1 addition, 1 deletion
connect/host.go
connect/hostParams.go
+3
-3
3 additions, 3 deletions
connect/hostParams.go
with
4 additions
and
4 deletions
connect/host.go
+
1
−
1
View file @
85ab20b2
...
...
@@ -112,7 +112,7 @@ func NewHost(id *id.ID, address string, cert []byte, params HostParams) (host *H
}
// Connect immediately if configured to do so
if
!
params
.
LazyConnection
{
if
params
.
Disable
LazyConnection
{
// No mutex required
err
=
host
.
connect
()
}
...
...
This diff is collapsed.
Click to expand it.
connect/hostParams.go
+
3
−
3
View file @
85ab20b2
...
...
@@ -41,9 +41,9 @@ type HostParams struct {
// If set, metric handling will be enabled on this host
EnableMetrics
bool
// If
tru
e, a connection will only be established when a comm is sent
// If
fals
e, a connection will only be established when a comm is sent
// else, a connection will be established immediately upon host creation
LazyConnection
bool
Disable
LazyConnection
bool
// List of sending errors that are deemed unimportant
// Reception of these errors will not update the Metric state
...
...
@@ -65,7 +65,7 @@ func GetDefaultHostParams() HostParams {
SendTimeout
:
2
*
time
.
Minute
,
PingTimeout
:
5
*
time
.
Second
,
EnableMetrics
:
false
,
LazyConnection
:
tru
e
,
Disable
LazyConnection
:
fals
e
,
ExcludeMetricErrors
:
make
([]
string
,
0
),
KaClientOpts
:
keepalive
.
ClientParameters
{
// Send keepAlive every Time interval
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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