Compare commits

...

2 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

View File

@@ -67,19 +67,19 @@ func (s *Service) GetFullAddr() string {
func (s *Service) Register() error { func (s *Service) Register() error {
def := &consul.AgentServiceRegistration{ def := &consul.AgentServiceRegistration{
ID: s.GetID(), ID: s.GetID(),
Kind: consul.ServiceKindConnectProxy, // Kind: consul.ServiceKindConnectProxy,
Name: s.Name, Name: s.Name,
Address: s.Address, Address: s.Address,
Port: s.port, Port: s.port,
Tags: s.getTags(), Tags: s.getTags(),
Connect: &consul.AgentServiceConnect{ // Connect: &consul.AgentServiceConnect{
SidecarService: &consul.AgentServiceRegistration{ // SidecarService: &consul.AgentServiceRegistration{
// Port: s.port, // Port: s.port,
}, // },
}, // },
Proxy: &consul.AgentServiceConnectProxyConfig{ // Proxy: &consul.AgentServiceConnectProxyConfig{
DestinationServiceName: s.Name, // DestinationServiceName: s.Name,
}, // },
Check: &consul.AgentServiceCheck{ Check: &consul.AgentServiceCheck{
TTL: s.ttl.String(), TTL: s.ttl.String(),
Status: "passing", Status: "passing",