Liking cljdoc? Tell your friends :D

puppetlabs.puppetdb.queue


ack-commandclj

(ack-command q command)
source

cmdref->cmdclj

(cmdref->cmd q cmdref)

Returns the command associated with cmdref, or nil if the file is missing (i.e. it's been deleted).

Returns the command associated with cmdref, or nil if the file is
missing (i.e. it's been deleted).
sourceraw docstring

cmdref->entryclj

(cmdref->entry {:keys [id received] :as cmdref})
source

command-req-schemaclj

Represents an incoming command, before it has been enqueued. One key difference between this and the command ref (and a ref is what you'll typically have) is that the certname in a ref may not be the actual certname, it may be the mangled version which acts as a hashable proxy for the original.

Represents an incoming command, before it has been enqueued.  One key
difference between this and the command ref (and a ref is what
you'll typically have) is that the certname in a ref may not be the
actual certname, it may be the mangled version which acts as a
hashable proxy for the original.
sourceraw docstring

compression-extension-rx-groupclj

source

cons-attemptclj

(cons-attempt cmdref exception)
source

create-command-reqclj

(create-command-req command
                    version
                    certname
                    producer-ts
                    compression
                    callback
                    command-stream)

Inputs: [command :- s/Str version :- s/Int certname :- s/Str producer-ts :- (s/maybe s/Str) compression :- compression-file-extension-schema callback :- (s/=> s/Any s/Any) command-stream :- java.io.InputStream] Returns: command-req-schema

Validating constructor function for command requests

Inputs: [command :- s/Str version :- s/Int certname :- s/Str producer-ts :- (s/maybe s/Str) compression :- compression-file-extension-schema callback :- (s/=> s/Any s/Any) command-stream :- java.io.InputStream]
Returns: command-req-schema

Validating constructor function for command requests
sourceraw docstring

create-or-open-stockpileclj

(create-or-open-stockpile queue-dir maybe-send-cmd-event! cmd-event-ch)

Opens an existing stockpile queue if one is present otherwise creates a new stockpile queue at queue-dir

Opens an existing stockpile queue if one is present otherwise
creates a new stockpile queue at `queue-dir`
sourceraw docstring

embeddable-certidclj

(embeddable-certid certname max-utf8-bytes)

Returns a certid, either the original certname or a hashable proxy for the original, that is safe to use as part of a filename on all of our the supported filesystems, and whose UTF-8 representation is no longer than max-utf8-bytes.

Returns a certid, either the original certname or a hashable proxy
for the original, that is safe to use as part of a filename on all
of our the supported filesystems, and whose UTF-8 representation is
no longer than max-utf8-bytes.
sourceraw docstring

encode-command-timeclj

(encode-command-time received-ts producer-ts)

This takes the two time fields in the command header and encodes it in a way that is more compact. These times need to be included in the stockpile metadata string, so they should be as short as possible. This will return a string that is received-ts as a long, followed by a + or - and the difference between received-ts and producer-ts as a long.

This takes the two time fields in the command header and encodes it
in a way that is more compact. These times need to be included in
the stockpile metadata string, so they should be as short as
possible. This will return a string that is `received-ts` as a long,
followed by a + or - and the difference between `received-ts` and
`producer-ts` as a long.
sourceraw docstring

entry->cmdrefclj

(entry->cmdref entry)
source

forbidden-meta-field-char-rxclj

source

make-cmd-eventclj

(make-cmd-event cmdref kind)

Given a cmdref and kind return a cmd-event-map which is suitable to be put on the cmd-event-chan. Valid :kind values are: ::command/ingested and ::command/processed.

Given a cmdref and kind return a cmd-event-map which is suitable to be put
on the cmd-event-chan.
Valid :kind values are: ::command/ingested and ::command/processed.
sourceraw docstring

max-metadata-utf8-bytesclj

Maximum number of bytes allowed for our queue metadata, allowing room for stockpile's ID- prefix, where the ID is a long.

Maximum number of bytes allowed for our queue metadata, allowing room
for stockpile's ID- prefix, where the ID is a long.
sourceraw docstring

message-loaderclj

(message-loader q message-id-ceiling maybe-send-cmd-event! cmd-event-ch)

Returns a function that will enqueue existing stockpile messages to command-chan. Messages with ids less than message-id-ceiling will be loaded to guard against duplicate processing of commands when new commands are enqueued before all existing commands have been enqueued. Note that there is no guarantee on the enqueuing order of commands read from stockpile's reduce function

Returns a function that will enqueue existing stockpile messages to
`command-chan`. Messages with ids less than `message-id-ceiling`
will be loaded to guard against duplicate processing of commands
when new commands are enqueued before all existing commands have
been enqueued. Note that there is no guarantee on the enqueuing
order of commands read from stockpile's reduce function
sourceraw docstring

metadata-command->puppetdb-commandclj

source

metadata-parserclj

(metadata-parser)
(metadata-parser metadata-command->puppetdb-command)

Given an (optional) map between the command names that appear in metadata strings and the command names used in the rest of PuppetDB, return a function that parses a queue metadata string. If no map is provided, then the map metadata-command->puppetdb-command defined in this namespace is used. Note that the certname in this result will not be the same as the original certname if the certname is long or contains filesystem special characters.

Given an (optional) map between the command names that appear in metadata
strings and the command names used in the rest of PuppetDB, return a function
that parses a queue metadata string. If no map is provided, then the map
`metadata-command->puppetdb-command` defined in this namespace is used.
Note that the certname in this result will not be the same as the original
certname if the certname is long or contains filesystem special characters.
sourceraw docstring

metadata-rxclj

(metadata-rx valid-commands)
source

metadata-schemaclj

source

metadata-serializerclj

(metadata-serializer)
(metadata-serializer puppetdb-command->metadata-command)

Given an (optional) map between the command names used in the rest of PuppetDB and the command names to use in metadata strings, return a function that serializes command metadata to a string. If no map is provided, then the map puppetdb-command->metadata-command defined in this namespace is used. Note that the certname in the string will not be the same as the original certname if the certname is long or contains filesystem special characters.

Given an (optional) map between the command names used in the rest of
PuppetDB and the command names to use in metadata strings, return a function
that serializes command metadata to a string. If no map is provided, then the
map `puppetdb-command->metadata-command` defined in this namespace is used.
Note that the certname in the string will not be the same as the original
certname if the certname is long or contains filesystem special characters.
sourceraw docstring

parse-metadataclj

source

puppetdb-command->metadata-commandclj

source

sanitize-certnameclj

(sanitize-certname certname)

Replace any underscores and filename forbidden characters found in certname with dashes.

Replace any underscores and filename forbidden characters found in `certname`
with dashes.
sourceraw docstring

serialize-metadataclj

source

sorted-command-bufferclj

(sorted-command-buffer n)
(sorted-command-buffer n delete-update-fn ignore-update-fn)
source

store-commandclj

(store-command q command-req)

Inputs: [q command-req :- command-req-schema]

Inputs: [q command-req :- command-req-schema]
sourceraw docstring

store-in-stockpileclj

(store-in-stockpile q received command-req)

Inputs: [q received :- pls/Timestamp command-req :- command-req-schema]

Inputs: [q received :- pls/Timestamp command-req :- command-req-schema]
sourceraw docstring

stream->jsonclj

(stream->json stream)
source

valid-metadata-field-count?clj

(valid-metadata-field-count? metadata)
source

valid-metadata-utf8-length?clj

(valid-metadata-utf8-length? metadata)
source

validate-compression-extension-syntaxclj

(validate-compression-extension-syntax ext)
source

wrap-decompression-streamclj

(wrap-decompression-stream file-extension command-stream)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close