CanisterMap - data structure for keeping track of PK -> CanisterIdList
CanisterMap is a Red-Black Tree data structure for keeping track of PK -> CanisterIdList
public func init() : CanisterMap
Initializes a CanisterMap for storing PK -> CanisterIdList. Must be present in the IndexCanister.
public func get(map : CanisterMap, pk : Text) : ?CanisterIdList
Get list of canister ids for a PK
public func add(
map : CanisterMap,
pk : Text,
canisterId : Text
) : CanisterMap
Add (append) a canister id to the CanisterIdList for a PK
public func delete(map : CanisterMap, pk : Text) : CanisterMap
Delete a pk and its associated CanisterIdList
public func entries(map : CanisterMap) : I.Iter<(Text, CanisterIdList)>
List all entries of (PK, CanisterIdList)