Merge lp:~teknico/ubuntu-push/reflow-docs into lp:ubuntu-push

Proposed by Nicola Larosa
Status: Merged
Approved by: Samuele Pedroni
Approved revision: 71
Merged at revision: 72
Proposed branch: lp:~teknico/ubuntu-push/reflow-docs
Merge into: lp:ubuntu-push
Diff against target: 126 lines (+19/-12)
7 files modified
bus/connectivity/connectivity.go (+3/-4)
protocol/protocol.go (+6/-3)
server/broker/broker.go (+2/-1)
server/broker/simple/simple.go (+2/-1)
server/doc.go (+2/-1)
server/listener/listener.go (+2/-1)
testing/helpers.go (+2/-1)
To merge this branch: bzr merge lp:~teknico/ubuntu-push/reflow-docs
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+207694@code.launchpad.net

Commit message

Reflow comments so that subsequent changes are more readable. Only comment reflows, no other changes.

Description of the change

Reflow comments so that subsequent changes are more readable. Only comment reflows, no other changes.

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bus/connectivity/connectivity.go'
--- bus/connectivity/connectivity.go 2014-02-06 07:59:27 +0000
+++ bus/connectivity/connectivity.go 2014-02-21 16:21:03 +0000
@@ -14,8 +14,8 @@
14 with this program. If not, see <http://www.gnu.org/licenses/>.14 with this program. If not, see <http://www.gnu.org/licenses/>.
15*/15*/
1616
17// Package connectivity a single, simple stream of booleans to answer17// Package connectivity a single, simple stream of booleans
18// the quesiton “are we connected?”.18// to answer the quesiton “are we connected?”.
19//19//
20// It can potentially fire two falses in a row, if a disconnected20// It can potentially fire two falses in a row, if a disconnected
21// state is followed by a dbus watch error. Other than that, it's edge21// state is followed by a dbus watch error. Other than that, it's edge
@@ -32,8 +32,7 @@
32 "time"32 "time"
33)33)
3434
35// the configuration for ConnectedState, with the idea that you'd populate it35// the configuration for ConnectedState, with the idea that you'd populate it from a config file.
36// from a config file.
37type ConnectivityConfig struct {36type ConnectivityConfig struct {
38 // how long to wait after a state change to make sure it's "stable"37 // how long to wait after a state change to make sure it's "stable"
39 // before acting on it38 // before acting on it
4039
=== modified file 'protocol/protocol.go'
--- protocol/protocol.go 2014-01-28 22:18:39 +0000
+++ protocol/protocol.go 2014-02-21 16:21:03 +0000
@@ -27,7 +27,8 @@
27 "time"27 "time"
28)28)
2929
30// Protocol is a connection capable of writing and reading the wire format of protocol messages.30// Protocol is a connection capable of writing and reading the wire format
31// of protocol messages.
31type Protocol interface {32type Protocol interface {
32 SetDeadline(t time.Time)33 SetDeadline(t time.Time)
33 ReadMessage(msg interface{}) error34 ReadMessage(msg interface{}) error
@@ -71,7 +72,8 @@
71 }72 }
72}73}
7374
74// ReadMessage reads one message made of big endian uint16 length, JSON body of length from the connection.75// ReadMessage reads one message made of big endian uint16 length, JSON body
76// of length from the connection.
75func (c *protocol0) ReadMessage(msg interface{}) error {77func (c *protocol0) ReadMessage(msg interface{}) error {
76 c.buffer.Reset()78 c.buffer.Reset()
77 _, err := io.CopyN(c.buffer, c.conn, 2)79 _, err := io.CopyN(c.buffer, c.conn, 2)
@@ -87,7 +89,8 @@
87 return json.Unmarshal(c.buffer.Bytes(), msg)89 return json.Unmarshal(c.buffer.Bytes(), msg)
88}90}
8991
90// WriteMessage writes one message made of big endian uint16 length, JSON body of length to the connection.92// WriteMessage writes one message made of big endian uint16 length, JSON body
93// of length to the connection.
91func (c *protocol0) WriteMessage(msg interface{}) error {94func (c *protocol0) WriteMessage(msg interface{}) error {
92 c.buffer.Reset()95 c.buffer.Reset()
93 c.buffer.WriteString("\x00\x00") // placeholder for length96 c.buffer.WriteString("\x00\x00") // placeholder for length
9497
=== modified file 'server/broker/broker.go'
--- server/broker/broker.go 2014-02-10 23:19:08 +0000
+++ server/broker/broker.go 2014-02-21 16:21:03 +0000
@@ -25,7 +25,8 @@
25 "launchpad.net/ubuntu-push/server/store"25 "launchpad.net/ubuntu-push/server/store"
26)26)
2727
28// Broker is responsible for registring sessions and delivering messages through them.28// Broker is responsible for registring sessions and delivering messages
29// through them.
29type Broker interface {30type Broker interface {
30 // Register the session.31 // Register the session.
31 Register(*protocol.ConnectMsg) (BrokerSession, error)32 Register(*protocol.ConnectMsg) (BrokerSession, error)
3233
=== modified file 'server/broker/simple/simple.go'
--- server/broker/simple/simple.go 2014-02-10 23:19:08 +0000
+++ server/broker/simple/simple.go 2014-02-21 16:21:03 +0000
@@ -26,7 +26,8 @@
26 "launchpad.net/ubuntu-push/server/store"26 "launchpad.net/ubuntu-push/server/store"
27)27)
2828
29// SimpleBroker implements broker.Broker/BrokerSending for everything in just one process.29// SimpleBroker implements broker.Broker/BrokerSending for everything
30// in just one process.
30type SimpleBroker struct {31type SimpleBroker struct {
31 sto store.PendingStore32 sto store.PendingStore
32 logger logger.Logger33 logger logger.Logger
3334
=== modified file 'server/doc.go'
--- server/doc.go 2014-01-23 15:33:30 +0000
+++ server/doc.go 2014-02-21 16:21:03 +0000
@@ -14,5 +14,6 @@
14 with this program. If not, see <http://www.gnu.org/licenses/>.14 with this program. If not, see <http://www.gnu.org/licenses/>.
15*/15*/
1616
17// Package server contains code to start server components hosted by the subpackages.17// Package server contains code to start server components hosted
18// by the subpackages.
18package server19package server
1920
=== modified file 'server/listener/listener.go'
--- server/listener/listener.go 2014-02-10 23:19:08 +0000
+++ server/listener/listener.go 2014-02-21 16:21:03 +0000
@@ -14,7 +14,8 @@
14 with this program. If not, see <http://www.gnu.org/licenses/>.14 with this program. If not, see <http://www.gnu.org/licenses/>.
15*/15*/
1616
17// Package listener has code to listen for device connections and setup sessions for them.17// Package listener has code to listen for device connections
18// and setup sessions for them.
18package listener19package listener
1920
20import (21import (
2122
=== modified file 'testing/helpers.go'
--- testing/helpers.go 2014-02-10 23:32:48 +0000
+++ testing/helpers.go 2014-02-21 16:21:03 +0000
@@ -73,7 +73,8 @@
73 helper *captureHelper73 helper *captureHelper
74}74}
7575
76// NewTestLogger can be used in tests instead of NewSimpleLogger(FromMinimalLogger).76// NewTestLogger can be used in tests instead of
77// NewSimpleLogger(FromMinimalLogger).
77func NewTestLogger(minLog logger.MinimalLogger, level string) *TestLogger {78func NewTestLogger(minLog logger.MinimalLogger, level string) *TestLogger {
78 h := &captureHelper{outputFunc: minLog.Output}79 h := &captureHelper{outputFunc: minLog.Output}
79 log := &TestLogger{80 log := &TestLogger{

Subscribers

People subscribed via source and target branches