Compare commits

...

8 Commits

Author SHA1 Message Date
f8a1ae841d register fix 2 2023-07-06 21:49:12 +02:00
9d424742d6 register fix 2 2023-07-06 21:45:45 +02:00
a9b73a6536 register fix 2 2023-07-06 19:30:00 +02:00
95584eb407 register fix 2 2023-07-05 23:44:47 +02:00
ce7e2bc75a register fix 2 2023-07-05 23:37:55 +02:00
4bedc5d926 register fix 2 2023-07-05 23:35:17 +02:00
ea7f98f8bb register fix 2023-07-05 22:45:12 +02:00
bbdce9b25a register fix 2023-07-05 22:25:56 +02:00

View File

@@ -66,20 +66,20 @@ func (s *Service) GetFullAddr() string {
func (s *Service) Register() error {
def := &consul.AgentServiceRegistration{
ID: s.GetID(),
Kind: consul.ServiceKindConnectProxy,
ID: s.GetID(),
// Kind: consul.ServiceKindConnectProxy,
Name: s.Name,
Address: s.Address,
Port: s.port,
Tags: s.getTags(),
Connect: &consul.AgentServiceConnect{
// SidecarService: &consul.AgentServiceRegistration{
// Port: s.port,
// },
},
Proxy: &consul.AgentServiceConnectProxyConfig{
DestinationServiceName: s.Name + "dupa",
},
// Connect: &consul.AgentServiceConnect{
// SidecarService: &consul.AgentServiceRegistration{
// Port: s.port,
// },
// },
// Proxy: &consul.AgentServiceConnectProxyConfig{
// DestinationServiceName: s.Name,
// },
Check: &consul.AgentServiceCheck{
TTL: s.ttl.String(),
Status: "passing",
@@ -119,10 +119,10 @@ func (s *Service) Unregister() error {
func (s *Service) Connect() (*connect.Service, error) {
// srvName := s.Name
srvName := s.Name
fmt.Printf("CONNECT SERVER: %s\n", srvName)
svc, err := connect.NewService(srvName, s.client)
s.connect = svc
cnf := svc.ServerTLSConfig()
fmt.Printf("CONNECT SERVER:: %s CONFIG:: %v\n", srvName, cnf)
for k, c := range cnf.Certificates {
fmt.Printf("CONNECT CERT %d: %v", k, c)
}