File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import (
17
17
"github.com/google/uuid"
18
18
kg "github.com/kubearmor/kubearmor-relay-server/relay-server/log"
19
19
"github.com/kubearmor/kubearmor-relay-server/relay-server/server"
20
+ "golang.org/x/sync/errgroup"
20
21
)
21
22
22
23
var (
@@ -116,7 +117,8 @@ func (ecl *ElasticsearchClient) Start() error {
116
117
start = time .Now ()
117
118
client := ecl .kaClient
118
119
ecl .ctx , ecl .cancel = context .WithCancel (context .Background ())
119
-
120
+ client .WgServer = & errgroup.Group {}
121
+ client .Context = ecl .ctx
120
122
// do healthcheck
121
123
if ok := client .DoHealthCheck (); ! ok {
122
124
return fmt .Errorf ("failed to check the liveness of the gRPC server" )
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ require (
13
13
github.com/cenkalti/backoff/v4 v4.2.1
14
14
github.com/dustin/go-humanize v1.0.1
15
15
github.com/elastic/go-elasticsearch/v7 v7.17.10
16
- github.com/golang/protobuf v1.5.4
17
16
github.com/google/uuid v1.6.0
18
17
github.com/kubearmor/KubeArmor/KubeArmor v0.0.0-20240412061210-e4422dd02342
19
18
github.com/kubearmor/KubeArmor/protobuf v0.0.0-20240315075053-fee50c9428b9
@@ -35,6 +34,7 @@ require (
35
34
github.com/go-openapi/jsonreference v0.21.0 // indirect
36
35
github.com/go-openapi/swag v0.23.0 // indirect
37
36
github.com/gogo/protobuf v1.3.2 // indirect
37
+ github.com/golang/protobuf v1.5.4 // indirect
38
38
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
39
39
github.com/google/go-cmp v0.6.0 // indirect
40
40
github.com/google/gofuzz v1.2.0 // indirect
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ func main() {
87
87
esCl , err := elasticsearch .NewElasticsearchClient (esUrl , endPoint )
88
88
if err != nil {
89
89
kg .Warnf ("Failed to start a Elasticsearch Client" )
90
+ return
90
91
}
91
92
go esCl .Start ()
92
93
defer esCl .Stop ()
You can’t perform that action at this time.
0 commit comments