controlplane: save configuration events to databroker (#2153)

* envoy: save events to databroker

* controlplane: add tests for envoy configuration events

* format imports
This commit is contained in:
Caleb Doxsey 2021-04-29 15:51:46 -06:00 committed by GitHub
parent d32b8a4d8a
commit 0adbf4f24c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 1067 additions and 618 deletions

View file

@ -190,17 +190,17 @@ func (src *ConfigSource) runUpdater(cfg *config.Config) {
src.cancel = nil
}
cc, err := grpc.NewGRPCClientConn(connectionOptions)
ctx := context.Background()
ctx, src.cancel = context.WithCancel(ctx)
cc, err := grpc.NewGRPCClientConn(ctx, connectionOptions)
if err != nil {
log.Error(context.TODO()).Err(err).Msg("databroker: failed to create gRPC connection to data broker")
log.Error(ctx).Err(err).Msg("databroker: failed to create gRPC connection to data broker")
return
}
client := databroker.NewDataBrokerServiceClient(cc)
ctx := context.Background()
ctx, src.cancel = context.WithCancel(ctx)
syncer := databroker.NewSyncer("databroker", &syncerHandler{
client: client,
src: src,