Version main

scheduler-api

source: crates/edgerun-scheduler/src/main.rs @ HEAD

Source ref: HEAD

Routes

Method Path Handler Related Types
GET /bundle/{bundle_hash}
String
GET /health
none
GET /v1/attestation/policy/get
GET /v1/control/ws
GET /v1/job/{job_id}
GET /v1/policy/audit
GET /v1/policy/info
PolicyInfoResponse
GET /v1/route/owner/{owner_pubkey}
String
GET /v1/route/resolve/{device_id}
String
GET /v1/route/resolve/{device_id}
String
GET /v1/trust/policy/get
GET /v1/webrtc/ws
GET /v1/worker/assignments
AssignmentsQueryAssignmentsResponse
POST /v1/attestation/policy/set
POST /v1/job/create
POST /v1/route/challenge
POST /v1/route/challenge
POST /v1/route/heartbeat
POST /v1/route/register
POST /v1/route/register
POST /v1/session/create
SessionCreateRequestSessionCreateResponse
POST /v1/session/invalidate
POST /v1/session/rotate
POST /v1/trust/policy/set
POST /v1/worker/failure
WorkerFailureReportserde_jsonValue
POST /v1/worker/heartbeat
HeartbeatRequestHeartbeatResponse
POST /v1/worker/replay
WorkerReplayArtifactReportserde_jsonValue
POST /v1/worker/result
WorkerResultReportserde_jsonValue

Handlers

attestation_policy_get

source:L1648

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap

Returns

Result<Json<AttestationPolicyResponse>, (StatusCode, String)>

No inline doc comment found.

attestation_policy_set

source:L1661

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • body: Bytes

Returns

Result<Json<AttestationPolicyResponse>, (StatusCode, String)>

No inline doc comment found.

attestation_policy_set_and_get_with_signed_session_headers

source:L6446

Arguments

  • No arguments

Returns

()

No inline doc comment found.

control_ws

source:L952

Arguments

  • ws: WebSocketUpgrade
  • State(state): State<AppState>
  • Query(query): Query<ControlWsConnectQuery>

Returns

impl IntoResponse

No inline doc comment found.

control_ws_socket

source:L960

Arguments

  • state: AppState
  • client_id: String
  • mut socket: WebSocket

Returns

()

No inline doc comment found.

get_bundle

source:L2341

Arguments

  • State(state): State<AppState>
  • Path(bundle_hash): Path<String>

Returns

Result<impl IntoResponse, (StatusCode, String)>

No inline doc comment found.

get_bundle_rejects_hash_mismatch_for_tampered_bytes

source:L5187

Arguments

  • No arguments

Returns

()

No inline doc comment found.

get_job_status

source:L2313

Arguments

  • State(state): State<AppState>
  • Path(job_id): Path<String>

Returns

Json<JobStatusResponse>

No inline doc comment found.

handle_control_client_message

source:L1019

Arguments

  • state: &AppState
  • text: &str

Returns

String

No inline doc comment found.

handle_signal_client_message

source:L1281

Arguments

  • state: &AppState
  • from_device_id: &str
  • text: &str

Returns

Result<(), ()>

No inline doc comment found.

health

source:L655

Arguments

  • headers: HeaderMap

Returns

Response

No inline doc comment found.

housekeeping_loop

source:L4379

Arguments

  • state: AppState

Returns

()

No inline doc comment found.

job_create

source:L2006

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<JobCreateRequest>

Returns

Result<Json<JobCreateResponse>, (StatusCode, String)>

No inline doc comment found.

Arguments

  • No arguments

Returns

Result<()>

No inline doc comment found.

policy_audit_list

source:L1580

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • Query(query): Query<PolicyAuditQuery>

Returns

Result<Json<PolicyAuditListResponse>, (StatusCode, String)>

No inline doc comment found.

policy_info

source:L1559

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap

Returns

Result<Json<PolicyInfoResponse>, (StatusCode, String)>

No inline doc comment found.

