def Bytes.options.decided

mylsm-lsm-store@0.6.0.1 · mylsm.bend:496

import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import mylsm-lsm-store@0.6.0.1/src/coordinator/OwnerOpenPolicy.bend as OwnerOpenPolicy

496def Bytes.options.decided(
497  decision: OwnerOpenPolicy.Decision,
498  handle: Bytes.Handle
499) -> IO(Result<&1, &1, Bytes.Error, Bytes.Handle>):
500  match decision:
501    case OwnerOpenPolicy.UseLocal{}:
502      IO.pure(Result<&1, &1, Bytes.Error, Bytes.Handle>, Done{handle})
503    case OwnerOpenPolicy.UseRemote{}:
504      IO.pure(Result<&1, &1, Bytes.Error, Bytes.Handle>, Done{handle})
505    case OwnerOpenPolicy.RejectOptions{}: Bytes.options.rejected(handle)

Uses (7)

Used by (2)