Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Informer ¶
type Informer struct {
// contains filtered or unexported fields
}
func NewInformer ¶
func NewInformer(consuls []model.ConsulInfo, serviceNames []string) *Informer
func (*Informer) Watch ¶
func (informer *Informer) Watch() chan *StateChange
type ServiceWatcher ¶
type ServiceWatcher struct { ServiceName string DC string Token string Plan *watch.Plan // 每个service的单独监控 ServiceState *State // 最新状态 ConsulAddr string }
func NewServiceWatcher ¶
func NewServiceWatcher(service string, c *model.ConsulInfo, ch chan<- *StateChange) (*ServiceWatcher, error)
func (*ServiceWatcher) Run ¶
func (w *ServiceWatcher) Run() error
func (*ServiceWatcher) Stop ¶
func (w *ServiceWatcher) Stop()
Click to show internal directories.
Click to hide internal directories.