NAME
RtcacheResource - Object class to request rtcache streams
SYNOPSIS
import rtcacheresource
rtcr = rtcacheresource.RtcacheResource( pfdict )
rtcr.render_GET( resource )
DESCRIPTION
The
RtcacheResource object renders a web-page by returning
an object requested from an instance of the
rtcache(1) program. The
streamname
for the cache must be passed into the corresponding web-page as an HTTP GET style query
(e.g.
/mysubpage?streamname=ZZZ). The
RtcacheResource object expects the
returned orb packet to have a source-name matching the orb select expression
streamname/.*
(where of course
streamname is the input
streamname). If other HTTP GET style
query parameters are passed in to the web-page being served by
RtcacheResource, they will be
entered into the
/pf/rtcacherequest parameter-file as well.
PARAMETER FILE
Each
RtcacheResource object is configured via a python
dict
value called
pfdict, so named because it is usually derived from
an Antelope parameter-file (see pf(5)). The following are the expected keys:
-
orbname
This is the name of the Antelope orbserver on which requests will be
placed for cached objects, and results returned.
-
maxwait_sec
This value specifies the maximum number of seconds an RtcacheResource object will wait for
results before giving up and returning a failure result to the caller.
-
rtcache_targetname
If not blank, the rtcache_targetname names a specific instance
of the rtcache(1) program to query for the desired cache object. This name
should correspond to the targetname under which rtcache(1) was launched.
-
verbose
This boolean value determines whether the RtcacheResource object
emits informational messages.
-
diagnostics
This boolean value determines whether the RtcacheResource object
emits extensive diagnostic messages (intended for debugging, not normal operations). If this parameter is
not present it is assumed to be set to 0.
RETURN VALUES
The
RtcacheResource constructor returns an object instantiated from the
RtcacheResource class.
SEE ALSO
rtcache(1), RtcacheEngine(3y), rtwebserver(1)
BUGS AND CAVEATS
This module is not generally intended for end users. It is a support utility for
rtwebserver(1).
At the moment
RtcacheResource supports only image objects and parameter-file objects.
The
diagnostics parameter produces voluminous output, thus should be used only for troubleshooting
and debugging, not for routine operation.
AUTHOR
Kent Lindquist