DesignIntake

Contents

DesignIntake#

class pulserver.proxy.DesignIntake[source]#

Bases: object

Receives stored designs over HTTP into the design store the proxy reads.

HEAD /designs/<id> answers 200 when the store holds the design, which marks it as used for prune(), and 404 otherwise; PUT /designs/<id> stores a bundle of pack() after checking every file against its manifest, and answers 201, or 200 for a design already stored. A bundle that is not the design its path names is refused with 400 and the reason. The endpoint is neither authenticated nor encrypted.

Parameters:
  • store – Directory of designs; created when missing.

  • host – Address to listen on; the loopback interface by default.

  • port – TCP port; 0 takes a free one.

  • received – Called with the directory of each design stored or found stored, in a thread of its own once the request is answered: a proxy tabulates the design there, ahead of the scan that plays it.

Methods

close

Stop serving and release the port.

start

Serve requests in a thread of its own until close().

Attributes

port

Port the intake listens on.