Tctl dataconverter plugin

I have a custom data converter that does the encryption/decryption of the payload. So in the WebUI, this shows up as encrypted.

Let me know if my understanding

  • tctl dataconverter web --web-uri xxx
  • Would open up a web socket and when the user goes to the given URL it will attempt to use it’s local data converter to modify the payload
  • Plugins for this need to be written in golang

Here is the PR that implemented this originally using hashicorps plugin framework. Feature: data converter websocket by robholland · Pull Request #1437 · temporalio/temporal · GitHub

I would need to do something similar to temporal/main.go at master · temporalio/temporal · GitHub but for the DataConverter plugin interface.

Do you have any examples of a DataConverter plugin for the CLI? Can this be written in anything other than golang.

samples-go/encryption at main · temporalio/samples-go · GitHub and samples-go/snappycompress at main · temporalio/samples-go · GitHub have tctl plugin implementations.

I don’t believe so currently. However, a RemoteDataConverter that uses IPC or similar has been discussed for such a use case.

Plugins do unfortunately need to be Golang for now. I am working on providing a language agnostic interface for this functionality, but I don’t have a timeline for that.

Since you are using the go-plugin from hashicorp which is just grpc and allows it being written in other languages. What portion of your implementation is restricting it to golang?

We don’t use the gRPC version of the plugin system. go-plugin offers two versions, one based on net/rpc which is golang specific, and one using gRPC. We currently use the former.