diff options
Diffstat (limited to 'libvirt/stream.go')
-rw-r--r-- | libvirt/stream.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libvirt/stream.go b/libvirt/stream.go index fcfed2cf..4223466c 100644 --- a/libvirt/stream.go +++ b/libvirt/stream.go @@ -2,10 +2,12 @@ package libvirt import libvirt "github.com/libvirt/libvirt-go" +// StreamIO libvirt struct type StreamIO struct { Stream libvirt.Stream } +// NewStreamIO returns libvirt StreamIO func NewStreamIO(s libvirt.Stream) *StreamIO { return &StreamIO{Stream: s} } @@ -18,6 +20,7 @@ func (sio *StreamIO) Write(p []byte) (int, error) { return sio.Stream.Send(p) } +// Close closes the stream func (sio *StreamIO) Close() error { return sio.Stream.Finish() } |