Documentation ¶
Index ¶
- Constants
- type Configuration
- type Event
- func (e *Event) GetBody() []byte
- func (e *Event) GetContentType() string
- func (e *Event) GetFieldByteSlice(key string) []byte
- func (e *Event) GetFieldInt(key string) (int, error)
- func (e *Event) GetFieldString(key string) string
- func (e *Event) GetFields() map[string]interface{}
- func (e *Event) GetHeader(key string) interface{}
- func (e *Event) GetHeaderByteSlice(key string) []byte
- func (e *Event) GetHeaderString(key string) string
- func (e *Event) GetHeaders() map[string]interface{}
- func (e *Event) GetMethod() string
- func (e *Event) GetPath() string
- func (e *Event) GetTimestamp() time.Time
- type FastHTTPLogger
- type TriggerMode
Constants ¶
View Source
const DefaultMaxRequestBodySize = 4 * 1024 * 1024
View Source
const DefaultReadBufferSize = 16 * 1024
View Source
const InternalHealthPath = "/__internal/health"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { trigger.Configuration ReadBufferSize int `json:"readBufferSize,omitempty"` // NOTE: Modifying the max request body size affect with gradually memory consumption increasing // as the entire request being read into the memory // https://github.com/valyala/fasthttp/issues/667#issuecomment-540965683 MaxRequestBodySize int `json:"maxRequestBodySize,omitempty"` ReduceMemoryUsage bool `json:"reduceMemoryUsage,omitempty"` CORS *cors.CORS `json:"cors,omitempty"` // Used to disable port publishing for the HTTP trigger on docker platform DisablePortPublishing bool `json:"disablePortPublishing,omitempty"` Mode TriggerMode `json:"mode,omitempty"` }
func NewConfiguration ¶
func NewConfiguration(id string, triggerConfiguration *functionconfig.Trigger, runtimeConfiguration *runtime.Configuration) (*Configuration, error)
type Event ¶
type Event struct { nuclio.AbstractEvent // contains filtered or unexported fields }
allows accessing fasthttp.RequestCtx as a event.Sync
func (*Event) GetContentType ¶
GetContentType returns the content type of the body
func (*Event) GetFieldByteSlice ¶
GetFieldByteSlice returns the field by name as a byte slice
func (*Event) GetFieldInt ¶
GetFieldInt returns the field by name as an integer
func (*Event) GetFieldString ¶
GetFieldString returns the field by name as a string
func (*Event) GetHeaderByteSlice ¶
GetHeaderByteSlice returns the header by name as a byte slice
func (*Event) GetHeaderString ¶
GetHeaderString returns the header by name as a string
func (*Event) GetHeaders ¶
GetHeaders loads all headers into a map of string / interface{}
func (*Event) GetTimestamp ¶
GetTimestamp returns when the event originated
type FastHTTPLogger ¶
type FastHTTPLogger struct {
// contains filtered or unexported fields
}
func NewFastHTTPLogger ¶
func NewFastHTTPLogger(parentLogger logger.Logger) FastHTTPLogger
func (FastHTTPLogger) Printf ¶
func (s FastHTTPLogger) Printf(format string, args ...interface{})
type TriggerMode ¶
type TriggerMode string
const ( TriggerModeAsync TriggerMode = "async" TriggerModeSync TriggerMode = "sync" DefaultTriggerMode = TriggerModeSync )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.