util: register group controller server

Register group controller server
if its initialized.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2024-02-06 14:45:30 +01:00 committed by mergify[bot]
parent 2af26ca62d
commit 5afc6fd0d2

View File

@ -45,6 +45,7 @@ type Servers struct {
IS csi.IdentityServer
CS csi.ControllerServer
NS csi.NodeServer
GS csi.GroupControllerServer
}
// NewNonBlockingGRPCServer return non-blocking GRPC.
@ -109,6 +110,9 @@ func (s *nonBlockingGRPCServer) serve(endpoint string, srv Servers) {
if srv.NS != nil {
csi.RegisterNodeServer(server, srv.NS)
}
if srv.GS != nil {
csi.RegisterGroupControllerServer(server, srv.GS)
}
log.DefaultLog("Listening for connections on address: %#v", listener.Addr())
err = server.Serve(listener)