Documentation ¶
Overview ¶
Package limit provides an Image Processor that limits the number of concurrent executions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(processor imageserver.Processor, limit uint) imageserver.Processor
New creates a LimitProcessor
Types ¶
type LimitProcessor ¶
type LimitProcessor struct { imageserver.Processor LimitChan chan struct{} }
LimitProcessor represents an Image Processor that limits the number of concurrent executions
It wraps an Image Processor and use a buffered channel to limit the number of concurrent executions.
func (*LimitProcessor) Process ¶
func (processor *LimitProcessor) Process(image *imageserver.Image, parameters imageserver.Parameters) (*imageserver.Image, error)
Process forwards the call to the wrapped Image Processor and limits the number of concurrent executions
Click to show internal directories.
Click to hide internal directories.