monitor

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServicesCheckPath, _              = utils.GetOption("ServicesCheckPath", "zookeeper")
	ServicesPath, _                   = utils.GetOption("ServicesPath", "zookeeper")
	DefaultServicesCheckPath          = "/hyperf/jsonrpc/checks"
	TimeFormat                        = "2006-01-02 15:04:05"
	ZkConnection             *zk.Conn = nil
)

Functions

func CheckJsonrpcAlive

func CheckJsonrpcAlive(zkConnect *zk.Conn, service string) bool

func CheckService

func CheckService(service string) bool

func DeleteService

func DeleteService(zkConnect *zk.Conn, servicesPath string, servicesName string) bool

func GetService

func GetService(zkConnect *zk.Conn, servicesPath string, serviceName string) (string, error)

func GetServicesPath

func GetServicesPath(zkConnect *zk.Conn, servicesPath string) ([]string, error)

func GetZkConnect

func GetZkConnect(servers string) (*zk.Conn, error)

func JsonrpcMonitor

func JsonrpcMonitor()

func MakeNodes

func MakeNodes(zkConnect *zk.Conn, servicesPath string) (bool, error)

func SetService

func SetService(zkConnect *zk.Conn, servicesPath string, servicesName string, serviceValue string) (bool, error)

Types

type JsonRpc

type JsonRpc struct {
	ID                             string
	Name                           string
	Service                        string
	Address                        string
	Port                           int
	DeregisterCriticalServiceAfter string
	Interval                       string
	CheckTime                      string
}

Jump to

Keyboard shortcuts

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