Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / apps / gdp-writer.1 @ master

History | View | Annotate | Download (3.35 KB)

1
.Dd October 4, 2015
2
.Dt GDP-WRITER 1
3
.Os Swarm-GDP
4
.Sh NAME
5
.Nm gdp-writer
6
.Nd write to a GDP log
7
.Sh SYNOPSIS
8
.Nm
9
.Op Fl 1
10
.Op Fl a
11
.Op Fl D Ar debug-spec
12
.Op Fl G Ar router-ip
13
.Op Fl i
14
.Op Fl K Ar key-file
15
.Op Fl L Ar log-file
16
.Op Fl q
17
.Op Fl S
18
.Ar log-name
19
.Sh DESCRIPTION
20
.Nm
21
reads data from the standard input and writes it to the GDP log
22
.Ar log-name .
23
The log must already exist.
24
Each line read from the standard input becomes one record in the log.
25
.Pp
26
If the log has a public key included in the metadata
27
(see
28
.Xr gcl-create 8 )
29
then
30
.Nm
31
will try to find a corresponding secret key in the filesystem.
32
It searches for a file named with the internal (256 bit) name of the log
33
as represented in
34
base64url
35
format with a
36
.Sy \&.pem
37
file extension containing the secret key
38
and uses that for signing writes.
39
See the description of the
40
.Sy swarm.gdp.crypto.key.path
41
parameter in
42
.Sx ADMINISTRATIVE PARAMETERS
43
for details on the search path.
44
This search can be overridden using the
45
.Fl K
46
flag.
47
.Sh OPTIONS
48
.Bl -tag
49
.It Fl 1
50
Normally
51
.Nm
52
reads lines from standard input and writes each line as a record
53
with the newline stripped.
54
The
55
.Fl 1
56
flag reads the entire standard input (to an end of file)
57
and writes it all as a single record.
58
This can be used to log binary input or input with newlines
59
(albeit not terribly efficiently if multiple records need to be written).
60
.It Fl a
61
Use asynchronous writes.
62
This is primarily for testing.
63
.It Fl D Ar debug-spec
64
Turn on debugging flags using the libep-style format.
65
Only useful with code in hand.
66
.It Fl G Ar router-ip
67
Contact the given IP address (which may be a DNS name)
68
to get a connection to the GDP routing layer.
69
This will be replaced by automatic discovery
70
(for example, using Zeroconf)
71
soon.
72
The address may have an optional port number after a colon.
73
If this is not specified,
74
the names listed in the
75
.Va swarm.gdp.routers
76
runtime administrative parameter
77
are searched.
78
.It Fl i
79
Print errors on append, but continue to accept input.
80
This is mostly useful for debugging.
81
.It Fl K Ar key-file
82
Names the file containing the secret key to be used for signing.
83
This must be a
84
.Sy \&.pem
85
format file.
86
This overrides the default search path.
87
.It Fl L Ar log-file
88
If set, write a very simplistic performance log to the given
89
.Ar log-file .
90
This can be used together with the companion flag on
91
.Xr gdp-reader 1
92
to produce crude round-trip performance numbers.
93
.It Fl q
94
Run quietly, suppressing all output that isn't error text.
95
.
96
.It Fl S
97
Normally
98
.Nm
99
will refuse to open a log for writing
100
if it cannot find a corresponding secret key.
101
The
102
.Fl S
103
flag allows it to proceed with a warning.
104
This is only useful if the log server hosting the log
105
is configured to allow signature mismatches.
106
.
107
.El
108
.
109
.Sh EXIT STATUS
110
.Bl -tag
111
.It Li EX_OK No (0)
112
Success.
113
.It Li EX_CANTCREAT No (73)
114
Output log could not be opened.
115
.It Li EX_SOFTWARE No (70)
116
Severe internal error.
117
.It Li EX_UNAVAILABLE No (69)
118
Other unspecified error occurred.
119
.It Li EX_USAGE No (64)
120
Error in command line parameters.
121
.El
122
.
123
.Sh ADMINISTRATIVE PARAMETERS
124
.Bl -tag
125
.It Sy swarm.gdp.crypto.key.path
126
Controls the search path for secret keys.
127
Defaults to:
128
.Bd -unfilled -offset indent -compact
129
\&.
130
KEYS
131
~/.swarm/gdp/keys
132
/usr/local/etc/gdp/keys
133
/usr/local/etc/swarm/gdp/keys
134
/etc/gdp/keys
135
/etc/swarm/gdp/keys
136
.Ed
137
.El
138
.\".Sh ENVIRONMENT
139
.\".Sh FILES
140
.Sh SEE ALSO
141
.Xr gdp-reader 1 ,
142
.Xr gcl-create 8
143
.\".Sh EXAMPLES
144
.\".Sh BUGS