route_challenge

source:L716

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<RouteChallengeRequest>

Returns

Result<Json<RouteChallengeResponse>, (StatusCode, String)>

No inline doc comment found.

route_heartbeat

source:L847

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<RouteHeartbeatRequest>

Returns

Result<Json<RouteHeartbeatResponse>, (StatusCode, String)>

No inline doc comment found.

route_owner_resolve

source:L934

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • Path(owner_pubkey): Path<String>

Returns

Response

No inline doc comment found.

route_register

source:L739

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<RouteRegisterRequest>

Returns

Result<Json<RouteRegisterResponse>, (StatusCode, String)>

No inline doc comment found.

route_registration_flow_challenge_register_resolve_owner_heartbeat

source:L6602

Arguments

  • No arguments

Returns

()

No inline doc comment found.

route_registration_shared_state_works_across_scheduler_instances

source:L6687

Arguments

  • No arguments

Returns

()

No inline doc comment found.

route_resolution_enables_real_service_to_service_connectivity

source:L6798

Arguments

  • No arguments

Returns

()

No inline doc comment found.

route_resolve

source:L924

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • Path(device_id): Path<String>

Returns

Response

No inline doc comment found.

session_create

source:L1428

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • Json(payload): Json<SessionCreateRequest>

Returns

Result<Json<SessionCreateResponse>, (StatusCode, String)>

No inline doc comment found.

session_create_requires_bootstrap_token_when_configured

source:L6295

Arguments

  • No arguments

Returns

()

No inline doc comment found.

session_invalidate

source:L1511

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • Json(payload): Json<SessionInvalidateRequest>

Returns

Result<Json<SessionInvalidateResponse>, (StatusCode, String)>

No inline doc comment found.

session_invalidate_revokes_token

source:L6396

Arguments

  • No arguments

Returns

()

No inline doc comment found.

session_rotate

source:L1463

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • Json(payload): Json<SessionRotateRequest>

Returns

Result<Json<SessionRotateResponse>, (StatusCode, String)>

No inline doc comment found.

session_rotate_replaces_and_revokes_old_token

source:L6330

Arguments

  • No arguments

Returns

()

No inline doc comment found.

strict_trust_policy_requires_client_signature

source:L6106

Arguments

  • No arguments

Returns

()

No inline doc comment found.

trust_policy_endpoints_reject_replayed_nonce

source:L6212

Arguments

  • No arguments

Returns

()

No inline doc comment found.

trust_policy_endpoints_require_valid_session

source:L6137

Arguments

  • No arguments

Returns

()

No inline doc comment found.

trust_policy_get

source:L1595

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap

Returns

Result<Json<TrustPolicyResponse>, (StatusCode, String)>

No inline doc comment found.

trust_policy_set

source:L1604

Arguments

  • State(state): State<AppState>
  • headers: HeaderMap
  • body: Bytes

Returns

Result<Json<TrustPolicyResponse>, (StatusCode, String)>

No inline doc comment found.

trust_policy_set_and_get_with_signed_session_headers

source:L6148

Arguments

  • No arguments

Returns

()

No inline doc comment found.

trust_policy_set_rejects_tampered_body_with_same_signature

source:L6254

Arguments

  • No arguments

Returns

()

No inline doc comment found.

webrtc_signal_socket

source:L1214

Arguments

  • state: AppState
  • device_id: String
  • mut socket: WebSocket

Returns

()

No inline doc comment found.

webrtc_signal_ws

source:L944

Arguments

  • ws: WebSocketUpgrade
  • State(state): State<AppState>
  • Query(query): Query<WebRtcSignalConnectQuery>

Returns

impl IntoResponse

No inline doc comment found.

worker_assignments

source:L1799

Arguments

  • State(state): State<AppState>
  • Query(query): Query<AssignmentsQuery>

Returns

Result<Json<AssignmentsResponse>, (StatusCode, String)>

No inline doc comment found.

worker_failure

