Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
bitmask-vpn
Commits
c994d4bb
Commit
c994d4bb
authored
10 months ago
by
Pea Nut
Committed by
jkito
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add some comments to vpn/status.go
parent
f134916f
No related branches found
No related tags found
1 merge request
!198
v5 implementation with a single Bitmask struct
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/vpn/status.go
+7
-0
7 additions, 0 deletions
pkg/vpn/status.go
with
7 additions
and
0 deletions
pkg/vpn/status.go
+
7
−
0
View file @
c994d4bb
...
...
@@ -106,6 +106,12 @@ func (b *Bitmask) eventHandler(eventCh <-chan management.Event) {
b
.
statusCh
<-
Off
}
// About the Getter functions here:
// In pkg/backend/status.go there is a function toJson which is called regularly by the cpp
// part (toJson is called in RefreshContext which is defined in pkg/backend/api.go and exported
// in libgoshim). It is used get the current state of the application. In toJson, all the Getter
// functions like GetCurrentGateway and IsManualLocation are called
func
(
b
*
Bitmask
)
GetCurrentGateway
()
string
{
return
b
.
onGateway
.
Host
}
...
...
@@ -126,6 +132,7 @@ func (b *Bitmask) GetBestLocation(transport string) string {
Str
(
"transport"
,
transport
)
.
Msg
(
"Could not get best location"
)
}
// TODO: we return here an empty string in case of an error
return
location
}
...
...
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