flipt-io / cup

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

Implement WASI Controller Get #3

Closed GeorgeMac closed 1 year ago

GeorgeMac commented 1 year ago

Supports #2

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

The role of this function is to source a single resource instance by namespace and name.

The controller needs to:

  1. Build a wazero execution environment with the target FSConfig mounted at /
  2. Invoke the wasm binary with the arguments ["get", kind, namespace, name]
  3. Parse the response as a cup.Resource and return it
func (*Controller) Get(context.Context, *GetRequest) (*cup.Resource, error) { /**/ }

Success

The Controller can get individual resources