Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultTopicRoute = "/x-nitric-topic/{name}" DefaultScheduleRoute = "/x-nitric-schedule/{name}" DefaultBucketNotificationRoute = "/x-nitric-notification/bucket/{name}" )
Variables ¶
This section is empty.
Functions ¶
func HttpHeadersToMap ¶
func HttpHeadersToMap(rh *fasthttp.RequestHeader) map[string][]string
func NewHttpGateway ¶
func NewHttpGateway(opts *HttpGatewayOptions) (gateway.GatewayService, error)
Create new HTTP gateway
Types ¶
type HttpGateway ¶
type HttpGateway struct { gateway.UnimplementedGatewayPlugin // contains filtered or unexported fields }
func (*HttpGateway) Start ¶
func (s *HttpGateway) Start(opts *gateway.GatewayStartOpts) error
Start the HTTP server and listen for requests, then route them to the appropriate handler(s
type HttpGatewayOptions ¶
type HttpGatewayOptions struct {
RouteRegistrationHook RouterRegistrationCallback
}
type HttpMiddleware ¶
type HttpMiddleware func(*fasthttp.RequestCtx, *gateway.GatewayStartOpts) bool
type RouterRegistrationCallback ¶
type RouterRegistrationCallback func(*fasthttprouter.Router, *gateway.GatewayStartOpts)
A callback function that allows for custom routing configuration to be setup by consumer packages.
Click to show internal directories.
Click to hide internal directories.