Merge lp:~chipaca/ubuntu-push/nukexample into lp:ubuntu-push

Proposed by John Lenton
Status: Superseded
Proposed branch: lp:~chipaca/ubuntu-push/nukexample
Merge into: lp:ubuntu-push
Prerequisite: lp:~chipaca/ubuntu-push/bus-endpoint-wachticker
Diff against target: 71 lines (+0/-61)
2 files modified
bus/connectivity/example/main.go (+0/-54)
bus/connectivity/example/thing.json (+0/-7)
To merge this branch: bzr merge lp:~chipaca/ubuntu-push/nukexample
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+203507@code.launchpad.net

This proposal has been superseded by a proposal from 2014-01-28.

Commit message

nuked the connectivity example

Description of the change

Nuked the connectivity example; it was bitrotting, and no longer
served a purpose.

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory 'bus/connectivity/example'
2=== removed file 'bus/connectivity/example/main.go'
3--- bus/connectivity/example/main.go 2014-01-23 10:03:39 +0000
4+++ bus/connectivity/example/main.go 1970-01-01 00:00:00 +0000
5@@ -1,54 +0,0 @@
6-/*
7- Copyright 2013-2014 Canonical Ltd.
8-
9- This program is free software: you can redistribute it and/or modify it
10- under the terms of the GNU General Public License version 3, as published
11- by the Free Software Foundation.
12-
13- This program is distributed in the hope that it will be useful, but
14- WITHOUT ANY WARRANTY; without even the implied warranties of
15- MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16- PURPOSE. See the GNU General Public License for more details.
17-
18- You should have received a copy of the GNU General Public License along
19- with this program. If not, see <http://www.gnu.org/licenses/>.
20-*/
21-
22-// a silly example of the connectivity api
23-package main
24-
25-import (
26- "fmt"
27- "launchpad.net/ubuntu-push/bus"
28- "launchpad.net/ubuntu-push/bus/connectivity"
29- "launchpad.net/ubuntu-push/config"
30- "launchpad.net/ubuntu-push/logger"
31- "os"
32- "strings"
33-)
34-
35-func main() {
36- log := logger.NewSimpleLogger(os.Stderr, "error")
37-
38- paths := []string{"thing.json", "bus/connectivity/example/thing.json"}
39- for _, path := range paths {
40- cff, err := os.Open(path)
41- if err == nil {
42- var cfg connectivity.Config
43- err = config.ReadConfig(cff, &cfg)
44- if err != nil {
45- log.Fatalf("%s", err)
46- }
47-
48- ch := make(chan bool)
49- go connectivity.ConnectedState(bus.SystemBus, cfg, log, ch)
50-
51- for c := range ch {
52- fmt.Println("Are we connected?", c)
53- }
54- return
55- }
56- }
57- log.Fatalf("Unable to open the config file; tried %s.", strings.Join(paths, ", "))
58-
59-}
60
61=== removed file 'bus/connectivity/example/thing.json'
62--- bus/connectivity/example/thing.json 2014-01-20 06:27:39 +0000
63+++ bus/connectivity/example/thing.json 1970-01-01 00:00:00 +0000
64@@ -1,7 +0,0 @@
65-{
66- "connectTimeouts": ["0s", "2s", "3s", "5s", "11s", "19s", "37s", "67s"],
67- "stabilizingTimeout": "2s",
68- "recheckTimeout": "10m",
69- "connectivityCheckURL": "http://start.ubuntu.com/connectivity-check.html",
70- "connectivityCheckMD5": "4589f42e1546aa47ca181e5d949d310b"
71-}

Subscribers

People subscribed via source and target branches