View Source Electric.TenantManager (electric v0.8.1)
Summary
Functions
Returns a specification to start this module under a supervisor.
Creates a new tenant for the provided database URL.
Deletes a tenant by its ID.
Retrieves the only tenant in the system.
If there are no tenants, it returns {:error, :not_found}
.
If there are several tenants, it returns {:error, :several_tenants}
and we should use get_tenant
instead.
Retrieves a tenant by its ID.
Stores the provided tenant in the tenant manager.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Creates a new tenant for the provided database URL.
Deletes a tenant by its ID.
@spec get_only_tenant(Keyword.t()) :: {:ok, Keyword.t()} | {:error, :not_found} | {:error, :several_tenants}
Retrieves the only tenant in the system.
If there are no tenants, it returns {:error, :not_found}
.
If there are several tenants, it returns {:error, :several_tenants}
and we should use get_tenant
instead.
Retrieves a tenant by its ID.
Stores the provided tenant in the tenant manager.