Documentation
¶
Index ¶
- Constants
- type Configuration
- type Event
- func (e *Event) GetBody() []byte
- func (e *Event) GetBodyObject() interface{}
- func (e *Event) GetBodyString() string
- func (e *Event) GetContentType() string
- func (e *Event) GetField(key string) interface{}
- 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) GetHeaderInt(key string) (int, error)
- 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) GetShardID() int
- func (e *Event) GetSize() int
- func (e *Event) GetTimestamp() time.Time
- func (e *Event) GetType() string
- func (e *Event) GetTypeVersion() string
- func (e *Event) GetURL() string
- type SinkConfiguration
Constants ¶
const (
DefaultProcessingFactor = 1 // Process every frame by default
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
trigger.Configuration
URL string `mapstructure:"url"`
ProcessingFactor int `mapstructure:"processing_factor"`
Sink *SinkConfiguration `mapstructure:"sink"`
}
Configuration holds the MJPEG trigger configuration
func NewConfiguration ¶
func NewConfiguration(id string, triggerConfiguration *functionconfig.Trigger, runtimeConfiguration *runtime.Configuration) (*Configuration, error)
NewConfiguration creates a new MJPEG trigger configuration
type Event ¶
type Event struct {
nuclio.AbstractEvent
// contains filtered or unexported fields
}
Event contains the data for a MJPEG frame event
func (*Event) GetBodyObject ¶
func (e *Event) GetBodyObject() interface{}
GetBodyObject returns nil since MJPEG events don't have a body object
func (*Event) GetBodyString ¶
GetBodyString returns the frame data as a string (not recommended for binary data)
func (*Event) GetContentType ¶
GetContentType returns the content type for JPEG images
func (*Event) GetFieldByteSlice ¶
GetFieldByteSlice returns an event field as a byte slice
func (*Event) GetFieldInt ¶
GetFieldInt returns an event field as an int
func (*Event) GetFieldString ¶
GetFieldString returns a specific event field as a string
func (*Event) GetHeaderByteSlice ¶
GetHeaderByteSlice returns nil since MJPEG events don't have headers
func (*Event) GetHeaderInt ¶
GetHeaderInt returns 0 since MJPEG events don't have headers
func (*Event) GetHeaderString ¶
GetHeaderString returns empty string since MJPEG events don't have headers
func (*Event) GetHeaders ¶
GetHeaders returns nil since MJPEG events don't have headers
func (*Event) GetShardID ¶
GetShardID returns 0 since MJPEG events don't have a shard ID
func (*Event) GetTimestamp ¶
GetTimestamp returns the event timestamp
func (*Event) GetTypeVersion ¶
GetTypeVersion returns an empty string since MJPEG events don't have a type version
type SinkConfiguration ¶
type SinkConfiguration struct {
Kind string `mapstructure:"kind"`
Attributes map[string]interface{} `mapstructure:"attributes"`
}
SinkConfiguration holds the sink configuration for the trigger