Compare commits

..

4 Commits

Author SHA1 Message Date
Piotr Biernat
feff40bf55 update 2024-12-06 14:05:06 +01:00
eb1e8a9cb0 consul registration update 2024-07-21 21:11:34 +02:00
2c797164e0 consul registration update 2024-07-21 21:00:49 +02:00
7725e5dd65 debug fix 2024-07-20 20:12:29 +02:00
2 changed files with 10 additions and 11 deletions

View File

@@ -85,14 +85,14 @@ func (s *Service) Register() error {
Address: s.Address,
Port: s.port,
Tags: s.getTags(),
// Connect: &consul.AgentServiceConnect{Native: true},
Connect: &consul.AgentServiceConnect{Native: true},
// Proxy: &consul.AgentServiceConnectProxyConfig{
// DestinationServiceName: s.Name,
// },
Check: &consul.AgentServiceCheck{
Interval: "5s",
Timeout: "1s",
// TTL: s.ttl.String(),
// Interval: "5s",
// Timeout: "1s",
TTL: s.ttl.String(),
Status: "passing",
DeregisterCriticalServiceAfter: "10s",
},
@@ -144,11 +144,10 @@ func (s *Service) Connect() (*connect.Service, error) {
// })
svc, err := connect.NewService(s.Name, s.client)
s.connect = svc
cnf := svc.ServerTLSConfig()
fmt.Printf("CONNECT SERVER:: %s CONFIG:: %v\n", s.Name, cnf)
for k, c := range cnf.Certificates {
fmt.Printf("CONNECT CERT %d: %v", k, c)
}
fmt.Printf("CONNECT SERVER:: %s CERTS:: %v\n", s.Name, svc.ServerTLSConfig())
// for k, c := range cnf.Certificates {
// fmt.Printf("CONNECT CERT %d: %v", k, c)
// }
return svc, err
}

4
go.mod
View File

@@ -1,9 +1,9 @@
module git.pbiernat.io/egommerce/go-api-pkg
module git.ego.cloudns.be/egommerce/go-api-pkg
go 1.18
require (
git.pbiernat.io/egommerce/api-entities v0.2.3
git.ego.cloudns.be/egommerce/api-entities v0.2.3
github.com/fluent/fluent-logger-golang v1.9.0
github.com/go-redis/redis/v8 v8.11.5
github.com/hashicorp/consul v1.16.0