grpc

package
v0.0.0-...-0f65a33 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: BSD-2-Clause Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const ServiceLeaseTTL = 3

Variables

This section is empty.

Functions

func ClientConn

func ClientConn(target string) (conn *grpc.ClientConn, err error)

func NewClientConn

func NewClientConn(etcdClient *etcd.Client, target string) (conn *grpc.ClientConn, err error)

Types

type Server

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

func NewServer

func NewServer(target, host string, port int, register ServiceRegister) *Server

func NewServerWithOption

func NewServerWithOption(target, host string, port int, register ServiceRegister, opt ...grpc.ServerOption) *Server

func (*Server) GetServiceInfo

func (s *Server) GetServiceInfo() map[string]grpc.ServiceInfo

func (*Server) GracefulStop

func (s *Server) GracefulStop()

func (*Server) RegisterService

func (s *Server) RegisterService(sd *grpc.ServiceDesc, ss interface{})

func (*Server) Serve

func (s *Server) Serve() (err error)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ServiceRegister

type ServiceRegister func(s *grpc.Server)

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

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