sprocket/cassette
Types
pub type CassetteOpts {
CassetteOpts(debug: Bool)
}
Constructors
-
CassetteOpts(debug: Bool)
pub type Message {
Shutdown
GetState(reply_with: Subject(State))
PushPreflight(preflight: Preflight)
CleanupPreflights
StartPreflightCleanupJob(cleanup_preflights: fn() -> Nil)
PopPreflight(
reply_with: Subject(Result(Preflight, Nil)),
id: String,
)
PushSprocket(sprocket: Sprocket)
GetSprocket(
reply_with: Subject(Result(Sprocket, Nil)),
ws: WebSocket,
)
PopSprocket(
reply_with: Subject(Result(Sprocket, Nil)),
ws: WebSocket,
)
}
Constructors
-
Shutdown
-
GetState(reply_with: Subject(State))
-
PushPreflight(preflight: Preflight)
-
CleanupPreflights
-
StartPreflightCleanupJob(cleanup_preflights: fn() -> Nil)
-
PopPreflight( reply_with: Subject(Result(Preflight, Nil)), id: String, )
-
PushSprocket(sprocket: Sprocket)
-
GetSprocket( reply_with: Subject(Result(Sprocket, Nil)), ws: WebSocket, )
-
PopSprocket( reply_with: Subject(Result(Sprocket, Nil)), ws: WebSocket, )
pub type Preflight {
Preflight(
id: String,
view: Element,
csrf_token: String,
created_at: Int,
)
}
Constructors
-
Preflight( id: String, view: Element, csrf_token: String, created_at: Int, )
Functions
pub fn live_service(_req: Request(Body), ca: Subject(Message)) -> HandlerResponse
pub fn pop_preflight(ca: Subject(Message), id: String) -> Result(
Preflight,
Nil,
)
pub fn push_preflight(ca: Subject(Message), preflight: Preflight) -> Preflight