flipt-io / cup

Git Contribution Automation
https://cup.flipt.io
Apache License 2.0
76 stars 1 forks source link

Implement WASI Controller List #4

Closed GeorgeMac closed 1 year ago

GeorgeMac commented 1 year ago

Supports #2

This issue tracks implementing the List function for the WASM/WASI Controller.

The role of this function is to list multiple instances of a resources by namespace and optional label key/pairs.

The controller needs to:

  1. Build a wazero execution environment with the target FSConfig mounted at /
  2. Invoke the wasm binary with the arguments ["list", kind, namespace, ...(k/v pairs)]
  3. Parse the response as a []*cup.Resource and return them
func (*Controller) List(context.Context, *ListRequest) ([]*cup.Resource, error) { /**/ }

Success

The Controler can list and filter multiple resources for a given namespace