Skip to content

Commit

Permalink
Fix: Pass ac client to vm service
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipAB committed Jul 19, 2024
1 parent 4f9f1a9 commit 86c0e6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v3/services/vmsvc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

vmservice "github.com/hobbyfarm/gargantua/services/vmsvc/v3/internal"
hfInformers "github.com/hobbyfarm/gargantua/v3/pkg/client/informers/externalversions"
accesscodepb "github.com/hobbyfarm/gargantua/v3/protos/accesscode"
authnpb "github.com/hobbyfarm/gargantua/v3/protos/authn"
authrpb "github.com/hobbyfarm/gargantua/v3/protos/authr"
vmpb "github.com/hobbyfarm/gargantua/v3/protos/vm"
Expand Down Expand Up @@ -38,6 +39,7 @@ func main() {
services := []microservices.MicroService{
microservices.AuthN,
microservices.AuthR,
microservices.AccessCode,
microservices.VMTemplate,
}
connections := microservices.EstablishConnections(services, serviceConfig.ClientCert)
Expand All @@ -46,6 +48,7 @@ func main() {
}
authnClient := authnpb.NewAuthNClient(connections[microservices.AuthN])
authrClient := authrpb.NewAuthRClient(connections[microservices.AuthR])
acClient := accesscodepb.NewAccessCodeSvcClient(connections[microservices.AccessCode])
vmTemplateClient := vmtemplatepb.NewVMTemplateSvcClient(connections[microservices.VMTemplate])

gs := microservices.CreateGRPCServer(serviceConfig.ServerCert.Clone())
Expand All @@ -68,6 +71,7 @@ func main() {
vmServer := vmservice.NewVMServer(
authnClient,
authrClient,
acClient,
vmTemplateClient,
vs,
)
Expand Down

0 comments on commit 86c0e6d

Please sign in to comment.