Hi, I am wondering how to run a sidecar with the go sdk. Some time ago the rough idea of async tasks had been implemented in cue which would allow for basic sidecar usage. I poked a bit around in the go sdk but I didnt find anything similar.
Should I simply run the command in an iife goroutine? If so, how can I stop the container once I dont need the sidecar anymore?
#running a sidecar with the go sdk
1 messages · Page 1 of 1 (latest)
@tulip nebula v0.3.13 has a feature that should help; there aren't docs yet, but it's on by default, and I have a draft blog post that goes over it: https://dev.to/vito/dagger-at-your-service-5bih-temp-slug-2527394?preview=7d90ca6733292d9ba22ba99cacb1ef3d4d1bdf2c26fcc48414d521a7d3b0f135a294bec24d49d5b62420dc200d23f4eaf953603bdc29d2bb8c076fca
@mossy knoll , thanks. I have seen some of these things like endpoints and so on in the SDK. I was missing the WithServiceBinding method and its purpose. Sounds definitly cool.
I am still confused what methods will actually cause a container to run. Is it all of them or just specific ones like ExitCode or Stdout? Basicially the ones that are not prefixed with With.
The ones where you need to pass a context and return an error 🙂
aye, makes sense. Thanks @cobalt kelp
“Dagger at your service” 😂