#WorkDir.Read().ID(ctx) under the hood

1 messages · Page 1 of 1 (latest)

regal rivet
#

Hi just editing a live stream I did yesterday on the new Go SDK and there were a few bits that I could make work but did not really understand what they were doing.

With the following code

client.Host().Workdir().Read().ID(ctx)

This obtains a directory ID that I can use in the mount points for containers but under the hood what does this actually do. Is it reading the contents of the and copying this as a snapshot into the build kit container so that it can be mounted as a volume. Or does it just create a reference to the directory so that every time I use this ID the receiver gets the current directory state not the state at the time Read was called?

wanton sable
regal rivet
#

Awesome thank you

verbal owl
sharp vale
#

@regal rivet that was a great video, thank you for sharing it! We're all watching it and making a list of things to improve in time for next sunday 🙂

regal rivet
#

I am just editing things up to cut out the stuff that has no context when there is not a live audience will make things way more brief. Also adding some like text to the screen for bits I did not fully understand when coding it.

sharp vale
#

Btw @regal rivet is there a way to see the livechat when not watching live?

#

(to have context on the questions you're answering)

#

It seems different from the regular youtube comments

regal rivet
#

It should be there, TBH most stuff was unrelated but there is some good comments.

#

In general I really liked the SDK, I have a bunch of questions I want to ask about how you build Packages and things like that but so far I really like it.