Documentation ¶
Overview ¶
Package gatewayrpc is a wrapper around a gorilla/rpc/v2 server which registers a special endpoint, "RPC.GetServices", which returns a structure containing a description of all services and their methods the rpc server supports and their type signatures
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetServicesRes ¶
type GetServicesRes struct {
Services []gatewaytypes.Service `json:"services"`
}
GetServicesRes describes the structure returned from the GetServices api call
type Server ¶
type Server struct { *rpc.Server // contains filtered or unexported fields }
Server is a simple wrapper around the normal gorilla/rpc/v2 server, adding a couple extra features
func NewServer ¶
func NewServer() *Server
NewServer returns a new Server struct initialized with a gorilla/rpc/v2 server
func (*Server) GetServices ¶
func (s *Server) GetServices(r *http.Request, _ *struct{}, res *GetServicesRes) error
GetServices is the actual rpc method which returns the set of services and their methods which are supported
func (*Server) RegisterHiddenService ¶
RegisterHiddenService passes its arguments through to the underlying gorilla/rpc/v2 server, but unlike RegisterService does NOT add the receiver's method data to the Server's cache, so the receiver won't show up in calls to GetMethods
func (*Server) RegisterService ¶
RegisterService passes its arguments through to the underlying gorilla/rpc/v2 server, as well as adds the given receiver's rpc methods to the Server's cache of method data which will be returned by the "RPC.GetMethods" endpoint.
Directories ¶
Path | Synopsis |
---|---|
Package gateway implements the actual gateway which will listen for requests and forward them to servers wrapped by gatewayrpc
|
Package gateway implements the actual gateway which will listen for requests and forward them to servers wrapped by gatewayrpc |