Skip to content

Module dev_push.erl

push@1.0 takes a message or slot number, evaluates it, and recursively pushes the resulting messages to other processes.

Description

The pushing mechanism continues until the there are no remaining messages to push.

Function Index

apply_security/4*Apply the recipient's security policy to the message.
apply_security/5*
augment_message/3*Set the necessary keys in order for the recipient to know where the message came from.
calculate_base_id/2*Calculate the base ID for a process.
commit_result/4*Attempt to sign a result message with the given committers.
do_push/3*Push a message or slot number, including its downstream results.
extract/2*Return either the target or the hint.
find_type/2*
full_push_test_/0*
is_async/3*Determine if the push is asynchronous.
message_to_legacynet_scheduler_script/0*
multi_process_push_test_/0*
normalize_message/2*Augment the message with from-* keys, if it doesn't already have them.
parse_redirect/2*
ping_pong_script/1*Test that a message that generates another message which resides on an ANS-104 scheduler leads to ~push@1.0 re-signing the message correctly.
push/3Push either a message or an assigned slot number.
push_as_identity_test_/0*
push_prompts_encoding_change/0*
push_prompts_encoding_change_test_/0*
push_result_message/4*Push a downstream message result.
push_with_mode/3*
push_with_redirect_hint_test_disabled/0*
remote_schedule_result/3*
reply_script/0*
schedule_initial_message/3*Push a message or a process, prior to pushing the resulting slot number.
schedule_result/4*Add the necessary keys to the message to be scheduled, then schedule it.
schedule_result/5*
split_target/1*Split the target into the process ID and the optional query string.
target_process/2*Find the target process ID for a message to push.

Function Details

apply_security/4 *

apply_security(Msg, TargetProcess, Codec, Opts) -> any()

Apply the recipient's security policy to the message. Observes the following parameters in order to calculate the appropriate security policy: - policy: A message that generates a security policy message. - authority: A single committer, or list of comma separated committers. - (Default: Signs with default wallet)

apply_security/5 *

apply_security(X1, Msg, TargetProcess, Codec, Opts) -> any()

augment_message/3 *

augment_message(Origin, ToSched, Opts) -> any()

Set the necessary keys in order for the recipient to know where the message came from.

calculate_base_id/2 *

calculate_base_id(GivenProcess, Opts) -> any()

Calculate the base ID for a process. The base ID is not just the uncommitted process ID. It also excludes the authority and scheduler keys.

commit_result/4 *

commit_result(Msg, Committers, Codec, Opts) -> any()

Attempt to sign a result message with the given committers.

do_push/3 *

do_push(PrimaryProcess, Assignment, Opts) -> any()

Push a message or slot number, including its downstream results.

extract/2 *

extract(X1, Raw) -> any()

Return either the target or the hint.

find_type/2 *

find_type(Req, Opts) -> any()

full_push_test_/0 *

full_push_test_() -> any()

is_async/3 *

is_async(Process, Req, Opts) -> any()

Determine if the push is asynchronous.

message_to_legacynet_scheduler_script/0 *

message_to_legacynet_scheduler_script() -> any()

multi_process_push_test_/0 *

multi_process_push_test_() -> any()

normalize_message/2 *

normalize_message(MsgToPush, Opts) -> any()

Augment the message with from-* keys, if it doesn't already have them.

parse_redirect/2 *

parse_redirect(Location, Opts) -> any()

ping_pong_script/1 *

ping_pong_script(Limit) -> any()

Test that a message that generates another message which resides on an ANS-104 scheduler leads to ~push@1.0 re-signing the message correctly. Requires ENABLE_GENESIS_WASM to be enabled.

push/3

push(Base, Req, Opts) -> any()

Push either a message or an assigned slot number. If a Process is provided in the body of the request, it will be scheduled (initializing it if it does not exist). Otherwise, the message specified by the given slot key will be pushed.

Optional parameters:

/result-depth: The depth to which the full contents of the result will be included in the response. Default: 1, returning the full result of the first message, but only the 'tree' of downstream messages.

/push-mode: Whether or not the push should be done asynchronously. Default: sync, pushing synchronously.

push_as_identity_test_/0 *

push_as_identity_test_() -> any()

push_prompts_encoding_change/0 *

push_prompts_encoding_change() -> any()

push_prompts_encoding_change_test_/0 *

push_prompts_encoding_change_test_() -> any()

push_result_message/4 *

push_result_message(TargetProcess, MsgToPush, Origin, Opts) -> any()

Push a downstream message result. The Origin map contains information about the origin of the message: The process that originated the message, the slot number from which it was sent, and the outbox key of the message, and the depth to which downstream results should be included in the message.

push_with_mode/3 *

push_with_mode(Process, Req, Opts) -> any()

push_with_redirect_hint_test_disabled/0 *

push_with_redirect_hint_test_disabled() -> any()

remote_schedule_result/3 *

remote_schedule_result(Location, SignedReq, Opts) -> any()

reply_script/0 *

reply_script() -> any()

schedule_initial_message/3 *

schedule_initial_message(Base, Req, Opts) -> any()

Push a message or a process, prior to pushing the resulting slot number.

schedule_result/4 *

schedule_result(TargetProcess, MsgToPush, Origin, Opts) -> any()

Add the necessary keys to the message to be scheduled, then schedule it. If the remote scheduler does not support the given codec, it will be downgraded and re-signed.

schedule_result/5 *

schedule_result(TargetProcess, MsgToPush, Codec, Origin, Opts) -> any()

split_target/1 *

split_target(RawTarget) -> any()

Split the target into the process ID and the optional query string.

target_process/2 *

target_process(MsgToPush, Opts) -> any()

Find the target process ID for a message to push.