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

Subscribers

People subscribed via source and target branches