{"modulePath":"github.com/cloudinterfaces/lrpc","version":"v0.0.0-20180215163902-0821f6f6fbc6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package server\n\nPackage server allows rpc/server implementations to be deployed to AWS Lambda.\n\nThis package has a default \\*rpc.Server. Services may be registered with the Register and RegisterName functions, as with the net/rpc package. The package's \\*rpc.Server may also be set with the RPCServer function.\n\nInvocations are handled via the builtin server's ServeRequest method. No assumptions may be made about the server's lifecycle or state beyond the assumption a method will be invoked at least once per container lifetime so it is possible to do certain types of initialization once. Likewise init functions and package-scoped variables may be used with care and consideration.\n\nThe Lambda environment receives a payload of an \\*rpc.Request and the request body. The response is an \\*rpc.Response and the response body.\n\n## Functions\n\n```go\nfunc RPCServer(s *rpc.Server)\n```\nRPCServer sets this package's default server to s.\n\n```go\nfunc Register(i interface{}) error\n```\nRegister registers i with this package's default server.\n\n```go\nfunc RegisterName(name string, i interface{}) error\n```\nRegisterName registers i with name with this package's default server.\n\n```go\nfunc Serve()\n```\nServe begins serving this package's default server as set with RPCServer or configured with the Register functions. In a non-Lambda environment, starts a net/rpc server on a random port.\n\n","path":"github.com/cloudinterfaces/lrpc/server","name":"server","synopsis":"Package server allows rpc/server implementations to be deployed to AWS Lambda.","isRedistributable":true}
