@scramjet/durability-preservation-event
TypeScript icon, indicating that this package has built-in type declarations

0.22.0 • Public • Published

durability-preservation-event

The sequence gets the file from the address given in the first parameter. The file is downloaded periodically. The time interval is specified in the second parameter (with seconds). After requesting file, the sequence emits an event with response status code and current date in ISO format (string).

Prepare sequence

# in sequence directory
$ yarn build

Send sequence

# in packages/reference-apps directory
$ SEQ_ID=$( \
    curl --location --request POST "http://localhost:8000/api/v1/sequence" \
    --header 'content-type: application/octet-stream' \
    --data-binary '@durability-preservation-event.tar.gz' | jq ".id" -r \
)

Start sequence with args

[file address, interval in seconds]

replace ip with your STH ip

$ INSTANCE_ID=$(curl --location --request POST "http://localhost:8000/api/v1/sequence/$SEQ_ID/start" \
--header 'content-type: application/json' \
--data-raw '{
    "appConfig": {},
    "args": ["https://assets.scramjet.org/scp-store/durability-test/file1.bin", "60"]
}' | jq ".id" -r)

Readme

Keywords

none

Package Sidebar

Install

npm i @scramjet/durability-preservation-event

Weekly Downloads

0

Version

0.22.0

License

ISC

Unpacked Size

74.3 kB

Total Files

7

Last publish

Collaborators

  • patu
  • scramjetorg
  • michalcz
  • stoq