source:L1932

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<WorkerFailureReport>

Returns

Result<Json<serde_json::Value>, (StatusCode, String)>

No inline doc comment found.

worker_heartbeat

source:L1778

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<HeartbeatRequest>

Returns

Result<Json<HeartbeatResponse>, (StatusCode, String)>

No inline doc comment found.

worker_replay_artifact

source:L1998

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<WorkerReplayArtifactReport>

Returns

Result<Json<serde_json::Value>, (StatusCode, String)>

No inline doc comment found.

worker_result

source:L1874

Arguments

  • State(state): State<AppState>
  • Json(payload): Json<WorkerResultReport>

Returns

Result<Json<serde_json::Value>, (StatusCode, String)>

No inline doc comment found.

Types

AppState

struct source:L58

No inline doc comment found.

AssignmentsQuery

struct source:L199

No inline doc comment found.

AttestationPolicyResponse

struct source:L262

No inline doc comment found.

AttestationPolicySetRequest

struct source:L254

No inline doc comment found.

ChainContext

struct source:L113

No inline doc comment found.

ControlWsClientMessage

struct source:L450

No inline doc comment found.

ControlWsConnectQuery

struct source:L409

No inline doc comment found.

ControlWsServerMessage

struct source:L458

No inline doc comment found.

DeviceRouteEntry

struct source:L309

No inline doc comment found.

HealthResponse

struct source:L204

No inline doc comment found.

JobCreateRequest

struct source:L275

No inline doc comment found.

JobCreateResponse

struct source:L289

No inline doc comment found.

JobQuorumState

struct source:L133

No inline doc comment found.

JobStatusResponse

struct source:L300

No inline doc comment found.

OnchainJobResultView

struct source:L3414

No inline doc comment found.

OnchainJobView

struct source:L3399

No inline doc comment found.

OwnerRoutesResponse

struct source:L381

No inline doc comment found.

PersistedPolicySessionState

struct source:L267

No inline doc comment found.

PersistedRouteState

struct source:L394

No inline doc comment found.

PersistedState

struct source:L188

No inline doc comment found.

PolicyAuditListResponse

struct source:L239

No inline doc comment found.

PolicyAuditQuery

struct source:L234

No inline doc comment found.

PostJobArgs

struct source:L469

No inline doc comment found.

RetentionConfig

struct source:L106

No inline doc comment found.

RouteChallengeHttpResponse

struct source:L6783

No inline doc comment found.

RouteChallengeRequest

struct source:L348

No inline doc comment found.

RouteChallengeResponse

struct source:L353

No inline doc comment found.

RouteHeartbeatRequest

struct source:L359

No inline doc comment found.

RouteHeartbeatResponse

struct source:L367

No inline doc comment found.

RouteHeartbeatToken

struct source:L388

No inline doc comment found.

RouteRegisterRequest

struct source:L324

No inline doc comment found.

RouteRegisterResponse

struct source:L340

No inline doc comment found.

RouteResolveHttpEntry

struct source:L6794

No inline doc comment found.

RouteResolveHttpResponse

struct source:L6788

No inline doc comment found.

RouteResolveResponse

struct source:L374

No inline doc comment found.

SessionInvalidateRequest

struct source:L223

No inline doc comment found.

SessionInvalidateResponse

struct source:L229

No inline doc comment found.

SessionRotateRequest

struct source:L210

No inline doc comment found.

SessionRotateResponse

struct source:L216

No inline doc comment found.

SlashWorkerArtifact

struct source:L179

No inline doc comment found.

TrustPolicyResponse

struct source:L249

No inline doc comment found.

TrustPolicySetRequest

struct source:L244

No inline doc comment found.

WebRtcSignalClientMessage

struct source:L415

No inline doc comment found.

WebRtcSignalConnectQuery

struct source:L404

No inline doc comment found.

WebRtcSignalServerMessage

struct source:L434

No inline doc comment found.

WorkerRegistryEntry

struct source:L121

No inline doc comment found.