grpcserver

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdRegisterFinder

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

func (*EtcdRegisterFinder) Register

func (r *EtcdRegisterFinder) Register(name string, addr string) error

type GRPCServer

type GRPCServer struct {
	HandlerFunc HandlerFunc

	log.InvokeLog
	// contains filtered or unexported fields
}

func NewGRPCServer

func NewGRPCServer(name string, conf *config.RpcServerConfig) (*GRPCServer, error)

func (*GRPCServer) AddServiceRegister

func (svr *GRPCServer) AddServiceRegister(r IServiceRegister)

func (*GRPCServer) Run

func (svr *GRPCServer) Run() error

type HandlerFunc

type HandlerFunc = func(*grpc.Server)

type IServiceDiscovery

type IServiceDiscovery interface {
	Discovery()
}

服务发现者 接口

type IServiceRegister

type IServiceRegister interface {
	Register(name string, addr string) error
}

服务注册者 接口

func NewEtcdSrvRegister

func NewEtcdSrvRegister(etcdAddr string) (IServiceRegister, error)

Jump to

Keyboard shortcuts

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