bankai/platform_profile

Explicit Bankai operating-profile boundary.

A missing profile means local mode. Cluster mode must be named in this file and is refused by the local daemon entry point until the clustered runtime exists.

Types

pub type Mode {
  Local
  Clustered
}

Constructors

  • Local
  • Clustered
pub type Profile {
  Profile(
    schema_version: Int,
    mode: Mode,
    task_authority: String,
    projection_source: String,
    interchange: String,
    cluster_id: option.Option(String),
    node_id: option.Option(String),
  )
}

Constructors

  • Profile(
      schema_version: Int,
      mode: Mode,
      task_authority: String,
      projection_source: String,
      interchange: String,
      cluster_id: option.Option(String),
      node_id: option.Option(String),
    )

Values

pub fn default() -> Profile
pub const filename: String
pub fn from_json(contents: String) -> Result(Profile, String)
pub fn load(workspace: String) -> Result(Profile, String)

Absence selects the backwards-compatible local profile. Invalid explicit configuration is an error; silently guessing a cluster configuration is unsafe.

pub fn mode_name(mode: Mode) -> String
pub fn path(workspace: String) -> String
pub fn require_clustered_daemon(
  profile: Profile,
) -> Result(Nil, String)
pub fn require_local_daemon(
  profile: Profile,
) -> Result(Nil, String)

Local bankai serve must never silently downgrade an explicit cluster configuration into an independent Mnesia writer.

pub fn to_json(profile: Profile) -> json.Json
Search Document