service_manager

package module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

service_manager

服务管理系统 基于zookeeper

Documentation

Overview

@Time : 2019-10-08 16:28 @Author : zr

@Time : 2019-10-08 11:06 @Author : zr

@Time : 2019-10-14 10:16 @Author : zr

@Time : 2019-10-08 16:18 @Author : zr

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoService          = errors.New("no service")
	ErrNoServiceAlive     = errors.New("no service alive")
	ErrConnectToZooKeeper = zk.ErrNoServer
	ErrInvalidPath        = zk.ErrInvalidPath
)

Functions

This section is empty.

Types

type Consumer added in v1.0.1

type Consumer struct {
	// contains filtered or unexported fields
}

func NewConsumer added in v1.0.1

func NewConsumer(path string, zkHosts []string) *Consumer

func (*Consumer) Close added in v1.0.2

func (c *Consumer) Close()

func (*Consumer) GetServiceHost added in v1.0.1

func (c *Consumer) GetServiceHost() (host string, err error)

func (*Consumer) Open added in v1.0.1

func (c *Consumer) Open() (err error)

func (*Consumer) Run added in v1.0.2

func (c *Consumer) Run()

type Data added in v1.0.1

type Data struct {
	Pid      int
	Host     string
	HostName string
}

type Logger added in v1.0.3

type Logger interface {
	Debug(msg string)
	Info(msg string)
	Warn(msg string)
	Panic(msg string)
}

type Manager added in v1.0.1

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager added in v1.0.1

func NewManager(hosts []string) *Manager

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(path, host string, zkHosts []string) *Service

func (Service) Close

func (s Service) Close()

func (*Service) Open

func (s *Service) Open() (err error)

func (*Service) SetLogger added in v1.0.3

func (s *Service) SetLogger(logger Logger)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL