docs: Add VERSION section giving first version a plugin/filter appeared.
[nbdkit/ericb.git] / plugins / streaming / nbdkit-streaming-plugin.pod
blob4a16237c3a4ebb349afb6eeb667748e01717f677
1 =head1 NAME
3 nbdkit-streaming-plugin - nbdkit streaming plugin
5 =head1 SYNOPSIS
7  nbdkit streaming pipe=FILENAME [size=SIZE]
9 =head1 DESCRIPTION
11 C<nbdkit-streaming-plugin> is a plugin for L<nbdkit(1)> that can turn
12 certain kinds of input into a stream.
14 If the NBD client opens the NBD port, and writes from the start to the
15 end of the disk without seeking backwards, then this plugin will turn
16 the resulting disk image into a stream of data which is written to the
17 named C<pipe> parameter.
19                ┌───────────┐
20  client        │ nbdkit    │        plugin streams
21  writes ──────▶│ streaming │──────▶ data to pipe
22                │ plugin    │
23                └───────────┘
25 Typical usage is with qemu tools.  The following command will I<not>
26 work because the output is a pipe or socket:
28  qemu-img convert input -O raw pipe
30 However this will work:
32  nbdkit -U - streaming pipe=pipe --run '
33    qemu-img convert -n input -O raw $nbd
34  '
36               ┌───────────┐       ┌───────────┐
37  reads        │ qemu-img  │       │ nbdkit    │        plugin streams
38  input ──────▶│ convert   │──────▶│ streaming │──────▶ data to pipe
39  file         │ command   │       │ plugin    │
40               └───────────┘      ↑└───────────┘
41                               Unix domain socket (-U -)
43 For use of the I<--run> and I<-U -> options, see
44 L<nbdkit-captive(1)>.
46 =head1 PARAMETERS
48 =over 4
50 =item B<pipe=>FILENAME
52 Write to the named pipe or socket.  If the pipe or socket does not
53 exist, then it is created (as a named FIFO), otherwise the existing
54 pipe or socket is opened and used.
56 This parameter is required.
58 =item B<size=>SIZE
60 Specify the virtual size of the stream.
62 This parameter is optional.  If not specified, then the virtual disk
63 appears to the client to be very large (effectively infinite).
64 Whether you need to specify this parameter depends on the client.
65 Some clients don't check the size and just write/stream, others do
66 checks or calculations based on the apparent size.
68 =back
70 =head1 FILES
72 =over 4
74 =item F<$plugindir/nbdkit-streaming-plugin.so>
76 The plugin.
78 Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
80 =back
82 =head1 VERSION
84 C<nbdkit-streaming-plugin> first appeared in nbdkit 1.2.
86 =head1 SEE ALSO
88 L<nbdkit(1)>,
89 L<nbdkit-plugin(3)>.
91 =head1 AUTHORS
93 Richard W.M. Jones
95 =head1 COPYRIGHT
97 Copyright (C) 2014 Red Hat Inc.