Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConsul ¶
func InitConsul()
Types ¶
type ConsulRegister ¶
type ConsulRegister struct {
Address string
Port int
ConsulAddress string
ConsulPort int
Service string
Tag []string
DeregisterCriticalServiceAfter time.Duration
Interval time.Duration
}
ConsulRegister consul service register
func (*ConsulRegister) NewConsulClient ¶
func (r *ConsulRegister) NewConsulClient() *consulapi.Client
func (*ConsulRegister) Register ¶
func (r *ConsulRegister) Register() error
Register register service
func (*ConsulRegister) RegisterHTTP ¶
func (r *ConsulRegister) RegisterHTTP() *consulapi.Client
Click to show internal directories.
Click to hide internal directories.