Started with implementation
This commit is contained in:
parent
b9c26b9441
commit
a6c43af8bb
|
@ -1,3 +1,3 @@
|
|||
# srpc
|
||||
|
||||
Easy to use RPC Framework writting in golang
|
||||
Easy to use RPC Framework written in golang
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package srpc
|
||||
|
||||
var REQUEST_HEADER_SIZE = int32(8)
|
||||
|
||||
type requestHeader struct {
|
||||
size int64
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package srpc
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
const (
|
||||
AIN uint8 = 0
|
||||
AOUT uint8 = 1
|
||||
AINOUT uint8 = 2
|
||||
)
|
||||
|
||||
const (
|
||||
OK uint8 = 0
|
||||
ERR uint8 = 1
|
||||
)
|
||||
|
||||
var RESPONSE_HEADER_SIZE = int32(9)
|
||||
|
||||
type responseHeader struct {
|
||||
size int64
|
||||
status uint8
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
serviceMap sync.Map
|
||||
}
|
||||
|
||||
func NewServer() *Server {
|
||||
return &Server{}
|
||||
}
|
||||
|
||||
var DefaultServer = NewServer()
|
Loading…
Reference in New Issue