27 lines
		
	
	
		
			374 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			374 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package srpc
 | |
| 
 | |
| import (
 | |
| 	"log"
 | |
| 	"time"
 | |
| )
 | |
| 
 | |
| type LogErrorFunc func(format string, args ...interface{})
 | |
| 
 | |
| var logError = LogErrorFunc(log.Printf)
 | |
| 
 | |
| func SetLogError(f LogErrorFunc) {
 | |
| 	logError = f
 | |
| }
 | |
| 
 | |
| type messageState uint8
 | |
| 
 | |
| const (
 | |
| 	FREE    messageState = 0
 | |
| 	PENDING messageState = 1
 | |
| )
 | |
| 
 | |
| const (
 | |
| 	DefaultMaxClientRequests = int(128)
 | |
| 	DefaultRequestTimeout    = 30 * time.Second
 | |
| )
 |