Organize local infrastructure and Vault secrets by service ownership

This commit is contained in:
Stephan D committed 2026-09-12 23:30:18 +02:00
1 parent 1b8800ee73
commit 9dbf0bd80c
44 files changed
+496 -359

No files matched your search

+6 -1
View File
@@ -12,6 +12,7 @@ import (
merrors "git.sendico.io/tech/sxchnge/shared/errors"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -57,7 +58,11 @@ func Open(c Config) (*Client, error) {
}
tlsConfig.RootCAs = pool
}
conn, err := grpc.NewClient(c.Address, grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)))
var transport credentials.TransportCredentials = insecure.NewCredentials()
if c.CAFile != "" || c.ServerName != "" {
transport = credentials.NewTLS(tlsConfig)
}
conn, err := grpc.NewClient(c.Address, grpc.WithTransportCredentials(transport))
if err != nil {
return nil, merrors.InternalWrap(err, "create notification client")
}