Package rpc provides internal gRPC utilities.



    This section is empty.


    This section is empty.


    func NewPipeClientConn

    func NewPipeClientConn(ctx context.Context, r io.Reader, w io.Writer, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error)

      NewPipeClientConn constructs ClientConn based on r and w.

      The returned ClientConn is suitable for talking with a gRPC server over a bidirectional pipe.

      func NewPipeListener

      func NewPipeListener(r io.Reader, w io.Writer) *pipeListener

        NewPipeListener constructs a new pipeListener based on r and w.

        func RunServer

        func RunServer(r io.Reader, w io.Writer, svcs []*testing.Service, register func(srv *grpc.Server)) error

          RunServer runs a gRPC server on r/w channels. register is called back to register core services. svcs is a list of user-defined gRPC services to be registered if the client requests them in HandshakeRequest. RunServer blocks until the client connection is closed or it encounters an error.


          type Client

          type Client struct {
          	// Conn is the gRPC connection. Use this to create gRPC service stubs.
          	Conn *grpc.ClientConn
          	// contains filtered or unexported fields

            Client owns a gRPC connection to the DUT for remote tests to use.

            func Dial

            func Dial(ctx context.Context, conn *ssh.Conn, path string, req *protocol.HandshakeRequest) (*Client, error)

              Dial establishes a gRPC connection to an executable on a remote machine.

              func (*Client) Close

              func (c *Client) Close(ctx context.Context) error

                Close closes this client.