Compare commits

..

5 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
07c0cd6f2e debug fix 2024-07-20 19:59:12 +02:00
2 changed files with 9 additions and 10 deletions

View File

@@ -85,13 +85,13 @@ func (s *Service) Register() error {
Address: s.Address, Address: s.Address,
Port: s.port, Port: s.port,
Tags: s.getTags(), Tags: s.getTags(),
// Connect: &consul.AgentServiceConnect{Native: true}, Connect: &consul.AgentServiceConnect{Native: true},
// Proxy: &consul.AgentServiceConnectProxyConfig{ // Proxy: &consul.AgentServiceConnectProxyConfig{
// DestinationServiceName: s.Name, // DestinationServiceName: s.Name,
// }, // },
Check: &consul.AgentServiceCheck{ Check: &consul.AgentServiceCheck{
Interval: "5s", // Interval: "5s",
Timeout: "1s", // Timeout: "1s",
TTL: s.ttl.String(), TTL: s.ttl.String(),
Status: "passing", Status: "passing",
DeregisterCriticalServiceAfter: "10s", DeregisterCriticalServiceAfter: "10s",
@@ -144,11 +144,10 @@ func (s *Service) Connect() (*connect.Service, error) {
// }) // })
svc, err := connect.NewService(s.Name, s.client) svc, err := connect.NewService(s.Name, s.client)
s.connect = svc s.connect = svc
cnf := svc.ServerTLSConfig() fmt.Printf("CONNECT SERVER:: %s CERTS:: %v\n", s.Name, svc.ServerTLSConfig())
fmt.Printf("CONNECT SERVER:: %s CONFIG:: %v\n", s.Name, cnf) // for k, c := range cnf.Certificates {
for k, c := range cnf.Certificates { // fmt.Printf("CONNECT CERT %d: %v", k, c)
fmt.Printf("CONNECT CERT %d: %v", k, c) // }
}
return svc, err 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 go 1.18
require ( 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/fluent/fluent-logger-golang v1.9.0
github.com/go-redis/redis/v8 v8.11.5 github.com/go-redis/redis/v8 v8.11.5
github.com/hashicorp/consul v1.16.0 github.com/hashicorp/consul v1.16.0