hub

package
v0.0.0-...-5daeeeb Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close() error
	Node() pb.NodeServiceClient
}

对外实现

type Hub

type Hub interface {
	// 新建一个Hub Server
	NewServer() Server
	// 新建一个Hub Client
	NewClient(hubServerAddress string, serviceAddress string, serviceName string) (Client, error)
}

对外实现

func GetApplication

func GetApplication() Hub

获取hub的应用程序实例

type Server

type Server interface {
	// 开始侦听
	Serve(lis net.Listener) error
	// 实时设置心跳检查间隔
	SetHeartbeatTime(time time.Duration)
	// 优雅停止
	GracefulStop()
	// 停止
	Stop()
}

对外实现

Jump to

Keyboard shortcuts

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