grpc

package
v1.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 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 Server

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

问题:Server 依赖于 service.Service, 而它是个具体实现,违反了依赖倒置原则 Server

func New

func New(cfgpath string, s *service.Service) *Server

New.

func (*Server) Ping

func (srv *Server) Ping(c context.Context, req *api.Request) (*api.Reply, error)

Ping

Jump to

Keyboard shortcuts

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