admission.bend fails
raw source on the hub · import bend-kit-http@0.31.0.0/admission.bend as Admission
Private bounded transport accounting. Replies contain copied data, never resources.
1 import
import Base
Types
type Counts source · line 4 · raw
Data
Counts@connections:U32 -> @active:U32 -> @buffered:U32 -> @connection_high:U32 -> @active_high:U32 -> @buffered_high:U32 -> @connection_rejected:Nat -> @active_rejected:Nat -> @buffered_rejected:Nat -> Counts
type Caps source · line 9 · raw
Data
Caps@connections:U32 -> @active:U32 -> @buffered:U32 -> Caps
type Command source · line 12 · raw
Data
Acquire@kind:U32 -> @reply:Chan(Bool) -> Command
Release@kind:U32 -> @reply:Chan(Unit) -> Command
Snapshot@reply:Chan(Counts) -> Command
Quiesce@reply:Chan(Bool) -> Command
Running@reply:Chan(Bool) -> Command
StopCommand
type Step source · line 71 · raw
Type
WaitingStep
Received@command:Maybe<&1, Command> -> Step
Acquired@reply:Chan(Bool) -> @result:Pair(Counts, Bool) -> Step
Finishing@done:Bool -> Step
Definitions
def empty source · line 20 · raw
Counts
def acquire.connection source · line 23 · raw
@full:Bool -> @buffer_full:Bool -> @counts:Counts -> Pair(Counts, Bool)
def acquire.active source · line 34 · raw
@full:Bool -> @counts:Counts -> Pair(Counts, Bool)
def acquire source · line 42 · raw
@kind:U32 -> @caps:Caps -> @+counts:Counts -> Pair(Counts, Bool)
def acquire.running source · line 53 · raw
@running:Bool -> @kind:U32 -> @caps:Caps -> @counts:Counts -> Pair(Counts, Bool)
def release source · line 60 · raw
@kind:U32 -> @counts:Counts -> Counts
def stopped source · line 67 · raw
@closing:Bool -> @counts:Counts -> Bool
def open source · line 126 · raw
@caps:Caps -> IO(Chan(Command))
def open.owner source · line 133 · raw
@caps:Caps -> IO(Pair(Chan(Command), Chan(Counts)))
The affine server owner joins this actual actor result after closing its listener.
def boolean.sent source · line 139 · raw
@sent:Bool -> @+reply:Chan(Bool) -> IO(Bool)
def quiesce source · line 149 · raw
@+inbox:Chan(Command) -> IO(Bool)
False also covers copied controls used after actual controller closure.
def running source · line 155 · raw
@+inbox:Chan(Command) -> IO(Bool)
def take source · line 161 · raw
@+inbox:Chan(Command) -> @kind:U32 -> IO(Bool)
def give.sent source · line 170 · raw
@sent:Bool -> @+reply:Chan(Unit) -> IO(Unit)
Correct owners cannot retire the actor while a lease remains counted. If an internal channel is externally closed, report the violation instead of joining an unanswered reply or pretending a retained operation drained.
def give source · line 179 · raw
@+inbox:Chan(Command) -> @kind:U32 -> IO(Unit)
def snapshot.sent source · line 185 · raw
@sent:Bool -> @+reply:Chan(Counts) -> IO(Maybe<&2, Counts>)
def snapshot source · line 198 · raw
@+inbox:Chan(Command) -> IO(Maybe<&2, Counts>)
A successful rendezvous send was received: Stop cannot erase a queued request. After controller closure a failed send returns None without waiting on its reply.
def close source · line 206 · raw
@inbox:Chan(Command) -> IO(Unit)
Retire accounting after listener closure; quiesce is the separate admission cutover. Finite internal fixtures may finish their already-accepted protocol.
Unsafe
unsafe loop source · line 79 · raw
@+inbox:Chan(Command) -> @+caps:Caps -> @+counts:Counts -> @+running:Bool -> @+closing:Bool -> @step:Step -> IO(Counts)
The private inbox is reusable: IO.join would close it after one receive.