Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
danet
quant
Commits
09d1bb74
Commit
09d1bb74
authored
2 years ago
by
Martin Stiemerling
Committed by
Malte Bauch
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
changed enum names
parent
e66d3282
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Move proto kms into ekms
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
internal/kms/kmspeers.go
+7
-7
7 additions, 7 deletions
internal/kms/kmspeers.go
with
7 additions
and
7 deletions
internal/kms/kmspeers.go
+
7
−
7
View file @
09d1bb74
...
@@ -15,10 +15,10 @@ import (
...
@@ -15,10 +15,10 @@ import (
type
KmsPeerStatus
int16
type
KmsPeerStatus
int16
const
(
const
(
k
msPeerUp
KmsPeerStatus
=
iota
// peer was seen up lately
K
msPeerUp
KmsPeerStatus
=
iota
// peer was seen up lately
k
msPeerDown
// peer not reachable anymore
K
msPeerDown
// peer not reachable anymore
k
msPeerPending
// peer was added and has to be succesfully contacted once
K
msPeerPending
// peer was added and has to be succesfully contacted once
k
msPeerUnknown
// not known, not initialized
K
msPeerUnknown
// not known, not initialized
)
)
type
kmsPeerInfo
interface
{
type
kmsPeerInfo
interface
{
...
@@ -68,7 +68,7 @@ func (ph *kmsPeer) PeerHandler(kmsName string) {
...
@@ -68,7 +68,7 @@ func (ph *kmsPeer) PeerHandler(kmsName string) {
r
,
err
:=
c
.
ETSICapabilities
(
ctx
,
&
pb
.
ETSICapabilitiesRequest
{
MyKmsName
:
kmsName
})
r
,
err
:=
c
.
ETSICapabilities
(
ctx
,
&
pb
.
ETSICapabilitiesRequest
{
MyKmsName
:
kmsName
})
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"could not greet: %v"
,
err
)
log
.
Printf
(
"could not greet: %v"
,
err
)
ph
.
peerStatus
=
k
msPeerDown
ph
.
peerStatus
=
K
msPeerDown
// Send notification about change
// Send notification about change
if
ph
.
externalNotifierKMSPeer
!=
nil
{
if
ph
.
externalNotifierKMSPeer
!=
nil
{
ph
.
externalNotifierKMSPeer
<-
ph
.
tcpSocketStr
ph
.
externalNotifierKMSPeer
<-
ph
.
tcpSocketStr
...
@@ -76,7 +76,7 @@ func (ph *kmsPeer) PeerHandler(kmsName string) {
...
@@ -76,7 +76,7 @@ func (ph *kmsPeer) PeerHandler(kmsName string) {
return
return
}
}
// Works and peer moves to kmsPeerUp
// Works and peer moves to kmsPeerUp
ph
.
peerStatus
=
k
msPeerUp
ph
.
peerStatus
=
K
msPeerUp
// Send notification about change
// Send notification about change
if
ph
.
externalNotifierKMSPeer
!=
nil
{
if
ph
.
externalNotifierKMSPeer
!=
nil
{
...
@@ -94,7 +94,7 @@ func (ph *kmsPeer) PeerHandler(kmsName string) {
...
@@ -94,7 +94,7 @@ func (ph *kmsPeer) PeerHandler(kmsName string) {
_
,
err
:=
c
.
ETSICapabilities
(
ctx
,
&
pb
.
ETSICapabilitiesRequest
{
MyKmsName
:
kmsName
})
_
,
err
:=
c
.
ETSICapabilities
(
ctx
,
&
pb
.
ETSICapabilitiesRequest
{
MyKmsName
:
kmsName
})
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"could not greet: %v"
,
err
)
log
.
Printf
(
"could not greet: %v"
,
err
)
ph
.
peerStatus
=
k
msPeerDown
ph
.
peerStatus
=
K
msPeerDown
// Send notification about change
// Send notification about change
if
ph
.
externalNotifierKMSPeer
!=
nil
{
if
ph
.
externalNotifierKMSPeer
!=
nil
{
ph
.
externalNotifierKMSPeer
<-
ph
.
tcpSocketStr
ph
.
externalNotifierKMSPeer
<-
ph
.
tcpSocketStr
...
...
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