Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WithOpsHandler = func(h HandlerFunc) ServerOps { return func(server *GRPCServer) { server.HandlerFunc = h } }
View Source
var WithOpsRequestIp = func(ip string) ServerOps { return func(server *GRPCServer) { server.RequestIp = ip } }
View Source
var WithOpsRequestPort = func(port string) ServerOps { return func(server *GRPCServer) { server.RequestPort = port } }
Functions ¶
This section is empty.
Types ¶
type EtcdRegisterFinder ¶
type EtcdRegisterFinder struct {
// contains filtered or unexported fields
}
type GRPCServer ¶
type GRPCServer struct { HandlerFunc HandlerFunc RequestIp string RequestPort string // contains filtered or unexported fields }
func NewGRPCServer ¶
func NewGRPCServer(name string, addr string, ops ...ServerOps) (*GRPCServer, error)
func (*GRPCServer) AddServiceRegister ¶
func (svr *GRPCServer) AddServiceRegister(r IServiceRegister)
func (*GRPCServer) Run ¶
func (svr *GRPCServer) Run() error
type HandlerFunc ¶
type IServiceRegister ¶
服务注册者 接口
func NewEtcdSrvRegister ¶
func NewEtcdSrvRegister(etcdAddr string) (IServiceRegister, error)
type ServerOps ¶ added in v1.1.17
type ServerOps = func(*GRPCServer)
Click to show internal directories.
Click to hide internal directories.