Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutorClient ¶
func NewExecutorClient(conn Conn) pb.ExecutorServiceClient
NewExecutorClient returns executor client based on Conn
func NewTestClient ¶
func NewTestClient(conn Conn) pb.TestServiceClient
NewTestClient creates a mock test service client
Types ¶
type Conn ¶
type Conn interface { Close() error // contains filtered or unexported methods }
Conn is a simple interface that support send gRPC requests and closeable
type GrpcServer ¶
type GrpcServer interface { Stop() // contains filtered or unexported methods }
GrpcServer implements a mock grpc server.
func NewExecutorServer ¶
func NewExecutorServer(addr string, server pb.ExecutorServiceServer) (GrpcServer, error)
NewExecutorServer returns a mock executor gRPC server for given address, if it doesn't exist, create a new one
func NewMasterServer ¶
func NewMasterServer(addr string, server masterServices) (GrpcServer, error)
NewMasterServer creates a master grpc server and listened the address. We try to make things simple, so we design the "NewMasterServer" to register only one type of pb server.
func NewTestServer ¶
func NewTestServer(addr string, server pb.TestServiceServer) (GrpcServer, error)
NewTestServer creates a mock gRPC server
Click to show internal directories.
Click to hide internal directories.