Documentation
¶
Overview ¶
Package server allows rpc/server implementations to be deployed to AWS Lambda.
This 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.
Invocations 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.
The Lambda environment receives a payload of an *rpc.Request and the request body. The response is an *rpc.Response and the response body.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(i interface{}) error
Register registers i with this package's default server.
func RegisterName ¶
RegisterName registers i with name with this package's default server.
Types ¶
This section is empty.