Table of Contents

Interface IInstanceStore

Namespace
Bielu.Microservices.Orchestrator.Abstractions
Assembly
Bielu.Microservices.Orchestrator.dll

Persists the desired state of managed instances so the orchestrator can recover and reconcile after a restart.

public interface IInstanceStore

Methods

GetAllAsync(CancellationToken)

Gets all managed instance records.

Task<IReadOnlyList<ManagedInstance>> GetAllAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ManagedInstance>>

GetAsync(string, CancellationToken)

Gets a managed instance by its identifier.

Task<ManagedInstance?> GetAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string
cancellationToken CancellationToken

Returns

Task<ManagedInstance>

The instance, or null if not found.

RemoveAsync(string, CancellationToken)

Removes a managed instance record by its identifier.

Task RemoveAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string
cancellationToken CancellationToken

Returns

Task

SaveAsync(ManagedInstance, CancellationToken)

Saves or updates a managed instance record.

Task SaveAsync(ManagedInstance instance, CancellationToken cancellationToken = default)

Parameters

instance ManagedInstance
cancellationToken CancellationToken

Returns

Task

UpdateContainerIdsAsync(string, IReadOnlyList<string>, CancellationToken)

Updates only the container IDs for an existing instance (e.g. after re-creation).

Task UpdateContainerIdsAsync(string id, IReadOnlyList<string> containerIds, CancellationToken cancellationToken = default)

Parameters

id string
containerIds IReadOnlyList<string>
cancellationToken CancellationToken

Returns

Task