Skip to main content

Module resource

Module resource 

Source
Expand description

This modules defines a set of common message types used for managing resources in hyperactor meshes.

Modules§

mesh
This module defines common types for mesh resources. Meshes are managed as resources, usually by a controller actor implementing the crate::resource behavior.

Structs§

Controller
The generated behavior struct.
CreateOrUpdate
Create or update a resource according to a spec.
GetRankStatus
Get the status of a resource across the mesh.
GetState
Retrieve the current state of the resource.
KeepaliveGetState
Same as GetState, but additionally tells the receiver that the owner is still alive. If the receiver does not receive this message for a while, it might assume the owner is dead.
List
List the set of resources managed by the controller.
Rank
Data type used to communicate ranks. Serialized as a typed multipart part so comm actors can replace instances with the delivered rank while the message is in transit.
RankRepr
Serialized representation for Rank multipart parts.
RankedValues
RankedValues compactly represents rank-indexed values of type T. It stores contiguous values in a set of intervals; thus it is efficient and compact when the cardinality of T-typed values is low.
State
The state of a resource.
Stop
Stop a resource according to a spec.
StopAll
Stop all resources owned by the receiver of this message. No reply, this just issues the stop command. Use GetRankStatus to determine if it has successfully stopped.
StreamState
Subscribe to streaming state updates for a named resource. The subscriber port will receive State<S> whenever the resource’s state changes. The current state is sent immediately upon subscription.
ValuesByRank
An inverted index of RankedValues, providing all ranks for which each unique T-typed value appears.
WaitRankStatus
Like GetRankStatus, but the handler defers its reply until the resource’s status is >= min_status. This avoids the race where the caller sees Stopping before the process has actually exited.

Enums§

Status
The current lifecycle status of a resource.

Traits§

CreateOrUpdateClient
The custom client trait for this message type.
CreateOrUpdateHandler
The custom handler trait for this message type.
GetRankStatusClient
The custom client trait for this message type.
GetRankStatusHandler
The custom handler trait for this message type.
GetStateClient
The custom client trait for this message type.
GetStateHandler
The custom handler trait for this message type.
KeepaliveGetStateClient
The custom client trait for this message type.
KeepaliveGetStateHandler
The custom handler trait for this message type.
ListClient
The custom client trait for this message type.
ListHandler
The custom handler trait for this message type.
Resource
A trait that bundles a set of types that together define a resource.
StateClient
The custom client trait for this message type.
StateHandler
The custom handler trait for this message type.
StopAllClient
The custom client trait for this message type.
StopAllHandler
The custom handler trait for this message type.
StopClient
The custom client trait for this message type.
StopHandler
The custom handler trait for this message type.
StreamStateClient
The custom client trait for this message type.
StreamStateHandler
The custom handler trait for this message type.
WaitRankStatusClient
The custom client trait for this message type.
WaitRankStatusHandler
The custom handler trait for this message type.

Functions§

wait_mesh
Collect an accumulated ValueMesh<T> from rx until every rank has been reported or max_idle_time elapses with no update.