Bedrock.Service.Manifest (bedrock v0.6.0)
View SourceService manifest utilities for worker specifications and metadata.
Summary
Types
@type t() :: %Bedrock.Service.Manifest{ cluster: Bedrock.Cluster.name(), id: String.t(), params: %{required(atom()) => term()}, worker: module() }
Functions
@spec load_from_file(path_to_manifest :: Path.t()) :: {:ok, t()} | {:error, :manifest_does_not_exist | :manifest_is_invalid | :manifest_is_not_a_dictionary | :worker_module_is_invalid | :worker_module_does_not_exist | :worker_module_failed_to_load | :invalid_cluster_id | :invalid_cluster_name | :invalid_worker_name | :worker_module_does_not_implement_behaviour | :invalid_params | {:file_read_error, atom()}}
@spec new( Bedrock.Cluster.name(), id :: Bedrock.service_id(), worker :: module(), params :: %{required(atom()) => term()} ) :: t()
@spec write_to_file(manifest :: t(), path_to_manifest :: Path.t()) :: :ok | {:error, File.posix()}