varlink / go

Golang implementation of the Varlink protocol
https://godoc.org/github.com/varlink/go/varlink
Apache License 2.0
64 stars 57 forks source link

Expose upgraded connection #18

Closed johanbrandhorst closed 4 years ago

johanbrandhorst commented 4 years ago

The recent change to use a context in all calls also took the liberty of hiding access to the Reader and Writers of the raw connection. Turns out this is sometimes necessary when using the varlink connection, for upgraded connections. See https://github.com/containers/libpod/blob/b713e5371fa8767067bd2c329a3744ea593b2ade/pkg/adapter/runtime_remote.go#L550 for example.

I propose adding a helper that does the first half of that function all in one and return a Reader and Writer from the function.

I intend to prototype this.