- Jun 21, 2016
-
-
Jonathan Boulle authored
sdjournal: add test for incorrect Read() length
-
Luca Bruno authored
-
- Jun 20, 2016
-
-
Luca Bruno authored
sdjournal: fix incomplete reads in JournalReader.Read()
-
- Jun 17, 2016
-
-
Jonathan Boulle authored
sdjournal: fix Writer call
-
Jonathan Boulle authored
-
- Jun 14, 2016
-
-
Jonathan Boulle authored
sdjournal: Break the loop if error happens during Write().
-
Alban Crequy authored
This patch fixes two issues in JournalReader.Read(): 1. The return value of copy() was ignored and JournalReader.Read() was returning the wrong amount of bytes copied. 2. JournalReader implements the Reader interface so it must be able to read a specific amount of bytes. Journald on the other hand only allows us to read full entries of arbitrary size (without byte granularity). JournalReader therefore needs to internally buffer entries that don't fit in the read buffer. Callers should keep calling until 0 and/or an error is returned. Fixes https://github.com/coreos/go-systemd/issues/172
-
- Jun 13, 2016
-
-
Yifan Gu authored
-
- Jun 07, 2016
-
-
Luca Bruno authored
sdjournal: don't close libsystemd on Close()
-
Luca Bruno authored
sdjournal: add GetEntry method to retrieve all fields
-
Gorka Lerchundi Osa authored
As GetEntry outputs every field in a string keyed map, it eases access to a concrete field without hardcoding it. Ref: https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
-
Gorka Lerchundi Osa authored
Implements the same semantics as the JOURNAL_FOREACH_DATA_RETVAL macro in journal-internal.h and produces a *JournalEntry with every field with its corresponding data in a map[string]string. Also it includes address fields like realtime (__REALTIME_TIMESTAMP), monotonic (__MONOTONIC_TIMESTAMP and cursor (__CURSOR). It mimics more or less `journalctl -o json`. Fixes #142 Supersedes #136
-
Iago López Galeiras authored
There is a symbol cache (map from function names to their addresses) so we don't need to call dlsym everytime we call a function from libsystemd if it was already called before. Every time we open a new Journal, we call dlopen(), and every time we close it, we call dlclose(). Since the map was global and we weren't clearing it up after closing Journal, we were reusing the addresses from the previous invocation. This is wrong because libsystemd can end up in a different address the second time we dlopen() it. Instead, just don't call dlclose() when we close the Journal so libsystemd remains in the process address space for the whole life of it. This means the symbol cache will be shared between different Journal instances. According to dlopen(3): If the same shared object is loaded again with dlopen(), the same object handle is returned. The dynamic linker maintains reference counts for object handles, so a dynamically loaded shared object is not deallocated until dlclose() has been called on it as many times as dlopen() has succeeded on it. So we don't worry about calling dlopen() on an already opened library.
-
Luca Bruno authored
sdjournal: add test for NewJournalFromDir()
-
Luca Bruno authored
dbus: add support for new ListUnits* methods
-
kayrus authored
* Added getUnitStatus and getUnitFile functions for test * Added t.Skip for methods which are not available * Increased verbosity to show skipped tests
-
- Jun 06, 2016
-
-
Luca Bruno authored
Simple test to exercise main code path and error handling of `NewJournalFromDir()`.
-
- May 31, 2016
-
-
kayrus authored
implemented new dbus methods: * ListUnitsFiltered * ListUnitsByPatterns * ListUnitsByNames * ListUnitFilesByPatterns refactored legacy ListUnits and ListUnitFiles functions
-
- May 27, 2016
-
-
Jonathan Boulle authored
sdjournal/read: fix comment related to mutually exclusive options
-
Gorka Lerchundi Osa authored
-
- May 26, 2016
-
-
Luca Bruno authored
sdjournal: add support for cursors (get&seek&test)
-
Jonathan Boulle authored
sdjournal: export SYSLOG_IDENTIFIER
-
Iago López Galeiras authored
rkt needs this because there's a race where short-lived non-root processes make the journal unable to get all their information (i.e. the SYSTEMD_UNIT). We work around it by using SYSLOG_IDENTIFIER.
-
- May 25, 2016
-
-
Nathan Zadoks authored
By providing a callback to NewConnection, users can now initialise a session over a transport of their choosing
-
- May 24, 2016
-
-
Gorka Lerchundi Osa authored
-
- May 20, 2016
-
-
Iago López Galeiras authored
sdjournal: add ability to rewind JournalReader
-
Jonathan Boulle authored
This allows users of the JournalReader to rewind to the beginning of the Journal. Also add a missing docstring to JournalReader.Close
-
Jonathan Boulle authored
Simple wrapper around `sd_journal_seek_head`
-
- May 19, 2016
-
-
Luca Bruno authored
Add test for dbus/methods.go:GetServiceProperty function
-
Alexey Baranov authored
-
Luca Bruno authored
Add method to get service property
-
Alexey Baranov authored
-
- May 18, 2016
-
-
Luca Bruno authored
sdjournal: dlopen libsystemd instead of linking against it
-
- May 13, 2016
-
-
Yifan Gu authored
Add // +build ignore to examples
-
- May 11, 2016
-
-
Michael Hudson-Doyle authored
This means that go get github.com/coreos/go-systemd/... can succeed. Fixes #156
-
- May 08, 2016
-
-
Seth Jennings authored
add _TRANSPORT as a filter field
-
- Mar 17, 2016
-
-
Iago López Galeiras authored
We don't want to leak it.
-
Iago López Galeiras authored
Maps are not safe for concurrent use in go.
-
- Feb 24, 2016
-
-
Iago López Galeiras authored
Systemd functions return negative errno-like errors, wrap those with syscall.Errno() so we can get descriptive error messages instead of numbers.
-
Iago López Galeiras authored
This allows not having to link users of the library to libsystemd, detect at runtime if it exists or not and react accordingly.
-