Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 98d85810f3 | |||
| 3fc1191f6e | |||
| 52793ac244 | |||
| f8a1ae841d | |||
| 9d424742d6 |
@@ -61,25 +61,26 @@ func (s *Service) GetID() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Service) GetFullAddr() string {
|
func (s *Service) GetFullAddr() string {
|
||||||
return fmt.Sprintf("http://%s:%d/", s.domain, s.port)
|
return fmt.Sprintf("https://%s:%d/", s.domain, s.port)
|
||||||
}
|
}
|
||||||
|
|
||||||
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{
|
Native: true,
|
||||||
// Port: s.port,
|
// SidecarService: &consul.AgentServiceRegistration{
|
||||||
},
|
// Port: s.port,
|
||||||
},
|
// },
|
||||||
Proxy: &consul.AgentServiceConnectProxyConfig{
|
|
||||||
DestinationServiceName: s.Name,
|
|
||||||
},
|
},
|
||||||
|
// Proxy: &consul.AgentServiceConnectProxyConfig{
|
||||||
|
// DestinationServiceName: s.Name,
|
||||||
|
// },
|
||||||
Check: &consul.AgentServiceCheck{
|
Check: &consul.AgentServiceCheck{
|
||||||
TTL: s.ttl.String(),
|
TTL: s.ttl.String(),
|
||||||
Status: "passing",
|
Status: "passing",
|
||||||
|
|||||||
Reference in New Issue
Block a user