Trait krator::Operator[][src]

pub trait Operator: 'static + Sync + Send {
    type Manifest: Metadata<Ty = ObjectMeta> + Clone + DeserializeOwned + Send + 'static + Debug + Sync + Default;
    type Status: ObjectStatus + Send;
    type ObjectState: ObjectState<Manifest = Self::Manifest, Status = Self::Status>;
    type InitialState: State<Self::ObjectState> + Default;
    type DeletedState: State<Self::ObjectState> + Default;
#[must_use]    fn initialize_object_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        manifest: &'life1 Self::Manifest
    ) -> Pin<Box<dyn Future<Output = Result<Self::ObjectState>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn shared_state<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = SharedState<<Self::ObjectState as ObjectState>::SharedState>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; #[must_use] fn registration_hook<'life0, 'async_trait>(
        &'life0 self,
        _manifest: Manifest<Self::Manifest>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

Interface for creating an operator.

Associated Types

type Manifest: Metadata<Ty = ObjectMeta> + Clone + DeserializeOwned + Send + 'static + Debug + Sync + Default[src]

Type representing the specification of the object in the Kubernetes API.

type Status: ObjectStatus + Send[src]

Type describing the status of the object.

type ObjectState: ObjectState<Manifest = Self::Manifest, Status = Self::Status>[src]

Type holding data specific to a single object.

type InitialState: State<Self::ObjectState> + Default[src]

State handler to run when object is created.

type DeletedState: State<Self::ObjectState> + Default[src]

State handler to run when object is deleted.

Loading content...

Required methods

#[must_use]fn initialize_object_state<'life0, 'life1, 'async_trait>(
    &'life0 self,
    manifest: &'life1 Self::Manifest
) -> Pin<Box<dyn Future<Output = Result<Self::ObjectState>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Initialize a new object state for running a new object's state machine.

#[must_use]fn shared_state<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = SharedState<<Self::ObjectState as ObjectState>::SharedState>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Create a reference to state shared between state machines.

Loading content...

Provided methods

#[must_use]fn registration_hook<'life0, 'async_trait>(
    &'life0 self,
    _manifest: Manifest<Self::Manifest>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Called before the state machine is run.

Loading content...

Implementors

Loading content...