core
v0.1.7
github.com/harluo/grpc/internal/core
Documentation
pkg.go.dev ↗Types
Client
type Client struct {
// contains filtered or unexported fields
}
Client gRPC客户端封装
Client.Connection
func (c *Client) Connection(name string) *grpc.ClientConn
Server
type Server struct {
// contains filtered or unexported fields
}
Server gRPC服务器封装
Server.Addr
func (s *Server) Addr() string
Server.Start
func (s *Server) Start(_ context.Context, router kernel.Router) (err error)
Server.Stop
func (s *Server) Stop(_ context.Context) (err error)