Documentation
¶
Overview ¶
Package golux provides a lightweight HTTP router designed for serverless applications.
golux allows you to define routes and handlers for incoming HTTP requests in AWS Lambda functions, using a simple and efficient routing mechanism based on a tree structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc common.HandlerFunc
HandlerFunc defines the signature for HTTP request handlers.
type Router ¶
Router is a lightweight HTTP router.
func (*Router) Handle ¶
func (r *Router) Handle(method string, path string, fn common.HandlerFunc)
Handle registers a new handler for the specified HTTP method and path pattern.
func (*Router) HandleRequest ¶
func (r *Router) HandleRequest(req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
HandleRequest handles an incoming API Gateway Proxy request and dispatches it to the appropriate handler. It returns an API Gateway Proxy response and an error, if any.
Click to show internal directories.
Click to hide internal directories.