Getting a list of rules
Retrieves all rules for a specified Target
with a single call.
Returns the first n rules that can fit into a 4MB gRPC package.
Arguments:
- Execution context
- Method arguments, which includes:
- Target
- Additional headers (optional)
Result:
| func ListChains(ctx context.Context, p pool.Pool, cnrID cid.ID) []ape.Chain {
prmListAPEChain := pool.PrmListAPEChains{
Target: ape.ChainTarget{
TargetType: ape.TargetTypeContainer,
Name: cnrID.EncodeToString(),
},
}
chains, _ := p.ListAPEChains(ctx, prmListAPEChain)
return chains
}
|
| public static void listChains(FrostFSClient frostFSClient,
ContainerId containerId,
CallContext callContext) {
var chainTarget = new ChainTarget(containerId.getValue(), TargetType.CONTAINER);
var prmApeChainList = new PrmApeChainList(chainTarget);
frostFSClient.listChains(prmApeChainList, callContext);
}
|
| protected static async Task<FrostFsChain[]> ListChains(
IFrostFSClient client,
FrostFsContainerId containerId)
{
var listChainPrm = new PrmApeChainList(
new FrostFsChainTarget(FrostFsTargetType.Container, containerId.GetValue())
);
return await client.ListChainAsync(listChainPrm, default);
}
|