 command
    
    
    
      command
    
    
      
        
      
    
   
    
      
  
    
      
  
    
      Version: 
        v0.0.0-...-bf09db0
    
    
      Opens a new window with list of versions in this module.
    
    
    
  
      
  
    Published: Jun 17, 2021
  
      
  
    License: Apache-2.0
      
    
  
  
    Opens a new window with license information.
  
      
        
  
    
      Imports: 12
    
  
  
    Opens a new window with list of imports.
  
        
  
    
       Imported by: 0
    
  
  
    Opens a new window with list of known importers.
  
      
    
   
  
  
    
   
    
      
    
    
    
  
    
      
        
  
    
       README
      ¶
      README
      ¶
    
    
      
        File
本篇演示Stack中的大文件传输(流式调用)。
内容
- server.go - 文件接收服务端
- client.go - 文件发送客户端
运行File
使用protoc生成相应的代码
protoc --go_out=. --stack_out=. proto/file.proto
运行服务端
go run server.go
运行客户端
go run client.go
使用
使用Postman/CURL向http://127.0.0.1:8080/upload发送文件
curl --location --request POST 'http://127.0.0.1:8080/upload' \
--header 'Content-Type: multipart/form-data;' \
--form 'file=@"README.md"'
回参是该文件的md5
 
      
      
    
   
      
      
        
          
  
    
       Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    
      
        
           
          There is no documentation for this package.
         
      
     
   
        
      
      
        
  
    
       Source Files
      ¶
      Source Files
      ¶
    
   
      
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.