You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/09/28 23:22:45 UTC

[01/36] qpid-proton git commit: PROTON-827: Restore genwrap.go generator deleted in error, update for package name changes.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 5598d501f -> cb868e927


PROTON-827: Restore genwrap.go generator deleted in error, update for package name changes.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/7087b22d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/7087b22d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/7087b22d

Branch: refs/heads/master
Commit: 7087b22ddd99959dedf235c5194a0a1eaead3116
Parents: 9276ae3
Author: Alan Conway <ac...@redhat.com>
Authored: Thu May 14 21:14:01 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:14:37 2015 -0400

----------------------------------------------------------------------
 go/event/genwrap.go | 427 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 427 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7087b22d/go/event/genwrap.go
----------------------------------------------------------------------
diff --git a/go/event/genwrap.go b/go/event/genwrap.go
new file mode 100644
index 0000000..094b196
--- /dev/null
+++ b/go/event/genwrap.go
@@ -0,0 +1,427 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Code generator to generate a thin Go wrapper API around the C proton API.
+//
+
+package main
+
+import (
+	"flag"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"os/exec"
+	"path"
+	"regexp"
+	"strings"
+	"text/template"
+)
+
+func mixedCase(s string) string {
+	result := ""
+	for _, w := range strings.Split(s, "_") {
+		if w != "" {
+			result = result + strings.ToUpper(w[0:1]) + strings.ToLower(w[1:])
+		}
+	}
+	return result
+}
+
+func mixedCaseTrim(s, prefix string) string {
+	return mixedCase(strings.TrimPrefix(s, prefix))
+}
+
+var templateFuncs = template.FuncMap{"mixedCase": mixedCase, "mixedCaseTrim": mixedCaseTrim}
+
+func doTemplate(out io.Writer, data interface{}, tmpl string) {
+	panicIf(template.Must(template.New("").Funcs(templateFuncs).Parse(tmpl)).Execute(out, data))
+}
+
+type enumType struct {
+	Name   string
+	Values []string
+}
+
+// Find enums in a header file return map of enum name to values.
+func findEnums(header string) (enums []enumType) {
+	for _, enum := range enumDefRe.FindAllStringSubmatch(header, -1) {
+		enums = append(enums, enumType{enum[2], enumValRe.FindAllString(enum[1], -1)})
+	}
+	return enums
+}
+
+func genEnum(out io.Writer, name string, values []string) {
+	doTemplate(out, []interface{}{name, values}, `{{$enumName := index . 0}}{{$values := index . 1}}
+type {{mixedCase $enumName}} C.pn_{{$enumName}}_t
+const ({{range $values}}
+	{{mixedCase .}} {{mixedCase $enumName}} = C.{{.}} {{end}}
+)
+
+func (e {{mixedCase $enumName}}) String() string {
+	switch e {
+{{range $values}}
+	case C.{{.}}: return "{{mixedCaseTrim . "PN_"}}" {{end}}
+	}
+	return "unknown"
+}
+`)
+}
+
+var (
+	reSpace = regexp.MustCompile("\\s+")
+)
+
+func panicIf(err error) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+func readHeader(name string) string {
+	file, err := os.Open(path.Join(*includeProton, name+".h"))
+	panicIf(err)
+	defer file.Close()
+	s, err := ioutil.ReadAll(file)
+	panicIf(err)
+	return string(s)
+}
+
+var copyright string = `/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// NOTE: This file was generated by genwrap.go, do not edit it by hand.
+//
+`
+
+type eventType struct {
+	// C, function and interface names for the event
+	Name, Cname, Fname, Iname string
+}
+
+func newEventType(cName string) eventType {
+	var etype eventType
+	etype.Cname = cName
+	etype.Name = mixedCaseTrim(cName, "PN_")
+	etype.Fname = "On" + etype.Name
+	etype.Iname = etype.Fname + "Interface"
+	return etype
+}
+
+var (
+	enumDefRe   = regexp.MustCompile("typedef enum {([^}]*)} pn_([a-z_]+)_t;")
+	enumValRe   = regexp.MustCompile("PN_[A-Z_]+")
+	skipEventRe = regexp.MustCompile("EVENT_NONE|REACTOR|SELECTABLE|TIMER")
+	skipFnRe    = regexp.MustCompile("attach|context|class|collect|^recv$|^send$|transport")
+)
+
+// Generate event wrappers.
+func event(out io.Writer) {
+	event_h := readHeader("event")
+
+	// Event is implented by hand in wrappers.go
+
+	// Get all the pn_event_type_t enum values
+	var etypes []eventType
+	enums := findEnums(event_h)
+	for _, e := range enums[0].Values {
+		if skipEventRe.FindStringSubmatch(e) == nil {
+			etypes = append(etypes, newEventType(e))
+		}
+	}
+
+	doTemplate(out, etypes, `
+type EventType int
+const ({{range .}}
+	 E{{.Name}} EventType = C.{{.Cname}}{{end}}
+)
+`)
+
+	doTemplate(out, etypes, `
+func (e EventType) String() string {
+	switch e {
+{{range .}}
+	case C.{{.Cname}}: return "{{.Name}}"{{end}}
+	}
+	return "Unknown"
+}
+`)
+}
+
+type genType struct {
+	Ctype, Gotype string
+	ToGo          func(value string) string
+	ToC           func(value string) string
+	Assign        func(value string) string
+}
+
+func (g genType) printBody(out io.Writer, value string) {
+	if g.Gotype != "" {
+		fmt.Fprintf(out, "return %s", g.ToGo(value))
+	} else {
+		fmt.Fprintf(out, "%s", value)
+	}
+}
+
+func (g genType) goLiteral(value string) string {
+	return fmt.Sprintf("%s{%s}", g.Gotype, value)
+}
+
+func (g genType) goConvert(value string) string {
+	switch g.Gotype {
+	case "string":
+		return fmt.Sprintf("C.GoString(%s)", value)
+	case "Event":
+		return fmt.Sprintf("makeEvent(%s)", value)
+	default:
+		return fmt.Sprintf("%s(%s)", g.Gotype, value)
+	}
+}
+
+var notStruct = map[string]bool{
+	"EventType":        true,
+	"SndSettleMode":    true,
+	"RcvSettleMode":    true,
+	"TerminusType":     true,
+	"State":            true,
+	"Durability":       true,
+	"ExpiryPolicy":     true,
+	"DistributionMode": true,
+}
+
+func mapType(ctype string) (g genType) {
+	g.Ctype = "C." + strings.Trim(ctype, " \n")
+
+	switch g.Ctype {
+	case "C.void":
+		g.Gotype = ""
+	case "C.size_t":
+		g.Gotype = "uint"
+	case "C.int":
+		g.Gotype = "int"
+	case "C.void *":
+		g.Gotype = "unsafe.Pointer"
+		g.Ctype = "unsafe.Pointer"
+	case "C.bool":
+		g.Gotype = "bool"
+	case "C.ssize_t":
+		g.Gotype = "int"
+	case "C.uint64_t":
+		g.Gotype = "uint64"
+	case "C.uint32_t":
+		g.Gotype = "uint16"
+	case "C.uint16_t":
+		g.Gotype = "uint32"
+	case "C.const char *":
+		fallthrough
+	case "C.char *":
+		g.Gotype = "string"
+		g.Ctype = "C.CString"
+		g.ToC = func(v string) string { return fmt.Sprintf("%sC", v) }
+		g.Assign = func(v string) string {
+			return fmt.Sprintf("%sC := C.CString(%s)\n defer C.free(unsafe.Pointer(%sC))\n", v, v, v)
+		}
+	case "C.pn_seconds_t":
+		g.Gotype = "time.Duration"
+		g.ToGo = func(v string) string { return fmt.Sprintf("(time.Duration(%s) * time.Second)", v) }
+	case "C.pn_error_t *":
+		g.Gotype = "error"
+		g.ToGo = func(v string) string { return fmt.Sprintf("internal.PnError(unsafe.Pointer(%s))", v) }
+	default:
+		pnId := regexp.MustCompile(" *pn_([a-z_]+)_t *\\*? *")
+		match := pnId.FindStringSubmatch(g.Ctype)
+		if match == nil {
+			panic(fmt.Errorf("unknown C type %#v", g.Ctype))
+		}
+		g.Gotype = mixedCase(match[1])
+		if !notStruct[g.Gotype] {
+			g.ToGo = g.goLiteral
+			g.ToC = func(v string) string { return v + ".pn" }
+		}
+	}
+	if g.ToGo == nil {
+		g.ToGo = g.goConvert // Use conversion by default.
+	}
+	if g.ToC == nil {
+		g.ToC = func(v string) string { return fmt.Sprintf("%s(%s)", g.Ctype, v) }
+	}
+	return
+}
+
+type genArg struct {
+	Name string
+	genType
+}
+
+var typeNameRe = regexp.MustCompile("^(.*( |\\*))([^ *]+)$")
+
+func splitArgs(argstr string) []genArg {
+	argstr = strings.Trim(argstr, " \n")
+	if argstr == "" {
+		return []genArg{}
+	}
+	args := make([]genArg, 0)
+	for _, item := range strings.Split(argstr, ",") {
+		item = strings.Trim(item, " \n")
+		typeName := typeNameRe.FindStringSubmatch(item)
+		if typeName == nil {
+			panic(fmt.Errorf("Can't split argument type/name %#v", item))
+		}
+		cType := strings.Trim(typeName[1], " \n")
+		name := strings.Trim(typeName[3], " \n")
+		if name == "type" {
+			name = "type_"
+		}
+		args = append(args, genArg{name, mapType(cType)})
+	}
+	return args
+}
+
+func goArgs(args []genArg) string {
+	l := ""
+	for i, arg := range args {
+		if i != 0 {
+			l += ", "
+		}
+		l += arg.Name + " " + arg.Gotype
+	}
+	return l
+}
+
+func cArgs(args []genArg) string {
+	l := ""
+	for _, arg := range args {
+		l += fmt.Sprintf(", %s", arg.ToC(arg.Name))
+	}
+	return l
+}
+
+func cAssigns(args []genArg) string {
+	l := "\n"
+	for _, arg := range args {
+		if arg.Assign != nil {
+			l += fmt.Sprintf("%s\n", arg.Assign(arg.Name))
+		}
+	}
+	return l
+}
+
+// Return the go name of the function or "" to skip the function.
+func goFnName(api, fname string) string {
+	// Skip class, context and attachment functions.
+	if skipFnRe.FindStringSubmatch(fname) != nil {
+		return ""
+	}
+	switch api + "." + fname {
+	case "link.get_drain":
+		return "IsDrain"
+	default:
+		return mixedCaseTrim(fname, "get_")
+	}
+}
+
+func apiWrapFns(api, header string, out io.Writer) {
+	fmt.Fprintf(out, "type %s struct{pn *C.pn_%s_t}\n", mixedCase(api), api)
+	fmt.Fprintf(out, "func (%c %s) IsNil() bool { return %c.pn == nil }\n", api[0], mixedCase(api), api[0])
+	fn := regexp.MustCompile(fmt.Sprintf(`PN_EXTERN ([a-z0-9_ ]+ *\*?) *pn_%s_([a-z_]+)\(pn_%s_t *\*[a-z_]+ *,? *([^)]*)\)`, api, api))
+	for _, m := range fn.FindAllStringSubmatch(header, -1) {
+		rtype, fname, argstr := mapType(m[1]), m[2], m[3]
+		gname := goFnName(api, fname)
+		if gname == "" { // Skip
+			continue
+		}
+		args := splitArgs(argstr)
+		fmt.Fprintf(out, "func (%c %s) %s", api[0], mixedCase(api), gname)
+		fmt.Fprintf(out, "(%s) %s { ", goArgs(args), rtype.Gotype)
+		fmt.Fprint(out, cAssigns(args))
+		rtype.printBody(out, fmt.Sprintf("C.pn_%s_%s(%c.pn%s)", api, fname, api[0], cArgs(args)))
+		fmt.Fprintf(out, "}\n")
+	}
+}
+
+var includeProton = flag.String("include", "", "path to proton include files, including /proton")
+
+func main() {
+	flag.Parse()
+	outpath := "wrappers_gen.go"
+	out, err := os.Create(outpath)
+	panicIf(err)
+	defer out.Close()
+
+	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
+	fmt.Fprintln(out, copyright)
+	fmt.Fprint(out, `
+package event
+
+import (
+	"time"
+  "unsafe"
+  "qpid.apache.org/proton/go/internal"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+`)
+	for _, api := range apis {
+		fmt.Fprintf(out, "// #include <proton/%s.h>\n", api)
+	}
+	fmt.Fprintln(out, `import "C"`)
+
+	event(out)
+
+	for _, api := range apis {
+		fmt.Fprintf(out, "// Wrappers for declarations in %s.h\n\n", api)
+		header := readHeader(api)
+		enums := findEnums(header)
+		for _, e := range enums {
+			genEnum(out, e.Name, e.Values)
+		}
+		apiWrapFns(api, header, out)
+	}
+	out.Close()
+
+	// Run gofmt.
+	cmd := exec.Command("gofmt", "-w", outpath)
+	cmd.Stdout = os.Stdout
+	cmd.Stderr = os.Stderr
+	err = cmd.Run()
+	if err != nil {
+		fmt.Fprintf(os.Stderr, "gofmt: %s", err)
+		os.Exit(1)
+	}
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[05/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a
new file mode 100644
index 0000000..9871ec9
--- /dev/null
+++ b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a
@@ -0,0 +1,3318 @@
+!<arch>
+__.PKGDEF       0           0     0     644     33134     `
+go object linux amd64 go1.4.2 X:precisestack
+
+$$
+package event
+	import net "net"
+	import sync "sync"
+	import runtime "runtime"
+	import time "time"
+	import io "io"
+	import cgo "runtime/cgo"
+	import amqp "qpid.apache.org/proton/go/amqp"
+	import os "os"
+	import syscall "syscall"
+	import fmt "fmt"
+	import internal "qpid.apache.org/proton/go/internal"
+	import reflect "reflect"
+	import path "path"
+	import unsafe "unsafe"
+	type @""._Ctype_struct_pn_event_t struct {}
+	type @"".EventType int
+	func (@"".e·2 @"".EventType) String () (? string)
+	type @""._Ctype_struct_pn_connection_t struct {}
+	type @"sync".Mutex struct { @"sync".state int32; @"sync".sema uint32 }
+	func (@"sync".m·1 *@"sync".Mutex) Lock ()
+	func (@"sync".m·1 *@"sync".Mutex) Unlock ()
+	type @"qpid.apache.org/proton/go/internal".FirstError struct { @"qpid.apache.org/proton/go/internal".err error; @"qpid.apache.org/proton/go/internal".lock @"sync".Mutex }
+	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Get () (? error)
+	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Set (@"qpid.apache.org/proton/go/internal".err·3 error) (? error)
+	type @"net".Addr interface { Network() (? string); String() (? string) }
+	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
+	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
+	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
+	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
+	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
+	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
+	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
+	type @"time".Duration int64
+	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
+	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
+	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
+	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
+	func (@"time".d·2 @"time".Duration) String () (? string)
+	type @"time".Month int
+	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
+	type @"time".Weekday int
+	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
+	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
+	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
+	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
+	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
+	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
+	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
+	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
+	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
+	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
+	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
+	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
+	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
+	type @"net".Conn interface { Close() (? error); LocalAddr() (? @"net".Addr); Read(@"net".b []byte) (@"net".n int, @"net".err error); RemoteAddr() (? @"net".Addr); SetDeadline(@"net".t @"time".Time) (? error); SetReadDeadline(@"net".t @"time".Time) (? error); SetWriteDeadline(@"net".t @"time".Time) (? error); Write(@"net".b []byte) (@"net".n int, @"net".err error) }
+	type @""._Ctype_struct_pn_transport_t struct {}
+	type @""._Ctype_struct_pn_collector_t struct {}
+	type @"".bufferChan struct { @"".buffers chan []byte; @"".buf1 []byte; @"".buf2 []byte }
+	func (@"".b·2 *@"".bufferChan) @"".buffer () (? []byte) { @"".b·2.@"".buf1, @"".b·2.@"".buf2 = @"".b·2.@"".buf2, @"".b·2.@"".buf1; return @"".b·2.@"".buf1[:cap(@"".b·2.@"".buf1)] }
+	type @"sync".Once struct { @"sync".m @"sync".Mutex; @"sync".done uint32 }
+	func (@"sync".o·1 *@"sync".Once) Do (@"sync".f·2 func() "esc:0x0")
+	type @"".Pump struct { @"".err @"qpid.apache.org/proton/go/internal".FirstError; @"".inject chan func(); @"".conn @"net".Conn; @"".connection @"".Connection; @"".transport *@""._Ctype_struct_pn_transport_t; @"".collector *@""._Ctype_struct_pn_collector_t; @"".read *@"".bufferChan; @"".write *@"".bufferChan; @"".handlers []@"".EventHandler; @"".running chan struct {}; @"".closeOnce @"sync".Once }
+	func (@"".p·1 *@"".Pump) Close (@"".err·2 error)
+	func (@"".p·2 *@"".Pump "esc:0x1") Connection () (? @"".Connection) { return @"".p·2.@"".connection }
+	func (@"".p·2 *@"".Pump) Error () (? error)
+	func (@"".p·2 *@"".Pump) Id () (? string)
+	func (@"".p·2 *@"".Pump) Inject (@"".f·3 func()) (? error)
+	func (@"".p·2 *@"".Pump) InjectWait (@"".f·3 func()) (@"".err·1 error)
+	func (@"".p·1 *@"".Pump) Run ()
+	func (@"".p·1 *@"".Pump "esc:0x0") Server ()
+	func (@"".p·2 *@"".Pump) String () (? string)
+	func (@"".p·2 *@"".Pump "esc:0x0") @"".handle (@"".e·3 @"".Event) (? error)
+	func (@"".p·1 *@"".Pump "esc:0x0") @"".pop (@"".buf·2 *[]byte)
+	func (@"".p·2 *@"".Pump "esc:0x0") @"".process () (? error)
+	func (@"".p·1 *@"".Pump "esc:0x0") @"".push (@"".buf·2 []byte "esc:0x0")
+	type @""._Ctype_struct_pn_link_t struct {}
+	type @""._Ctype_struct_pn_delivery_t struct {}
+	type @"qpid.apache.org/proton/go/amqp".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"qpid.apache.org/proton/go/amqp".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGr
 oupId(? string); SetGroupSequence(? int32); SetInferred(? bool); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
+	type @""._Ctype_size_t uint64
+	type @""._Ctype_char int8
+	type @""._Ctype_struct___0 struct { @"".size @""._Ctype_size_t; @"".start *@""._Ctype_char }
+	type @"".DeliveryTag struct { @"".pn @""._Ctype_struct___0 }
+	func (@"".t·2 @"".DeliveryTag) String () (? string)
+	type @""._Ctype_struct_pn_disposition_t struct {}
+	type @""._Ctype_struct_pn_condition_t struct {}
+	type @""._Ctype_struct_pn_data_t struct {}
+	type @"".Data struct { @"".pn *@""._Ctype_struct_pn_data_t }
+	func (@"".d·1 @"".Data "esc:0x0") Clear ()
+	func (@"".d·2 @"".Data "esc:0x0") Error () (? error)
+	func (@"".d·1 @"".Data "esc:0x0") Free ()
+	func (@"".d·2 @"".Data "esc:0x2") Pointer () (? @"unsafe".Pointer) { return @"unsafe".Pointer(@"".d·2.@"".pn) }
+	func (@"".d·1 @"".Data "esc:0x0") Rewind ()
+	type @"".Condition struct { @"".pn *@""._Ctype_struct_pn_condition_t }
+	func (@"".c·1 @"".Condition "esc:0x0") Clear ()
+	func (@"".c·2 @"".Condition "esc:0x0") Description () (? string)
+	func (@"".c·2 @"".Condition "esc:0x0") Error () (? error)
+	func (@"".c·2 @"".Condition "esc:0x0") Info () (? @"".Data)
+	func (@"".c·2 @"".Condition "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
+	func (@"".c·2 @"".Condition "esc:0x0") IsRedirect () (? bool)
+	func (@"".c·2 @"".Condition "esc:0x0") IsSet () (? bool)
+	func (@"".c·2 @"".Condition "esc:0x0") Name () (? string)
+	func (@"".c·2 @"".Condition "esc:0x0") RedirectHost () (? string)
+	func (@"".c·2 @"".Condition "esc:0x0") RedirectPort () (? int)
+	func (@"".c·2 @"".Condition "esc:0x0") SetDescription (@"".description·3 string "esc:0x0") (? int)
+	func (@"".c·1 @"".Condition "esc:0x0") SetError (@"".err·2 error)
+	func (@"".c·2 @"".Condition "esc:0x0") SetName (@"".name·3 string "esc:0x0") (? int)
+	type @"".Disposition struct { @"".pn *@""._Ctype_struct_pn_disposition_t }
+	func (@"".d·2 @"".Disposition "esc:0x0") Annotations () (? @"".Data)
+	func (@"".d·2 @"".Disposition "esc:0x0") Condition () (? @"".Condition)
+	func (@"".d·2 @"".Disposition "esc:0x0") Data () (? @"".Data)
+	func (@"".d·2 @"".Disposition "esc:0x0") IsFailed () (? bool)
+	func (@"".d·2 @"".Disposition "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
+	func (@"".d·2 @"".Disposition "esc:0x0") IsUndeliverable () (? bool)
+	func (@"".d·2 @"".Disposition "esc:0x0") SectionNumber () (? uint16)
+	func (@"".d·2 @"".Disposition "esc:0x0") SectionOffset () (? uint64)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetFailed (@"".failed·2 bool)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionNumber (@"".section_number·2 uint16)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionOffset (@"".section_offset·2 uint64)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetUndeliverable (@"".undeliverable·2 bool)
+	func (@"".d·2 @"".Disposition "esc:0x0") Type () (? uint64)
+	type @"".Delivery struct { @"".pn *@""._Ctype_struct_pn_delivery_t }
+	func (@"".d·1 @"".Delivery "esc:0x0") Accept ()
+	func (@"".d·2 @"".Delivery "esc:0x0") Buffered () (? bool)
+	func (@"".d·1 @"".Delivery "esc:0x0") Clear ()
+	func (@"".d·2 @"".Delivery "esc:0x0") Current () (? bool)
+	func (@"".d·1 @"".Delivery "esc:0x0") Dump ()
+	func (@"".d·2 @"".Delivery "esc:0x0") HasMessage () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
+	func (@"".d·2 @"".Delivery "esc:0x0") Link () (? @"".Link)
+	func (@"".d·2 @"".Delivery "esc:0x0") Local () (? @"".Disposition)
+	func (@"".d·2 @"".Delivery "esc:0x0") LocalState () (? uint64)
+	func (@"".delivery·3 @"".Delivery "esc:0x0") Message () (@"".m·1 @"qpid.apache.org/proton/go/amqp".Message, @"".err·2 error)
+	func (@"".d·2 @"".Delivery "esc:0x0") Partial () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Pending () (? uint)
+	func (@"".d·2 @"".Delivery "esc:0x0") Readable () (? bool)
+	func (@"".d·1 @"".Delivery "esc:0x0") Reject ()
+	func (@"".d·1 @"".Delivery "esc:0x0") Release (@"".delivered·2 bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Remote () (? @"".Disposition)
+	func (@"".d·2 @"".Delivery "esc:0x0") RemoteState () (? uint64)
+	func (@"".d·1 @"".Delivery "esc:0x0") Settle ()
+	func (@"".d·1 @"".Delivery "esc:0x0") SettleAs (@"".disposition·2 uint64)
+	func (@"".d·2 @"".Delivery "esc:0x0") Settled () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Tag () (? @"".DeliveryTag)
+	func (@"".d·1 @"".Delivery "esc:0x0") Update (@"".state·2 uint64)
+	func (@"".d·2 @"".Delivery "esc:0x0") Updated () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Writable () (? bool)
+	type @"".State uint8
+	func (@"".s·2 @"".State) Is (@"".bits·3 @"".State) (? bool) { return @"".s·2 & @"".bits·3 != @"".State(0x0) }
+	func (@"".s·2 @"".State) Local () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x7)) }
+	func (@"".s·2 @"".State) Remote () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x38)) }
+	type @""._Ctype_struct_pn_session_t struct {}
+	type @"".Session struct { @"".pn *@""._Ctype_struct_pn_session_t }
+	func (@"".s·1 @"".Session "esc:0x0") Close ()
+	func (@"".s·2 @"".Session "esc:0x0") Condition () (? @"".Condition)
+	func (@"".s·2 @"".Session "esc:0x0") Connection () (? @"".Connection)
+	func (@"".s·2 @"".Session "esc:0x0") Error () (? error)
+	func (@"".s·1 @"".Session "esc:0x0") Free ()
+	func (@"".s·2 @"".Session "esc:0x0") IncomingBytes () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") IncomingCapacity () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") IsNil () (? bool) { return @"".s·2.@"".pn == nil }
+	func (@"".s·2 @"".Session "esc:0x0") Next (@"".state·3 @"".State) (? @"".Session)
+	func (@"".s·1 @"".Session "esc:0x0") Open ()
+	func (@"".s·2 @"".Session "esc:0x0") OutgoingBytes () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") OutgoingWindow () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") Receiver (@"".name·3 string "esc:0x0") (? @"".Link)
+	func (@"".s·2 @"".Session "esc:0x0") RemoteCondition () (? @"".Condition)
+	func (@"".s·2 @"".Session "esc:0x0") Sender (@"".name·3 string "esc:0x0") (? @"".Link)
+	func (@"".s·1 @"".Session "esc:0x0") SetIncomingCapacity (@"".capacity·2 uint)
+	func (@"".s·1 @"".Session "esc:0x0") SetOutgoingWindow (@"".window·2 uint)
+	func (@"".s·2 @"".Session "esc:0x0") State () (? @"".State)
+	func (@"".s·2 @"".Session) String () (? string)
+	type @""._Ctype_struct_pn_terminus_t struct {}
+	type @"".TerminusType uint32
+	func (@"".e·2 @"".TerminusType) String () (? string)
+	type @"".DistributionMode uint32
+	func (@"".e·2 @"".DistributionMode) String () (? string)
+	type @"".Durability uint32
+	func (@"".e·2 @"".Durability) String () (? string)
+	type @"".ExpiryPolicy uint32
+	func (@"".e·2 @"".ExpiryPolicy) String () (? string)
+	type @"".Terminus struct { @"".pn *@""._Ctype_struct_pn_terminus_t }
+	func (@"".t·2 @"".Terminus "esc:0x0") Address () (? string)
+	func (@"".t·2 @"".Terminus "esc:0x0") Capabilities () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") Copy (@"".src·3 @"".Terminus "esc:0x0") (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") Durability () (? @"".Durability)
+	func (@"".t·2 @"".Terminus "esc:0x0") ExpiryPolicy () (? @"".ExpiryPolicy)
+	func (@"".t·2 @"".Terminus "esc:0x0") Filter () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") IsDynamic () (? bool)
+	func (@"".t·2 @"".Terminus "esc:0x0") IsNil () (? bool) { return @"".t·2.@"".pn == nil }
+	func (@"".t·2 @"".Terminus "esc:0x0") Outcomes () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") Properties () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetAddress (@"".address·3 string "esc:0x0") (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetDistributionMode (@"".mode·3 @"".DistributionMode) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetDurability (@"".durability·3 @"".Durability) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetDynamic (@"".dynamic·3 bool) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetExpiryPolicy (@"".policy·3 @"".ExpiryPolicy) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetTimeout (@"".timeout·3 @"time".Duration) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetType (@"".type_·3 @"".TerminusType) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") Timeout () (? @"time".Duration)
+	func (@"".t·2 @"".Terminus "esc:0x0") Type () (? @"".TerminusType)
+	type @"".SndSettleMode uint32
+	func (@"".e·2 @"".SndSettleMode) String () (? string)
+	type @"".RcvSettleMode uint32
+	func (@"".e·2 @"".RcvSettleMode) String () (? string)
+	type @"".Link struct { @"".pn *@""._Ctype_struct_pn_link_t }
+	func (@"".l·2 @"".Link "esc:0x0") Advance () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") Available () (? int)
+	func (@"".l·1 @"".Link "esc:0x0") Close ()
+	func (@"".l·2 @"".Link "esc:0x0") Condition () (? @"".Condition)
+	func (@"".l·2 @"".Link "esc:0x0") Credit () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") Current () (? @"".Delivery)
+	func (@"".l·2 @"".Link "esc:0x0") Delivery (@"".tag·3 string "esc:0x0") (? @"".Delivery)
+	func (@"".l·1 @"".Link "esc:0x0") Detach ()
+	func (@"".l·1 @"".Link "esc:0x0") Drain (@"".credit·2 int)
+	func (@"".l·2 @"".Link "esc:0x0") Drained () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") Draining () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") Error () (? error)
+	func (@"".l·1 @"".Link "esc:0x0") Flow (@"".credit·2 int)
+	func (@"".l·1 @"".Link "esc:0x0") Free ()
+	func (@"".l·2 @"".Link "esc:0x0") IsDrain () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") IsNil () (? bool) { return @"".l·2.@"".pn == nil }
+	func (@"".l·2 @"".Link "esc:0x0") IsReceiver () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") IsSender () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") Name () (? string)
+	func (@"".l·2 @"".Link "esc:0x0") Next (@"".state·3 @"".State) (? @"".Link)
+	func (@"".l·1 @"".Link "esc:0x0") Offered (@"".credit·2 int)
+	func (@"".l·1 @"".Link "esc:0x0") Open ()
+	func (@"".l·2 @"".Link "esc:0x0") Queued () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") RcvSettleMode () (? @"".RcvSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") Recv (@"".buf·3 []byte "esc:0x0") (? int)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteCondition () (? @"".Condition)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteCredit () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteRcvSettleMode () (? @"".RcvSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteSndSettleMode () (? @"".SndSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteSource () (? @"".Terminus)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteTarget () (? @"".Terminus)
+	func (@"".link·3 @"".Link "esc:0x0") Send (@"".m·4 @"qpid.apache.org/proton/go/amqp".Message) (? @"".Delivery, ? error)
+	func (@"".l·2 @"".Link "esc:0x0") SendBytes (@"".bytes·3 []byte "esc:0x0") (? int)
+	func (@"".l·2 @"".Link "esc:0x0") Session () (? @"".Session)
+	func (@"".l·1 @"".Link "esc:0x0") SetDrain (@"".drain·2 bool)
+	func (@"".l·1 @"".Link "esc:0x0") SetRcvSettleMode (@"".mode·2 @"".RcvSettleMode)
+	func (@"".l·1 @"".Link "esc:0x0") SetSndSettleMode (@"".mode·2 @"".SndSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") SndSettleMode () (? @"".SndSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") Source () (? @"".Terminus)
+	func (@"".l·2 @"".Link "esc:0x0") State () (? @"".State)
+	func (@"".l·2 @"".Link "esc:0x0") String () (? string)
+	func (@"".l·2 @"".Link "esc:0x0") Target () (? @"".Terminus)
+	func (@"".l·2 @"".Link "esc:0x0") Unsettled () (? int)
+	type @"".Connection struct { @"".pn *@""._Ctype_struct_pn_connection_t }
+	func (@"".c·1 @"".Connection "esc:0x0") Close ()
+	func (@"".c·2 @"".Connection "esc:0x0") Condition () (? @"".Condition)
+	func (@"".c·2 @"".Connection "esc:0x0") Container () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") DesiredCapabilities () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") Error () (? error)
+	func (@"".c·1 @"".Connection "esc:0x0") Free ()
+	func (@"".c·2 @"".Connection "esc:0x0") Hostname () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
+	func (@"".c·2 @"".Connection "esc:0x0") LinkHead (@"".s·3 @"".State) (? @"".Link)
+	func (@"".c·2 @"".Connection "esc:0x0") Links (@"".state·3 @"".State) (@"".links·1 []@"".Link)
+	func (@"".c·2 @"".Connection "esc:0x0") OfferedCapabilities () (? @"".Data)
+	func (@"".c·1 @"".Connection "esc:0x0") Open ()
+	func (@"".c·2 @"".Connection "esc:0x0") Properties () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") Pump () (? *@"".Pump)
+	func (@"".c·1 @"".Connection "esc:0x0") Release ()
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteCondition () (? @"".Condition)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteContainer () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteDesiredCapabilities () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteHostname () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteOfferedCapabilities () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteProperties () (? @"".Data)
+	func (@"".c·1 @"".Connection "esc:0x0") Reset ()
+	func (@"".c·3 @"".Connection "esc:0x0") Session () (? @"".Session, ? error)
+	func (@"".c·2 @"".Connection "esc:0x0") SessionHead (@"".s·3 @"".State) (? @"".Session)
+	func (@"".c·2 @"".Connection "esc:0x0") Sessions (@"".state·3 @"".State) (@"".sessions·1 []@"".Session)
+	func (@"".c·1 @"".Connection "esc:0x0") SetContainer (@"".container·2 string "esc:0x0")
+	func (@"".c·1 @"".Connection "esc:0x0") SetHostname (@"".hostname·2 string "esc:0x0")
+	func (@"".c·1 @"".Connection "esc:0x0") SetPassword (@"".password·2 string "esc:0x0")
+	func (@"".c·1 @"".Connection "esc:0x0") SetUser (@"".user·2 string "esc:0x0")
+	func (@"".c·2 @"".Connection "esc:0x0") State () (? @"".State)
+	func (@"".c·2 @"".Connection "esc:0x0") String () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") User () (? string)
+	type @"".Event struct { @"".pn *@""._Ctype_struct_pn_event_t; @"".eventType @"".EventType; @"".connection @"".Connection; @"".session @"".Session; @"".link @"".Link; @"".delivery @"".Delivery }
+	func (@"".e·2 @"".Event "esc:0x2") Connection () (? @"".Connection) { return @"".e·2.@"".connection }
+	func (@"".e·2 @"".Event "esc:0x2") Delivery () (? @"".Delivery) { return @"".e·2.@"".delivery }
+	func (@"".e·2 @"".Event "esc:0x0") IsNil () (? bool) { return @"".e·2.@"".eventType == @"".EventType(0x0) }
+	func (@"".e·2 @"".Event "esc:0x2") Link () (? @"".Link) { return @"".e·2.@"".link }
+	func (@"".e·2 @"".Event "esc:0x2") Session () (? @"".Session) { return @"".e·2.@"".session }
+	func (@"".e·2 @"".Event "esc:0x0") String () (? string)
+	func (@"".e·2 @"".Event "esc:0x0") Type () (? @"".EventType) { return @"".e·2.@"".eventType }
+	type @"".EventHandler interface { HandleEvent(@"".e @"".Event) (? error) }
+	type @"".MessagingEventType int
+	func (@"".t·2 @"".MessagingEventType) String () (? string)
+	type @"".MessagingHandler interface { HandleMessagingEvent(? @"".MessagingEventType, ? @"".Event) (? error) }
+	const @"".MStart @"".MessagingEventType = 0x0
+	const @"".MConnectionError @"".MessagingEventType = 0x1
+	const @"".MSessionError @"".MessagingEventType = 0x2
+	const @"".MLinkError @"".MessagingEventType = 0x3
+	const @"".MConnectionOpening @"".MessagingEventType = 0x4
+	const @"".MSessionOpening @"".MessagingEventType = 0x5
+	const @"".MLinkOpening @"".MessagingEventType = 0x6
+	const @"".MConnectionOpened @"".MessagingEventType = 0x7
+	const @"".MSessionOpened @"".MessagingEventType = 0x8
+	const @"".MLinkOpened @"".MessagingEventType = 0x9
+	const @"".MConnectionClosing @"".MessagingEventType = 0xA
+	const @"".MSessionClosing @"".MessagingEventType = 0xB
+	const @"".MLinkClosing @"".MessagingEventType = 0xC
+	const @"".MConnectionClosed @"".MessagingEventType = 0xD
+	const @"".MSessionClosed @"".MessagingEventType = 0xE
+	const @"".MLinkClosed @"".MessagingEventType = 0xF
+	const @"".MConnectionDisconnected @"".MessagingEventType = 0x10
+	const @"".MSessionDisconnected @"".MessagingEventType = 0x11
+	const @"".MLinkDisconnected @"".MessagingEventType = 0x12
+	const @"".MSendable @"".MessagingEventType = 0x13
+	const @"".MAccepted @"".MessagingEventType = 0x14
+	const @"".MRejected @"".MessagingEventType = 0x15
+	const @"".MReleased @"".MessagingEventType = 0x16
+	const @"".MSettled @"".MessagingEventType = 0x17
+	const @"".MMessage @"".MessagingEventType = 0x18
+	const @"".MFinal @"".MessagingEventType = 0x19
+	type @"".Endpoint interface { Close(); Condition() (? @"".Condition); Open(); RemoteCondition() (? @"".Condition); State() (? @"".State); String() (? string) }
+	type @"".endpointDelegator struct { @"".remoteOpen @"".EventType; @"".remoteClose @"".EventType; @"".localOpen @"".EventType; @"".localClose @"".EventType; @"".opening @"".MessagingEventType; @"".opened @"".MessagingEventType; @"".closing @"".MessagingEventType; @"".closed @"".MessagingEventType; @"".error @"".MessagingEventType; @"".endpoint func(? @"".Event) (? @"".Endpoint); @"".delegate @"".MessagingHandler }
+	func (@"".d·2 @"".endpointDelegator) HandleEvent (@"".e·3 @"".Event) (@"".err·1 error)
+	type @"".MessagingDelegator struct { @"".delegate @"".MessagingHandler; @"".connection @"".endpointDelegator; @"".session @"".endpointDelegator; @"".link @"".endpointDelegator; @"".handshaker @"".EventHandler; @"".flowcontroller @"".EventHandler; AutoSettle bool; AutoAccept bool; Prefetch int; PeerCloseError bool }
+	func (@"".d·2 *@"".MessagingDelegator) HandleEvent (@"".e·3 @"".Event) (? error)
+	func (@"".d·2 *@"".MessagingDelegator) @"".incoming (@"".e·3 @"".Event) (@"".err·1 error)
+	func (@"".d·2 *@"".MessagingDelegator) @"".outgoing (@"".e·3 @"".Event) (@"".err·1 error)
+	func @"".NewMessagingDelegator (@"".h·2 @"".MessagingHandler) (? *@"".MessagingDelegator)
+	func @"".NewPump (@"".conn·3 @"net".Conn, @"".handlers·4 ...@"".EventHandler) (? *@"".Pump, ? error)
+	func @"".NewData (@"".p·2 @"unsafe".Pointer "esc:0x2") (? @"".Data) { return (@"".Data{ @"".pn:(*@""._Ctype_struct_pn_data_t)(@"".p·2) }) }
+	const @"".SLocalUninit @"".State = 0x1
+	const @"".SLocalActive = 0x2
+	const @"".SLocalClosed = 0x4
+	const @"".SRemoteUninit = 0x8
+	const @"".SRemoteActive = 0x10
+	const @"".SRemoteClosed = 0x20
+	func @"".CloseError (@"".e·1 @"".Endpoint, @"".err·2 error)
+	const @"".Received uint64 = 0x23
+	const @"".Accepted = 0x24
+	const @"".Rejected = 0x25
+	const @"".Released = 0x26
+	const @"".Modified = 0x27
+	const @"".EConnectionInit @"".EventType = 0x5
+	const @"".EConnectionBound @"".EventType = 0x6
+	const @"".EConnectionUnbound @"".EventType = 0x7
+	const @"".EConnectionLocalOpen @"".EventType = 0x8
+	const @"".EConnectionRemoteOpen @"".EventType = 0x9
+	const @"".EConnectionLocalClose @"".EventType = 0xA
+	const @"".EConnectionRemoteClose @"".EventType = 0xB
+	const @"".EConnectionFinal @"".EventType = 0xC
+	const @"".ESessionInit @"".EventType = 0xD
+	const @"".ESessionLocalOpen @"".EventType = 0xE
+	const @"".ESessionRemoteOpen @"".EventType = 0xF
+	const @"".ESessionLocalClose @"".EventType = 0x10
+	const @"".ESessionRemoteClose @"".EventType = 0x11
+	const @"".ESessionFinal @"".EventType = 0x12
+	const @"".ELinkInit @"".EventType = 0x13
+	const @"".ELinkLocalOpen @"".EventType = 0x14
+	const @"".ELinkRemoteOpen @"".EventType = 0x15
+	const @"".ELinkLocalClose @"".EventType = 0x16
+	const @"".ELinkRemoteClose @"".EventType = 0x17
+	const @"".ELinkLocalDetach @"".EventType = 0x18
+	const @"".ELinkRemoteDetach @"".EventType = 0x19
+	const @"".ELinkFlow @"".EventType = 0x1A
+	const @"".ELinkFinal @"".EventType = 0x1B
+	const @"".EDelivery @"".EventType = 0x1C
+	const @"".ETransport @"".EventType = 0x1D
+	const @"".ETransportAuthenticated @"".EventType = 0x1E
+	const @"".ETransportError @"".EventType = 0x1F
+	const @"".ETransportHeadClosed @"".EventType = 0x20
+	const @"".ETransportTailClosed @"".EventType = 0x21
+	const @"".ETransportClosed @"".EventType = 0x22
+	const @"".PnSndUnsettled @"".SndSettleMode = 0x0
+	const @"".PnSndSettled @"".SndSettleMode = 0x1
+	const @"".PnSndMixed @"".SndSettleMode = 0x2
+	const @"".PnRcvFirst @"".RcvSettleMode = 0x0
+	const @"".PnRcvSecond @"".RcvSettleMode = 0x1
+	const @"".PnUnspecified @"".TerminusType = 0x0
+	const @"".PnSource @"".TerminusType = 0x1
+	const @"".PnTarget @"".TerminusType = 0x2
+	const @"".PnCoordinator @"".TerminusType = 0x3
+	const @"".PnNondurable @"".Durability = 0x0
+	const @"".PnConfiguration @"".Durability = 0x1
+	const @"".PnDeliveries @"".Durability = 0x2
+	const @"".PnExpireWithLink @"".ExpiryPolicy = 0x0
+	const @"".PnExpireWithSession @"".ExpiryPolicy = 0x1
+	const @"".PnExpireWithConnection @"".ExpiryPolicy = 0x2
+	const @"".PnExpireNever @"".ExpiryPolicy = 0x3
+	const @"".PnDistModeUnspecified @"".DistributionMode = 0x0
+	const @"".PnDistModeCopy @"".DistributionMode = 0x1
+	const @"".PnDistModeMove @"".DistributionMode = 0x2
+	func @"".init ()
+	var @"time".months [12]string
+	var @"time".days [7]string
+	var @"time".Local *@"time".Location
+	var @"time".UTC *@"time".Location
+	const @""._Cconst_PN_LOCAL_MASK = 0x7
+	const @""._Cconst_PN_REMOTE_MASK = 0x38
+
+$$
+_go_.6          0           0     0     644     981748    `
+go object linux amd64 go1.4.2 X:precisestack
+
+!
+go13ldruntime/cgo.asyscall.aHqpid.apache.org/proton/go/internal.a@qpid.apache.org/proton/go/amqp.a
+fmt.aio.a
+net.aos.apath.async.areflect.atime.a�""._Cgo_ptr H�\$H�\$� "".~r1&type.unsafe.Pointer"".ptr&type.unsafe.PointerTgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9fhqpid.apache.org/proton/go/event/_obj/_cgo_gotypes.go�"""._Cfunc_CString��dH�%H;aw���H��PH�\$`H��H�$H�H���H�t$H�t$ H�t$H����H��@H��@H�L$HH�T$XH�L$`H�D$@H�L$0H9�}H��H�t$8H�4$H�T$(H�T$H�D$�H�D$`H�\$H��t%H=@sH��H�\$ H�\$hH��P����׉�t���
+ 0runtime.morestack_noctxtR.""._cgo_runtime_cmalloc`
+�runtime.memmove�$runtime.panicindex0�"".autotmp_0015type.uintptr"".autotmp_0014type.int"".autotmp_0013Otype.string"".autotmp_0012/type.[]uint8"".autotmp_0011type.int
+"".ppo.type.*[1073741824]uint8"".p_&type.unsafe.Pointer"".~r1 (type.*""._Ctype_char"".stype.string�����$�[0b3Tgclocals·d7e8a62d22b1cde6d92b17a55c33fe8fTgclocals·283619d6755c7337ece602447ba790ff�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�$""._Cfunc_GoString��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�H���H�L$H�D$H�L$(H�D$0H���
+ 0runtime.morestack_noctxtp0""._cgo_runtime_gostring~
+00"".~r1type.string"".p(type.*""._Ctype_char0?/`�,4
+?!Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�&""._Cfunc_GoStringN��dH�%H;aw���H�� H�D$8H�D$@H�\$(H�$Hc\$0H�\$H�H���H�L$H�D$H�L$8H�D$@H�� �
+ 0runtime.morestack_noctxt�2""._cgo_runtime_gostringn�
+@@"".~r2 type.string"".l$type.""._Ctype_int"".p(type.*""._Ctype_char@I?
p�,D
+I'Tgclocals·6a2e5ab2d393a1bfd331903fbd0fd425Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�""._Cfunc_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN>""._cgo_6c239f814c3a_Cfunc_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0&type.unsafe.Pointer0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/� ""._Cfunc_memcpy��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLB""._cgo_6c239f814c3a_Cfunc_memcpyv:""._cgo_runtime_cgocall_errno�
+@0
+"".r10&type.unsafe.Pointer
+"".p2 *type.""._Ctype_size_t
+"".p1&type.unsafe.Pointer
+"".p0&type.unsafe.Pointer0./P�#!
+BTgclocals·a05343871e6f69ae44bc4db2bd3d1078Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�,""._Cfunc_pn_collector��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^N""._cgo_6c239f814c3a_Cfunc_pn_collector�:""._cgo_runtime_cgocall_errno�
+0
+"".r1Jtype.*""._Ctype_struct_pn_collector_t07/`�,!
+KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_collector_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNX""._cgo_6c239f814c3a_Cfunc_pn_collector_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Jtype.*""._Ctype_struct_pn_collector_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_collector_peek��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_collector_peekv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_event_t
+"".p0Jtype.*""._Ctype_struct_pn_collector_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_collector_pop��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDV""._cgo_6c239f814c3a_Cfunc_pn_collector_popn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Jtype.*""._Ctype_struct_pn_collector_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_condition_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_condition_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�L""._Cfunc_pn_condition_get_description��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLn""._cgo_6c239f814c3a_Cfunc_pn_condition_get_descriptionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_condition_get_name��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL`""._cgo_6c239f814c3a_Cfunc_pn_condition_get_namev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_condition_info��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_condition_infov:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_condition_is_redirect��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDf""._cgo_6c239f814c3a_Cfunc_pn_condition_is_redirectn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_condition_is_set��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_condition_is_setn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_condition_redirect_host��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_6c239f814c3a_Cfunc_pn_condition_redirect_hostv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_condition_redirect_port��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJj""._cgo_6c239f814c3a_Cfunc_pn_condition_redirect_portt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�L""._Cfunc_pn_condition_set_description��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJn""._cgo_6c239f814c3a_Cfunc_pn_condition_set_descriptiont:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_condition_set_name��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJ`""._cgo_6c239f814c3a_Cfunc_pn_condition_set_namet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_connection��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^P""._cgo_6c239f814c3a_Cfunc_pn_connection�:""._cgo_runtime_cgocall_errno�
+0
+"".r1Ltype.*""._Ctype_struct_pn_connection_t07/`�,!
+KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN\""._cgo_6c239f814c3a_Cfunc_pn_connection_closex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_connection_collect��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN`""._cgo_6c239f814c3a_Cfunc_pn_connection_collectx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1Jtype.*""._Ctype_struct_pn_collector_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�B""._Cfunc_pn_connection_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_6c239f814c3a_Cfunc_pn_connection_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�X""._Cfunc_pn_connection_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLz""._cgo_6c239f814c3a_Cfunc_pn_connection_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_connection_errorv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_error_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_connection_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_connection_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�J""._Cfunc_pn_connection_get_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLl""._cgo_6c239f814c3a_Cfunc_pn_connection_get_containerv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_connection_get_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_6c239f814c3a_Cfunc_pn_connection_get_hostnamev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�@""._Cfunc_pn_connection_get_user��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLb""._cgo_6c239f814c3a_Cfunc_pn_connection_get_userv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�X""._Cfunc_pn_connection_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLz""._cgo_6c239f814c3a_Cfunc_pn_connection_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_connection_open��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_connection_openx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_connection_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLf""._cgo_6c239f814c3a_Cfunc_pn_connection_propertiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_connection_release��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN`""._cgo_6c239f814c3a_Cfunc_pn_connection_releasex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�P""._Cfunc_pn_connection_remote_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLr""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�P""._Cfunc_pn_connection_remote_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLr""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_containerv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�f""._Cfunc_pn_connection_remote_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL�""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�N""._Cfunc_pn_connection_remote_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLp""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_hostnamev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�f""._Cfunc_pn_connection_remote_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL�""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�R""._Cfunc_pn_connection_remote_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLt""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_propertiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_reset��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN\""._cgo_6c239f814c3a_Cfunc_pn_connection_resetx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�J""._Cfunc_pn_connection_set_container��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNl""._cgo_6c239f814c3a_Cfunc_pn_connection_set_containerx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_connection_set_hostname��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNj""._cgo_6c239f814c3a_Cfunc_pn_connection_set_hostnamex:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_connection_set_password��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNj""._cgo_6c239f814c3a_Cfunc_pn_connection_set_passwordx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�@""._Cfunc_pn_connection_set_user��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNb""._cgo_6c239f814c3a_Cfunc_pn_connection_set_userx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_state��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJ\""._cgo_6c239f814c3a_Cfunc_pn_connection_statet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r12type.""._Ctype_pn_state_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_data_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_6c239f814c3a_Cfunc_pn_data_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_data_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLP""._cgo_6c239f814c3a_Cfunc_pn_data_errorv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_error_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�,""._Cfunc_pn_data_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNN""._cgo_6c239f814c3a_Cfunc_pn_data_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�0""._Cfunc_pn_data_rewind��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNR""._cgo_6c239f814c3a_Cfunc_pn_data_rewindx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�*""._Cfunc_pn_delivery��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLL""._cgo_6c239f814c3a_Cfunc_pn_deliveryv:""._cgo_runtime_cgocall_errno�
+@0
+"".r10Htype.*""._Ctype_struct_pn_delivery_t
+"".p12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_link_t0./P�#!
+BTgclocals·9d50c2650bd14b076465d970d8016122Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�<""._Cfunc_pn_delivery_buffered��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD^""._cgo_6c239f814c3a_Cfunc_pn_delivery_bufferedn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_delivery_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNX""._cgo_6c239f814c3a_Cfunc_pn_delivery_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_current��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_currentn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_delivery_dump��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNV""._cgo_6c239f814c3a_Cfunc_pn_delivery_dumpx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_delivery_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_6c239f814c3a_Cfunc_pn_delivery_linkv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_link_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_delivery_local��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_delivery_localv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ntype.*""._Ctype_struct_pn_disposition_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�B""._Cfunc_pn_delivery_local_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_6c239f814c3a_Cfunc_pn_delivery_local_statev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_partial��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_partialn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_pending��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_delivery_pendingv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1*type.""._Ctype_size_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�<""._Cfunc_pn_delivery_readable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD^""._cgo_6c239f814c3a_Cfunc_pn_delivery_readablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_delivery_remote��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLZ""._cgo_6c239f814c3a_Cfunc_pn_delivery_remotev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ntype.*""._Ctype_struct_pn_disposition_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_delivery_remote_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLf""._cgo_6c239f814c3a_Cfunc_pn_delivery_remote_statev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_delivery_settle��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_delivery_settlex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_settled��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_settledn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_delivery_tag��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^T""._cgo_6c239f814c3a_Cfunc_pn_delivery_tag�:""._cgo_runtime_cgocall_errno�
+00
+"".r12type.""._Ctype_struct___0
+"".p0Htype.*""._Ctype_struct_pn_delivery_t07/`�,!
+KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_delivery_update��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_delivery_updatex:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1.type.""._Ctype_uint64_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_updated��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_updatedn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�<""._Cfunc_pn_delivery_writable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD^""._cgo_6c239f814c3a_Cfunc_pn_delivery_writablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_disposition_annotations��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_6c239f814c3a_Cfunc_pn_disposition_annotationsv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_disposition_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLf""._cgo_6c239f814c3a_Cfunc_pn_disposition_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_disposition_data��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_disposition_datav:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_get_section_number��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJx""._cgo_6c239f814c3a_Cfunc_pn_disposition_get_section_numbert:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint32_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_get_section_offset��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLx""._cgo_6c239f814c3a_Cfunc_pn_disposition_get_section_offsetv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_disposition_is_failed��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDf""._cgo_6c239f814c3a_Cfunc_pn_disposition_is_failedn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�R""._Cfunc_pn_disposition_is_undeliverable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDt""._cgo_6c239f814c3a_Cfunc_pn_disposition_is_undeliverablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�F""._Cfunc_pn_disposition_set_failed��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNh""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_failedx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_set_section_number��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNx""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_section_numberx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1.type.""._Ctype_uint32_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_set_section_offset��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNx""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_section_offsetx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1.type.""._Ctype_uint64_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�T""._Cfunc_pn_disposition_set_undeliverable��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNv""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_undeliverablex:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�	$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_disposition_type��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_disposition_typev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�	#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�"""._Cfunc_pn_dtag��dH�%H;aw���H��H�D$0H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^D""._cgo_6c239f814c3a_Cfunc_pn_dtag�:""._cgo_runtime_cgocall_errno�
+@0
+"".r1 2type.""._Ctype_struct___0
+"".p1*type.""._Ctype_size_t
+"".p0(type.*""._Ctype_char07/`�	,!
+KTgclocals·2ab34f76b7fe498424f2c49491d7ce91Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_event_connection��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_event_connectionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ltype.*""._Ctype_struct_pn_connection_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_event_delivery��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_event_deliveryv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Htype.*""._Ctype_struct_pn_delivery_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_event_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLP""._cgo_6c239f814c3a_Cfunc_pn_event_linkv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_link_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_event_session��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_6c239f814c3a_Cfunc_pn_event_sessionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ftype.*""._Ctype_struct_pn_session_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_event_type��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJP""._cgo_6c239f814c3a_Cfunc_pn_event_typet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1<type.""._Ctype_pn_event_type_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0-/	P�	"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_flowcontroller��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_flowcontrollerv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ftype.*""._Ctype_struct_pn_handler_t
+"".p0$type.""._Ctype_int0./P�	#!
+BTgclocals·8512b64a8c2de1386e17b894ea692148Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_handler_dispatch��dH�%H;aw���H��H�\$8H�\$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN\""._cgo_6c239f814c3a_Cfunc_pn_handler_dispatchx:""._cgo_runtime_cgocall_errno�
+00
+"".r10&type.""._Ctype_void
+"".p2 <type.""._Ctype_pn_event_type_t
+"".p1Btype.*""._Ctype_struct_pn_event_t
+"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
+C
Tgclocals·72c306c66d827d7caa50958774c351b5Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_handler_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNT""._cgo_6c239f814c3a_Cfunc_pn_handler_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_link_advance��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDT""._cgo_6c239f814c3a_Cfunc_pn_link_advancen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_link_t0*/P�
+!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_link_available��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_6c239f814c3a_Cfunc_pn_link_availablet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
+"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_link_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_6c239f814c3a_Cfunc_pn_link_closex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_link_t0//P�
+$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_link_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_link_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0@type.*""._Ctype_struct_pn_link_t0./P�
+#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�0""._Cfunc_pn_link_credit��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJR""._cgo_6c239f814c3a_Cfunc_pn_link_creditt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
+"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_link_current��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLT""._cgo_6c239f814c3a_Cfunc_pn_link_currentv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Htype.*""._Ctype_struct_pn_delivery_t
+"".p0@type.*""._Ctype_struct_pn_link_t0./P�
+#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�0""._Cfunc_pn_link_detach��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNR""._cgo_6c239f814c3a_Cfunc_pn_link_detachx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_link_t0//P�
+$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_link_drain��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_6c239f814c3a_Cfunc_pn_link_drainx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0//P�
+$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_link_drained��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJT""._cgo_6c239f814c3a_Cfunc_pn_link_drainedt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
+"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_link_draining��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDV""._cgo_6c239f814c3a_Cfunc_pn_link_drainingn:"

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[09/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/event/message.go
----------------------------------------------------------------------
diff --git a/go/event/message.go b/go/event/message.go
new file mode 100644
index 0000000..d900744
--- /dev/null
+++ b/go/event/message.go
@@ -0,0 +1,75 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/internal"
+)
+
+// DecodeMessage decodes the message containined in a delivery event.
+func DecodeMessage(e Event) (m amqp.Message, err error) {
+	defer internal.DoRecover(&err)
+	delivery := e.Delivery()
+	if !delivery.Readable() || delivery.Partial() {
+		return nil, internal.Errorf("attempting to get incomplete message")
+	}
+	data := make([]byte, delivery.Pending())
+	result := delivery.Link().Recv(data)
+	if result != len(data) {
+		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
+	}
+	return amqp.DecodeMessage(data)
+}
+
+// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
+var tags amqp.UidCounter
+
+// Send sends a amqp.Message over a Link.
+// Returns a Delivery that can be use to determine the outcome of the message.
+func (link Link) Send(m amqp.Message) (Delivery, error) {
+	if !link.IsSender() {
+		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
+	}
+	// FIXME aconway 2015-04-08: buffering, error handling
+	delivery := link.Delivery(tags.Next())
+	bytes, err := m.Encode(nil)
+	if err != nil {
+		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
+	}
+	result := link.SendBytes(bytes)
+	link.Advance()
+	if result != len(bytes) {
+		if result < 0 {
+			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
+		} else {
+			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
+		}
+	}
+	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
+		delivery.Settle()
+	}
+	return delivery, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/event/pump.go
----------------------------------------------------------------------
diff --git a/go/event/pump.go b/go/event/pump.go
new file mode 100644
index 0000000..db022ff
--- /dev/null
+++ b/go/event/pump.go
@@ -0,0 +1,357 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/connection.h>
+// #include <proton/transport.h>
+// #include <proton/event.h>
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+// #include <proton/transport.h>
+// #include <proton/session.h>
+// #include <memory.h>
+// #include <stdlib.h>
+//
+// PN_HANDLE(REMOTE_ADDR)
+import "C"
+
+import (
+	"fmt"
+	"io"
+	"net"
+	"qpid.apache.org/proton/go/internal"
+	"sync"
+	"unsafe"
+)
+
+// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
+type bufferChan struct {
+	buffers    chan []byte
+	buf1, buf2 []byte
+}
+
+func newBufferChan(size int) *bufferChan {
+	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
+}
+
+func (b *bufferChan) buffer() []byte {
+	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
+	return b.buf1[:cap(b.buf1)]
+}
+
+// FIXME aconway 2015-05-04: direct sending to Inject may block user goroutines if
+// the pum stops. Make this a function that selects on running.
+
+// FIXME aconway 2015-05-05: for consistency should Pump be called Driver?
+
+/*
+Pump reads from a net.Conn, decodes AMQP events and calls the appropriate
+Handler functions. Actions taken by Handler functions (such as sending messages)
+are encoded and written to the net.Conn.
+
+The proton protocol engine is single threaded (per connection). The Pump runs
+proton in the goroutine that calls Pump.Run() and creates goroutines to feed
+data to/from a net.Conn. You can create multiple Pumps to handle multiple
+connections concurrently.
+
+Methods in this package can only be called in the goroutine that executes the
+corresponding Pump.Run(). You implement the EventHandler or MessagingHandler
+interfaces and provide those values to NewPump(). Their HandleEvent method will be
+called in the Pump goroutine, in typical event-driven style.
+
+Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
+other goroutines, store them, or use them as map indexes. Effectively they are
+just C pointers.  Other goroutines cannot call their methods directly but they
+can can create function closures that call their methods and send those closures
+to the Pump.Inject channel. They will execute safely in the pump
+goroutine. Injected functions, or your handlers, can set up channels to get
+results back to other goroutines.
+
+You are responsible for ensuring you don't use an event value after the C object
+has been deleted. The handler methods will tell you when a value is no longer
+valid. For example after a MethodHandler handles a LinkClosed event, that link
+is no longer valid. If you do Link.Close() yourself (in a handler or injected
+function) the link remains valid until the corresponing LinkClosed event is
+received by the handler.
+
+Pump.Close() will take care of cleaning up any remaining values and types when
+you are done with the Pump. All values associated with a pump become invalid
+when you call Pump.Close()
+
+The qpid.apache.org/proton/go/messaging package will do all this for you, so unless
+you are doing something fairly low-level it is probably a better choice.
+
+*/
+type Pump struct {
+	// Error is set on exit from Run() if there was an error.
+	Error error
+	// Channel to inject functions to be executed in the Pump's proton event loop.
+	Inject chan func()
+
+	conn       net.Conn
+	transport  *C.pn_transport_t
+	connection *C.pn_connection_t
+	collector  *C.pn_collector_t
+	read       *bufferChan    // Read buffers channel.
+	write      *bufferChan    // Write buffers channel.
+	handlers   []EventHandler // Handlers for proton events.
+	running    chan struct{}  // This channel will be closed when the goroutines are done.
+}
+
+const bufferSize = 4096
+
+var pumps map[*C.pn_connection_t]*Pump
+
+func init() {
+	pumps = make(map[*C.pn_connection_t]*Pump)
+}
+
+// NewPump initializes a pump with a connection and handlers. To start it running:
+//    p := NewPump(...)
+//    go run p.Run()
+// The goroutine will exit when the pump is closed or disconnected.
+// You can check for errors on Pump.Error.
+//
+func NewPump(conn net.Conn, handlers ...EventHandler) (*Pump, error) {
+	// Save the connection ID for Connection.String()
+	p := &Pump{
+		Inject:     make(chan func(), 100), // FIXME aconway 2015-05-04: blocking hack
+		conn:       conn,
+		transport:  C.pn_transport(),
+		connection: C.pn_connection(),
+		collector:  C.pn_collector(),
+		handlers:   handlers,
+		read:       newBufferChan(bufferSize),
+		write:      newBufferChan(bufferSize),
+		running:    make(chan struct{}),
+	}
+	if p.transport == nil || p.connection == nil || p.collector == nil {
+		return nil, internal.Errorf("failed to allocate pump")
+	}
+	pnErr := int(C.pn_transport_bind(p.transport, p.connection))
+	if pnErr != 0 {
+		return nil, internal.Errorf("cannot setup pump: %s", internal.PnErrorCode(pnErr))
+	}
+	C.pn_connection_collect(p.connection, p.collector)
+	C.pn_connection_open(p.connection)
+	pumps[p.connection] = p
+	return p, nil
+}
+
+func (p *Pump) String() string {
+	return fmt.Sprintf("(%s-%s)", p.conn.LocalAddr(), p.conn.RemoteAddr())
+}
+
+func (p *Pump) Id() string {
+	return fmt.Sprintf("%p", &p)
+}
+
+// setError sets error only if not already set
+func (p *Pump) setError(e error) {
+	if p.Error == nil {
+		p.Error = e
+	}
+}
+
+// Server puts the Pump in server mode, meaning it will auto-detect security settings on
+// the incoming connnection such as use of SASL and SSL.
+// Must be called before Run()
+//
+func (p *Pump) Server() {
+	C.pn_transport_set_server(p.transport)
+}
+
+func (p *Pump) free() {
+	if p.connection != nil {
+		C.pn_connection_free(p.connection)
+	}
+	if p.transport != nil {
+		C.pn_transport_free(p.transport)
+	}
+	if p.collector != nil {
+		C.pn_collector_free(p.collector)
+	}
+	for _, h := range p.handlers {
+		switch h := h.(type) {
+		case cHandler:
+			C.pn_handler_free(h.pn)
+		}
+	}
+}
+
+// Close closes the AMQP connection, the net.Conn, and stops associated goroutines.
+// It will cause Run() to return. Run() may return earlier if the network disconnects
+// but you must still call Close() to clean everything up.
+//
+// Methods on values associated with the pump (Connections, Sessions, Links) will panic
+// if called after Close()
+//
+func (p *Pump) Close() error {
+	// If the pump is still running, inject a close. Either way wait for it to finish.
+	select {
+	case p.Inject <- func() { C.pn_connection_close(p.connection) }:
+		<-p.running // Wait to finish
+	case <-p.running: // Wait for goroutines to finish
+	}
+	delete(pumps, p.connection)
+	p.free()
+	return p.Error
+}
+
+// Run the pump. Normally called in a goroutine as: go pump.Run()
+// An error dunring Run is stored on p.Error.
+//
+func (p *Pump) Run() {
+	// Signal errors from the read/write goroutines. Don't block if we don't
+	// read all the errors, we only care about the first.
+	error := make(chan error, 2)
+	// FIXME aconway 2015-05-04: 	stop := make(chan struct{}) // Closed to signal that read/write should stop.
+
+	wait := sync.WaitGroup{}
+	wait.Add(2)
+
+	go func() { // Read goroutine
+		defer wait.Done()
+		for {
+			rbuf := p.read.buffer()
+			n, err := p.conn.Read(rbuf)
+			if n > 0 {
+				p.read.buffers <- rbuf[:n]
+			} else if err != nil {
+				close(p.read.buffers)
+				error <- err
+				return
+			}
+		}
+	}()
+
+	go func() { // Write goroutine
+		defer wait.Done()
+		for {
+			wbuf, ok := <-p.write.buffers
+			if !ok {
+				return
+			}
+			_, err := p.conn.Write(wbuf)
+			if err != nil {
+				error <- err
+				return
+			}
+		}
+	}()
+
+	wbuf := p.write.buffer()[:0]
+loop:
+	for {
+		if len(wbuf) == 0 {
+			p.pop(&wbuf)
+		}
+		// Don't set wchan unless there is something to write.
+		var wchan chan []byte
+		if len(wbuf) > 0 {
+			wchan = p.write.buffers
+		}
+
+		select {
+		case buf := <-p.read.buffers: // Read a buffer
+			p.push(buf)
+		case wchan <- wbuf: // Write a buffer
+			wbuf = p.write.buffer()[:0]
+		case f := <-p.Inject: // Function injected from another goroutine
+			f()
+		case err := <-error: // Read or write error
+			p.setError(err)
+			C.pn_transport_close_tail(p.transport)
+			C.pn_transport_close_head(p.transport)
+		}
+		if err := p.process(); err != nil {
+			p.setError(err)
+			break loop
+		}
+	}
+	close(p.write.buffers)
+	p.conn.Close()
+	wait.Wait()
+	close(p.running) // Signal goroutines have exited and Error is set.
+}
+
+func minInt(a, b int) int {
+	if a < b {
+		return a
+	} else {
+		return b
+	}
+}
+
+func (p *Pump) pop(buf *[]byte) {
+	pending := int(C.pn_transport_pending(p.transport))
+	switch {
+	case pending == int(C.PN_EOS):
+		*buf = (*buf)[:]
+		return
+	case pending < 0:
+		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
+	}
+	size := minInt(pending, cap(*buf))
+	*buf = (*buf)[:size]
+	if size == 0 {
+		return
+	}
+	C.memcpy(unsafe.Pointer(&(*buf)[0]), unsafe.Pointer(C.pn_transport_head(p.transport)), C.size_t(size))
+	C.pn_transport_pop(p.transport, C.size_t(size))
+}
+
+func (p *Pump) push(buf []byte) {
+	buf2 := buf
+	for len(buf2) > 0 {
+		n := int(C.pn_transport_push(p.transport, (*C.char)(unsafe.Pointer((&buf2[0]))), C.size_t(len(buf2))))
+		if n <= 0 {
+			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
+		}
+		buf2 = buf2[n:]
+	}
+}
+
+func (p *Pump) handle(e Event) error {
+	for _, h := range p.handlers {
+		if err := h.HandleEvent(e); err != nil {
+			return err
+		}
+	}
+	if e.Type() == ETransportClosed {
+		return io.EOF
+	}
+	return nil
+}
+
+func (p *Pump) process() error {
+	// FIXME aconway 2015-05-04: if a Handler returns error we should stop the pump
+	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
+		e := makeEvent(ce)
+		if err := p.handle(e); err != nil {
+			return err
+		}
+		C.pn_collector_pop(p.collector)
+	}
+	return nil
+}
+
+// Connectoin gets the Pump's connection value.
+func (p *Pump) Connection() Connection { return Connection{p.connection} }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/event/wrappers.go
----------------------------------------------------------------------
diff --git a/go/event/wrappers.go b/go/event/wrappers.go
new file mode 100644
index 0000000..7043b9c
--- /dev/null
+++ b/go/event/wrappers.go
@@ -0,0 +1,253 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+//#include <proton/codec.h>
+//#include <proton/connection.h>
+//#include <proton/session.h>
+//#include <proton/session.h>
+//#include <proton/delivery.h>
+//#include <proton/link.h>
+//#include <proton/event.h>
+//#include <proton/transport.h>
+//#include <proton/link.h>
+//#include <stdlib.h>
+import "C"
+
+import (
+	"fmt"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+// FIXME aconway 2015-05-05: Documentation for generated types.
+
+// Event is an AMQP protocol event.
+type Event struct {
+	pn         *C.pn_event_t
+	eventType  EventType
+	connection Connection
+	session    Session
+	link       Link
+	delivery   Delivery
+}
+
+func makeEvent(pn *C.pn_event_t) Event {
+	return Event{
+		pn:         pn,
+		eventType:  EventType(C.pn_event_type(pn)),
+		connection: Connection{C.pn_event_connection(pn)},
+		session:    Session{C.pn_event_session(pn)},
+		link:       Link{C.pn_event_link(pn)},
+		delivery:   Delivery{C.pn_event_delivery(pn)},
+	}
+}
+func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
+func (e Event) Type() EventType        { return e.eventType }
+func (e Event) Connection() Connection { return e.connection }
+func (e Event) Session() Session       { return e.session }
+func (e Event) Link() Link             { return e.link }
+func (e Event) Delivery() Delivery     { return e.delivery }
+func (e Event) String() string         { return e.Type().String() }
+
+// Data holds a pointer to decoded AMQP data.
+// Use amqp.marshal/unmarshal to access it as Go data types.
+//
+type Data struct{ pn *C.pn_data_t }
+
+func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
+
+func (d Data) Free()                   { C.pn_data_free(d.pn) }
+func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
+func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
+func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
+func (d Data) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
+}
+
+// State holds the state flags for an AMQP endpoint.
+type State byte
+
+const (
+	SLocalUninit  State = C.PN_LOCAL_UNINIT
+	SLocalActive        = C.PN_LOCAL_ACTIVE
+	SLocalClosed        = C.PN_LOCAL_CLOSED
+	SRemoteUninit       = C.PN_REMOTE_UNINIT
+	SRemoteActive       = C.PN_REMOTE_ACTIVE
+	SRemoteClosed       = C.PN_REMOTE_CLOSED
+)
+
+// Is is True if bits & state is non 0.
+func (s State) Is(bits State) bool { return s&bits != 0 }
+
+// Return a State containig just the local flags
+func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
+
+// Return a State containig just the remote flags
+func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
+
+// Endpoint is the common interface for Connection, Link and Session.
+type Endpoint interface {
+	// State is the open/closed state.
+	State() State
+	// Open an endpoint.
+	Open()
+	// Close an endpoint.
+	Close()
+	// Condition holds a local error condition.
+	Condition() Condition
+	// RemoteCondition holds a remote error condition.
+	RemoteCondition() Condition
+}
+
+const (
+	Received uint64 = C.PN_RECEIVED
+	Accepted        = C.PN_ACCEPTED
+	Rejected        = C.PN_REJECTED
+	Released        = C.PN_RELEASED
+	Modified        = C.PN_MODIFIED
+)
+
+// SettleAs is equivalent to d.Update(disposition); d.Settle()
+// It is a no-op if e does not have a delivery.
+func (d Delivery) SettleAs(disposition uint64) {
+	d.Update(disposition)
+	d.Settle()
+}
+
+// Accept accepts and settles a delivery.
+func (d Delivery) Accept() { d.SettleAs(Accepted) }
+
+// Reject rejects and settles a delivery
+func (d Delivery) Reject() { d.SettleAs(Rejected) }
+
+// Release releases and settles a delivery
+// If delivered is true the delivery count for the message will be increased.
+func (d Delivery) Release(delivered bool) {
+	if delivered {
+		d.SettleAs(Modified)
+	} else {
+		d.SettleAs(Released)
+	}
+}
+
+// FIXME aconway 2015-05-05: don't expose DeliveryTag as a C pointer, just as a String?
+
+type DeliveryTag struct{ pn C.pn_delivery_tag_t }
+
+func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
+
+func (l Link) Recv(buf []byte) int {
+	if len(buf) == 0 {
+		return 0
+	}
+	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
+}
+
+func (l Link) SendBytes(bytes []byte) int {
+	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
+}
+
+func pnTag(tag string) C.pn_delivery_tag_t {
+	bytes := []byte(tag)
+	return C.pn_dtag(cPtr(bytes), cLen(bytes))
+}
+
+func (l Link) Delivery(tag string) Delivery {
+	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}
+
+func (s Session) Sender(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_sender(s.pn, cname)}
+}
+
+func (s Session) Receiver(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_receiver(s.pn, cname)}
+}
+
+func joinId(a, b interface{}) string {
+	return fmt.Sprintf("%s/%s", a, b)
+}
+
+// Pump associated with this connection.
+func (c Connection) Pump() *Pump { return pumps[c.pn] }
+
+// Unique (per process) string identifier for a connection, useful for debugging.
+func (c Connection) String() string { return pumps[c.pn].String() }
+
+// Head functions don't follow the normal naming conventions so missed by the generator.
+
+func (c Connection) LinkHead(s State) Link {
+	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
+}
+
+func (c Connection) SessionHead(s State) Session {
+	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
+}
+
+// Unique (per process) string identifier for a session, including connection identifier.
+func (s Session) String() string {
+	return joinId(s.Connection(), fmt.Sprintf("%p", s.pn))
+}
+
+// Unique (per process) string identifier for a link, inlcuding session identifier.
+func (l Link) String() string {
+	return joinId(l.Session(), l.Name())
+}
+
+// Error returns an error interface corresponding to Condition.
+func (c Condition) Error() error {
+	if c.IsNil() {
+		return nil
+	} else {
+		return fmt.Errorf("%s: %s", c.Name(), c.Description())
+	}
+}
+
+// SetIfUnset sets name and description on a condition if it is not already set.
+func (c Condition) SetIfUnset(name, description string) {
+	if !c.IsSet() {
+		c.SetName(name)
+		c.SetDescription(description)
+	}
+}
+
+func (c Connection) Session() (Session, error) {
+	s := Session{C.pn_session(c.pn)}
+	if s.IsNil() {
+		return s, Connection(c).Error()
+	}
+	return s, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/event/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/go/event/wrappers_gen.go b/go/event/wrappers_gen.go
new file mode 100644
index 0000000..73f0d3b
--- /dev/null
+++ b/go/event/wrappers_gen.go
@@ -0,0 +1,732 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// NOTE: This file was generated by genwrap.go, do not edit it by hand.
+//
+
+package event
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+// #include <proton/session.h>
+// #include <proton/link.h>
+// #include <proton/delivery.h>
+// #include <proton/disposition.h>
+// #include <proton/condition.h>
+// #include <proton/terminus.h>
+// #include <proton/connection.h>
+import "C"
+
+type EventType int
+
+const (
+	EConnectionInit         EventType = C.PN_CONNECTION_INIT
+	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
+	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
+	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
+	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
+	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
+	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
+	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
+	ESessionInit            EventType = C.PN_SESSION_INIT
+	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
+	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
+	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
+	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
+	ESessionFinal           EventType = C.PN_SESSION_FINAL
+	ELinkInit               EventType = C.PN_LINK_INIT
+	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
+	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
+	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
+	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
+	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
+	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
+	ELinkFlow               EventType = C.PN_LINK_FLOW
+	ELinkFinal              EventType = C.PN_LINK_FINAL
+	EDelivery               EventType = C.PN_DELIVERY
+	ETransport              EventType = C.PN_TRANSPORT
+	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
+	ETransportError         EventType = C.PN_TRANSPORT_ERROR
+	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
+	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
+	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
+)
+
+func (e EventType) String() string {
+	switch e {
+
+	case C.PN_CONNECTION_INIT:
+		return "ConnectionInit"
+	case C.PN_CONNECTION_BOUND:
+		return "ConnectionBound"
+	case C.PN_CONNECTION_UNBOUND:
+		return "ConnectionUnbound"
+	case C.PN_CONNECTION_LOCAL_OPEN:
+		return "ConnectionLocalOpen"
+	case C.PN_CONNECTION_REMOTE_OPEN:
+		return "ConnectionRemoteOpen"
+	case C.PN_CONNECTION_LOCAL_CLOSE:
+		return "ConnectionLocalClose"
+	case C.PN_CONNECTION_REMOTE_CLOSE:
+		return "ConnectionRemoteClose"
+	case C.PN_CONNECTION_FINAL:
+		return "ConnectionFinal"
+	case C.PN_SESSION_INIT:
+		return "SessionInit"
+	case C.PN_SESSION_LOCAL_OPEN:
+		return "SessionLocalOpen"
+	case C.PN_SESSION_REMOTE_OPEN:
+		return "SessionRemoteOpen"
+	case C.PN_SESSION_LOCAL_CLOSE:
+		return "SessionLocalClose"
+	case C.PN_SESSION_REMOTE_CLOSE:
+		return "SessionRemoteClose"
+	case C.PN_SESSION_FINAL:
+		return "SessionFinal"
+	case C.PN_LINK_INIT:
+		return "LinkInit"
+	case C.PN_LINK_LOCAL_OPEN:
+		return "LinkLocalOpen"
+	case C.PN_LINK_REMOTE_OPEN:
+		return "LinkRemoteOpen"
+	case C.PN_LINK_LOCAL_CLOSE:
+		return "LinkLocalClose"
+	case C.PN_LINK_REMOTE_CLOSE:
+		return "LinkRemoteClose"
+	case C.PN_LINK_LOCAL_DETACH:
+		return "LinkLocalDetach"
+	case C.PN_LINK_REMOTE_DETACH:
+		return "LinkRemoteDetach"
+	case C.PN_LINK_FLOW:
+		return "LinkFlow"
+	case C.PN_LINK_FINAL:
+		return "LinkFinal"
+	case C.PN_DELIVERY:
+		return "Delivery"
+	case C.PN_TRANSPORT:
+		return "Transport"
+	case C.PN_TRANSPORT_AUTHENTICATED:
+		return "TransportAuthenticated"
+	case C.PN_TRANSPORT_ERROR:
+		return "TransportError"
+	case C.PN_TRANSPORT_HEAD_CLOSED:
+		return "TransportHeadClosed"
+	case C.PN_TRANSPORT_TAIL_CLOSED:
+		return "TransportTailClosed"
+	case C.PN_TRANSPORT_CLOSED:
+		return "TransportClosed"
+	}
+	return "Unknown"
+}
+
+// Wrappers for declarations in session.h
+
+type Session struct{ pn *C.pn_session_t }
+
+func (s Session) IsNil() bool { return s.pn == nil }
+func (s Session) Free() {
+	C.pn_session_free(s.pn)
+}
+func (s Session) State() State {
+	return State(C.pn_session_state(s.pn))
+}
+func (s Session) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
+}
+func (s Session) Condition() Condition {
+	return Condition{C.pn_session_condition(s.pn)}
+}
+func (s Session) RemoteCondition() Condition {
+	return Condition{C.pn_session_remote_condition(s.pn)}
+}
+func (s Session) Connection() Connection {
+	return Connection{C.pn_session_connection(s.pn)}
+}
+func (s Session) Open() {
+	C.pn_session_open(s.pn)
+}
+func (s Session) Close() {
+	C.pn_session_close(s.pn)
+}
+func (s Session) IncomingCapacity() uint {
+	return uint(C.pn_session_get_incoming_capacity(s.pn))
+}
+func (s Session) SetIncomingCapacity(capacity uint) {
+	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
+}
+func (s Session) OutgoingBytes() uint {
+	return uint(C.pn_session_outgoing_bytes(s.pn))
+}
+func (s Session) IncomingBytes() uint {
+	return uint(C.pn_session_incoming_bytes(s.pn))
+}
+func (s Session) Next(state State) Session {
+	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
+}
+
+// Wrappers for declarations in link.h
+
+type SndSettleMode C.pn_snd_settle_mode_t
+
+const (
+	PnSndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
+	PnSndSettled   SndSettleMode = C.PN_SND_SETTLED
+	PnSndMixed     SndSettleMode = C.PN_SND_MIXED
+)
+
+func (e SndSettleMode) String() string {
+	switch e {
+
+	case C.PN_SND_UNSETTLED:
+		return "SndUnsettled"
+	case C.PN_SND_SETTLED:
+		return "SndSettled"
+	case C.PN_SND_MIXED:
+		return "SndMixed"
+	}
+	return "unknown"
+}
+
+type RcvSettleMode C.pn_rcv_settle_mode_t
+
+const (
+	PnRcvFirst  RcvSettleMode = C.PN_RCV_FIRST
+	PnRcvSecond RcvSettleMode = C.PN_RCV_SECOND
+)
+
+func (e RcvSettleMode) String() string {
+	switch e {
+
+	case C.PN_RCV_FIRST:
+		return "RcvFirst"
+	case C.PN_RCV_SECOND:
+		return "RcvSecond"
+	}
+	return "unknown"
+}
+
+type Link struct{ pn *C.pn_link_t }
+
+func (l Link) IsNil() bool { return l.pn == nil }
+func (l Link) Free() {
+	C.pn_link_free(l.pn)
+}
+func (l Link) Name() string {
+	return C.GoString(C.pn_link_name(l.pn))
+}
+func (l Link) IsSender() bool {
+	return bool(C.pn_link_is_sender(l.pn))
+}
+func (l Link) IsReceiver() bool {
+	return bool(C.pn_link_is_receiver(l.pn))
+}
+func (l Link) State() State {
+	return State(C.pn_link_state(l.pn))
+}
+func (l Link) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
+}
+func (l Link) Condition() Condition {
+	return Condition{C.pn_link_condition(l.pn)}
+}
+func (l Link) RemoteCondition() Condition {
+	return Condition{C.pn_link_remote_condition(l.pn)}
+}
+func (l Link) Session() Session {
+	return Session{C.pn_link_session(l.pn)}
+}
+func (l Link) Next(state State) Link {
+	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
+}
+func (l Link) Open() {
+	C.pn_link_open(l.pn)
+}
+func (l Link) Close() {
+	C.pn_link_close(l.pn)
+}
+func (l Link) Detach() {
+	C.pn_link_detach(l.pn)
+}
+func (l Link) Source() Terminus {
+	return Terminus{C.pn_link_source(l.pn)}
+}
+func (l Link) Target() Terminus {
+	return Terminus{C.pn_link_target(l.pn)}
+}
+func (l Link) RemoteSource() Terminus {
+	return Terminus{C.pn_link_remote_source(l.pn)}
+}
+func (l Link) RemoteTarget() Terminus {
+	return Terminus{C.pn_link_remote_target(l.pn)}
+}
+func (l Link) Current() Delivery {
+	return Delivery{C.pn_link_current(l.pn)}
+}
+func (l Link) Advance() bool {
+	return bool(C.pn_link_advance(l.pn))
+}
+func (l Link) Credit() int {
+	return int(C.pn_link_credit(l.pn))
+}
+func (l Link) Queued() int {
+	return int(C.pn_link_queued(l.pn))
+}
+func (l Link) RemoteCredit() int {
+	return int(C.pn_link_remote_credit(l.pn))
+}
+func (l Link) IsDrain() bool {
+	return bool(C.pn_link_get_drain(l.pn))
+}
+func (l Link) Drained() int {
+	return int(C.pn_link_drained(l.pn))
+}
+func (l Link) Available() int {
+	return int(C.pn_link_available(l.pn))
+}
+func (l Link) SndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
+}
+func (l Link) RcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
+}
+func (l Link) SetSndSettleMode(mode SndSettleMode) {
+	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
+}
+func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
+	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
+}
+func (l Link) RemoteSndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
+}
+func (l Link) RemoteRcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
+}
+func (l Link) Unsettled() int {
+	return int(C.pn_link_unsettled(l.pn))
+}
+func (l Link) Offered(credit int) {
+	C.pn_link_offered(l.pn, C.int(credit))
+}
+func (l Link) Flow(credit int) {
+	C.pn_link_flow(l.pn, C.int(credit))
+}
+func (l Link) Drain(credit int) {
+	C.pn_link_drain(l.pn, C.int(credit))
+}
+func (l Link) SetDrain(drain bool) {
+	C.pn_link_set_drain(l.pn, C.bool(drain))
+}
+func (l Link) Draining() bool {
+	return bool(C.pn_link_draining(l.pn))
+}
+
+// Wrappers for declarations in delivery.h
+
+type Delivery struct{ pn *C.pn_delivery_t }
+
+func (d Delivery) IsNil() bool { return d.pn == nil }
+func (d Delivery) Tag() DeliveryTag {
+	return DeliveryTag{C.pn_delivery_tag(d.pn)}
+}
+func (d Delivery) Link() Link {
+	return Link{C.pn_delivery_link(d.pn)}
+}
+func (d Delivery) Local() Disposition {
+	return Disposition{C.pn_delivery_local(d.pn)}
+}
+func (d Delivery) LocalState() uint64 {
+	return uint64(C.pn_delivery_local_state(d.pn))
+}
+func (d Delivery) Remote() Disposition {
+	return Disposition{C.pn_delivery_remote(d.pn)}
+}
+func (d Delivery) RemoteState() uint64 {
+	return uint64(C.pn_delivery_remote_state(d.pn))
+}
+func (d Delivery) Settled() bool {
+	return bool(C.pn_delivery_settled(d.pn))
+}
+func (d Delivery) Pending() uint {
+	return uint(C.pn_delivery_pending(d.pn))
+}
+func (d Delivery) Partial() bool {
+	return bool(C.pn_delivery_partial(d.pn))
+}
+func (d Delivery) Writable() bool {
+	return bool(C.pn_delivery_writable(d.pn))
+}
+func (d Delivery) Readable() bool {
+	return bool(C.pn_delivery_readable(d.pn))
+}
+func (d Delivery) Updated() bool {
+	return bool(C.pn_delivery_updated(d.pn))
+}
+func (d Delivery) Update(state uint64) {
+	C.pn_delivery_update(d.pn, C.uint64_t(state))
+}
+func (d Delivery) Clear() {
+	C.pn_delivery_clear(d.pn)
+}
+func (d Delivery) Current() bool {
+	return bool(C.pn_delivery_current(d.pn))
+}
+func (d Delivery) Settle() {
+	C.pn_delivery_settle(d.pn)
+}
+func (d Delivery) Dump() {
+	C.pn_delivery_dump(d.pn)
+}
+func (d Delivery) Buffered() bool {
+	return bool(C.pn_delivery_buffered(d.pn))
+}
+
+// Wrappers for declarations in disposition.h
+
+type Disposition struct{ pn *C.pn_disposition_t }
+
+func (d Disposition) IsNil() bool { return d.pn == nil }
+func (d Disposition) Type() uint64 {
+	return uint64(C.pn_disposition_type(d.pn))
+}
+func (d Disposition) Condition() Condition {
+	return Condition{C.pn_disposition_condition(d.pn)}
+}
+func (d Disposition) Data() Data {
+	return Data{C.pn_disposition_data(d.pn)}
+}
+func (d Disposition) SectionNumber() uint16 {
+	return uint16(C.pn_disposition_get_section_number(d.pn))
+}
+func (d Disposition) SetSectionNumber(section_number uint16) {
+	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
+}
+func (d Disposition) SectionOffset() uint64 {
+	return uint64(C.pn_disposition_get_section_offset(d.pn))
+}
+func (d Disposition) SetSectionOffset(section_offset uint64) {
+	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
+}
+func (d Disposition) IsFailed() bool {
+	return bool(C.pn_disposition_is_failed(d.pn))
+}
+func (d Disposition) SetFailed(failed bool) {
+	C.pn_disposition_set_failed(d.pn, C.bool(failed))
+}
+func (d Disposition) IsUndeliverable() bool {
+	return bool(C.pn_disposition_is_undeliverable(d.pn))
+}
+func (d Disposition) SetUndeliverable(undeliverable bool) {
+	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
+}
+func (d Disposition) Annotations() Data {
+	return Data{C.pn_disposition_annotations(d.pn)}
+}
+
+// Wrappers for declarations in condition.h
+
+type Condition struct{ pn *C.pn_condition_t }
+
+func (c Condition) IsNil() bool { return c.pn == nil }
+func (c Condition) IsSet() bool {
+	return bool(C.pn_condition_is_set(c.pn))
+}
+func (c Condition) Clear() {
+	C.pn_condition_clear(c.pn)
+}
+func (c Condition) Name() string {
+	return C.GoString(C.pn_condition_get_name(c.pn))
+}
+func (c Condition) SetName(name string) int {
+	nameC := C.CString(name)
+	defer C.free(unsafe.Pointer(nameC))
+
+	return int(C.pn_condition_set_name(c.pn, nameC))
+}
+func (c Condition) Description() string {
+	return C.GoString(C.pn_condition_get_description(c.pn))
+}
+func (c Condition) SetDescription(description string) int {
+	descriptionC := C.CString(description)
+	defer C.free(unsafe.Pointer(descriptionC))
+
+	return int(C.pn_condition_set_description(c.pn, descriptionC))
+}
+func (c Condition) Info() Data {
+	return Data{C.pn_condition_info(c.pn)}
+}
+func (c Condition) IsRedirect() bool {
+	return bool(C.pn_condition_is_redirect(c.pn))
+}
+func (c Condition) RedirectHost() string {
+	return C.GoString(C.pn_condition_redirect_host(c.pn))
+}
+func (c Condition) RedirectPort() int {
+	return int(C.pn_condition_redirect_port(c.pn))
+}
+
+// Wrappers for declarations in terminus.h
+
+type TerminusType C.pn_terminus_type_t
+
+const (
+	PnUnspecified TerminusType = C.PN_UNSPECIFIED
+	PnSource      TerminusType = C.PN_SOURCE
+	PnTarget      TerminusType = C.PN_TARGET
+	PnCoordinator TerminusType = C.PN_COORDINATOR
+)
+
+func (e TerminusType) String() string {
+	switch e {
+
+	case C.PN_UNSPECIFIED:
+		return "Unspecified"
+	case C.PN_SOURCE:
+		return "Source"
+	case C.PN_TARGET:
+		return "Target"
+	case C.PN_COORDINATOR:
+		return "Coordinator"
+	}
+	return "unknown"
+}
+
+type Durability C.pn_durability_t
+
+const (
+	PnNondurable    Durability = C.PN_NONDURABLE
+	PnConfiguration Durability = C.PN_CONFIGURATION
+	PnDeliveries    Durability = C.PN_DELIVERIES
+)
+
+func (e Durability) String() string {
+	switch e {
+
+	case C.PN_NONDURABLE:
+		return "Nondurable"
+	case C.PN_CONFIGURATION:
+		return "Configuration"
+	case C.PN_DELIVERIES:
+		return "Deliveries"
+	}
+	return "unknown"
+}
+
+type ExpiryPolicy C.pn_expiry_policy_t
+
+const (
+	PnExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
+	PnExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
+	PnExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
+	PnExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
+)
+
+func (e ExpiryPolicy) String() string {
+	switch e {
+
+	case C.PN_EXPIRE_WITH_LINK:
+		return "ExpireWithLink"
+	case C.PN_EXPIRE_WITH_SESSION:
+		return "ExpireWithSession"
+	case C.PN_EXPIRE_WITH_CONNECTION:
+		return "ExpireWithConnection"
+	case C.PN_EXPIRE_NEVER:
+		return "ExpireNever"
+	}
+	return "unknown"
+}
+
+type DistributionMode C.pn_distribution_mode_t
+
+const (
+	PnDistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
+	PnDistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
+	PnDistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
+)
+
+func (e DistributionMode) String() string {
+	switch e {
+
+	case C.PN_DIST_MODE_UNSPECIFIED:
+		return "DistModeUnspecified"
+	case C.PN_DIST_MODE_COPY:
+		return "DistModeCopy"
+	case C.PN_DIST_MODE_MOVE:
+		return "DistModeMove"
+	}
+	return "unknown"
+}
+
+type Terminus struct{ pn *C.pn_terminus_t }
+
+func (t Terminus) IsNil() bool { return t.pn == nil }
+func (t Terminus) Type() TerminusType {
+	return TerminusType(C.pn_terminus_get_type(t.pn))
+}
+func (t Terminus) SetType(type_ TerminusType) int {
+	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
+}
+func (t Terminus) Address() string {
+	return C.GoString(C.pn_terminus_get_address(t.pn))
+}
+func (t Terminus) SetAddress(address string) int {
+	addressC := C.CString(address)
+	defer C.free(unsafe.Pointer(addressC))
+
+	return int(C.pn_terminus_set_address(t.pn, addressC))
+}
+func (t Terminus) SetDistributionMode(mode DistributionMode) int {
+	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
+}
+func (t Terminus) Durability() Durability {
+	return Durability(C.pn_terminus_get_durability(t.pn))
+}
+func (t Terminus) SetDurability(durability Durability) int {
+	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
+}
+func (t Terminus) ExpiryPolicy() ExpiryPolicy {
+	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
+}
+func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
+	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
+}
+func (t Terminus) Timeout() time.Duration {
+	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
+}
+func (t Terminus) SetTimeout(timeout time.Duration) int {
+	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
+}
+func (t Terminus) IsDynamic() bool {
+	return bool(C.pn_terminus_is_dynamic(t.pn))
+}
+func (t Terminus) SetDynamic(dynamic bool) int {
+	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
+}
+func (t Terminus) Properties() Data {
+	return Data{C.pn_terminus_properties(t.pn)}
+}
+func (t Terminus) Capabilities() Data {
+	return Data{C.pn_terminus_capabilities(t.pn)}
+}
+func (t Terminus) Outcomes() Data {
+	return Data{C.pn_terminus_outcomes(t.pn)}
+}
+func (t Terminus) Filter() Data {
+	return Data{C.pn_terminus_filter(t.pn)}
+}
+func (t Terminus) Copy(src Terminus) int {
+	return int(C.pn_terminus_copy(t.pn, src.pn))
+}
+
+// Wrappers for declarations in connection.h
+
+type Connection struct{ pn *C.pn_connection_t }
+
+func (c Connection) IsNil() bool { return c.pn == nil }
+func (c Connection) Free() {
+	C.pn_connection_free(c.pn)
+}
+func (c Connection) Release() {
+	C.pn_connection_release(c.pn)
+}
+func (c Connection) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
+}
+func (c Connection) State() State {
+	return State(C.pn_connection_state(c.pn))
+}
+func (c Connection) Open() {
+	C.pn_connection_open(c.pn)
+}
+func (c Connection) Close() {
+	C.pn_connection_close(c.pn)
+}
+func (c Connection) Reset() {
+	C.pn_connection_reset(c.pn)
+}
+func (c Connection) Condition() Condition {
+	return Condition{C.pn_connection_condition(c.pn)}
+}
+func (c Connection) RemoteCondition() Condition {
+	return Condition{C.pn_connection_remote_condition(c.pn)}
+}
+func (c Connection) Container() string {
+	return C.GoString(C.pn_connection_get_container(c.pn))
+}
+func (c Connection) SetContainer(container string) {
+	containerC := C.CString(container)
+	defer C.free(unsafe.Pointer(containerC))
+
+	C.pn_connection_set_container(c.pn, containerC)
+}
+func (c Connection) SetUser(user string) {
+	userC := C.CString(user)
+	defer C.free(unsafe.Pointer(userC))
+
+	C.pn_connection_set_user(c.pn, userC)
+}
+func (c Connection) SetPassword(password string) {
+	passwordC := C.CString(password)
+	defer C.free(unsafe.Pointer(passwordC))
+
+	C.pn_connection_set_password(c.pn, passwordC)
+}
+func (c Connection) User() string {
+	return C.GoString(C.pn_connection_get_user(c.pn))
+}
+func (c Connection) Hostname() string {
+	return C.GoString(C.pn_connection_get_hostname(c.pn))
+}
+func (c Connection) SetHostname(hostname string) {
+	hostnameC := C.CString(hostname)
+	defer C.free(unsafe.Pointer(hostnameC))
+
+	C.pn_connection_set_hostname(c.pn, hostnameC)
+}
+func (c Connection) RemoteContainer() string {
+	return C.GoString(C.pn_connection_remote_container(c.pn))
+}
+func (c Connection) RemoteHostname() string {
+	return C.GoString(C.pn_connection_remote_hostname(c.pn))
+}
+func (c Connection) OfferedCapabilities() Data {
+	return Data{C.pn_connection_offered_capabilities(c.pn)}
+}
+func (c Connection) DesiredCapabilities() Data {
+	return Data{C.pn_connection_desired_capabilities(c.pn)}
+}
+func (c Connection) Properties() Data {
+	return Data{C.pn_connection_properties(c.pn)}
+}
+func (c Connection) RemoteOfferedCapabilities() Data {
+	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
+}
+func (c Connection) RemoteDesiredCapabilities() Data {
+	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
+}
+func (c Connection) RemoteProperties() Data {
+	return Data{C.pn_connection_remote_properties(c.pn)}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/internal/error.go
----------------------------------------------------------------------
diff --git a/go/internal/error.go b/go/internal/error.go
new file mode 100644
index 0000000..01ba890
--- /dev/null
+++ b/go/internal/error.go
@@ -0,0 +1,125 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Internal implementation details - ignore.
+package internal
+
+// #cgo LDFLAGS: -lqpid-proton
+// #include <proton/error.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"fmt"
+	"runtime"
+	"sync"
+	"sync/atomic"
+	"unsafe"
+)
+
+// Error type for all proton errors.
+type Error string
+
+// Error prefixes error message with proton:
+func (e Error) Error() string {
+	return "proton: " + string(e)
+}
+
+// Errorf creates an Error with a formatted message
+func Errorf(format string, a ...interface{}) Error {
+	return Error(fmt.Sprintf(format, a...))
+}
+
+type PnErrorCode int
+
+func (e PnErrorCode) String() string {
+	switch e {
+	case C.PN_EOS:
+		return "end-of-data"
+	case C.PN_ERR:
+		return "error"
+	case C.PN_OVERFLOW:
+		return "overflow"
+	case C.PN_UNDERFLOW:
+		return "underflow"
+	case C.PN_STATE_ERR:
+		return "bad-state"
+	case C.PN_ARG_ERR:
+		return "invalid-argument"
+	case C.PN_TIMEOUT:
+		return "timeout"
+	case C.PN_INTR:
+		return "interrupted"
+	case C.PN_INPROGRESS:
+		return "in-progress"
+	default:
+		return fmt.Sprintf("unknown-error(%d)", e)
+	}
+}
+
+func PnError(p unsafe.Pointer) error {
+	e := (*C.pn_error_t)(p)
+	if e == nil || C.pn_error_code(e) == 0 {
+		return nil
+	}
+	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
+}
+
+// DoRecover is called to recover from internal panics
+func DoRecover(err *error) {
+	r := recover()
+	switch r := r.(type) {
+	case nil: // We are not recovering
+		return
+	case runtime.Error: // Don't catch runtime.Error
+		panic(r)
+	case error:
+		*err = r
+	default:
+		panic(r)
+	}
+}
+
+// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
+func panicIf(condition bool, fmt string, args ...interface{}) {
+	if condition {
+		panic(Errorf(fmt, args...))
+	}
+}
+
+// FirstError is a goroutine-safe error holder that keeps the first error that is set.
+type FirstError struct {
+	err  atomic.Value
+	once sync.Once
+}
+
+// Set the error if not allread set.
+func (e *FirstError) Set(err error) {
+	e.once.Do(func() { e.err.Store(err) })
+}
+
+// Get the error.
+func (e *FirstError) Get() error {
+	v := e.err.Load()
+	if v != nil {
+		return v.(error)
+	} else {
+		return nil
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/messaging/doc.go
----------------------------------------------------------------------
diff --git a/go/messaging/doc.go b/go/messaging/doc.go
new file mode 100644
index 0000000..c815f4e
--- /dev/null
+++ b/go/messaging/doc.go
@@ -0,0 +1,28 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package messaging provides a procedural, concurrent Go API for exchanging AMQP messages.
+*/
+package messaging
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/messaging/handler.go
----------------------------------------------------------------------
diff --git a/go/messaging/handler.go b/go/messaging/handler.go
new file mode 100644
index 0000000..4a97b9d
--- /dev/null
+++ b/go/messaging/handler.go
@@ -0,0 +1,70 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package messaging
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+)
+
+// FIXME aconway 2015-04-28: cleanup - exposing delivery vs. disposition.
+
+type acksMap map[event.Delivery]chan Disposition
+type receiverMap map[event.Link]chan amqp.Message
+
+type handler struct {
+	connection *Connection
+	acks       acksMap
+	receivers  receiverMap
+}
+
+func newHandler(c *Connection) *handler {
+	return &handler{c, make(acksMap), make(receiverMap)}
+}
+
+func (h *handler) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
+	switch t {
+	// FIXME aconway 2015-04-29: handle errors.
+	case event.MConnectionClosed:
+		for _, ack := range h.acks {
+			// FIXME aconway 2015-04-29: communicate error info
+			close(ack)
+		}
+
+	case event.MSettled:
+		ack := h.acks[e.Delivery()]
+		if ack != nil {
+			ack <- Disposition(e.Delivery().Remote().Type())
+			close(ack)
+			delete(h.acks, e.Delivery())
+		}
+
+	case event.MMessage:
+		r := h.receivers[e.Link()]
+		if r != nil {
+			m, _ := event.DecodeMessage(e)
+			// FIXME aconway 2015-04-29: hack, direct send, possible blocking.
+			r <- m
+		} else {
+			// FIXME aconway 2015-04-29: Message with no receiver - log? panic? deadletter? drop?
+		}
+	}
+	return nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/go/messaging/messaging.go b/go/messaging/messaging.go
new file mode 100644
index 0000000..e653de2
--- /dev/null
+++ b/go/messaging/messaging.go
@@ -0,0 +1,250 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package messaging
+
+// #include <proton/disposition.h>
+import "C"
+
+import (
+	"net"
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+)
+
+// Connection is a connection to a remote AMQP endpoint.
+//
+// You can set exported fields to configure the connection before calling
+// Connection.Open()
+//
+type Connection struct {
+	// Server = true means a the connection will do automatic protocol detection.
+	Server bool
+
+	// FIXME aconway 2015-04-17: Other parameters to set up SSL, SASL etc.
+
+	handler *handler
+	pump    *event.Pump
+	session Session
+}
+
+// Make an AMQP connection over a net.Conn connection.
+//
+// Use Connection.Close() to close the Connection, this will also close conn.
+// Using conn.Close() directly will cause an abrupt disconnect rather than an
+// orderly AMQP close.
+//
+func (c *Connection) Open(conn net.Conn) (err error) {
+	c.handler = newHandler(c)
+	c.pump, err = event.NewPump(conn,
+		event.NewMessagingDelegator(c.handler),
+	)
+	if err != nil {
+		return err
+	}
+	if c.Server {
+		c.pump.Server()
+	}
+	go c.pump.Run()
+	return nil
+}
+
+// Connect opens a default client connection. It is a shortcut for
+//    c := &Connection
+//    c.Open()
+//
+func Connect(conn net.Conn) (*Connection, error) {
+	c := &Connection{}
+	err := c.Open(conn)
+	return c, err
+}
+
+// Close the connection.
+//
+// Connections must be closed to clean up resources and stop associated goroutines.
+func (c *Connection) Close() error { return c.pump.Close() }
+
+// DefaultSession returns a default session for the connection.
+//
+// It is created on the first call to DefaultSession() and returned from all subsequent calls.
+// Use Session() for more control over creating sessions.
+//
+func (c *Connection) DefaultSession() (s Session, err error) {
+	if c.session.e.IsNil() {
+		c.session, err = c.Session()
+	}
+	return c.session, err
+}
+
+type sessionErr struct {
+	s   event.Session
+	err error
+}
+
+// Session creates a new session.
+func (c *Connection) Session() (Session, error) {
+	connection := c.pump.Connection()
+	result := make(chan sessionErr)
+	c.pump.Inject <- func() {
+		s, err := connection.Session()
+		if err == nil {
+			s.Open()
+		}
+		result <- sessionErr{s, err}
+	}
+	se := <-result
+	return Session{se.s, c.pump}, se.err
+}
+
+// FIXME aconway 2015-04-27: set sender name, options etc.
+
+// Sender creates a Sender that will send messages to the address addr.
+func (c *Connection) Sender(addr string) (s Sender, err error) {
+	session, err := c.DefaultSession()
+	if err != nil {
+		return Sender{}, err
+	}
+	result := make(chan Sender)
+	c.pump.Inject <- func() {
+		link := session.e.Sender(linkNames.Next())
+		if link.IsNil() {
+			err = session.e.Error()
+		} else {
+			link.Target().SetAddress(addr)
+			// FIXME aconway 2015-04-27: link options?
+			link.Open()
+		}
+		result <- Sender{Link{c, link}}
+	}
+	return <-result, err
+}
+
+// Receiver returns a receiver that will receive messages sent to address addr.
+func (c *Connection) Receiver(addr string) (r Receiver, err error) {
+	// FIXME aconway 2015-04-29: move code to session, in link.go?
+	session, err := c.DefaultSession()
+	if err != nil {
+		return Receiver{}, err
+	}
+	result := make(chan Receiver)
+	c.pump.Inject <- func() {
+		link := session.e.Receiver(linkNames.Next())
+		if link.IsNil() {
+			err = session.e.Error()
+		} else {
+			link.Source().SetAddress(addr)
+			// FIXME aconway 2015-04-27: link options?
+			link.Open()
+		}
+		// FIXME aconway 2015-04-29: hack to avoid blocking, need proper buffering linked to flow control
+		rchan := make(chan amqp.Message, 1000)
+		c.handler.receivers[link] = rchan
+		result <- Receiver{Link{c, link}, rchan}
+	}
+	return <-result, err
+}
+
+// FIXME aconway 2015-04-29: counter per session.
+var linkNames amqp.UidCounter
+
+// Session is an AMQP session, it contains Senders and Receivers.
+// Every Connection has a DefaultSession, you can create additional sessions
+// with Connection.Session()
+type Session struct {
+	e    event.Session
+	pump *event.Pump
+}
+
+// FIXME aconway 2015-05-05: REWORK Sender/receiver/session.
+
+// Disposition indicates the outcome of a settled message delivery.
+type Disposition uint64
+
+const (
+	// Message was accepted by the receiver
+	Accepted Disposition = C.PN_ACCEPTED
+	// Message was rejected as invalid by the receiver
+	Rejected = C.PN_REJECTED
+	// Message was not processed by the receiver but may be processed by some other receiver.
+	Released = C.PN_RELEASED
+)
+
+// String human readable name for a Disposition.
+func (d Disposition) String() string {
+	switch d {
+	case Accepted:
+		return "Accepted"
+	case Rejected:
+		return "Rejected"
+	case Released:
+		return "Released"
+	default:
+		return "Unknown"
+	}
+}
+
+// FIXME aconway 2015-04-29: How to signal errors via ack channels.
+
+// An Acknowledgement is a channel which will receive the Disposition of the message
+// when it is acknowledged. The channel is closed after the disposition is sent.
+type Acknowledgement <-chan Disposition
+
+// Link has common data and methods for Sender and Receiver links.
+type Link struct {
+	connection *Connection
+	elink      event.Link
+}
+
+// Sender sends messages.
+type Sender struct {
+	Link
+}
+
+// FIXME aconway 2015-04-28: allow user to specify delivery tag.
+// FIXME aconway 2015-04-28: should we provide a sending channel rather than a send function?
+
+// Send sends a message. If d is not nil, the disposition is retured on d.
+// If d is nil the message is sent pre-settled and no disposition is returned.
+func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
+	ackChan := make(chan Disposition, 1)
+	ack = ackChan
+	s.connection.pump.Inject <- func() {
+		// FIXME aconway 2015-04-28: flow control & credit, buffer or fail?
+		delivery, err := s.elink.Send(m)
+		if err == nil { // FIXME aconway 2015-04-28: error handling
+			s.connection.handler.acks[delivery] = ackChan
+		}
+	}
+	return ack, nil
+}
+
+// Close the sender.
+func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
+
+// Receiver receives messages via the channel Receive.
+type Receiver struct {
+	Link
+	// Channel of messag
+	Receive <-chan amqp.Message
+}
+
+// FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
+
+// Close the Receiver.
+func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
deleted file mode 100644
index 0449d68..0000000
--- a/proton-c/bindings/go/README.md
+++ /dev/null
@@ -1,138 +0,0 @@
-# *EXPERIMENTAL* Go binding for proton
-
-This is the beginning of a [Go](http://golang.org) binding for proton.
-
-This work is in early *experimental* stages, *everything* may change in future.
-Comments and contributions are strongly encouraged, this experiment is public so
-early feedback can guide development.
-
-- Email <pr...@qpid.apache.org>
-- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
-
-There are working [examples](../../../examples/go/README.md) and the examples README file
-explains how to install the packages in your go workspace and read the documentation.
-
-## Goals
-
-The API should
-
-- be idiomatic, unsurprising, and easy to use for Go developers.
-- support client and server development.
-- make simple tasks simple.
-- provide deep access to AMQP protocol when that is required.
-
-There are two types of developer we want to support
-
-1. Go developers using AMQP as a message transport:
-   - Straightforward conversions between Go built-in types and AMQP types.
-   - Easy message exchange via Go channels to support use in goroutines.
-
-2. AMQP-aware developers using Go as an implementation language:
-   - Go types to exactly represent all AMQP types and encoding details.
-   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
-
-## Status
-
-There are 3 go packages for proton:
-
-- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
-- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
-- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
-
-Most applications should use the `messaging` package. The `event` package is for
-applications that need low-level access to the proton engine.
-
-The `event` package is fairly complete, with the exception of the proton
-reactor. It's unclear if the reactor is important for go.
-
-The `messaging` package can run the examples but probably not much else. There
-is work to do on error handling and the API may change.
-
-There are working [examples](../../../examples/go/README.md) of a broker using `event` and
-a sender and receiver using `messaging`.
-
-## The event driven API
-
-See the package documentation for details.
-
-## The Go API
-
-The goal: A procedural API that allows any user goroutine to send and receive
-AMQP messages and other information (acknowledgments, flow control instructions
-etc.) using channels. There will be no user-visible locks and no need to run
-user code in special goroutines, e.g. as handlers in a proton event loop.
-
-See the package documentation for emerging details.
-
-Currently using a channel to receive messages, a function to send them (channels
-internally) and a channel as a "future" for acknowledgements to senders. This
-may change.
-
-## Why a separate API for Go?
-
-Go is a concurrent language and encourages applications to be divided into
-concurrent *goroutines*. It provides traditional locking but it encourages the
-use *channels* to communicate between goroutines without explicit locks:
-
-  "Share memory by communicating, don't communicate by sharing memory"
-
-The idea is that a given value is only operated on by one goroutine at a time,
-but values can easily be passed from one goroutine to another. This removes much
-of the need for locking.
-
-Go literature distinguishes between:
-
-- *concurrency*: "keeping track of things that could be done in parallel"
-- *parallelism*: "actually doing things in parallel"
-
-The application expresses concurrency by starting goroutines for potentially
-concurrent tasks. The Go run-times schedule the activity of goroutines onto a
-small number (possibly one) of actual parallel executions.
-
-Even with *no* parallelism, concurrency lets the Go run-times *order* work with
-respect to events like file descriptors being readable/writable, channels having
-data, timers firing etc. Go automatically takes care of switching out goroutines
-that block or sleep so it is normal to write code in terms of blocking calls.
-
-Event-driven API (like poll, epoll, select or the proton event API) also
-channel unpredictably ordered events to actions in one or a small pool of
-execution threads. However this requires a different style of programming:
-"event-driven" or "reactive" programming. Go developers call it "inside-out"
-programming. In an event-driven architecture blocking is a big problem as it
-consumes a scarce thread of execution, so actions that take time to complete
-have to be re-structured in terms of future event delivery.
-
-The promise of Go is that you can express your application in concurrent,
-procedural terms with simple blocking calls and the Go run-times will turn it
-inside-out for you. Write as many goroutines as you want, and let Go interleave
-and schedule them efficiently.
-
-For example: the Go equivalent of listening for connections is a goroutine with
-a simple endless loop that calls a blocking Listen() function and starts a
-goroutine for each new connection. Each connection has its own goroutine that
-deals with just that connection till it closes.
-
-The benefit is that the variables and logic live closer together. Once you're in
-a goroutine, you have everything you need in local variables, and they are
-preserved across blocking calls. There's no need to store details in context
-objects that you have to look up when handling a later event to figure out how
-to continue where you left off.
-
-So a Go-like proton API does not force the users code to run in an event-loop
-goroutine. Instead user goroutines communicate with the event loop(s) via
-channels.  There's no need to funnel connections into one event loop, in fact it
-makes no sense.  Connections can be processed concurrently so they should be
-processed in separate goroutines and left to Go to schedule. User goroutines can
-have simple loops that block channels till messages are available, the user can
-start as many or as few such goroutines as they wish to implement concurrency as
-simple or as complex as they wish. For example blocking request-response
-vs. asynchronous flows of messages and acknowledgments.
-
-## New to Go?
-
-If you are new to Go then these are a good place to start:
-
-- [A Tour of Go](http://tour.golang.org)
-- [Effective Go](http://golang.org/doc/effective_go.html)
-
-Then look at the tools and library docs at <http://golang.org> as you need them.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/doc.go b/proton-c/bindings/go/amqp/doc.go
deleted file mode 100644
index 7c00aa0..0000000
--- a/proton-c/bindings/go/amqp/doc.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package amqp encodes and decodes AMQP messages and data as Go types.
-
-It follows the standard 'encoding' libraries pattern. The mapping between AMQP
-and Go types is described in the documentation of the Marshal and Unmarshal
-functions.
-
-The sub-packages 'event' and 'messaging' provide two alternative ways to write
-AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
-gives complete low-level control of the underlying proton C engine.
-
-AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
-*/
-package amqp
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.
-
-// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/interop
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/interop b/proton-c/bindings/go/amqp/interop
deleted file mode 120000
index 8f50d0e..0000000
--- a/proton-c/bindings/go/amqp/interop
+++ /dev/null
@@ -1 +0,0 @@
-../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/interop_test.go b/proton-c/bindings/go/amqp/interop_test.go
deleted file mode 100644
index 11049f7..0000000
--- a/proton-c/bindings/go/amqp/interop_test.go
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Test that conversion of Go type to/from AMQP is compatible with other
-// bindings.
-//
-package amqp
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"reflect"
-	"strings"
-	"testing"
-)
-
-func assertEqual(want interface{}, got interface{}) {
-	if !reflect.DeepEqual(want, got) {
-		panic(fmt.Errorf("%#v != %#v", want, got))
-	}
-}
-
-func assertNil(err interface{}) {
-	if err != nil {
-		panic(err)
-	}
-}
-
-func getReader(name string) (r io.Reader) {
-	r, err := os.Open("interop/" + name + ".amqp")
-	if err != nil {
-		panic(fmt.Errorf("Can't open %#v: %v", name, err))
-	}
-	return
-}
-
-func remaining(d *Decoder) string {
-	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
-	return string(remainder)
-}
-
-// assertDecode: want is the expected value, gotPtr is a pointer to a
-// instance of the same type for Decode.
-func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
-
-	assertNil(d.Decode(gotPtr))
-
-	got := reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(want, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, gotPtr)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	got = reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-}
-
-func TestUnmarshal(t *testing.T) {
-	bytes, err := ioutil.ReadAll(getReader("strings"))
-	if err != nil {
-		t.Error(err)
-	}
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		n, err := Unmarshal(bytes, &got)
-		if err != nil {
-			t.Error(err)
-		}
-		if want != got {
-			t.Errorf("%#v != %#v", want, got)
-		}
-		bytes = bytes[n:]
-	}
-}
-
-func TestPrimitivesExact(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into exact types
-	var b bool
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	var u8 uint8
-	assertDecode(d, uint8(42), &u8)
-	var u16 uint16
-	assertDecode(d, uint16(42), &u16)
-	var i16 int16
-	assertDecode(d, int16(-42), &i16)
-	var u32 uint32
-	assertDecode(d, uint32(12345), &u32)
-	var i32 int32
-	assertDecode(d, int32(-12345), &i32)
-	var u64 uint64
-	assertDecode(d, uint64(12345), &u64)
-	var i64 int64
-	assertDecode(d, int64(-12345), &i64)
-	var f32 float32
-	assertDecode(d, float32(0.125), &f32)
-	var f64 float64
-	assertDecode(d, float64(0.125), &f64)
-}
-
-func TestPrimitivesCompatible(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into compatible types
-	var b bool
-	var i int
-	var u uint
-	var f float64
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, -42, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, 0.125, &f)
-	assertDecode(d, 0.125, &f)
-}
-
-// assertDecodeValue: want is the expected value, decode into a reflect.Value
-func assertDecodeInterface(d *Decoder, want interface{}) {
-
-	var got, got2 interface{}
-	assertNil(d.Decode(&got))
-
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(got, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, &got2)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	assertEqual(want, got2)
-}
-
-func TestPrimitivesInterface(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	assertDecodeInterface(d, true)
-	assertDecodeInterface(d, false)
-	assertDecodeInterface(d, uint8(42))
-	assertDecodeInterface(d, uint16(42))
-	assertDecodeInterface(d, int16(-42))
-	assertDecodeInterface(d, uint32(12345))
-	assertDecodeInterface(d, int32(-12345))
-	assertDecodeInterface(d, uint64(12345))
-	assertDecodeInterface(d, int64(-12345))
-	assertDecodeInterface(d, float32(0.125))
-	assertDecodeInterface(d, float64(0.125))
-}
-
-func TestStrings(t *testing.T) {
-	d := NewDecoder(getReader("strings"))
-	// Test decoding as plain Go strings
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		assertDecode(d, want, &got)
-	}
-	remains := remaining(d)
-	if remains != "" {
-		t.Errorf("leftover: %s", remains)
-	}
-
-	// Test decoding as specific string types
-	d = NewDecoder(getReader("strings"))
-	var bytes []byte
-	var str, sym string
-	assertDecode(d, []byte("abc\000defg"), &bytes)
-	assertDecode(d, "abcdefg", &str)
-	assertDecode(d, "abcdefg", &sym)
-	assertDecode(d, make([]byte, 0), &bytes)
-	assertDecode(d, "", &str)
-	assertDecode(d, "", &sym)
-	remains = remaining(d)
-	if remains != "" {
-		t.Fatalf("leftover: %s", remains)
-	}
-
-	// Test some error handling
-	d = NewDecoder(getReader("strings"))
-	var s string
-	err := d.Decode(s)
-	if err == nil {
-		t.Fatal("Expected error")
-	}
-	if !strings.Contains(err.Error(), "not a pointer") {
-		t.Error(err)
-	}
-	var i int
-	err = d.Decode(&i)
-	if !strings.Contains(err.Error(), "cannot unmarshal") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte{}, nil)
-	if !strings.Contains(err.Error(), "not enough data") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte("foobar"), nil)
-	if !strings.Contains(err.Error(), "invalid-argument") {
-		t.Error(err)
-	}
-}
-
-func TestEncodeDecode(t *testing.T) {
-	type data struct {
-		s  string
-		i  int
-		u8 uint8
-		b  bool
-		f  float32
-		v  interface{}
-	}
-
-	in := data{"foo", 42, 9, true, 1.234, "thing"}
-
-	buf := bytes.Buffer{}
-	e := NewEncoder(&buf)
-	assertNil(e.Encode(in.s))
-	assertNil(e.Encode(in.i))
-	assertNil(e.Encode(in.u8))
-	assertNil(e.Encode(in.b))
-	assertNil(e.Encode(in.f))
-	assertNil(e.Encode(in.v))
-
-	var out data
-	d := NewDecoder(&buf)
-	assertNil(d.Decode(&out.s))
-	assertNil(d.Decode(&out.i))
-	assertNil(d.Decode(&out.u8))
-	assertNil(d.Decode(&out.b))
-	assertNil(d.Decode(&out.f))
-	assertNil(d.Decode(&out.v))
-
-	assertEqual(in, out)
-}
-
-func TestMap(t *testing.T) {
-	d := NewDecoder(getReader("maps"))
-
-	// Generic map
-	var m Map
-	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
-
-	// Interface as map
-	var i interface{}
-	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
-
-	d = NewDecoder(getReader("maps"))
-	// Specific typed map
-	var m2 map[string]int
-	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
-
-	// Round trip a nested map
-	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
-	bytes, err := Marshal(m, nil)
-	assertNil(err)
-	_, err = Unmarshal(bytes, &i)
-	assertNil(err)
-	assertEqual(m, i)
-}
-
-func TestList(t *testing.T) {
-	d := NewDecoder(getReader("lists"))
-	var l List
-	assertDecode(d, List{int32(32), "foo", true}, &l)
-	assertDecode(d, List{}, &l)
-}
-
-func FIXMETestMessage(t *testing.T) {
-	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
-	bytes, err := ioutil.ReadAll(getReader("message"))
-	assertNil(err)
-	m, err := DecodeMessage(bytes)
-	assertNil(err)
-	fmt.Printf("%+v\n", m)
-	assertEqual(m.Body(), "hello")
-
-	bytes2 := make([]byte, len(bytes))
-	bytes2, err = m.Encode(bytes2)
-	assertNil(err)
-	assertEqual(bytes, bytes2)
-}
-
-// FIXME aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/marshal.go b/proton-c/bindings/go/amqp/marshal.go
deleted file mode 100644
index e5c2945..0000000
--- a/proton-c/bindings/go/amqp/marshal.go
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-func dataError(prefix string, data *C.pn_data_t) error {
-	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
-	if err != nil {
-		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
-	}
-	return err
-}
-
-/*
-Marshal encodes a Go value as AMQP data in buffer.
-If buffer is nil, or is not large enough, a new buffer  is created.
-
-Returns the buffer used for encoding with len() adjusted to the actual size of data.
-
-Go types are encoded as follows
-
- +-------------------------------------+--------------------------------------------+
- |Go type                              |AMQP type                                   |
- +-------------------------------------+--------------------------------------------+
- |bool                                 |bool                                        |
- +-------------------------------------+--------------------------------------------+
- |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
- +-------------------------------------+--------------------------------------------+
- |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
- +-------------------------------------+--------------------------------------------+
- |float32, float64                     |float, double.                              |
- +-------------------------------------+--------------------------------------------+
- |string                               |string                                      |
- +-------------------------------------+--------------------------------------------+
- |[]byte, Binary                       |binary                                      |
- +-------------------------------------+--------------------------------------------+
- |Symbol                               |symbol                                      |
- +-------------------------------------+--------------------------------------------+
- |interface{}                          |the contained type                          |
- +-------------------------------------+--------------------------------------------+
- |nil                                  |null                                        |
- +-------------------------------------+--------------------------------------------+
- |map[K]T                              |map with K and T converted as above         |
- +-------------------------------------+--------------------------------------------+
- |Map                                  |map, may have mixed types for keys, values  |
- +-------------------------------------+--------------------------------------------+
- |[]T                                  |list with T converted as above              |
- +-------------------------------------+--------------------------------------------+
- |List                                 |list, may have mixed types  values          |
- +-------------------------------------+--------------------------------------------+
-
-TODO Go types: array, slice, struct
-
-Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
-*/
-func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	put(data, v)
-	encode := func(buf []byte) ([]byte, error) {
-		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
-		switch {
-		case n == int(C.PN_OVERFLOW):
-			return buf, overflow
-		case n < 0:
-			return buf, dataError("marshal error", data)
-		default:
-			return buf[:n], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}
-
-const minEncode = 256
-
-// overflow is returned when an encoding function can't fit data in the buffer.
-var overflow = internal.Errorf("buffer too small")
-
-// encodeFn encodes into buffer[0:len(buffer)].
-// Returns buffer with length adjusted for data encoded.
-// If buffer too small, returns overflow as error.
-type encodeFn func(buffer []byte) ([]byte, error)
-
-// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
-// Returns the final buffer.
-func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
-	if buffer == nil || len(buffer) == 0 {
-		buffer = make([]byte, minEncode)
-	}
-	var err error
-	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
-		buffer = make([]byte, 2*len(buffer))
-	}
-	return buffer, err
-}
-
-func put(data *C.pn_data_t, v interface{}) {
-	switch v := v.(type) {
-	case nil:
-		C.pn_data_put_null(data)
-	case bool:
-		C.pn_data_put_bool(data, C.bool(v))
-	case int8:
-		C.pn_data_put_byte(data, C.int8_t(v))
-	case int16:
-		C.pn_data_put_short(data, C.int16_t(v))
-	case int32:
-		C.pn_data_put_int(data, C.int32_t(v))
-	case int64:
-		C.pn_data_put_long(data, C.int64_t(v))
-	case int:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_long(data, C.int64_t(v))
-		} else {
-			C.pn_data_put_int(data, C.int32_t(v))
-		}
-	case uint8:
-		C.pn_data_put_ubyte(data, C.uint8_t(v))
-	case uint16:
-		C.pn_data_put_ushort(data, C.uint16_t(v))
-	case uint32:
-		C.pn_data_put_uint(data, C.uint32_t(v))
-	case uint64:
-		C.pn_data_put_ulong(data, C.uint64_t(v))
-	case uint:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_ulong(data, C.uint64_t(v))
-		} else {
-			C.pn_data_put_uint(data, C.uint32_t(v))
-		}
-	case float32:
-		C.pn_data_put_float(data, C.float(v))
-	case float64:
-		C.pn_data_put_double(data, C.double(v))
-	case string:
-		C.pn_data_put_string(data, pnBytes([]byte(v)))
-	case []byte:
-		C.pn_data_put_binary(data, pnBytes(v))
-	case Binary:
-		C.pn_data_put_binary(data, pnBytes([]byte(v)))
-	case Symbol:
-		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
-	case Map: // Special map type
-		C.pn_data_put_map(data)
-		C.pn_data_enter(data)
-		for key, val := range v {
-			put(data, key)
-			put(data, val)
-		}
-		C.pn_data_exit(data)
-	default:
-		switch reflect.TypeOf(v).Kind() {
-		case reflect.Map:
-			putMap(data, v)
-		case reflect.Slice:
-			putList(data, v)
-		default:
-			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
-		}
-	}
-	err := dataError("marshal", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-func putMap(data *C.pn_data_t, v interface{}) {
-	mapValue := reflect.ValueOf(v)
-	C.pn_data_put_map(data)
-	C.pn_data_enter(data)
-	for _, key := range mapValue.MapKeys() {
-		put(data, key.Interface())
-		put(data, mapValue.MapIndex(key).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-func putList(data *C.pn_data_t, v interface{}) {
-	listValue := reflect.ValueOf(v)
-	C.pn_data_put_list(data)
-	C.pn_data_enter(data)
-	for i := 0; i < listValue.Len(); i++ {
-		put(data, listValue.Index(i).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-// Encoder encodes AMQP values to an io.Writer
-type Encoder struct {
-	writer io.Writer
-	buffer []byte
-}
-
-// New encoder returns a new encoder that writes to w.
-func NewEncoder(w io.Writer) *Encoder {
-	return &Encoder{w, make([]byte, minEncode)}
-}
-
-func (e *Encoder) Encode(v interface{}) (err error) {
-	e.buffer, err = Marshal(v, e.buffer)
-	if err == nil {
-		e.writer.Write(e.buffer)
-	}
-	return err
-}
-
-func replace(data *C.pn_data_t, v interface{}) {
-	C.pn_data_clear(data)
-	put(data, v)
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[04/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a
new file mode 100644
index 0000000..6731803
Binary files /dev/null and b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[03/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a
new file mode 100644
index 0000000..3bafe9c
--- /dev/null
+++ b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a
@@ -0,0 +1,1100 @@
+!<arch>
+__.PKGDEF       0           0     0     644     63393     `
+go object linux amd64 go1.4.2 X:precisestack
+
+$$
+package messaging
+	import net "net"
+	import runtime "runtime"
+	import time "time"
+	import io "io"
+	import cgo "runtime/cgo"
+	import amqp "qpid.apache.org/proton/go/amqp"
+	import syscall "syscall"
+	import fmt "fmt"
+	import internal "qpid.apache.org/proton/go/internal"
+	import reflect "reflect"
+	import reactor "qpid.apache.org/proton/go/reactor"
+	import unsafe "unsafe"
+	var @"".Closed error
+	type @"".Endpoint interface { Close(? error); Error() (? error); Open() (? error); String() (? string) }
+	type @"".Link interface { Close(? error); Error() (? error); IsOpen() (? bool); IsReceiver() (? bool); IsSender() (? bool); Name() (? string); Open() (? error); SetName(? string); SetSource(? string); SetTarget(? string); Source() (? string); String() (? string); Target() (? string) }
+	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
+	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
+	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
+	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
+	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
+	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
+	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
+	type @"time".Duration int64
+	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
+	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
+	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
+	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
+	func (@"time".d·2 @"time".Duration) String () (? string)
+	type @"time".Month int
+	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
+	type @"time".Weekday int
+	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
+	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
+	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
+	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
+	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
+	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
+	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
+	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
+	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
+	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
+	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
+	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
+	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
+	type @"qpid.apache.org/proton/go/amqp".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"qpid.apache.org/proton/go/amqp".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGr
 oupId(? string); SetGroupSequence(? int32); SetInferred(? bool); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_delivery_t struct {}
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_link_t struct {}
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_condition_t struct {}
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_data_t struct {}
+	type @"qpid.apache.org/proton/go/reactor".Data struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_data_t }
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Clear ()
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Error () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Free ()
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Data "esc:0x2") Pointer () (? @"unsafe".Pointer) { return @"unsafe".Pointer(@"qpid.apache.org/proton/go/reactor".d·2.@"qpid.apache.org/proton/go/reactor".pn) }
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Rewind ()
+	type @"qpid.apache.org/proton/go/reactor".Condition struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_condition_t }
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Clear ()
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Description () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Error () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Info () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".c·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") IsRedirect () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") IsSet () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Name () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") RedirectHost () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") RedirectPort () (? int)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") SetDescription (@"qpid.apache.org/proton/go/reactor".description·3 string "esc:0x0") (? int)
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") SetError (@"qpid.apache.org/proton/go/reactor".err·2 error)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") SetName (@"qpid.apache.org/proton/go/reactor".name·3 string "esc:0x0") (? int)
+	type @"qpid.apache.org/proton/go/reactor".State uint8
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".State) Is (@"qpid.apache.org/proton/go/reactor".bits·3 @"qpid.apache.org/proton/go/reactor".State) (? bool) { return @"qpid.apache.org/proton/go/reactor".s·2 & @"qpid.apache.org/proton/go/reactor".bits·3 != @"qpid.apache.org/proton/go/reactor".State(0x0) }
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".State) Local () (? @"qpid.apache.org/proton/go/reactor".State) { return @"qpid.apache.org/proton/go/reactor".State(@"qpid.apache.org/proton/go/reactor".s·2 & @"qpid.apache.org/proton/go/reactor".State(0x7)) }
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".State) Remote () (? @"qpid.apache.org/proton/go/reactor".State) { return @"qpid.apache.org/proton/go/reactor".State(@"qpid.apache.org/proton/go/reactor".s·2 & @"qpid.apache.org/proton/go/reactor".State(0x38)) }
+	type @"qpid.apache.org/proton/go/reactor".RcvSettleMode uint32
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".RcvSettleMode) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".SndSettleMode uint32
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".SndSettleMode) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_terminus_t struct {}
+	type @"qpid.apache.org/proton/go/reactor".Durability uint32
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Durability) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".ExpiryPolicy uint32
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".ExpiryPolicy) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".DistributionMode uint32
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".DistributionMode) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".TerminusType uint32
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".TerminusType) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".Terminus struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_terminus_t }
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Address () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Capabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Copy (@"qpid.apache.org/proton/go/reactor".src·3 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Durability () (? @"qpid.apache.org/proton/go/reactor".Durability)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") ExpiryPolicy () (? @"qpid.apache.org/proton/go/reactor".ExpiryPolicy)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Filter () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") IsDynamic () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".t·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Outcomes () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Properties () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetAddress (@"qpid.apache.org/proton/go/reactor".address·3 string "esc:0x0") (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetDistributionMode (@"qpid.apache.org/proton/go/reactor".mode·3 @"qpid.apache.org/proton/go/reactor".DistributionMode) (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetDurability (@"qpid.apache.org/proton/go/reactor".durability·3 @"qpid.apache.org/proton/go/reactor".Durability) (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetDynamic (@"qpid.apache.org/proton/go/reactor".dynamic·3 bool) (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetExpiryPolicy (@"qpid.apache.org/proton/go/reactor".policy·3 @"qpid.apache.org/proton/go/reactor".ExpiryPolicy) (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetTimeout (@"qpid.apache.org/proton/go/reactor".timeout·3 @"time".Duration) (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetType (@"qpid.apache.org/proton/go/reactor".type_·3 @"qpid.apache.org/proton/go/reactor".TerminusType) (? int)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Timeout () (? @"time".Duration)
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Type () (? @"qpid.apache.org/proton/go/reactor".TerminusType)
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_session_t struct {}
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_connection_t struct {}
+	import sync "sync" // indirect
+	type @"sync".Mutex struct { @"sync".state int32; @"sync".sema uint32 }
+	func (@"sync".m·1 *@"sync".Mutex) Lock ()
+	func (@"sync".m·1 *@"sync".Mutex) Unlock ()
+	type @"qpid.apache.org/proton/go/internal".FirstError struct { @"qpid.apache.org/proton/go/internal".err error; @"qpid.apache.org/proton/go/internal".lock @"sync".Mutex }
+	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Get () (? error)
+	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Set (@"qpid.apache.org/proton/go/internal".err·3 error) (? error)
+	type @"net".Addr interface { Network() (? string); String() (? string) }
+	type @"net".Conn interface { Close() (? error); LocalAddr() (? @"net".Addr); Read(@"net".b []byte) (@"net".n int, @"net".err error); RemoteAddr() (? @"net".Addr); SetDeadline(@"net".t @"time".Time) (? error); SetReadDeadline(@"net".t @"time".Time) (? error); SetWriteDeadline(@"net".t @"time".Time) (? error); Write(@"net".b []byte) (@"net".n int, @"net".err error) }
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_transport_t struct {}
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_collector_t struct {}
+	type @"qpid.apache.org/proton/go/reactor".bufferChan struct { @"qpid.apache.org/proton/go/reactor".buffers chan []byte; @"qpid.apache.org/proton/go/reactor".buf1 []byte; @"qpid.apache.org/proton/go/reactor".buf2 []byte }
+	func (@"qpid.apache.org/proton/go/reactor".b·2 *@"qpid.apache.org/proton/go/reactor".bufferChan) @"qpid.apache.org/proton/go/reactor".buffer () (? []byte) { @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1, @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf2 = @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf2, @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1; return @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1[:cap(@"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1)] }
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_event_t struct {}
+	type @"qpid.apache.org/proton/go/reactor".EventType int
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".EventType) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".Event struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_event_t; @"qpid.apache.org/proton/go/reactor".eventType @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".connection @"qpid.apache.org/proton/go/reactor".Connection; @"qpid.apache.org/proton/go/reactor".session @"qpid.apache.org/proton/go/reactor".Session; @"qpid.apache.org/proton/go/reactor".link @"qpid.apache.org/proton/go/reactor".Link; @"qpid.apache.org/proton/go/reactor".delivery @"qpid.apache.org/proton/go/reactor".Delivery }
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Connection () (? @"qpid.apache.org/proton/go/reactor".Connection) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".connection }
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Delivery () (? @"qpid.apache.org/proton/go/reactor".Delivery) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".delivery }
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".eventType == @"qpid.apache.org/proton/go/reactor".EventType(0x0) }
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Link () (? @"qpid.apache.org/proton/go/reactor".Link) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".link }
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Session () (? @"qpid.apache.org/proton/go/reactor".Session) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".session }
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x0") String () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x0") Type () (? @"qpid.apache.org/proton/go/reactor".EventType) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".eventType }
+	type @"qpid.apache.org/proton/go/reactor".EventHandler interface { HandleEvent(@"qpid.apache.org/proton/go/reactor".e @"qpid.apache.org/proton/go/reactor".Event) (? error) }
+	type @"sync".Once struct { @"sync".m @"sync".Mutex; @"sync".done uint32 }
+	func (@"sync".o·1 *@"sync".Once) Do (@"sync".f·2 func() "esc:0x0")
+	type @"qpid.apache.org/proton/go/reactor".Pump struct { @"qpid.apache.org/proton/go/reactor".err @"qpid.apache.org/proton/go/internal".FirstError; @"qpid.apache.org/proton/go/reactor".inject chan func(); @"qpid.apache.org/proton/go/reactor".conn @"net".Conn; @"qpid.apache.org/proton/go/reactor".connection @"qpid.apache.org/proton/go/reactor".Connection; @"qpid.apache.org/proton/go/reactor".transport *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_transport_t; @"qpid.apache.org/proton/go/reactor".collector *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_collector_t; @"qpid.apache.org/proton/go/reactor".read *@"qpid.apache.org/proton/go/reactor".bufferChan; @"qpid.apache.org/proton/go/reactor".write *@"qpid.apache.org/proton/go/reactor".bufferChan; @"qpid.apache.org/proton/go/reactor".handlers []@"qpid.apache.org/proton/go/reactor".EventHandler; @"qpid.apache.org/proton/go/reactor".running chan struct {}; @"qpid.apache.org/proton/go/reactor".closeOnce @"sync".Once }
+	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump) Close (@"qpid.apache.org/proton/go/reactor".err·2 error)
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x1") Connection () (? @"qpid.apache.org/proton/go/reactor".Connection) { return @"qpid.apache.org/proton/go/reactor".p·2.@"qpid.apache.org/proton/go/reactor".connection }
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) Error () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) Id () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) Inject (@"qpid.apache.org/proton/go/reactor".f·3 func()) (? error)
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) InjectWait (@"qpid.apache.org/proton/go/reactor".f·3 func()) (@"qpid.apache.org/proton/go/reactor".err·1 error)
+	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump) Run ()
+	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") Server ()
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) String () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".handle (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (? error)
+	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".pop (@"qpid.apache.org/proton/go/reactor".buf·2 *[]byte)
+	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".process () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".push (@"qpid.apache.org/proton/go/reactor".buf·2 []byte "esc:0x0")
+	type @"qpid.apache.org/proton/go/reactor".Connection struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_connection_t }
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Close ()
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Container () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") DesiredCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Error () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Free ()
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Hostname () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".c·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") LinkHead (@"qpid.apache.org/proton/go/reactor".s·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Link)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Links (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (@"qpid.apache.org/proton/go/reactor".links·1 []@"qpid.apache.org/proton/go/reactor".Link)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") OfferedCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Open ()
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Properties () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Pump () (? *@"qpid.apache.org/proton/go/reactor".Pump)
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Release ()
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteCondition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteContainer () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteDesiredCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteHostname () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteOfferedCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteProperties () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Reset ()
+	func (@"qpid.apache.org/proton/go/reactor".c·3 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Session () (? @"qpid.apache.org/proton/go/reactor".Session, ? error)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SessionHead (@"qpid.apache.org/proton/go/reactor".s·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Session)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Sessions (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (@"qpid.apache.org/proton/go/reactor".sessions·1 []@"qpid.apache.org/proton/go/reactor".Session)
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetContainer (@"qpid.apache.org/proton/go/reactor".container·2 string "esc:0x0")
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetHostname (@"qpid.apache.org/proton/go/reactor".hostname·2 string "esc:0x0")
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetPassword (@"qpid.apache.org/proton/go/reactor".password·2 string "esc:0x0")
+	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetUser (@"qpid.apache.org/proton/go/reactor".user·2 string "esc:0x0")
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") State () (? @"qpid.apache.org/proton/go/reactor".State)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") String () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") User () (? string)
+	type @"qpid.apache.org/proton/go/reactor".Session struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_session_t }
+	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Close ()
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Connection () (? @"qpid.apache.org/proton/go/reactor".Connection)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Error () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Free ()
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") IncomingBytes () (? uint)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") IncomingCapacity () (? uint)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".s·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Next (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Session)
+	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Open ()
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") OutgoingBytes () (? uint)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") OutgoingWindow () (? uint)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Receiver (@"qpid.apache.org/proton/go/reactor".name·3 string "esc:0x0") (? @"qpid.apache.org/proton/go/reactor".Link)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") RemoteCondition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Sender (@"qpid.apache.org/proton/go/reactor".name·3 string "esc:0x0") (? @"qpid.apache.org/proton/go/reactor".Link)
+	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") SetIncomingCapacity (@"qpid.apache.org/proton/go/reactor".capacity·2 uint)
+	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") SetOutgoingWindow (@"qpid.apache.org/proton/go/reactor".window·2 uint)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") State () (? @"qpid.apache.org/proton/go/reactor".State)
+	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".Link struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_link_t }
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Advance () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Available () (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Close ()
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Credit () (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Current () (? @"qpid.apache.org/proton/go/reactor".Delivery)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Delivery (@"qpid.apache.org/proton/go/reactor".tag·3 string "esc:0x0") (? @"qpid.apache.org/proton/go/reactor".Delivery)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Detach ()
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Drain (@"qpid.apache.org/proton/go/reactor".credit·2 int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Drained () (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Draining () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Error () (? error)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Flow (@"qpid.apache.org/proton/go/reactor".credit·2 int)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Free ()
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsDrain () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".l·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsReceiver () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsSender () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Name () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Next (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Link)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Offered (@"qpid.apache.org/proton/go/reactor".credit·2 int)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Open ()
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Queued () (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RcvSettleMode () (? @"qpid.apache.org/proton/go/reactor".RcvSettleMode)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Recv (@"qpid.apache.org/proton/go/reactor".buf·3 []byte "esc:0x0") (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteCondition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteCredit () (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteRcvSettleMode () (? @"qpid.apache.org/proton/go/reactor".RcvSettleMode)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteSndSettleMode () (? @"qpid.apache.org/proton/go/reactor".SndSettleMode)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteSource () (? @"qpid.apache.org/proton/go/reactor".Terminus)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteTarget () (? @"qpid.apache.org/proton/go/reactor".Terminus)
+	func (@"qpid.apache.org/proton/go/reactor".link·3 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Send (@"qpid.apache.org/proton/go/reactor".m·4 @"qpid.apache.org/proton/go/amqp".Message) (? @"qpid.apache.org/proton/go/reactor".Delivery, ? error)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SendBytes (@"qpid.apache.org/proton/go/reactor".bytes·3 []byte "esc:0x0") (? int)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Session () (? @"qpid.apache.org/proton/go/reactor".Session)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SetDrain (@"qpid.apache.org/proton/go/reactor".drain·2 bool)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SetRcvSettleMode (@"qpid.apache.org/proton/go/reactor".mode·2 @"qpid.apache.org/proton/go/reactor".RcvSettleMode)
+	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SetSndSettleMode (@"qpid.apache.org/proton/go/reactor".mode·2 @"qpid.apache.org/proton/go/reactor".SndSettleMode)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SndSettleMode () (? @"qpid.apache.org/proton/go/reactor".SndSettleMode)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Source () (? @"qpid.apache.org/proton/go/reactor".Terminus)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") State () (? @"qpid.apache.org/proton/go/reactor".State)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") String () (? string)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Target () (? @"qpid.apache.org/proton/go/reactor".Terminus)
+	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Unsettled () (? int)
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_disposition_t struct {}
+	type @"qpid.apache.org/proton/go/reactor".Disposition struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_disposition_t }
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Annotations () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Data () (? @"qpid.apache.org/proton/go/reactor".Data)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") IsFailed () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".d·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") IsUndeliverable () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SectionNumber () (? uint16)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SectionOffset () (? uint64)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetFailed (@"qpid.apache.org/proton/go/reactor".failed·2 bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetSectionNumber (@"qpid.apache.org/proton/go/reactor".section_number·2 uint16)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetSectionOffset (@"qpid.apache.org/proton/go/reactor".section_offset·2 uint64)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetUndeliverable (@"qpid.apache.org/proton/go/reactor".undeliverable·2 bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Type () (? uint64)
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_size_t uint64
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_char int8
+	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct___0 struct { @"qpid.apache.org/proton/go/reactor".size @"qpid.apache.org/proton/go/reactor"._Ctype_size_t; @"qpid.apache.org/proton/go/reactor".start *@"qpid.apache.org/proton/go/reactor"._Ctype_char }
+	type @"qpid.apache.org/proton/go/reactor".DeliveryTag struct { @"qpid.apache.org/proton/go/reactor".pn @"qpid.apache.org/proton/go/reactor"._Ctype_struct___0 }
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".DeliveryTag) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".Delivery struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_delivery_t }
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Accept ()
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Buffered () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Clear ()
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Current () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Dump ()
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") HasMessage () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".d·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Link () (? @"qpid.apache.org/proton/go/reactor".Link)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Local () (? @"qpid.apache.org/proton/go/reactor".Disposition)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") LocalState () (? uint64)
+	func (@"qpid.apache.org/proton/go/reactor".delivery·3 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Message () (@"qpid.apache.org/proton/go/reactor".m·1 @"qpid.apache.org/proton/go/amqp".Message, @"qpid.apache.org/proton/go/reactor".err·2 error)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Partial () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Pending () (? uint)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Readable () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Reject ()
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Release (@"qpid.apache.org/proton/go/reactor".delivered·2 bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Remote () (? @"qpid.apache.org/proton/go/reactor".Disposition)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") RemoteState () (? uint64)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Settle ()
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") SettleAs (@"qpid.apache.org/proton/go/reactor".disposition·2 uint64)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Settled () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Tag () (? @"qpid.apache.org/proton/go/reactor".DeliveryTag)
+	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Update (@"qpid.apache.org/proton/go/reactor".state·2 uint64)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Updated () (? bool)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Writable () (? bool)
+	type @"".Disposition uint64
+	func (@"".d·2 @"".Disposition) String () (? string)
+	type @"".ReceivedMessage struct { Message @"qpid.apache.org/proton/go/amqp".Message; @"".eDelivery @"qpid.apache.org/proton/go/reactor".Delivery; @"".receiver @"".Receiver }
+	func (@"".rm·2 *@"".ReceivedMessage) Accept () (? error)
+	func (@"".rm·2 *@"".ReceivedMessage) Acknowledge (@"".disposition·3 @"".Disposition) (@"".err·1 error)
+	func (@"".rm·2 *@"".ReceivedMessage) Reject () (? error)
+	type @"".Receiver interface { AddCredit(@"".n int); Buffer() (? chan<- @"".ReceivedMessage); Close(? error); Credit() (@"".len int, @"".credit int, @"".max int); Error() (? error); IsOpen() (? bool); IsReceiver() (? bool); IsSender() (? bool); Name() (? string); Open() (? error); Receive() (? @"".ReceivedMessage, ? error); SetCapacity(@"".capacity int, @"".prefetch bool); SetName(? string); SetSource(? string); SetTarget(? string); Source() (? string); String() (? string); Target() (? string) }
+	type @"".errorHolder struct { @"".err @"qpid.apache.org/proton/go/internal".FirstError }
+	func (@"".e·2 *@"".errorHolder) Error () (? error)
+	func (@"".e·2 *@"".errorHolder) @"".setError (@"".err·3 error) (? error)
+	type @"".endpoint struct { ? @"".errorHolder; @"".str string }
+	func (@"".e·2 *@"".endpoint "esc:0x1") String () (? string) { return @"".e·2.@"".str }
+	type @"qpid.apache.org/proton/go/reactor".MessagingEventType int
+	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".MessagingEventType) String () (? string)
+	type @"qpid.apache.org/proton/go/reactor".MessagingHandler interface { HandleMessagingEvent(? @"qpid.apache.org/proton/go/reactor".MessagingEventType, ? @"qpid.apache.org/proton/go/reactor".Event) (? error) }
+	type @"qpid.apache.org/proton/go/reactor".Endpoint interface { Close(); Condition() (? @"qpid.apache.org/proton/go/reactor".Condition); Open(); RemoteCondition() (? @"qpid.apache.org/proton/go/reactor".Condition); State() (? @"qpid.apache.org/proton/go/reactor".State); String() (? string) }
+	type @"qpid.apache.org/proton/go/reactor".endpointDelegator struct { @"qpid.apache.org/proton/go/reactor".remoteOpen @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".remoteClose @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".localOpen @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".localClose @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".opening @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".opened @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".closing @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".closed @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".error @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".
 endpoint func(? @"qpid.apache.org/proton/go/reactor".Event) (? @"qpid.apache.org/proton/go/reactor".Endpoint); @"qpid.apache.org/proton/go/reactor".delegate @"qpid.apache.org/proton/go/reactor".MessagingHandler }
+	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".endpointDelegator) HandleEvent (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (@"qpid.apache.org/proton/go/reactor".err·1 error)
+	type @"qpid.apache.org/proton/go/reactor".MessagingDelegator struct { @"qpid.apache.org/proton/go/reactor".delegate @"qpid.apache.org/proton/go/reactor".MessagingHandler; @"qpid.apache.org/proton/go/reactor".connection @"qpid.apache.org/proton/go/reactor".endpointDelegator; @"qpid.apache.org/proton/go/reactor".session @"qpid.apache.org/proton/go/reactor".endpointDelegator; @"qpid.apache.org/proton/go/reactor".link @"qpid.apache.org/proton/go/reactor".endpointDelegator; @"qpid.apache.org/proton/go/reactor".handshaker @"qpid.apache.org/proton/go/reactor".EventHandler; @"qpid.apache.org/proton/go/reactor".flowcontroller @"qpid.apache.org/proton/go/reactor".EventHandler; AutoSettle bool; AutoAccept bool; Prefetch int; PeerCloseError bool }
+	func (@"qpid.apache.org/proton/go/reactor".d·2 *@"qpid.apache.org/proton/go/reactor".MessagingDelegator) HandleEvent (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (? error)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 *@"qpid.apache.org/proton/go/reactor".MessagingDelegator) @"qpid.apache.org/proton/go/reactor".incoming (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (@"qpid.apache.org/proton/go/reactor".err·1 error)
+	func (@"qpid.apache.org/proton/go/reactor".d·2 *@"qpid.apache.org/proton/go/reactor".MessagingDelegator) @"qpid.apache.org/proton/go/reactor".outgoing (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (@"qpid.apache.org/proton/go/reactor".err·1 error)
+	type @"".sender struct { ? @"".link; @"".deliveries map[@"qpid.apache.org/proton/go/reactor".Delivery]*@"".SentMessage }
+	func (@"".s·1 *@"".sender) Close (@"".err·2 error)
+	func (@"".s·2 *@"".sender) Open () (@"".err·1 error)
+	func (@"".s·3 *@"".sender) Send (@"".m·4 @"qpid.apache.org/proton/go/amqp".Message) (@"".sm·1 *@"".SentMessage, @"".err·2 error)
+	func (@"".s·1 *@"".sender) @"".close (@"".err·2 error)
+	func (@"".s·1 *@"".sender "esc:0x0") @"".handleDelivery (@"".delivery·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0")
+	type @"".SentMessage struct { @"".sender *@"".sender; @"".eDelivery @"qpid.apache.org/proton/go/reactor".Delivery; @"".done chan struct {}; @"".disposition @"".Disposition }
+	func (@"".sm·3 *@"".SentMessage) Wait () (? @"".Disposition, ? error)
+	func (@"".sm·3 *@"".SentMessage) WaitTimeout (@"".timeout·4 @"time".Duration) (? @"".Disposition, ? error)
+	type @"".Sender interface { Close(? error); Error() (? error); IsOpen() (? bool); IsReceiver() (? bool); IsSender() (? bool); Name() (? string); Open() (? error); Send(@"".m @"qpid.apache.org/proton/go/amqp".Message) (@"".sm *@"".SentMessage, @"".err error); SetName(? string); SetSource(? string); SetTarget(? string); Source() (? string); String() (? string); Target() (? string) }
+	type @"".session struct { ? @"".endpoint; @"".eSession @"qpid.apache.org/proton/go/reactor".Session; @"".connection *@"".Connection }
+	func (@"".s·1 *@"".session) Close (@"".err·2 error)
+	func (@"".s·2 *@"".session "esc:0x1") Connection () (? *@"".Connection) { return @"".s·2.@"".connection }
+	func (@"".s·2 *@"".session) NewReceiver (@"".target·3 string) (@"".rcv·1 @"".Receiver)
+	func (@"".s·2 *@"".session) NewSender (@"".target·3 string) (@"".snd·1 @"".Sender)
+	func (@"".s·2 *@"".session) Open () (? error)
+	func (@"".s·2 *@"".session "esc:0x1") @"".eEndpoint () (? @"qpid.apache.org/proton/go/reactor".Endpoint) { return @"".s·2.@"".eSession }
+	func (@"".s·2 *@"".session "esc:0x1") @"".pump () (? *@"qpid.apache.org/proton/go/reactor".Pump) { return @"".s·2.@"".connection.@"".pump }
+	type @"".link struct { ? @"".endpoint; @"".session *@"".session; @"".isSender bool; @"".eLink @"qpid.apache.org/proton/go/reactor".Link; @"".name string; @"".source string; @"".target string; @"".isOpen bool }
+	func (@"".l·2 *@"".link "esc:0x1") Connection () (? *@"".Connection)
+	func (@"".l·2 *@"".link "esc:0x0") IsOpen () (? bool) { return @"".l·2.@"".isOpen }
+	func (@"".l·2 *@"".link "esc:0x0") IsReceiver () (? bool) { return !@"".l·2.@"".isSender }
+	func (@"".l·2 *@"".link "esc:0x0") IsSender () (? bool) { return @"".l·2.@"".isSender }
+	func (@"".l·2 *@"".link "esc:0x1") Name () (? string) { return @"".l·2.@"".name }
+	func (@"".l·2 *@"".link "esc:0x1") Session () (? @"".Session) { return @"".l·2.@"".session }
+	func (@"".l·1 *@"".link) SetName (@"".s·2 string)
+	func (@"".l·1 *@"".link) SetSource (@"".s·2 string)
+	func (@"".l·1 *@"".link) SetTarget (@"".s·2 string)
+	func (@"".l·2 *@"".link "esc:0x1") Source () (? string) { return @"".l·2.@"".source }
+	func (@"".l·2 *@"".link "esc:0x1") Target () (? string) { return @"".l·2.@"".target }
+	func (@"".l·1 *@"".link) @"".close (@"".err·2 error)
+	func (@"".l·2 *@"".link "esc:0x0") @"".handler () (? *@"".handler)
+	func (@"".l·2 *@"".link) @"".localSetup () (? error)
+	func (@"".l·2 *@"".link) @"".open () (? error)
+	func (@"".l·2 *@"".link "esc:0x0") @"".pump () (? *@"qpid.apache.org/proton/go/reactor".Pump)
+	func (@"".l·1 *@"".link) @"".setPanicIfLink ()
+	func (@"".l·1 *@"".link) @"".setPanicIfOpen ()
+	func (@"".l·1 *@"".link) @"".setString ()
+	type @"".policy interface { Post(? *@"".receiver, ? error); Pre(? *@"".receiver) }
+	type @"".receiver struct { ? @"".link; @"".capacity int; @"".prefetch bool; @"".buffer chan @"".ReceivedMessage; @"".policy @"".policy }
+	func (@"".r·1 *@"".receiver) AddCredit (@"".n·2 int)
+	func (@"".r·2 *@"".receiver "esc:0x1") Buffer () (? chan<- @"".ReceivedMessage) { return @"".r·2.@"".buffer }
+	func (@"".r·2 *@"".receiver "esc:0x0") Capacity () (? int) { return cap(@"".r·2.@"".buffer) }
+	func (@"".r·1 *@"".receiver) Close (@"".err·2 error)
+	func (@"".r·4 *@"".receiver) Credit () (@"".buffered·1 int, @"".credit·2 int, @"".capacity·3 int)
+	func (@"".r·2 *@"".receiver) Open () (@"".err·1 error)
+	func (@"".r·3 *@"".receiver) Receive () (@"".rm·1 @"".ReceivedMessage, @"".err·2 error)
+	func (@"".r·1 *@"".receiver) SetCapacity (@"".capacity·2 int, @"".prefetch·3 bool)
+	func (@"".r·1 *@"".receiver) @"".close (@"".err·2 error)
+	func (@"".r·4 *@"".receiver "esc:0x0") @"".credit () (@"".buffered·1 int, @"".credit·2 int, @"".capacity·3 int)
+	func (@"".r·1 *@"".receiver) @"".handleDelivery (@"".delivery·2 @"qpid.apache.org/proton/go/reactor".Delivery)
+	type @"".handler struct { @"".delegator *@"qpid.apache.org/proton/go/reactor".MessagingDelegator; @"".connection *@"".Connection; @"".receivers map[@"qpid.apache.org/proton/go/reactor".Link]*@"".receiver; @"".senders map[@"qpid.apache.org/proton/go/reactor".Link]*@"".sender; @"".sessions map[@"qpid.apache.org/proton/go/reactor".Session]*@"".session }
+	func (@"".h·2 *@"".handler) HandleMessagingEvent (@"".t·3 @"qpid.apache.org/proton/go/reactor".MessagingEventType, @"".e·4 @"qpid.apache.org/proton/go/reactor".Event) (? error)
+	func (@"".h·1 *@"".handler "esc:0x0") @"".close ()
+	type @"qpid.apache.org/proton/go/amqp".UidCounter struct { @"qpid.apache.org/proton/go/amqp".count uint64 }
+	func (@"qpid.apache.org/proton/go/amqp".uc·2 *@"qpid.apache.org/proton/go/amqp".UidCounter) Next () (? string)
+	func (@"qpid.apache.org/proton/go/amqp".uc·2 *@"qpid.apache.org/proton/go/amqp".UidCounter) NextInt () (? uint64)
+	type @"qpid.apache.org/proton/go/internal".FlexChannel struct { In chan<- interface {}; Out <-chan interface {}; @"qpid.apache.org/proton/go/internal".in chan interface {}; @"qpid.apache.org/proton/go/internal".out chan interface {}; @"qpid.apache.org/proton/go/internal".buffer []interface {}; @"qpid.apache.org/proton/go/internal".limit int }
+	func (@"qpid.apache.org/proton/go/internal".fc·1 *@"qpid.apache.org/proton/go/internal".FlexChannel) @"qpid.apache.org/proton/go/internal".run ()
+	type @"net".Listener interface { Accept() (@"net".c @"net".Conn, @"net".err error); Addr() (? @"net".Addr); Close() (? error) }
+	type @"".Connection struct { Server bool; AllowIncoming int; LinkPrefix string; ? @"".endpoint; @"".handler *@"".handler; @"".pump *@"qpid.apache.org/proton/go/reactor".Pump; @"".err @"qpid.apache.org/proton/go/internal".FirstError; @"".linkNames @"qpid.apache.org/proton/go/amqp".UidCounter; @"".eConnection @"qpid.apache.org/proton/go/reactor".Connection; @"".incoming *@"qpid.apache.org/proton/go/internal".FlexChannel }
+	func (@"".c·2 *@"".Connection) Accept (@"".l·3 @"net".Listener) (? error)
+	func (@"".c·1 *@"".Connection) Close (@"".err·2 error)
+	func (@"".c·2 *@"".Connection) Dial (@"".network·3 string, @"".address·4 string) (? error)
+	func (@"".c·3 *@"".Connection) Incoming () (? @"".Endpoint, ? error)
+	func (@"".c·3 *@"".Connection) IncomingTimeout (@"".timeout·4 @"time".Duration) (? @"".Endpoint, ? error)
+	func (@"".c·2 *@"".Connection) Open (@"".conn·3 @"net".Conn) (@"".err·1 error)
+	func (@"".c·3 *@"".Connection) OpenSession () (@"".s·1 @"".Session, @"".err·2 error)
+	func (@"".c·1 *@"".Connection) @"".close (@"".err·2 error)
+	func (@"".c·1 *@"".Connection "esc:0x0") @"".handleIncoming (@"".sn·2 *@"".session, @"".l·3 @"qpid.apache.org/proton/go/reactor".Link)
+	func (@"".c·2 *@"".Connection) @"".nextLinkName () (? string)
+	type @"".Session interface { Close(? error); Connection() (? *@"".Connection); Error() (? error); NewReceiver(@"".target string) (? @"".Receiver); NewSender(@"".target string) (? @"".Sender); Open() (? error); String() (? string) }
+	type @"qpid.apache.org/proton/go/internal".Error string
+	func (@"qpid.apache.org/proton/go/internal".e·2 @"qpid.apache.org/proton/go/internal".Error "esc:0x0") Error () (? string) { return "proton: " + string(@"qpid.apache.org/proton/go/internal".e·2) }
+	var @"".Timeout @"qpid.apache.org/proton/go/internal".Error
+	const @"".Forever @"time".Duration = -0x1
+	const @"".Unlimited = -0x1
+	const @"".NoDisposition @"".Disposition = 0x0
+	const @"".Accepted = 0x24
+	const @"".Rejected = 0x25
+	const @"".Released = 0x26
+	func @"".init ()
+	var @"time".months [12]string
+	var @"time".days [7]string
+	var @"time".Local *@"time".Location
+	var @"time".UTC *@"time".Location
+
+$$
+_go_.6          0           0     0     644     468572    `
+go object linux amd64 go1.4.2 X:precisestack
+
+!
+go13ld@qpid.apache.org/proton/go/amqp.aFqpid.apache.org/proton/go/reactor.a
+fmt.aio.aHqpid.apache.org/proton/go/internal.areflect.atime.aruntime/cgo.asyscall.a
+net.a�"".newHandler�	�	dH�%H;aw���H��XH�H�$H�D$�H�\$H�\$@H�H�$H�D$�H�\$H�\$8H�H�$H�D$�H�\$H�\$0H�H�$�H�L$H��H����1��H�L$(H�$H�<$�yH�$H�\$`H�\$�H�\$(H�$H�<$�EH�$H�\$@H�\$�H�\$(H�$H�<$�H�$H�\$8H�\$�H�\$(H�$H�<$��H�$ H�\$0H�\$�H�D$(H�D$ H�D$(H�1�H9�tzH�L$(H�D$HH�$H�L$PH�L$�H�D$H�\$ H�$H�<$t?H�D$�H�D$ H�HǃXH�1�@��QH�1�@��PH�D$hH��XÉ%�H�H�$H�H�\$H�H�\$�H�D$�T����%�����%������%�����%�{�����Y���,
+ 0runtime.morestack_noctxt:xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver^runtime.makemap�ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�runtime.makemap�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�runtime.makemap�type."".handler�"runtime.newobject�� runtime.duffzero�.runtime.writebarrierptr�.runtime.writebarrierptr�.runtime.writebarrierptr�.runtime.writebarrierptr��go.itab.*"".handler.qpid.apache.org/proton/go/reactor.MessagingHandler�nqpid.apache.org/proton/go/reactor.NewMessagingDelegator�.runtime.writebarrierptr� type.*"".handler�ntype.qpid.apache.org/proton/go/reactor.MessagingHandler��go.itab.*"".handler.qpid.apache.org/proton/go/reactor.MessagingHandler� runtime.typ2Itab �"".autotmp_0033_ type.*"".handle
 r"".autotmp_0031 type.*"".handler"".autotmp_0030O|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session"".autotmp_0029?ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender"".autotmp_0028/xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver"".ho type.*"".handler"".~r1 type.*"".handler"".c&type.*"".Connection����v�4L##�Y
+	;;0.##A(((:�JTgclocals·a89e82532b08703817da6ad245f4f6c1Tgclocals·afe2b15161969548d2683e49e081ad97�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go�D"".(*handler).HandleMessagingEvent�:�:dH�%H��$ ���H;Aw���H��`H��$hHDŽ$�HDŽ$�H��$pH���>H���tH���H��$xH��$@H��H���H��$XH��$�H�$��\$H��H!À���1�<�.H��$xH��$�H��H���H��$�H��$hH�kH�,$H�D$hH�D$�H�T$H��$xH��$ H��H���H��$8H��$�H��$�H��$�H��$�H�H�$H��$hH�k H�l$H��$�H�\$H��$�H�\$�H��$hH�iH���1�H9�toH��$�H��$@H�H��$8H�H�$H�YH��
 ��H�+H�l$H��$8H�\$�HDŽ$�HDŽ$�H��`�H��$xH��$H��H���H��$H��$�H��$�H�H�$H�5H�t$H�5H�l$H��H�H�H�\$ H�H�CH�C�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$�H�\$�H�\$ H��$H�\$(H��$ H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$H�$H��$ H�\$�����H���M���H���y���H��$xH��$H��H���H��$0H��$�H��$�H�$�H��$��\$H��H!À���1�<����H��$hH�mH���1�H9��&H��$H�H�$H�5H�t$H�5H�l$H��H�H�H�\$ H�H�CH�C�H�\$8H��$pH�
 �H���H�H�$H�H�\$H�H�\$H��$H�\$�H�\$ H��$H�\$(H��$ H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$H�$H��$ H�\$������H�4$�H�\$H��$�H�H�$H��$hH�k H�l$H��$�H�\$�H��$�H�\$H�1�H9��&H��$H�H�$H�5H�t$H�5H�l$H��H�H�H�\$ H�H�CH�C�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$H�\$�H�\$ H��$H�\$(H��$ H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$H�$H��$ H�\$��J���H��$hH�kH�,$H�D$H�T$��&���H�������H��u^H��$xH��$�H�
 ���H���H��$�H��$�H��$�H�H�$H�j H�l$H��$�H�\$�����H�������H��$xH��$�H��H���H��$�H�D$xH��$�H�$�H�D$H��$�H�$�H�L$H�D$H��$H��$H��$�H��$H�H�$H��$hH�kH�l$H��$H�\$�H�\$H�1�H9�t#H�$H��$H�\$H��$H�\$�H��$�H��$H�H�$H��$hH�kH�l$H��$H�\$�H�\$H�1�H9������H�$H��$H�\$H��$H�\$��Z���H���{H���H��$xH��$pH��H���H��$�H��$�H��$H�H�$H�jH�l$H��$H�\$�H�\$H�1�H9�tH�$H�\$H�H�C�H��$xH��$0H��H���H��$PH��$�H��$H�
 ��H�$H��$hH�kH�l$H��$H�\$�H�\$H�1�H9��M���H�$H�\$H�H�C��+���H���!���H��$xH��$�H��H���H��$�H�D$pH��$H�H�$H�jH�l$H��$H�\$�H�\$H�1�H9�t;H��$xH��$PH��H���H��$xH�$H�L$`H�L$�����H��$xH��$�H��H���H��$H��$�H��$H��$HH�H�CH��$HH���IH��H��H��$XH��$`H��$hH�H�$H��$H�\$�H�T$H�D$H��$XH�$H��$(H�T$H��$0H�D$�H�H�$H�5H�t$H�5H�l$H��H�H�H��$XH�\$ H��$`H�\$(H��$hH�\$0�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l
 $H��H��H�H�H��$hH�kH�,$�����������H���OH��$xH��$�H��H���H��$H��$�H��$H�H�$H�jH�l$H��$H�\$�H�\$H�1�H9�t>H��$xH��$�H��H���H��$�H�$H��$�H�L$��%���H��$xH��$�H��H���H��$�H�D$XH��$H��$HH�H�CH��$HH���IH��H��H��$XH��$`H��$hH�H�$H��$H�\$�H�T$H�D$H��$XH�$H��$(H�T$H��$0H�D$�H�H�$H�5H�t$H�5H�l$H��H�H�H��$XH�\$ H��$`H�\$(H��$hH�\$0�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$hH�kH�,$���
 ���������H���r���H�$��d����
+00runtime.morestack_noctxt�� runtime.duffcopy�^qpid.apache.org/proton/go/reactor.Session.State�� runtime.duffcopy�"".newSession�� runtime.duffcopy�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�$runtime.mapassign1� type.*"".session�0type.chan<- interface {}�"runtime.chansend1�� runtime.duffcopy�	Rqpid.apache.org/proton/go/amqp.NotAllowed�	Rqpid.apache.org/proton/go/amqp.NotAllowed�	Ngo.string."remote sessions not allowed"�
+Jqpid.apache.org/proton/go/amqp.Errorf�
+� runtime.duffcopy�
+\type.qpid.apache.org/proton/go/reactor.Session�
+^type.qpid.apache.org/proton/go/reactor.Endpoint�
+�go.itab.qpid.apache.org/proton/go/reactor.Session.qpid.apache.org/proton/go/reactor.Endpoint�runtime.convT2I�Rtype.qpid.apache.org/proton/go/amqp.Error�type.error�dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�runtime.convT2I�
Xqpid.apache.org/proton/go/reactor.CloseError�� runtime.duffcopy�Xqpid.apache.org/proton/go/reactor.Link.State�Rqpid.apache.org/proton/go/amqp.NotAllowed�Rqpid.apache.org/proton/go/amqp.NotAllowed�6go.string."no remote links"�Jqpid.apache.org/proton/go/amqp.Errorf�� runtime.duffcopy�Vtype.qpid.apache.org/proton/go/reactor.Link�^type.qpid.apache.org/proton/go/reactor.Endpoint��go.itab.qpid.apache.org/proton/go/reactor.Link.qpid.apache.org/proton/go/reactor.Endpoint�runtime.convT2I�Rtype.qpid.apache.org/proton/go/amqp.Error�type.error�dgo.ita
 b.qpid.apache.org/proton/go/amqp.Error.error�runtime.convT2I�Xqpid.apache.org/proton/go/reactor.CloseError�\qpid.apache.org/proton/go/reactor.Link.Session�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�$runtime.mapaccess1�Xqpid.apache.org/proton/go/amqp.InternalError�Xqpid.apache.org/proton/go/amqp.InternalError�Pgo.string."cannot find session for link"�Jqpid.apache.org/proton/go/amqp.Errorf�� runtime.duffcopy�Vtype.qpid.apache.org/proton/go/reactor.Link�^type.qpid.apache.org/proton/go/reactor.Endpoint��go.itab.qpid.apache.org/proton/go/reactor.Link.qpid.apache.org/proton/go/reactor.Endpoint�runtime.convT2I�Rtype.qpid.apache.org/proton/go/amqp.Error�type.error�dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�runtime.convT2I�Xqpid.apache.org/proton/go/reactor.CloseErro
 r�>"".(*Connection).handleIncoming�� runtime.duffcopy�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�"runtime.mapdelete�� runtime.duffcopy�lqpid.apache.org/proton/go/reactor.Link.RemoteCondition�bqpid.apache.org/proton/go/reactor.Condition.Error�xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�$runtime.mapaccess1� ("".(*receiver).close� ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�!$runtime.mapaccess1�"$"".(*sender).close�#� runtime.duffcopy�#xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�#$runtime.mapaccess1�$("".(*receiver).close�%� runtime.duffcopy�%ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�&$runtime.mapaccess1�&$"".(*sender).close�'� runtime.duffcopy�(ttype.map[qpid.apache.org/pro
 ton/go/reactor.Link]*"".sender�($runtime.mapaccess1�)� runtime.duffcopy�)6"".(*sender).handleDelivery�*� runtime.duffcopy�+Vtype.qpid.apache.org/proton/go/reactor.Link�,runtime.convT2E�,2runtime.writebarrieriface�-Xqpid.apache.org/proton/go/amqp.InternalError�-Xqpid.apache.org/proton/go/amqp.InternalError�-Tgo.string."cannot find sender for link %s"�.Jqpid.apache.org/proton/go/amqp.Errorf�.� runtime.duffcopy�.Rtype.qpid.apache.org/proton/go/amqp.Error�.type.error�/dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�/runtime.convT2I�0,"".(*Connection).close�0� runtime.duffcopy�1xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�1$runtime.mapaccess1�2� runtime.duffcopy�3:"".(*receiver).handleDelivery�3� runtime.duffcopy�5Vtype.qpid.apache.org/prot
 on/go/reactor.Link�5runtime.convT2E�62runtime.writebarrieriface�6Xqpid.apache.org/proton/go/amqp.InternalError�6Xqpid.apache.org/proton/go/amqp.InternalError�6Xgo.string."cannot find receiver for link %s"�7Jqpid.apache.org/proton/go/amqp.Errorf�8� runtime.duffcopy�8Rtype.qpid.apache.org/proton/go/amqp.Error�8type.error�8dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�8runtime.convT2I�9,"".(*Connection).close�:&"".(*handler).close���"".autotmp_0084^type.qpid.apache.org/proton/go/reactor.Endpoint"".autotmp_0083^type.qpid.apache.org/proton/go/reactor.Endpoint"".autotmp_0082type.bool"".autotmp_0081�
^type.qpid.apache.org/proton/go/reactor.Endpoint"".autotmp_0079"type.interface {}"".autotmp_0078*type.*[1]interface {}"".autotmp_0077&type.[]interface {}"".autotmp_0076�"type.interface {}"".autotmp_0074�&
 type.[]interface {}"".autotmp_0072type.*"".sender"".autotmp_0071Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0070"type.*"".receiver"".autotmp_0069Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0068type.*"".sender"".autotmp_0067Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0066"type.*"".receiver"".autotmp_0065Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0063�
`type.qpid.apache.org/proton/go/reactor.Condition"".autotmp_0062Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0061Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0060 type.*"".session"".autotmp_0059\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0058Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0057Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0056Xtype.qpid.apache.org/proton/go/reactor.State"".autotmp_0055\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0
 054Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0053\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0052�"type.interface {}"".autotmp_0051 type.*"".session"".autotmp_0050�
 type.*"".session"".autotmp_0049�
\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0046Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0045Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0044(type.[1]interface {}"".autotmp_0042Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0041�Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0040Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0039�(type.[1]interface {}"".autotmp_0037�
Vtype.qpid.apache.org/proton/go/reactor.Link"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2_Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/p
 roton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type
 .qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�	Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�^type.qpid.apache.org/proton/go/reactor.DeliveryLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�
+Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�^type.qpid.apache.org/proton/go/reactor.DeliveryLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".err�
type.error"".l�
Vtype.qpid.apache.org/proton/go/reactor.Link"".l�Vtype.qpid.apache.org/proton/go/reactor.Link"".s� type.*"".session"".~r2�type.error"".e Xtype.qpid.apache.org/proton/go/reactor.Event"".trtype.qpid.apache.org/proton/go/reactor.MessagingEventType"".h type.*"".handler%�������jE&
+VG�Ob ]�^i
++;�HAT�>78K	YT1
+(AM#Q#$�
+z
+ht}
+e6xq�rq
+h9�����f
+	
+���i�MO2W�MO2;nMO2$pHn2>6r,
a0
eE
��M�H
��MH!Tgclocals·b82cb6ebf331abc37c079649e2b6da7cTgclocals·8db54c8e460d681e679ff513c38148da�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go�&"".(*handler).close��dH�%H�D$�H;Aw���H��H��$�H�kH�|$h1��H�H�$H�l$H�\$hH�\$�H�\$h1�H9�tNH�\$pH�+H�\$hH����H�,$H�\$H�H�C�H�\$hH�$�H�\$h1�H9�u�H��$�H�kH�|$1��H�H�$H�l$H�\$H�\$�H�\$1�H9�tJH�\$ H�+H�\$H��t?H�,$H�\$H�H�C�H�\$H�$�H�\$1�H9�u�H�ĸÉ뽉�)���
+*0runtime.morestack_noctxtl� runtime.duffzerozxtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�&runtime.mapiterinit�("".(*receiver).close�&runtime.mapiternext�� runtime.duffzero�ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�&runtime.mapiterinit�$"".(*sender).close�&runtime.mapiternext�"".autotmp_0095�~type.map.iter[qpid.apache.org/proton/go/reactor.Link]*"".sender"".autotmp_0093��type.map.iter[qpid.apache.org/proton/go/reactor.Link]*"".receiver"".h type.*"".handler"�����4�"ZVT�{Tgclocals·15395a9df917b4c9aa74d5c6c7e1ebf4Tgclocals·71f80432bc6668593abff0f0dbd021b7�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go�4"".(*errorHolder).setError��dH�%H;aw���H��(H�D$HH�D$P
 H�\$0H�$H�<$t2H�\$8H�\$H�\$@H�\$�H�L$H�D$ H�L$HH�D$PH��(É%��
+ 0runtime.morestack_noctxt�hqpid.apache.org/proton/go/internal.(*FirstError).SetPP"".~r10type.error"".errtype.error"".e(type.*"".errorHolderPSOP�|�
+P0Tgclocals·57e1009a600f832f844e0e3c49ba5a89Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�."".(*errorHolder).Error��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�<$t�H�L$H�D$H�L$(H�D$0H��É%��
+ 0runtime.morestack_noctxtzhqpid.apache.org/proton/go/internal.(*FirstError).Get00"".~r0type.error"".e(type.*"".errorHolder0?/0p~p
+<4Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�*"".(*endpoint).String`DH�\$H��tH�kH�l$H�k H�l$É��0"".~r0type.string"".e"type.*"".endpoint00�0Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�2"".(*link).setPanicIfOpen��dH�%H;aw���H��H��$��ip@����H��H�\$XH�H�CH�\$XH����H��H��H�T$pH�L$xH�\$hH�$H�H�D$8H�D$H�l$@H�l$�H�H�,$H��H��H�H�H�\$hH�\$H�\$pH�\$H�\$xH�\$ �H�\$(H�\$HH�\$0H�\$PH�H�$H�\$HH�\$�H�\$H�,$H��H��H�H��
 ��8���H��
+ 0runtime.morestack_noctxt�type.*"".link�2runtime.writebarrieriface�^go.string."cannot set property on open link %s"�Rqpid.apache.org/proton/go/internal.Errorf�Ztype.qpid.apache.org/proton/go/internal.Error�runtime.convT2E�runtime.gopanic�"".autotmp_0103/&type.[]interface {}"".autotmp_0102oZtype.qpid.apache.org/proton/go/internal.Error"".autotmp_0100O(type.[1]interface {}"".ltype.*"".link�����%��8.5Tgclocals·fbd5b7009fdd3864023723132632a4f4Tgclocals·2276d8371a4f8737752113708e64c2a5�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�2"".(*link).setPanicIfLink��dH�%H�D$�H;Aw���H��H��$�H�$�H��$�H���&H�Y8H�\$81�H9��1�<��H��H�\$`H�H�CH�\$`H����H
 ��H��H�T$xH��$�H�\$pH�$H�H�D$@H�D$H�l$HH�l$�H�H�,$H��H��H�H�H�\$pH�\$H�\$xH�\$H��$�H�\$ �H�\$(H�\$PH�\$0H�\$XH�H�$H�\$PH�\$�H�\$H�,$H��H��H�H����2���H�Ĉ�H�������������
+*0runtime.morestack_noctxt^2"".(*link).setPanicIfOpen�type.*"".link�2runtime.writebarrieriface�xgo.string."cannot set set link property on incoming link %s"�Rqpid.apache.org/proton/go/internal.Errorf�Ztype.qpid.apache.org/proton/go/internal.Error�runtime.convT2E�runtime.gopanic�
+"".autotmp_0114/&type.[]interface {}"".autotmp_0112oZtype.qpid.apache.org/proton/go/internal.Error"".autotmp_0110O(type.[1]interface {}Lqpid.apache.org/proton/go/reactor.l·2�Vtype.qpid.apache.org/proton/go/reactor.Link"".ltype.*"".link"����!��"(�!.�;.OTgclocals·fbd5b7009fdd3864023723132632a4f4Tgclocals·bdc8dbf2e07519097eddde01a6360fd2�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�""".(*link).Source`DH�\$H��tH�kPH�l$H�kXH�l$É��0"".~r0type.string"".ltype.*"".link00�0Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�""".(*link).Target`DH�\$H��tH�k`H�l$H�khH�l$É��0"".~r0type.string"".ltype.*"".link00�0Tgc
 locals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�"".(*link).Name`DH�\$H��tH�k@H�l$H�kHH�l$É��0"".~r0type.string"".ltype.*"".link00�0Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�&"".(*link).IsSender H�\$�k0@�l$� "".~r0type.bool"".ltype.*"".link�Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�*"".(*link).IsReceiver@6H�l$�]0��t�D$��D$�� "".~r0type.bool"".ltype.*"".link  � Tgclocals·06cab038d51064a089bda21
 fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�("".(*link).SetSource��dH�%H;aw���H��H�\$ H�$�H�\$ H�$H�<$t#H�$PH�\$(H�\$H�\$0H�\$�H��É%��
+ 0runtime.morestack_noctxtH2"".(*link).setPanicIfLink�4runtime.writebarrierstring00"".stype.string"".ltype.*"".link0@/0p�p
+#MTgclocals·d3486bc7ce1948dc22d7ad1c0be2887aTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�("".(*link).SetTarget��dH�%H;aw���H��H�\$ H�$�H�\$ H�$H�<$t#H�$`H�\$(H�\$H�\$0H�\$�H��É%��
+ 0runtime.morestack_noctxtH2"".(*link).setPanicIfLink�4runtime.writebarrierstring00"".stype.string"".ltype.*"".link0@/0p�p
+#MTgclocals·d3486bc7ce1948dc22d7ad1c0be2887aTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�$"".(*link).SetName��dH�%H;aw���H��H�\$ H�$�H�\$ H�$H�<$t#H�$@H�\$(H�\$H�\$0H�\$�H��É%��
+ 0runtime.morestack_noctxtH2"".(*link).setPanicIfLink�4runtime.writebarrierstring00"".stype.string"".ltype.*"".link0@/0p�p
+#MTgclocals·d3486bc7ce1948dc22d7ad1c0be2887aTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�""".(*link).IsOpen H�\$�kp@�l$� "".~r0type.bool"".ltype.*"".link�Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�$"".(*link).Session��dH�%H;aw���H�� H�D$0H�D$8H�1�H9�tH�\$(H�k(H�l$8H�D$0H�� �H�H�$H�H�\$H�H�\$�H�D$�
+ 0runtime.morestack_noctxt^<go.itab.*"".session."".Session� type.*"".session�type."".Session�<go.itab.*"".session."".Session� runtime.typ2Itab0@"".~r0type."".Session"".ltype.*"".link@7?@>�
+��
+uTgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�*"".(*link).Connection@&H�\$H�k(H�m0H�l$� "".~r0&type.*"".Connection"".ltype.*"".link  � Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�"".(*link).pump�vdH�%H;aw���H��H�\$H�$�H�\$H�

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[23/36] qpid-proton git commit: PROTON-827: Simplified examples and Connection error handling.

Posted by ac...@apache.org.
PROTON-827: Simplified examples and Connection error handling.

- Simplified non-relevant code in examples (logging, argument handling)
- Improved error handling on API see Connection.Error(). Need more on other endpoints.
- Added -debug flag to example_test to help debug example problems.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/495d7413
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/495d7413
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/495d7413

Branch: refs/heads/master
Commit: 495d74136f165f37f692e68710a1b6cdbd74dc98
Parents: 7cecb8e
Author: Alan Conway <ac...@redhat.com>
Authored: Mon May 25 17:14:22 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:19:56 2015 -0400

----------------------------------------------------------------------
 examples/go/example_test.go                     |  30 ++--
 examples/go/receive.go                          | 140 +++++++------------
 examples/go/send.go                             | 108 ++++++--------
 proton-c/bindings/go/genwrap.go                 | 108 +++++++-------
 .../src/qpid.apache.org/proton/go/event/pump.go |   5 +-
 .../qpid.apache.org/proton/go/internal/error.go |  25 ++--
 .../proton/go/messaging/messaging.go            |  51 ++++---
 7 files changed, 215 insertions(+), 252 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/examples/go/example_test.go
----------------------------------------------------------------------
diff --git a/examples/go/example_test.go b/examples/go/example_test.go
index a4b4c2c..8879c38 100644
--- a/examples/go/example_test.go
+++ b/examples/go/example_test.go
@@ -78,13 +78,11 @@ func (b *broker) check() error {
 
 // Start the demo broker, wait till it is listening on *addr. No-op if already started.
 func (b *broker) start() error {
-	build("event_broker.go")
 	if b.cmd == nil { // Not already started
 		// FIXME aconway 2015-04-30: better way to pick/configure a broker port.
 		b.addr = fmt.Sprintf("127.0.0.1:%d", rand.Intn(10000)+10000)
-		b.cmd = exec.Command(exepath("event_broker"), "-addr", b.addr, "-verbose", "0")
+		b.cmd = exampleCommand("event_broker", "-addr", b.addr)
 		b.runerr = make(chan error)
-		// Change the -verbose setting above to see broker output on stdout/stderr.
 		b.cmd.Stderr, b.cmd.Stdout = os.Stderr, os.Stdout
 		go func() {
 			b.runerr <- b.cmd.Run()
@@ -111,7 +109,12 @@ func checkEqual(want interface{}, got interface{}) error {
 // runCommand returns an exec.Cmd to run an example.
 func exampleCommand(prog string, arg ...string) *exec.Cmd {
 	build(prog + ".go")
-	cmd := exec.Command(exepath(prog), arg...)
+	args := []string{}
+	if *debug {
+		args = append(args, "-debug=true")
+	}
+	args = append(args, arg...)
+	cmd := exec.Command(exepath(prog), args...)
 	cmd.Stderr = os.Stderr
 	return cmd
 }
@@ -149,16 +152,16 @@ func TestExampleSendReceive(t *testing.T) {
 	}
 	testBroker.start()
 	err := runExampleWant(
-		"send: Received all 15 acknowledgements\n",
+		"Received all 15 acknowledgements\n",
 		"send",
-		exampleArgs("-count", "5", "-verbose", "1")...)
+		exampleArgs("-count", "5")...)
 	if err != nil {
 		t.Fatal(err)
 	}
 	err = runExampleWant(
-		"receive: Listening\nreceive: Received 15 messages\n",
+		"Listening on 3 connections\nReceived 15 messages\n",
 		"receive",
-		exampleArgs("-verbose", "1", "-count", "15")...)
+		exampleArgs("-count", "15")...)
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -187,7 +190,7 @@ func goReceiveWant(errchan chan<- error, want string, arg ...string) *exec.Cmd {
 			errchan <- err
 			return
 		}
-		listening := "receive: Listening\n"
+		listening := "Listening on 3 connections\n"
 		if line != listening {
 			errchan <- checkEqual(listening, line)
 			return
@@ -209,8 +212,8 @@ func TestExampleReceiveSend(t *testing.T) {
 	testBroker.start()
 	recvErr := make(chan error)
 	recvCmd := goReceiveWant(recvErr,
-		"receive: Received 15 messages\n",
-		exampleArgs("-count", "15", "-verbose", "1")...)
+		"Received 15 messages\n",
+		exampleArgs("-count", "15")...)
 	defer func() {
 		recvCmd.Process.Kill()
 		recvCmd.Wait()
@@ -219,9 +222,9 @@ func TestExampleReceiveSend(t *testing.T) {
 		t.Fatal(err)
 	}
 	err := runExampleWant(
-		"send: Received all 15 acknowledgements\n",
+		"Received all 15 acknowledgements\n",
 		"send",
-		exampleArgs("-count", "5", "-verbose", "1")...)
+		exampleArgs("-count", "5")...)
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -263,6 +266,7 @@ func build(prog string) {
 }
 
 var rpath = flag.String("rpath", "", "Runtime path for test executables")
+var debug = flag.Bool("debug", false, "Debugging output from examples")
 
 func TestMain(m *testing.M) {
 	rand.Seed(time.Now().UTC().UnixNano())

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/examples/go/receive.go
----------------------------------------------------------------------
diff --git a/examples/go/receive.go b/examples/go/receive.go
index e31862b..b1eb309 100644
--- a/examples/go/receive.go
+++ b/examples/go/receive.go
@@ -22,87 +22,65 @@ package main
 import (
 	"flag"
 	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"math"
 	"net"
 	"os"
-	"path"
 	"qpid.apache.org/proton/go/amqp"
 	"qpid.apache.org/proton/go/messaging"
 	"sync"
-	"time"
 )
 
-// Command-line flags
-var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
-var count = flag.Int64("count", 0, "Stop after receiving this many messages. 0 means unlimited.")
-var timeout = flag.Int64("time", 0, "Stop after this many seconds. 0 means unlimited.")
+// Usage and command-line flags
+func usage() {
+	fmt.Fprintf(os.Stderr, `Usage: %s url [url ...]
+Receive messages from all the listed URLs concurrently and print them.
+`, os.Args[0])
+	flag.PrintDefaults()
+}
+
+var debug = flag.Bool("debug", false, "Print detailed debug output")
+var count = flag.Uint64("count", 1, "Stop after receiving this many messages.")
 var full = flag.Bool("full", false, "Print full message not just body.")
 
 func main() {
-	// Parse flags and arguments, print usage message on error.
-	flag.Usage = func() {
-		fmt.Fprintf(os.Stderr, `
-Usage: %s url [url ...]
-Receive messages from all the listed URLs concurrently and print them.
-`, os.Args[0])
-		flag.PrintDefaults()
-	}
+	flag.Usage = usage
 	flag.Parse()
+
 	urls := flag.Args() // Non-flag arguments are URLs to receive from
 	if len(urls) == 0 {
-		flag.Usage()
-		fmt.Fprintf(os.Stderr, "No URL provided")
+		fmt.Fprintln(os.Stderr, "No URL provided")
+		usage()
 		os.Exit(1)
 	}
-	duration := time.Duration(*timeout) * time.Second
-	if duration == 0 {
-		duration = time.Duration(math.MaxInt64) // Not forever, but 290 years is close enough.
-	}
-	if *count == 0 {
-		*count = math.MaxInt64
-	}
-
-	// Create a goroutine for each URL that receives messages and sends them to
-	// the messages channel. main() receives and prints them.
 
 	messages := make(chan amqp.Message) // Channel for messages from goroutines to main()
 	stop := make(chan struct{})         // Closing this channel means the program is stopping.
+	var wait sync.WaitGroup             // Used by main() to wait for all goroutines to end.
+	wait.Add(len(urls))                 // Wait for one goroutine per URL.
 
-	var wait sync.WaitGroup // Used by main() to wait for all goroutines to end.
-
-	wait.Add(len(urls)) // Wait for one goroutine per URL.
-
-	// Arrange to close all connections on exit
-	connections := make([]*messaging.Connection, len(urls))
-	defer func() {
-		for _, c := range connections {
-			if c != nil {
-				c.Close()
-			}
-		}
-	}()
+	connections := make([]*messaging.Connection, len(urls)) // Store connctions to close on exit
 
+	// Start a goroutine to for each URL to receive messages and send them to the messages channel.
+	// main() receives and prints them.
 	for i, urlStr := range urls {
-		debug.Printf("Connecting to %s", urlStr)
-		go func(urlStr string) {
-			defer wait.Done()                 // Notify main() that this goroutine is done.
+		debugf("debug: Connecting to %s\n", urlStr)
+		go func(urlStr string) { // Start the goroutine
+
+			defer wait.Done()                 // Notify main() when this goroutine is done.
 			url, err := amqp.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
-			fatalIf(err)
+			exitIf(err)
 
 			// Open a standard Go net.Conn and and AMQP connection using it.
 			conn, err := net.Dial("tcp", url.Host) // Note net.URL.Host is actually "host:port"
-			fatalIf(err)
+			exitIf(err)
 			pc, err := messaging.Connect(conn) // This is our AMQP connection.
-			fatalIf(err)
-			connections[i] = pc // So we can close it when main() ends
+			exitIf(err)
+			connections[i] = pc // Save connection so it will be closed when main() ends
 
 			// Create a receiver using the path of the URL as the AMQP address
 			r, err := pc.Receiver(url.Path)
-			fatalIf(err)
+			exitIf(err)
 
+			// Loop receiving messages
 			for {
 				var m amqp.Message
 				select { // Receive a message or stop.
@@ -118,57 +96,43 @@ Receive messages from all the listed URLs concurrently and print them.
 			}
 		}(urlStr)
 	}
-	info.Printf("Listening")
-
-	// time.After() returns a channel that will close when the timeout is up.
-	timer := time.After(duration)
-
-	// main() prints each message and checks for count or timeout being exceeded.
-	for i := int64(0); i < *count; i++ {
-		select {
-		case m := <-messages:
-			debug.Print(formatMessage{m})
-		case <-timer: // Timeout has expired
-			i = 0
-		}
+
+	// All goroutines are started, we are receiving messages.
+	fmt.Printf("Listening on %d connections\n", len(urls))
+
+	// print each message until the count is exceeded.
+	for i := uint64(0); i < *count; i++ {
+		debugf("%s\n", formatMessage(<-messages))
 	}
-	info.Printf("Received %d messages", *count)
+	fmt.Printf("Received %d messages\n", *count)
 	close(stop) // Signal all goroutines to stop.
 	wait.Wait() // Wait for all goroutines to finish.
-}
-
-// Logging
-func logger(prefix string, level int, w io.Writer) *log.Logger {
-	if *verbose >= level {
-		return log.New(w, prefix, 0)
+	close(messages)
+	for _, c := range connections { // Close all connections
+		if c != nil {
+			c.Close()
+		}
 	}
-	return log.New(ioutil.Discard, "", 0)
 }
 
-var info, debug *log.Logger
-
-func init() {
-	flag.Parse()
-	name := path.Base(os.Args[0])
-	log.SetFlags(0)                                               // Use default logger for errors.
-	log.SetPrefix(fmt.Sprintf("%s: ", name))                      // Log errors on stderr.
-	info = logger(fmt.Sprintf("%s: ", name), 1, os.Stdout)        // Log info on stdout.
-	debug = logger(fmt.Sprintf("%s debug: ", name), 2, os.Stderr) // Log debug on stderr.
+// Simple debug logging
+func debugf(format string, data ...interface{}) {
+	if *debug {
+		fmt.Fprintf(os.Stderr, format, data...)
+	}
 }
 
 // Simple error handling for demo.
-func fatalIf(err error) {
+func exitIf(err error) {
 	if err != nil {
-		log.Fatal(err)
+		fmt.Fprintln(os.Stderr, err)
 	}
 }
 
-type formatMessage struct{ m amqp.Message }
-
-func (fm formatMessage) String() string {
+func formatMessage(m amqp.Message) string {
 	if *full {
-		return fmt.Sprintf("%#v", fm.m)
+		return fmt.Sprintf("%#v", m)
 	} else {
-		return fmt.Sprintf("%#v", fm.m.Body())
+		return fmt.Sprintf("%#v", m.Body())
 	}
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/examples/go/send.go
----------------------------------------------------------------------
diff --git a/examples/go/send.go b/examples/go/send.go
index 4aaeb43..98acefa 100644
--- a/examples/go/send.go
+++ b/examples/go/send.go
@@ -22,21 +22,23 @@ package main
 import (
 	"flag"
 	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"math"
 	"net"
 	"os"
-	"path"
 	"qpid.apache.org/proton/go/amqp"
 	"qpid.apache.org/proton/go/messaging"
 	"sync"
 )
 
-// Command-line flags
-var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
-var count = flag.Int64("count", 1, "Send this may messages per address. 0 means unlimited.")
+// Usage and command-line flags
+func usage() {
+	fmt.Fprintf(os.Stderr, `Usage: %s url [url ...]
+Send messages to each URL concurrently with body "<url-path>-<n>" where n is the message number.
+`, os.Args[0])
+	flag.PrintDefaults()
+}
+
+var debug = flag.Bool("debug", false, "Print detailed debug output")
+var count = flag.Int64("count", 1, "Send this may messages per address.")
 
 // Ack associates an info string with an acknowledgement
 type Ack struct {
@@ -45,67 +47,51 @@ type Ack struct {
 }
 
 func main() {
-	// Parse flags and arguments, print usage message on error.
-	flag.Usage = func() {
-		fmt.Fprintf(os.Stderr, `
-Usage: %s url [url ...]
-Send messages to all the listed URLs concurrently.
-To each URL, send the string "path-n" where n is the message number.
-`, os.Args[0])
-		flag.PrintDefaults()
-	}
+	flag.Usage = usage
 	flag.Parse()
+
 	urls := flag.Args() // Non-flag arguments are URLs to receive from
 	if len(urls) == 0 {
+		fmt.Fprintln(os.Stderr, "No URL provided")
 		flag.Usage()
-		fmt.Fprintf(os.Stderr, "No URL provided\n")
 		os.Exit(1)
 	}
-	if *count == 0 {
-		*count = math.MaxInt64
-	}
-
-	// Create a channel to receive all the acknowledgements
-	acks := make(chan Ack)
 
-	// Create a goroutine for each URL that sends messages.
+	acks := make(chan Ack)  // Channel to receive all the acknowledgements
 	var wait sync.WaitGroup // Used by main() to wait for all goroutines to end.
 	wait.Add(len(urls))     // Wait for one goroutine per URL.
 
-	// Arrange to close all connections on exit
-	connections := make([]*messaging.Connection, len(urls))
-	defer func() {
-		for _, c := range connections {
-			if c != nil {
-				c.Close()
-			}
-		}
-	}()
+	connections := make([]*messaging.Connection, len(urls)) // Store connctions to close on exit
 
+	// Start a goroutine for each URL to send messages, receive the acknowledgements and
+	// send them to the acks channel.
 	for i, urlStr := range urls {
-		debug.Printf("Connecting to %v", urlStr)
+		debugf("Connecting to %v\n", urlStr)
 		go func(urlStr string) {
+
 			defer wait.Done()                 // Notify main() that this goroutine is done.
 			url, err := amqp.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
-			fatalIf(err)
+			exitIf(err)
 
 			// Open a standard Go net.Conn and and AMQP connection using it.
 			conn, err := net.Dial("tcp", url.Host) // Note net.URL.Host is actually "host:port"
-			fatalIf(err)
+			exitIf(err)
 			pc, err := messaging.Connect(conn) // This is our AMQP connection.
-			fatalIf(err)
-			connections[i] = pc // So we can close it when main() ends
+			exitIf(err)
+			connections[i] = pc // Save connection so it will be closed when main() ends
 
 			// Create a sender using the path of the URL as the AMQP address
 			s, err := pc.Sender(url.Path)
-			fatalIf(err)
+			exitIf(err)
 
+			// Loop sending messages, receiving acknowledgements and sending them to the acks channel.
 			for i := int64(0); i < *count; i++ {
 				m := amqp.NewMessage()
 				body := fmt.Sprintf("%v-%v", url.Path, i)
 				m.SetBody(body)
+				// Note Send is *asynchronous*, ack is a channel that will receive the acknowledgement.
 				ack, err := s.Send(m)
-				fatalIf(err)
+				exitIf(err)
 				acks <- Ack{ack, body} // Send the acknowledgement to main()
 			}
 		}(urlStr)
@@ -113,44 +99,38 @@ To each URL, send the string "path-n" where n is the message number.
 
 	// Wait for all the acknowledgements
 	expect := int(*count) * len(urls)
-	debug.Printf("Started senders, expect %v acknowledgements", expect)
+	debugf("Started senders, expect %v acknowledgements\n", expect)
 	for i := 0; i < expect; i++ {
 		ack, ok := <-acks
 		if !ok {
-			info.Fatalf("acks channel closed after only %d acks\n", i)
+			exitIf(fmt.Errorf("acks channel closed after only %d acks\n", i))
 		}
 		d := <-ack.ack
-		debug.Printf("acknowledgement[%v] %v", i, ack.info)
+		debugf("acknowledgement[%v] %v\n", i, ack.info)
 		if d != messaging.Accepted {
-			info.Printf("Unexpected disposition %v", d)
+			fmt.Printf("Unexpected disposition %v\n", d)
 		}
 	}
-	info.Printf("Received all %v acknowledgements", expect)
-	wait.Wait() // Wait for all goroutines to finish.
-}
+	fmt.Printf("Received all %v acknowledgements\n", expect)
 
-// Logging
-func logger(prefix string, level int, w io.Writer) *log.Logger {
-	if *verbose >= level {
-		return log.New(w, prefix, 0)
+	wait.Wait()                     // Wait for all goroutines to finish.
+	for _, c := range connections { // Close all connections
+		if c != nil {
+			c.Close()
+		}
 	}
-	return log.New(ioutil.Discard, "", 0)
 }
 
-var info, debug *log.Logger
-
-func init() {
-	flag.Parse()
-	name := path.Base(os.Args[0])
-	log.SetFlags(0)                                               // Use default logger for errors.
-	log.SetPrefix(fmt.Sprintf("%s: ", name))                      // Log errors on stderr.
-	info = logger(fmt.Sprintf("%s: ", name), 1, os.Stdout)        // Log info on stdout.
-	debug = logger(fmt.Sprintf("%s debug: ", name), 2, os.Stderr) // Log debug on stderr.
+// Simple debug logging
+func debugf(format string, data ...interface{}) {
+	if *debug {
+		fmt.Fprintf(os.Stderr, format, data...)
+	}
 }
 
 // Simple error handling for demo.
-func fatalIf(err error) {
+func exitIf(err error) {
 	if err != nil {
-		log.Fatal(err)
+		fmt.Fprintln(os.Stderr, err)
 	}
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/proton-c/bindings/go/genwrap.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/genwrap.go b/proton-c/bindings/go/genwrap.go
index 094b196..27e5966 100644
--- a/proton-c/bindings/go/genwrap.go
+++ b/proton-c/bindings/go/genwrap.go
@@ -35,6 +35,59 @@ import (
 	"text/template"
 )
 
+var includeProton = "../../include/proton"
+var outpath = "src/qpid.apache.org/proton/go/event/wrappers_gen.go"
+
+func main() {
+	flag.Parse()
+	out, err := os.Create(outpath)
+	panicIf(err)
+	defer out.Close()
+
+	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
+	fmt.Fprintln(out, copyright)
+	fmt.Fprint(out, `
+package event
+
+import (
+	"time"
+  "unsafe"
+  "qpid.apache.org/proton/go/internal"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+`)
+	for _, api := range apis {
+		fmt.Fprintf(out, "// #include <proton/%s.h>\n", api)
+	}
+	fmt.Fprintln(out, `import "C"`)
+
+	event(out)
+
+	for _, api := range apis {
+		fmt.Fprintf(out, "// Wrappers for declarations in %s.h\n\n", api)
+		header := readHeader(api)
+		enums := findEnums(header)
+		for _, e := range enums {
+			genEnum(out, e.Name, e.Values)
+		}
+		apiWrapFns(api, header, out)
+	}
+	out.Close()
+
+	// Run gofmt.
+	cmd := exec.Command("gofmt", "-w", outpath)
+	cmd.Stdout = os.Stdout
+	cmd.Stderr = os.Stderr
+	err = cmd.Run()
+	if err != nil {
+		fmt.Fprintf(os.Stderr, "gofmt: %s", err)
+		os.Exit(1)
+	}
+}
+
 func mixedCase(s string) string {
 	result := ""
 	for _, w := range strings.Split(s, "_") {
@@ -96,7 +149,7 @@ func panicIf(err error) {
 }
 
 func readHeader(name string) string {
-	file, err := os.Open(path.Join(*includeProton, name+".h"))
+	file, err := os.Open(path.Join(includeProton, name+".h"))
 	panicIf(err)
 	defer file.Close()
 	s, err := ioutil.ReadAll(file)
@@ -372,56 +425,3 @@ func apiWrapFns(api, header string, out io.Writer) {
 		fmt.Fprintf(out, "}\n")
 	}
 }
-
-var includeProton = flag.String("include", "", "path to proton include files, including /proton")
-
-func main() {
-	flag.Parse()
-	outpath := "wrappers_gen.go"
-	out, err := os.Create(outpath)
-	panicIf(err)
-	defer out.Close()
-
-	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
-	fmt.Fprintln(out, copyright)
-	fmt.Fprint(out, `
-package event
-
-import (
-	"time"
-  "unsafe"
-  "qpid.apache.org/proton/go/internal"
-)
-
-// #include <proton/types.h>
-// #include <proton/event.h>
-// #include <stdlib.h>
-`)
-	for _, api := range apis {
-		fmt.Fprintf(out, "// #include <proton/%s.h>\n", api)
-	}
-	fmt.Fprintln(out, `import "C"`)
-
-	event(out)
-
-	for _, api := range apis {
-		fmt.Fprintf(out, "// Wrappers for declarations in %s.h\n\n", api)
-		header := readHeader(api)
-		enums := findEnums(header)
-		for _, e := range enums {
-			genEnum(out, e.Name, e.Values)
-		}
-		apiWrapFns(api, header, out)
-	}
-	out.Close()
-
-	// Run gofmt.
-	cmd := exec.Command("gofmt", "-w", outpath)
-	cmd.Stdout = os.Stdout
-	cmd.Stderr = os.Stderr
-	err = cmd.Run()
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "gofmt: %s", err)
-		os.Exit(1)
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
index db022ff..73db513 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
@@ -101,7 +101,7 @@ you are doing something fairly low-level it is probably a better choice.
 */
 type Pump struct {
 	// Error is set on exit from Run() if there was an error.
-	Error error
+	Error error // FIXME aconway 2015-05-26: make it a function
 	// Channel to inject functions to be executed in the Pump's proton event loop.
 	Inject chan func()
 
@@ -212,6 +212,9 @@ func (p *Pump) Close() error {
 	}
 	delete(pumps, p.connection)
 	p.free()
+	if p.Error == io.EOF {
+		return nil
+	}
 	return p.Error
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
index 01ba890..f3f3307 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
@@ -29,7 +29,6 @@ import (
 	"fmt"
 	"runtime"
 	"sync"
-	"sync/atomic"
 	"unsafe"
 )
 
@@ -105,21 +104,23 @@ func panicIf(condition bool, fmt string, args ...interface{}) {
 
 // FirstError is a goroutine-safe error holder that keeps the first error that is set.
 type FirstError struct {
-	err  atomic.Value
-	once sync.Once
+	err  error
+	lock sync.Mutex
 }
 
-// Set the error if not allread set.
-func (e *FirstError) Set(err error) {
-	e.once.Do(func() { e.err.Store(err) })
+// Set the error if not already set, return the error.
+func (e *FirstError) Set(err error) error {
+	e.lock.Lock()
+	defer e.lock.Unlock()
+	if e.err == nil {
+		e.err = err
+	}
+	return e.err
 }
 
 // Get the error.
 func (e *FirstError) Get() error {
-	v := e.err.Load()
-	if v != nil {
-		return v.(error)
-	} else {
-		return nil
-	}
+	e.lock.Lock()
+	defer e.lock.Unlock()
+	return e.err
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/495d7413/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
index e653de2..e4b117d 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
@@ -23,11 +23,16 @@ package messaging
 import "C"
 
 import (
+	"io"
 	"net"
 	"qpid.apache.org/proton/go/amqp"
 	"qpid.apache.org/proton/go/event"
+	"qpid.apache.org/proton/go/internal"
 )
 
+// Closed is an alias for io.EOF. It indicates orderly closure of an endpoint.
+var Closed = io.EOF
+
 // Connection is a connection to a remote AMQP endpoint.
 //
 // You can set exported fields to configure the connection before calling
@@ -42,27 +47,27 @@ type Connection struct {
 	handler *handler
 	pump    *event.Pump
 	session Session
+	err     internal.FirstError
 }
 
+// Error returns nil if the connection is open, messaging.Closed if was closed cleanly
+// or an error value if it was closed due to an error.
+func (c *Connection) Error() error { return c.err.Get() }
+
 // Make an AMQP connection over a net.Conn connection.
-//
-// Use Connection.Close() to close the Connection, this will also close conn.
-// Using conn.Close() directly will cause an abrupt disconnect rather than an
-// orderly AMQP close.
-//
+// You must call c.Close() to close the connection and clean up its resources.
 func (c *Connection) Open(conn net.Conn) (err error) {
 	c.handler = newHandler(c)
 	c.pump, err = event.NewPump(conn,
 		event.NewMessagingDelegator(c.handler),
 	)
-	if err != nil {
-		return err
-	}
-	if c.Server {
-		c.pump.Server()
+	if err == nil {
+		if c.Server {
+			c.pump.Server()
+		}
+		go c.pump.Run()
 	}
-	go c.pump.Run()
-	return nil
+	return c.err.Set(err)
 }
 
 // Connect opens a default client connection. It is a shortcut for
@@ -71,14 +76,16 @@ func (c *Connection) Open(conn net.Conn) (err error) {
 //
 func Connect(conn net.Conn) (*Connection, error) {
 	c := &Connection{}
-	err := c.Open(conn)
-	return c, err
+	c.err.Set(c.Open(conn))
+	return c, c.Error()
 }
 
-// Close the connection.
-//
-// Connections must be closed to clean up resources and stop associated goroutines.
-func (c *Connection) Close() error { return c.pump.Close() }
+// Close cleans up resources and closes the associated net.Conn connection.
+func (c *Connection) Close() error {
+	err := c.pump.Close()   // Will be nil on close OK
+	c.err.Set(c.pump.Error) // Will be io.EOF on close OK
+	return err
+}
 
 // DefaultSession returns a default session for the connection.
 //
@@ -86,6 +93,9 @@ func (c *Connection) Close() error { return c.pump.Close() }
 // Use Session() for more control over creating sessions.
 //
 func (c *Connection) DefaultSession() (s Session, err error) {
+	if c.Error() != nil {
+		return Session{}, c.Error()
+	}
 	if c.session.e.IsNil() {
 		c.session, err = c.Session()
 	}
@@ -237,14 +247,15 @@ func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
 // Close the sender.
 func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
 
-// Receiver receives messages via the channel Receive.
 type Receiver struct {
 	Link
-	// Channel of messag
+	// Channel to receive messages. When it closes, check Receiver.Error() for an error.
 	Receive <-chan amqp.Message
 }
 
 // FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
 
+// FIXME aconway 2015-05-25:  Close must unblock Receive() calls.
+
 // Close the Receiver.
 func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[36/36] qpid-proton git commit: PROTON-827: Updated README, removed redundant "go" symlink

Posted by ac...@apache.org.
PROTON-827: Updated README, removed redundant "go" symlink


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/cb868e92
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/cb868e92
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/cb868e92

Branch: refs/heads/master
Commit: cb868e927edb9b756a6fd68f15a766a066b2c625
Parents: 7b880b8
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Sep 28 15:59:51 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:19:57 2015 -0400

----------------------------------------------------------------------
 examples/go/README.md          | 33 +++++++++++++++++++--------------
 go                             |  1 -
 proton-c/bindings/go/README.md | 24 +++++++++---------------
 3 files changed, 28 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cb868e92/examples/go/README.md
----------------------------------------------------------------------
diff --git a/examples/go/README.md b/examples/go/README.md
index 33c3d88..c0bfd85 100644
--- a/examples/go/README.md
+++ b/examples/go/README.md
@@ -1,13 +1,13 @@
 # Go examples for proton
 
-There are 3 go packages for proton:
+There are 3 Go packages for proton:
 
-- qpid.apache.org/proton/amqp: converts AMQP messages and data types to and from Go data types.
-- qpid.apache.org/proton/concurrent: easy-to-use, concurrent API for concurrent clients and servers.
-- qpid.apache.org/proton: Low-level access to the proton engine.
+- qpid.apache.org/proton/concurrent: Easy-to-use, concurrent API for concurrent clients and servers.
+- qpid.apache.org/proton/amqp: Convert AMQP messages and data to and from Go data types.
+- qpid.apache.org/proton: Direct access to the event-driven, concurrent-unsafe proton library.
 
-Most applications should use the `proton/concurrent` package. The `proton` package is for
-applications that need low-level access to the proton engine.
+Most applications should use the `concurrent` package. The `proton` package is
+for applications that need low-level access to the proton library.
 
 ## Example programs
 
@@ -16,10 +16,13 @@ applications that need low-level access to the proton engine.
 
 ## Using the Go packages
 
-Set your GOPATH environment variable to include `/<path-to-proton>/proton-c/bindings/go`
+Use `go get qpid.apache.org/proton/concurrent` or check out the proton
+repository and set your GOPATH environment variable to include
+`/<path-to-proton>/proton-c/bindings/go`
 
 The proton Go packages include C code so the cgo compiler needs to be able to
-find the proton library and include files.  There are a couple of ways to do this:
+find the proton library and include files.  There are a couple of ways to do
+this:
 
 1. Build proton in directory `$BUILD`. Source the script `$BUILD/config.sh` to set your environment.
 
@@ -51,9 +54,10 @@ You can compile the program first and then run the executable to avoid the delay
 All the examples take a `-h` flag to show usage information, and the comments in
 the example source have more details.
 
-First start the broker:
+First start the broker (the optional `-debug` flag will print extra information about
+what the broker is doing)
 
-    go run reactor_broker.go
+    go run broker.go -debug
 
 Send messages concurrently to queues "foo" and "bar", 10 messages to each queue:
 
@@ -63,14 +67,15 @@ Receive messages concurrently from "foo" and "bar". Note -count 20 for 10 messag
 
     go run receive.go -count 20 localhost:/foo localhost:/bar
 
-The broker and clients use the amqp port on the local host by default, to use a
-different address use the `-addr host:port` flag.
+The broker and clients use the standard AMQP port (5672) on the local host by
+default, to use a different address use the `-addr host:port` flag.
 
-You can mix it up by running the Go clients with the python broker:
+If you have the full proton repository checked out you can try try using the
+python broker with Go clients:
 
     python ../python/broker.py
 
 Or use the Go broker and the python clients:
 
     python ../python/simple_send.py
-    python ../python/simple_recv.py`.
+    python ../python/simple_recv.py

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cb868e92/go
----------------------------------------------------------------------
diff --git a/go b/go
deleted file mode 120000
index d6afbc5..0000000
--- a/go
+++ /dev/null
@@ -1 +0,0 @@
-proton-c/bindings/go/src/qpid.apache.org/proton/go
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cb868e92/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
index 98a432a..14ccf0f 100644
--- a/proton-c/bindings/go/README.md
+++ b/proton-c/bindings/go/README.md
@@ -1,7 +1,7 @@
-# *EXPERIMENTAL* Go binding for proton
+# Go binding for proton
 
-This is an *experimental* [Go](http://golang.org) binding for proton.
-The API is subject to change but there is enough to get a good idea of where it is headed.
+This is a a [Go](http://golang.org) binding for proton.
+The API is subject to change but is stabilizing.
 
 Feedback is strongly encouraged:
 
@@ -10,8 +10,8 @@ Feedback is strongly encouraged:
 
 The package documentation is available at: <http://godoc.org/qpid.apache.org/proton>
 
-See the [examples](../../../examples/go/README.md) for working examples and
-practical instructions on how to get started.
+See the [examples](https://github.com/apache/qpid-proton/blob/master/examples/cpp/README.mdw)
+for working examples and practical instructions on how to get started.
 
 The rest of this page discusses the high-level goals and design issues.
 
@@ -125,9 +125,6 @@ loops for each connection.
 
 ### Design of the concurrent API
 
-The details are still being worked out (see the code) but some basic principles have been
-established.
-
 Code from the `proton` package runs _only_ in a dedicated goroutine (per
 connection). This makes it safe to use proton C data structures associated with
 that connection.
@@ -138,13 +135,10 @@ function into the proton goroutine via a special channel. Injected functions
 can use temporary channels to allow the calling code to wait for results. Such
 waiting is only for the local event-loop, not across network calls.
 
-The API exposes blocking calls returning normal error values, no exposed
-channels or callbacks. The user can write simple blocking code or start their
-own goroutine loops and channels as appropriate. Details of our internal channel
-use and error handling are hidden, which simplifies the API and gives us more
-implementation flexibility.
-
-TODO: lifecycle rules for proton objects.
+The API exposes blocking calls returning normal error values. The user can write
+simple blocking code or start their own goroutine loops and channels as
+appropriate. Details of our internal channel use and error handling are hidden,
+which simplifies the API and gives us more implementation flexibility.
 
 ## New to Go?
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[11/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go
----------------------------------------------------------------------
diff --git a/go b/go
deleted file mode 120000
index a4b737d..0000000
--- a/go
+++ /dev/null
@@ -1 +0,0 @@
-proton-c/bindings/go
\ No newline at end of file
diff --git a/go/README.md b/go/README.md
new file mode 100644
index 0000000..2b73583
--- /dev/null
+++ b/go/README.md
@@ -0,0 +1,142 @@
+# *EXPERIMENTAL* Go binding for proton
+
+    NOTE: The go directory is in the proton repository root with a symlink at
+    proton-c/bindings/go to facilitate use of go tools: go get, godep and godoc.
+    There may be a cleaner solution to this in future.
+
+This is the beginning of a [Go](http://golang.org) binding for proton.
+
+This work is in early *experimental* stages, *everything* may change in future.
+Comments and contributions are strongly encouraged, this experiment is public so
+early feedback can guide development.
+
+- Email <pr...@qpid.apache.org>
+- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
+
+There are working [examples](../examples/go/README.md) and the examples README file
+explains how to install the packages in your go workspace and read the documentation.
+
+## Goals
+
+The API should
+
+- be idiomatic, unsurprising, and easy to use for Go developers.
+- support client and server development.
+- make simple tasks simple.
+- provide deep access to AMQP protocol when that is required.
+
+There are two types of developer we want to support
+
+1. Go developers using AMQP as a message transport:
+   - Straightforward conversions between Go built-in types and AMQP types.
+   - Easy message exchange via Go channels to support use in goroutines.
+
+2. AMQP-aware developers using Go as an implementation language:
+   - Go types to exactly represent all AMQP types and encoding details.
+   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
+
+## Status
+
+There are 3 go packages for proton:
+
+- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
+- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+
+Most applications should use the `messaging` package. The `event` package is for
+applications that need low-level access to the proton engine.
+
+The `event` package is fairly complete, with the exception of the proton
+reactor. It's unclear if the reactor is important for go.
+
+The `messaging` package can run the examples but probably not much else. There
+is work to do on error handling and the API may change.
+
+There are working [examples](../../../examples/go/README.md) of a broker using `event` and
+a sender and receiver using `messaging`.
+
+## The event driven API
+
+See the package documentation for details.
+
+## The Go API
+
+The goal: A procedural API that allows any user goroutine to send and receive
+AMQP messages and other information (acknowledgments, flow control instructions
+etc.) using channels. There will be no user-visible locks and no need to run
+user code in special goroutines, e.g. as handlers in a proton event loop.
+
+See the package documentation for emerging details.
+
+Currently using a channel to receive messages, a function to send them (channels
+internally) and a channel as a "future" for acknowledgements to senders. This
+may change.
+
+## Why a separate API for Go?
+
+Go is a concurrent language and encourages applications to be divided into
+concurrent *goroutines*. It provides traditional locking but it encourages the
+use *channels* to communicate between goroutines without explicit locks:
+
+  "Share memory by communicating, don't communicate by sharing memory"
+
+The idea is that a given value is only operated on by one goroutine at a time,
+but values can easily be passed from one goroutine to another. This removes much
+of the need for locking.
+
+Go literature distinguishes between:
+
+- *concurrency*: "keeping track of things that could be done in parallel"
+- *parallelism*: "actually doing things in parallel"
+
+The application expresses concurrency by starting goroutines for potentially
+concurrent tasks. The Go run-times schedule the activity of goroutines onto a
+small number (possibly one) of actual parallel executions.
+
+Even with *no* parallelism, concurrency lets the Go run-times *order* work with
+respect to events like file descriptors being readable/writable, channels having
+data, timers firing etc. Go automatically takes care of switching out goroutines
+that block or sleep so it is normal to write code in terms of blocking calls.
+
+Event-driven API (like poll, epoll, select or the proton event API) also
+channel unpredictably ordered events to actions in one or a small pool of
+execution threads. However this requires a different style of programming:
+"event-driven" or "reactive" programming. Go developers call it "inside-out"
+programming. In an event-driven architecture blocking is a big problem as it
+consumes a scarce thread of execution, so actions that take time to complete
+have to be re-structured in terms of future event delivery.
+
+The promise of Go is that you can express your application in concurrent,
+procedural terms with simple blocking calls and the Go run-times will turn it
+inside-out for you. Write as many goroutines as you want, and let Go interleave
+and schedule them efficiently.
+
+For example: the Go equivalent of listening for connections is a goroutine with
+a simple endless loop that calls a blocking Listen() function and starts a
+goroutine for each new connection. Each connection has its own goroutine that
+deals with just that connection till it closes.
+
+The benefit is that the variables and logic live closer together. Once you're in
+a goroutine, you have everything you need in local variables, and they are
+preserved across blocking calls. There's no need to store details in context
+objects that you have to look up when handling a later event to figure out how
+to continue where you left off.
+
+So a Go-like proton API does not force the users code to run in an event-loop
+goroutine. Instead user goroutines communicate with the event loop(s) via
+channels.  There's no need to funnel connections into one event loop, in fact it
+makes no sense.  Connections can be processed concurrently so they should be
+processed in separate goroutines and left to Go to schedule. User goroutines can
+have simple loops that block channels till messages are available, the user can
+start as many or as few such goroutines as they wish to implement concurrency as
+simple or as complex as they wish. For example blocking request-response
+vs. asynchronous flows of messages and acknowledgments.
+
+## New to Go?
+
+If you are new to Go then these are a good place to start:
+
+- [A Tour of Go](http://tour.golang.org)
+- [Effective Go](http://golang.org/doc/effective_go.html)
+
+Then look at the tools and library docs at <http://golang.org> as you need them.
diff --git a/go/amqp/doc.go b/go/amqp/doc.go
new file mode 100644
index 0000000..7c00aa0
--- /dev/null
+++ b/go/amqp/doc.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package amqp encodes and decodes AMQP messages and data as Go types.
+
+It follows the standard 'encoding' libraries pattern. The mapping between AMQP
+and Go types is described in the documentation of the Marshal and Unmarshal
+functions.
+
+The sub-packages 'event' and 'messaging' provide two alternative ways to write
+AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
+gives complete low-level control of the underlying proton C engine.
+
+AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
+*/
+package amqp
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.
+
+// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.
diff --git a/go/amqp/interop b/go/amqp/interop
new file mode 120000
index 0000000..8f50d0e
--- /dev/null
+++ b/go/amqp/interop
@@ -0,0 +1 @@
+../../../../tests/interop
\ No newline at end of file
diff --git a/go/amqp/interop_test.go b/go/amqp/interop_test.go
new file mode 100644
index 0000000..11049f7
--- /dev/null
+++ b/go/amqp/interop_test.go
@@ -0,0 +1,308 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Test that conversion of Go type to/from AMQP is compatible with other
+// bindings.
+//
+package amqp
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"reflect"
+	"strings"
+	"testing"
+)
+
+func assertEqual(want interface{}, got interface{}) {
+	if !reflect.DeepEqual(want, got) {
+		panic(fmt.Errorf("%#v != %#v", want, got))
+	}
+}
+
+func assertNil(err interface{}) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+func getReader(name string) (r io.Reader) {
+	r, err := os.Open("interop/" + name + ".amqp")
+	if err != nil {
+		panic(fmt.Errorf("Can't open %#v: %v", name, err))
+	}
+	return
+}
+
+func remaining(d *Decoder) string {
+	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
+	return string(remainder)
+}
+
+// assertDecode: want is the expected value, gotPtr is a pointer to a
+// instance of the same type for Decode.
+func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
+
+	assertNil(d.Decode(gotPtr))
+
+	got := reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(want, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, gotPtr)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	got = reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+}
+
+func TestUnmarshal(t *testing.T) {
+	bytes, err := ioutil.ReadAll(getReader("strings"))
+	if err != nil {
+		t.Error(err)
+	}
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		n, err := Unmarshal(bytes, &got)
+		if err != nil {
+			t.Error(err)
+		}
+		if want != got {
+			t.Errorf("%#v != %#v", want, got)
+		}
+		bytes = bytes[n:]
+	}
+}
+
+func TestPrimitivesExact(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into exact types
+	var b bool
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	var u8 uint8
+	assertDecode(d, uint8(42), &u8)
+	var u16 uint16
+	assertDecode(d, uint16(42), &u16)
+	var i16 int16
+	assertDecode(d, int16(-42), &i16)
+	var u32 uint32
+	assertDecode(d, uint32(12345), &u32)
+	var i32 int32
+	assertDecode(d, int32(-12345), &i32)
+	var u64 uint64
+	assertDecode(d, uint64(12345), &u64)
+	var i64 int64
+	assertDecode(d, int64(-12345), &i64)
+	var f32 float32
+	assertDecode(d, float32(0.125), &f32)
+	var f64 float64
+	assertDecode(d, float64(0.125), &f64)
+}
+
+func TestPrimitivesCompatible(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into compatible types
+	var b bool
+	var i int
+	var u uint
+	var f float64
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, -42, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, 0.125, &f)
+	assertDecode(d, 0.125, &f)
+}
+
+// assertDecodeValue: want is the expected value, decode into a reflect.Value
+func assertDecodeInterface(d *Decoder, want interface{}) {
+
+	var got, got2 interface{}
+	assertNil(d.Decode(&got))
+
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(got, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, &got2)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	assertEqual(want, got2)
+}
+
+func TestPrimitivesInterface(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	assertDecodeInterface(d, true)
+	assertDecodeInterface(d, false)
+	assertDecodeInterface(d, uint8(42))
+	assertDecodeInterface(d, uint16(42))
+	assertDecodeInterface(d, int16(-42))
+	assertDecodeInterface(d, uint32(12345))
+	assertDecodeInterface(d, int32(-12345))
+	assertDecodeInterface(d, uint64(12345))
+	assertDecodeInterface(d, int64(-12345))
+	assertDecodeInterface(d, float32(0.125))
+	assertDecodeInterface(d, float64(0.125))
+}
+
+func TestStrings(t *testing.T) {
+	d := NewDecoder(getReader("strings"))
+	// Test decoding as plain Go strings
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		assertDecode(d, want, &got)
+	}
+	remains := remaining(d)
+	if remains != "" {
+		t.Errorf("leftover: %s", remains)
+	}
+
+	// Test decoding as specific string types
+	d = NewDecoder(getReader("strings"))
+	var bytes []byte
+	var str, sym string
+	assertDecode(d, []byte("abc\000defg"), &bytes)
+	assertDecode(d, "abcdefg", &str)
+	assertDecode(d, "abcdefg", &sym)
+	assertDecode(d, make([]byte, 0), &bytes)
+	assertDecode(d, "", &str)
+	assertDecode(d, "", &sym)
+	remains = remaining(d)
+	if remains != "" {
+		t.Fatalf("leftover: %s", remains)
+	}
+
+	// Test some error handling
+	d = NewDecoder(getReader("strings"))
+	var s string
+	err := d.Decode(s)
+	if err == nil {
+		t.Fatal("Expected error")
+	}
+	if !strings.Contains(err.Error(), "not a pointer") {
+		t.Error(err)
+	}
+	var i int
+	err = d.Decode(&i)
+	if !strings.Contains(err.Error(), "cannot unmarshal") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte{}, nil)
+	if !strings.Contains(err.Error(), "not enough data") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte("foobar"), nil)
+	if !strings.Contains(err.Error(), "invalid-argument") {
+		t.Error(err)
+	}
+}
+
+func TestEncodeDecode(t *testing.T) {
+	type data struct {
+		s  string
+		i  int
+		u8 uint8
+		b  bool
+		f  float32
+		v  interface{}
+	}
+
+	in := data{"foo", 42, 9, true, 1.234, "thing"}
+
+	buf := bytes.Buffer{}
+	e := NewEncoder(&buf)
+	assertNil(e.Encode(in.s))
+	assertNil(e.Encode(in.i))
+	assertNil(e.Encode(in.u8))
+	assertNil(e.Encode(in.b))
+	assertNil(e.Encode(in.f))
+	assertNil(e.Encode(in.v))
+
+	var out data
+	d := NewDecoder(&buf)
+	assertNil(d.Decode(&out.s))
+	assertNil(d.Decode(&out.i))
+	assertNil(d.Decode(&out.u8))
+	assertNil(d.Decode(&out.b))
+	assertNil(d.Decode(&out.f))
+	assertNil(d.Decode(&out.v))
+
+	assertEqual(in, out)
+}
+
+func TestMap(t *testing.T) {
+	d := NewDecoder(getReader("maps"))
+
+	// Generic map
+	var m Map
+	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
+
+	// Interface as map
+	var i interface{}
+	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
+
+	d = NewDecoder(getReader("maps"))
+	// Specific typed map
+	var m2 map[string]int
+	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
+
+	// Round trip a nested map
+	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
+	bytes, err := Marshal(m, nil)
+	assertNil(err)
+	_, err = Unmarshal(bytes, &i)
+	assertNil(err)
+	assertEqual(m, i)
+}
+
+func TestList(t *testing.T) {
+	d := NewDecoder(getReader("lists"))
+	var l List
+	assertDecode(d, List{int32(32), "foo", true}, &l)
+	assertDecode(d, List{}, &l)
+}
+
+func FIXMETestMessage(t *testing.T) {
+	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
+	bytes, err := ioutil.ReadAll(getReader("message"))
+	assertNil(err)
+	m, err := DecodeMessage(bytes)
+	assertNil(err)
+	fmt.Printf("%+v\n", m)
+	assertEqual(m.Body(), "hello")
+
+	bytes2 := make([]byte, len(bytes))
+	bytes2, err = m.Encode(bytes2)
+	assertNil(err)
+	assertEqual(bytes, bytes2)
+}
+
+// FIXME aconway 2015-03-13: finish the full interop test
diff --git a/go/amqp/marshal.go b/go/amqp/marshal.go
new file mode 100644
index 0000000..e5c2945
--- /dev/null
+++ b/go/amqp/marshal.go
@@ -0,0 +1,238 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+func dataError(prefix string, data *C.pn_data_t) error {
+	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
+	if err != nil {
+		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
+	}
+	return err
+}
+
+/*
+Marshal encodes a Go value as AMQP data in buffer.
+If buffer is nil, or is not large enough, a new buffer  is created.
+
+Returns the buffer used for encoding with len() adjusted to the actual size of data.
+
+Go types are encoded as follows
+
+ +-------------------------------------+--------------------------------------------+
+ |Go type                              |AMQP type                                   |
+ +-------------------------------------+--------------------------------------------+
+ |bool                                 |bool                                        |
+ +-------------------------------------+--------------------------------------------+
+ |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
+ +-------------------------------------+--------------------------------------------+
+ |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
+ +-------------------------------------+--------------------------------------------+
+ |float32, float64                     |float, double.                              |
+ +-------------------------------------+--------------------------------------------+
+ |string                               |string                                      |
+ +-------------------------------------+--------------------------------------------+
+ |[]byte, Binary                       |binary                                      |
+ +-------------------------------------+--------------------------------------------+
+ |Symbol                               |symbol                                      |
+ +-------------------------------------+--------------------------------------------+
+ |interface{}                          |the contained type                          |
+ +-------------------------------------+--------------------------------------------+
+ |nil                                  |null                                        |
+ +-------------------------------------+--------------------------------------------+
+ |map[K]T                              |map with K and T converted as above         |
+ +-------------------------------------+--------------------------------------------+
+ |Map                                  |map, may have mixed types for keys, values  |
+ +-------------------------------------+--------------------------------------------+
+ |[]T                                  |list with T converted as above              |
+ +-------------------------------------+--------------------------------------------+
+ |List                                 |list, may have mixed types  values          |
+ +-------------------------------------+--------------------------------------------+
+
+TODO Go types: array, slice, struct
+
+Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
+*/
+func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	put(data, v)
+	encode := func(buf []byte) ([]byte, error) {
+		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
+		switch {
+		case n == int(C.PN_OVERFLOW):
+			return buf, overflow
+		case n < 0:
+			return buf, dataError("marshal error", data)
+		default:
+			return buf[:n], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
+
+const minEncode = 256
+
+// overflow is returned when an encoding function can't fit data in the buffer.
+var overflow = internal.Errorf("buffer too small")
+
+// encodeFn encodes into buffer[0:len(buffer)].
+// Returns buffer with length adjusted for data encoded.
+// If buffer too small, returns overflow as error.
+type encodeFn func(buffer []byte) ([]byte, error)
+
+// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
+// Returns the final buffer.
+func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
+	if buffer == nil || len(buffer) == 0 {
+		buffer = make([]byte, minEncode)
+	}
+	var err error
+	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
+		buffer = make([]byte, 2*len(buffer))
+	}
+	return buffer, err
+}
+
+func put(data *C.pn_data_t, v interface{}) {
+	switch v := v.(type) {
+	case nil:
+		C.pn_data_put_null(data)
+	case bool:
+		C.pn_data_put_bool(data, C.bool(v))
+	case int8:
+		C.pn_data_put_byte(data, C.int8_t(v))
+	case int16:
+		C.pn_data_put_short(data, C.int16_t(v))
+	case int32:
+		C.pn_data_put_int(data, C.int32_t(v))
+	case int64:
+		C.pn_data_put_long(data, C.int64_t(v))
+	case int:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_long(data, C.int64_t(v))
+		} else {
+			C.pn_data_put_int(data, C.int32_t(v))
+		}
+	case uint8:
+		C.pn_data_put_ubyte(data, C.uint8_t(v))
+	case uint16:
+		C.pn_data_put_ushort(data, C.uint16_t(v))
+	case uint32:
+		C.pn_data_put_uint(data, C.uint32_t(v))
+	case uint64:
+		C.pn_data_put_ulong(data, C.uint64_t(v))
+	case uint:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_ulong(data, C.uint64_t(v))
+		} else {
+			C.pn_data_put_uint(data, C.uint32_t(v))
+		}
+	case float32:
+		C.pn_data_put_float(data, C.float(v))
+	case float64:
+		C.pn_data_put_double(data, C.double(v))
+	case string:
+		C.pn_data_put_string(data, pnBytes([]byte(v)))
+	case []byte:
+		C.pn_data_put_binary(data, pnBytes(v))
+	case Binary:
+		C.pn_data_put_binary(data, pnBytes([]byte(v)))
+	case Symbol:
+		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
+	case Map: // Special map type
+		C.pn_data_put_map(data)
+		C.pn_data_enter(data)
+		for key, val := range v {
+			put(data, key)
+			put(data, val)
+		}
+		C.pn_data_exit(data)
+	default:
+		switch reflect.TypeOf(v).Kind() {
+		case reflect.Map:
+			putMap(data, v)
+		case reflect.Slice:
+			putList(data, v)
+		default:
+			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
+		}
+	}
+	err := dataError("marshal", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+func putMap(data *C.pn_data_t, v interface{}) {
+	mapValue := reflect.ValueOf(v)
+	C.pn_data_put_map(data)
+	C.pn_data_enter(data)
+	for _, key := range mapValue.MapKeys() {
+		put(data, key.Interface())
+		put(data, mapValue.MapIndex(key).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+func putList(data *C.pn_data_t, v interface{}) {
+	listValue := reflect.ValueOf(v)
+	C.pn_data_put_list(data)
+	C.pn_data_enter(data)
+	for i := 0; i < listValue.Len(); i++ {
+		put(data, listValue.Index(i).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+// Encoder encodes AMQP values to an io.Writer
+type Encoder struct {
+	writer io.Writer
+	buffer []byte
+}
+
+// New encoder returns a new encoder that writes to w.
+func NewEncoder(w io.Writer) *Encoder {
+	return &Encoder{w, make([]byte, minEncode)}
+}
+
+func (e *Encoder) Encode(v interface{}) (err error) {
+	e.buffer, err = Marshal(v, e.buffer)
+	if err == nil {
+		e.writer.Write(e.buffer)
+	}
+	return err
+}
+
+func replace(data *C.pn_data_t, v interface{}) {
+	C.pn_data_clear(data)
+	put(data, v)
+}
diff --git a/go/amqp/message.go b/go/amqp/message.go
new file mode 100644
index 0000000..87093f5
--- /dev/null
+++ b/go/amqp/message.go
@@ -0,0 +1,342 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
+
+// Message is the interface to an AMQP message.
+// Instances of this interface contain a pointer to the underlying struct.
+type Message interface {
+	/**
+	 * Inferred indicates how the message content
+	 * is encoded into AMQP sections. If inferred is true then binary and
+	 * list values in the body of the message will be encoded as AMQP DATA
+	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
+	 * then all values in the body of the message will be encoded as AMQP
+	 * VALUE sections regardless of their type.
+	 */
+	Inferred() bool
+	SetInferred(bool)
+
+	/**
+	 * Durable indicates that any parties taking responsibility
+	 * for the message must durably store the content.
+	 */
+	Durable() bool
+	SetDurable(bool)
+
+	/**
+	 * Priority impacts ordering guarantees. Within a
+	 * given ordered context, higher priority messages may jump ahead of
+	 * lower priority messages.
+	 */
+	Priority() uint8
+	SetPriority(uint8)
+
+	/**
+	 * TTL or Time To Live, a message it may be dropped after this duration
+	 */
+	TTL() time.Duration
+	SetTTL(time.Duration)
+
+	/**
+	 * FirstAcquirer indicates
+	 * that the recipient of the message is the first recipient to acquire
+	 * the message, i.e. there have been no failed delivery attempts to
+	 * other acquirers. Note that this does not mean the message has not
+	 * been delivered to, but not acquired, by other recipients.
+	 */
+	FirstAcquirer() bool
+	SetFirstAcquirer(bool)
+
+	/**
+	 * DeliveryCount tracks how many attempts have been made to
+	 * delivery a message.
+	 */
+	DeliveryCount() uint32
+	SetDeliveryCount(uint32)
+
+	/**
+	 * MessageId provides a unique identifier for a message.
+	 * it can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	MessageId() interface{}
+	SetMessageId(interface{})
+
+	UserId() string
+	SetUserId(string)
+
+	Address() string
+	SetAddress(string)
+
+	Subject() string
+	SetSubject(string)
+
+	ReplyTo() string
+	SetReplyTo(string)
+
+	/**
+	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	CorrelationId() interface{}
+	SetCorrelationId(interface{})
+
+	ContentType() string
+	SetContentType(string)
+
+	ContentEncoding() string
+	SetContentEncoding(string)
+
+	// ExpiryTime indicates an absoulte time when the message may be dropped.
+	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
+	ExpiryTime() time.Time
+	SetExpiryTime(time.Time)
+
+	CreationTime() time.Time
+	SetCreationTime(time.Time)
+
+	GroupId() string
+	SetGroupId(string)
+
+	GroupSequence() int32
+	SetGroupSequence(int32)
+
+	ReplyToGroupId() string
+	SetReplyToGroupId(string)
+
+	/**
+	 * Instructions can be used to access or modify AMQP delivery instructions.
+	 */
+	Instructions() *map[string]interface{}
+
+	/**
+	 * Annotations  can be used to access or modify AMQP annotations.
+	 */
+	Annotations() *map[string]interface{}
+
+	/**
+	 * Properties  can be used to access or modify the application properties of a message.
+	 */
+	Properties() *map[string]interface{}
+
+	/**
+	 * Body of the message can be any AMQP encodable type.
+	 */
+	Body() interface{}
+	SetBody(interface{})
+
+	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
+	// the message is encoded into it, otherwise a new buffer is created.
+	// Returns the buffer containing the message.
+	Encode(buffer []byte) ([]byte, error)
+}
+
+// NewMessage creates a new message instance. The returned interface contains a pointer.
+func NewMessage() Message {
+	pn := C.pn_message() // Pick up default setting from C message.
+	defer C.pn_message_free(pn)
+	return goMessage(pn)
+}
+
+// Message implementation copies all message data into Go space so it can be proprely
+// memory managed.
+//
+type message struct {
+	inferred, durable, firstAcquirer      bool
+	priority                              uint8
+	ttl                                   time.Duration
+	deliveryCount                         uint32
+	messageId                             interface{}
+	userId, address, subject, replyTo     string
+	contentType, contentEncoding          string
+	groupId, replyToGroupId               string
+	creationTime, expiryTime              time.Time
+	groupSequence                         int32
+	correlationId                         interface{}
+	instructions, annotations, properties map[string]interface{}
+	body                                  interface{}
+}
+
+func (m *message) Inferred() bool                        { return m.inferred }
+func (m *message) SetInferred(b bool)                    { m.inferred = b }
+func (m *message) Durable() bool                         { return m.durable }
+func (m *message) SetDurable(b bool)                     { m.durable = b }
+func (m *message) Priority() uint8                       { return m.priority }
+func (m *message) SetPriority(b uint8)                   { m.priority = b }
+func (m *message) TTL() time.Duration                    { return m.ttl }
+func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
+func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
+func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
+func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
+func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
+func (m *message) MessageId() interface{}                { return m.messageId }
+func (m *message) SetMessageId(id interface{})           { m.messageId = id }
+func (m *message) UserId() string                        { return m.userId }
+func (m *message) SetUserId(s string)                    { m.userId = s }
+func (m *message) Address() string                       { return m.address }
+func (m *message) SetAddress(s string)                   { m.address = s }
+func (m *message) Subject() string                       { return m.subject }
+func (m *message) SetSubject(s string)                   { m.subject = s }
+func (m *message) ReplyTo() string                       { return m.replyTo }
+func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
+func (m *message) CorrelationId() interface{}            { return m.correlationId }
+func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
+func (m *message) ContentType() string                   { return m.contentType }
+func (m *message) SetContentType(s string)               { m.contentType = s }
+func (m *message) ContentEncoding() string               { return m.contentEncoding }
+func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
+func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
+func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
+func (m *message) CreationTime() time.Time               { return m.creationTime }
+func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
+func (m *message) GroupId() string                       { return m.groupId }
+func (m *message) SetGroupId(s string)                   { m.groupId = s }
+func (m *message) GroupSequence() int32                  { return m.groupSequence }
+func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
+func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
+func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
+func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
+func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
+func (m *message) Properties() *map[string]interface{}   { return &m.properties }
+func (m *message) Body() interface{}                     { return m.body }
+func (m *message) SetBody(b interface{})                 { m.body = b }
+
+// rewindGet rewinds and then gets the value from a data object.
+func rewindGet(data *C.pn_data_t, v interface{}) {
+	if data != nil && C.pn_data_size(data) > 0 {
+		C.pn_data_rewind(data)
+		C.pn_data_next(data)
+		get(data, v)
+	}
+}
+
+// goMessage populates a Go message from a pn_message_t
+func goMessage(pn *C.pn_message_t) *message {
+	m := &message{
+		inferred:        bool(C.pn_message_is_inferred(pn)),
+		durable:         bool(C.pn_message_is_durable(pn)),
+		priority:        uint8(C.pn_message_get_priority(pn)),
+		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
+		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
+		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
+		userId:          goString(C.pn_message_get_user_id(pn)),
+		address:         C.GoString(C.pn_message_get_address(pn)),
+		subject:         C.GoString(C.pn_message_get_subject(pn)),
+		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
+		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
+		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
+		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
+		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
+		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
+		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
+		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
+		messageId:       nil,
+		correlationId:   nil,
+		instructions:    make(map[string]interface{}),
+		annotations:     make(map[string]interface{}),
+		properties:      make(map[string]interface{}),
+	}
+	rewindGet(C.pn_message_id(pn), &m.messageId)
+	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
+	rewindGet(C.pn_message_instructions(pn), &m.instructions)
+	rewindGet(C.pn_message_annotations(pn), &m.annotations)
+	rewindGet(C.pn_message_properties(pn), &m.properties)
+	rewindGet(C.pn_message_body(pn), &m.body)
+	return m
+}
+
+// pnMessage populates a pn_message_t from a Go message.
+func (m *message) pnMessage() *C.pn_message_t {
+	pn := C.pn_message()
+	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
+	C.pn_message_set_durable(pn, C.bool(m.Durable()))
+	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
+	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
+	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
+	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
+	replace(C.pn_message_id(pn), m.MessageId())
+	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
+	C.pn_message_set_address(pn, C.CString(m.Address()))
+	C.pn_message_set_subject(pn, C.CString(m.Subject()))
+	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
+	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
+	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
+	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
+	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
+	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
+	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
+	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
+	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
+	replace(C.pn_message_instructions(pn), *m.Instructions())
+	replace(C.pn_message_annotations(pn), *m.Annotations())
+	replace(C.pn_message_properties(pn), *m.Properties())
+	replace(C.pn_message_body(pn), m.Body())
+	return pn
+}
+
+// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
+
+// DecodeMessage decodes bytes as a message
+func DecodeMessage(data []byte) (Message, error) {
+	pnMsg := C.pn_message()
+	defer C.pn_message_free(pnMsg)
+	if len(data) == 0 {
+		return nil, internal.Errorf("empty buffer for decode")
+	}
+	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
+		return nil, internal.Errorf("decoding message: %s",
+			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
+	}
+	return goMessage(pnMsg), nil
+}
+
+// Encode the message into bufffer.
+// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
+// buffer will be returned.
+func (m *message) Encode(buffer []byte) ([]byte, error) {
+	pn := m.pnMessage()
+	defer C.pn_message_free(pn)
+	encode := func(buf []byte) ([]byte, error) {
+		len := cLen(buf)
+		result := C.pn_message_encode(pn, cPtr(buf), &len)
+		switch {
+		case result == C.PN_OVERFLOW:
+			return buf, overflow
+		case result < 0:
+			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
+		default:
+			return buf[:len], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
diff --git a/go/amqp/message_test.go b/go/amqp/message_test.go
new file mode 100644
index 0000000..46e26de
--- /dev/null
+++ b/go/amqp/message_test.go
@@ -0,0 +1,90 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"reflect"
+	"testing"
+	"time"
+)
+
+func roundTrip(t *testing.T, m Message) {
+	buffer, err := m.Encode(nil)
+	if err != nil {
+		t.Fatalf("Encode failed: %v", err)
+	}
+	m2, err := DecodeMessage(buffer)
+	if err != nil {
+		t.Fatalf("Decode failed: %v", err)
+	}
+	if !reflect.DeepEqual(m, m2) {
+		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
+	}
+}
+
+func TestDefaultMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	// Check defaults
+	assertEqual(m.Inferred(), false)
+	assertEqual(m.Durable(), false)
+	assertEqual(m.Priority(), uint8(4))
+	assertEqual(m.TTL(), time.Duration(0))
+	assertEqual(m.UserId(), "")
+	assertEqual(m.Address(), "")
+	assertEqual(m.Subject(), "")
+	assertEqual(m.ReplyTo(), "")
+	assertEqual(m.ContentType(), "")
+	assertEqual(m.ContentEncoding(), "")
+	assertEqual(m.GroupId(), "")
+	assertEqual(m.GroupSequence(), int32(0))
+	assertEqual(m.ReplyToGroupId(), "")
+	assertEqual(m.MessageId(), nil)
+	assertEqual(m.CorrelationId(), nil)
+	assertEqual(*m.Instructions(), map[string]interface{}{})
+	assertEqual(*m.Annotations(), map[string]interface{}{})
+	assertEqual(*m.Properties(), map[string]interface{}{})
+	assertEqual(m.Body(), nil)
+
+	roundTrip(t, m)
+}
+
+func TestMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	m.SetInferred(false)
+	m.SetDurable(true)
+	m.SetPriority(42)
+	m.SetTTL(0)
+	m.SetUserId("user")
+	m.SetAddress("address")
+	m.SetSubject("subject")
+	m.SetReplyTo("replyto")
+	m.SetContentType("content")
+	m.SetContentEncoding("encoding")
+	m.SetGroupId("group")
+	m.SetGroupSequence(42)
+	m.SetReplyToGroupId("replytogroup")
+	m.SetMessageId("id")
+	m.SetCorrelationId("correlation")
+	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
+	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
+	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
+	m.SetBody("hello")
+	roundTrip(t, m)
+}
diff --git a/go/amqp/types.go b/go/amqp/types.go
new file mode 100644
index 0000000..8713520
--- /dev/null
+++ b/go/amqp/types.go
@@ -0,0 +1,193 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"reflect"
+	"time"
+	"unsafe"
+)
+
+func pnTypeString(pt C.pn_type_t) string {
+	switch pt {
+	case C.PN_NULL:
+		return "null"
+	case C.PN_BOOL:
+		return "bool"
+	case C.PN_UBYTE:
+		return "ubyte"
+	case C.PN_BYTE:
+		return "byte"
+	case C.PN_USHORT:
+		return "ushort"
+	case C.PN_SHORT:
+		return "short"
+	case C.PN_CHAR:
+		return "char"
+	case C.PN_UINT:
+		return "uint"
+	case C.PN_INT:
+		return "int"
+	case C.PN_ULONG:
+		return "ulong"
+	case C.PN_LONG:
+		return "long"
+	case C.PN_TIMESTAMP:
+		return "timestamp"
+	case C.PN_FLOAT:
+		return "float"
+	case C.PN_DOUBLE:
+		return "double"
+	case C.PN_DECIMAL32:
+		return "decimal32"
+	case C.PN_DECIMAL64:
+		return "decimal64"
+	case C.PN_DECIMAL128:
+		return "decimal128"
+	case C.PN_UUID:
+		return "uuid"
+	case C.PN_BINARY:
+		return "binary"
+	case C.PN_STRING:
+		return "string"
+	case C.PN_SYMBOL:
+		return "symbol"
+	case C.PN_DESCRIBED:
+		return "described"
+	case C.PN_ARRAY:
+		return "array"
+	case C.PN_LIST:
+		return "list"
+	case C.PN_MAP:
+		return "map"
+	case C.PN_DATA_TYPE_ERROR:
+		return "no-data"
+	default:
+		return fmt.Sprintf("unknown-type(%d)", pt)
+	}
+}
+
+// Go types
+var (
+	bytesType = reflect.TypeOf([]byte{})
+	valueType = reflect.TypeOf(reflect.Value{})
+)
+
+// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
+
+// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
+type Map map[interface{}]interface{}
+
+// List is a generic list that can hold mixed values and can represent any AMQP list.
+//
+type List []interface{}
+
+// Symbol is a string that is encoded as an AMQP symbol
+type Symbol string
+
+// Binary is a string that is encoded as an AMQP binary.
+// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
+// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
+type Binary string
+
+// GoString for Map prints values with their types, useful for debugging.
+func (m Map) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", m)
+	i := len(m)
+	for k, v := range m {
+		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
+		i--
+		if i > 0 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// GoString for List prints values with their types, useful for debugging.
+func (l List) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", l)
+	for i := 0; i < len(l); i++ {
+		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
+		if i == len(l)-1 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// pnTime converts Go time.Time to Proton millisecond Unix time.
+func pnTime(t time.Time) C.pn_timestamp_t {
+	secs := t.Unix()
+	// Note: sub-second accuracy is not guaraunteed if the Unix time in
+	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
+	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
+	return C.pn_timestamp_t(secs*1000 + msecs)
+}
+
+// goTime converts a pn_timestamp_t to a Go time.Time.
+func goTime(t C.pn_timestamp_t) time.Time {
+	secs := int64(t) / 1000
+	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
+	return time.Unix(secs, nsecs)
+}
+
+func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
+	if cBytes.start != nil {
+		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
+	}
+	return
+}
+
+func goString(cBytes C.pn_bytes_t) (str string) {
+	if cBytes.start != nil {
+		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
+	}
+	return
+}
+
+func pnBytes(b []byte) C.pn_bytes_t {
+	if len(b) == 0 {
+		return C.pn_bytes_t{0, nil}
+	} else {
+		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
+	}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}
diff --git a/go/amqp/uid.go b/go/amqp/uid.go
new file mode 100644
index 0000000..944bf6f
--- /dev/null
+++ b/go/amqp/uid.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Generating unique IDs for various things.
+
+package amqp
+
+import (
+	"strconv"
+	"sync/atomic"
+)
+
+// A simple atomic counter to generate unique 64 bit IDs.
+type UidCounter struct{ count uint64 }
+
+// NextInt gets the next uint64 value from the atomic counter.
+func (uc *UidCounter) NextInt() uint64 {
+	return atomic.AddUint64(&uc.count, 1)
+}
+
+// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
+func (uc *UidCounter) Next() string {
+	return strconv.FormatUint(uc.NextInt(), 32)
+}
diff --git a/go/amqp/unmarshal.go b/go/amqp/unmarshal.go
new file mode 100644
index 0000000..89ab64a
--- /dev/null
+++ b/go/amqp/unmarshal.go
@@ -0,0 +1,552 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+oor more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+const minDecode = 1024
+
+// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
+type BadUnmarshal struct {
+	// The name of the AMQP type.
+	AMQPType string
+	// The Go type.
+	GoType reflect.Type
+}
+
+func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
+	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
+}
+
+func (e BadUnmarshal) Error() string {
+	if e.GoType.Kind() != reflect.Ptr {
+		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
+	} else {
+		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
+	}
+}
+
+//
+// Decoding from a pn_data_t
+//
+// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
+// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
+//
+
+// Decoder decodes AMQP values from an io.Reader.
+//
+type Decoder struct {
+	reader io.Reader
+	buffer bytes.Buffer
+}
+
+// NewDecoder returns a new decoder that reads from r.
+//
+// The decoder has it's own buffer and may read more data than required for the
+// AMQP values requested.  Use Buffered to see if there is data left in the
+// buffer.
+//
+func NewDecoder(r io.Reader) *Decoder {
+	return &Decoder{r, bytes.Buffer{}}
+}
+
+// Buffered returns a reader of the data remaining in the Decoder's buffer. The
+// reader is valid until the next call to Decode.
+//
+func (d *Decoder) Buffered() io.Reader {
+	return bytes.NewReader(d.buffer.Bytes())
+}
+
+// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
+//
+// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
+//
+func (d *Decoder) Decode(v interface{}) (err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	var n int
+	for n == 0 && err == nil {
+		n = unmarshal(data, d.buffer.Bytes(), v)
+		if n == 0 { // n == 0 means not enough data, read more
+			err = d.more()
+			if err != nil {
+				return
+			}
+		}
+	}
+	d.buffer.Next(n)
+	return
+}
+
+/*
+Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
+Types are converted as follows:
+
+ +---------------------------+----------------------------------------------------------------------+
+ |To Go types                |From AMQP types                                                       |
+ +===========================+======================================================================+
+ |bool                       |bool                                                                  |
+ +---------------------------+----------------------------------------------------------------------+
+ |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
+ |int32, int64               |long.                                                                 |
+ +---------------------------+----------------------------------------------------------------------+
+ |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
+ |uint32, uint64 types       |uint, ulong                                                           |
+ +---------------------------+----------------------------------------------------------------------+
+ |float32, float64           |Equivalent or smaller float or double.                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |string, []byte             |string, symbol or binary.                                             |
+ +---------------------------+----------------------------------------------------------------------+
+ |Symbol                     |symbol                                                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
+ +---------------------------+----------------------------------------------------------------------+
+ |Map                        |map, any AMQP map                                                     |
+ +---------------------------+----------------------------------------------------------------------+
+ |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |AMQP Type               |Go Type in interface{}                       |
+ |                           +========================+=============================================+
+ |                           |bool                    |bool                                         |
+ |                           +------------------------+---------------------------------------------+
+ |                           |char                    |unint8                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |byte,short,int,long     |int8,int16,int32,int64                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
+ |                           +------------------------+---------------------------------------------+
+ |                           |float, double           |float32, float64                             |
+ |                           +------------------------+---------------------------------------------+
+ |                           |string                  |string                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |symbol                  |Symbol                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |binary                  |Binary                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |nulll                   |nil                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |map                     |Map                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |list                    |List                                         |
+ +---------------------------+------------------------+---------------------------------------------+
+
+The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
+
+TODO types
+
+AMQP: timestamp, decimal32/64/128, uuid, described, array.
+
+Go: array, struct.
+
+Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
+representation for those.
+*/
+func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	n = unmarshal(data, bytes, v)
+	if n == 0 {
+		err = internal.Errorf("not enough data")
+	}
+	return
+}
+
+// more reads more data when we can't parse a complete AMQP type
+func (d *Decoder) more() error {
+	var readSize int64 = minDecode
+	if int64(d.buffer.Len()) > readSize { // Grow by doubling
+		readSize = int64(d.buffer.Len())
+	}
+	var n int64
+	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
+	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
+		err = io.EOF
+	}
+	return err
+}
+
+// unmarshal decodes from bytes and converts into the value pointed to by v.
+// Used by Unmarshal and Decode
+//
+// Returns the number of bytes decoded or 0 if not enough data.
+//
+func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
+	n = decode(data, bytes)
+	if n == 0 {
+		return 0
+	}
+	get(data, v)
+	return
+}
+
+// get value from data into value pointed at by v.
+func get(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+
+	switch v := v.(type) {
+	case *bool:
+		switch pnType {
+		case C.PN_BOOL:
+			*v = bool(C.pn_data_get_bool(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int8(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int8(C.pn_data_get_byte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint8(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint8(C.pn_data_get_ubyte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int16(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int16(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int16(C.pn_data_get_short(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint16(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint16(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint16(C.pn_data_get_ushort(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int32(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int32(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int32(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int32(C.pn_data_get_int(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint32(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint32(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint32(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint32(C.pn_data_get_uint(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int64(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int64(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int64(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int64(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			*v = int64(C.pn_data_get_long(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint64(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint64(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint64(C.pn_data_get_ushort(data))
+		case C.PN_ULONG:
+			*v = uint64(C.pn_data_get_ulong(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = int(C.pn_data_get_long(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint(C.pn_data_get_uint(data))
+		case C.PN_ULONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = uint(C.pn_data_get_ulong(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float32:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float32(C.pn_data_get_float(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float64:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float64(C.pn_data_get_float(data))
+		case C.PN_DOUBLE:
+			*v = float64(C.pn_data_get_double(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *string:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goString(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goString(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goString(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *[]byte:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goBytes(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goBytes(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goBytes(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Binary:
+		switch pnType {
+		case C.PN_BINARY:
+			*v = Binary(goBytes(C.pn_data_get_binary(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Symbol:
+		switch pnType {
+		case C.PN_SYMBOL:
+			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *interface{}:
+		getInterface(data, v)
+
+	default:
+		if reflect.TypeOf(v).Kind() != reflect.Ptr {
+			panic(newBadUnmarshal(pnType, v))
+		}
+		switch reflect.TypeOf(v).Elem().Kind() {
+		case reflect.Map:
+			getMap(data, v)
+		case reflect.Slice:
+			getList(data, v)
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	}
+	err := dataError("unmarshaling", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+// Getting into an interface is driven completely by the AMQP type, since the interface{}
+// target is type-neutral.
+func getInterface(data *C.pn_data_t, v *interface{}) {
+	pnType := C.pn_data_type(data)
+	switch pnType {
+	case C.PN_NULL:
+		*v = nil
+	case C.PN_BOOL:
+		*v = bool(C.pn_data_get_bool(data))
+	case C.PN_UBYTE:
+		*v = uint8(C.pn_data_get_ubyte(data))
+	case C.PN_BYTE:
+		*v = int8(C.pn_data_get_byte(data))
+	case C.PN_USHORT:
+		*v = uint16(C.pn_data_get_ushort(data))
+	case C.PN_SHORT:
+		*v = int16(C.pn_data_get_short(data))
+	case C.PN_UINT:
+		*v = uint32(C.pn_data_get_uint(data))
+	case C.PN_INT:
+		*v = int32(C.pn_data_get_int(data))
+	case C.PN_CHAR:
+		*v = uint8(C.pn_data_get_char(data))
+	case C.PN_ULONG:
+		*v = uint64(C.pn_data_get_ulong(data))
+	case C.PN_LONG:
+		*v = int64(C.pn_data_get_long(data))
+	case C.PN_FLOAT:
+		*v = float32(C.pn_data_get_float(data))
+	case C.PN_DOUBLE:
+		*v = float64(C.pn_data_get_double(data))
+	case C.PN_BINARY:
+		*v = Binary(goBytes(C.pn_data_get_binary(data)))
+	case C.PN_STRING:
+		*v = goString(C.pn_data_get_string(data))
+	case C.PN_SYMBOL:
+		*v = Symbol(goString(C.pn_data_get_symbol(data)))
+	case C.PN_MAP:
+		m := make(Map)
+		get(data, &m)
+		*v = m // FIXME aconway 2015-03-13: avoid the copy?
+	case C.PN_LIST:
+		l := make(List, 0)
+		get(data, &l)
+		*v = l // FIXME aconway 2015-03-13: avoid the copy?
+	default:
+		panic(newBadUnmarshal(pnType, v))
+	}
+}
+
+// get into map pointed at by v
+func getMap(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_MAP {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	mapValue := reflect.ValueOf(v).Elem()
+	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
+	count := int(C.pn_data_get_map(data))
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count/2; i++ {
+			if bool(C.pn_data_next(data)) {
+				key := reflect.New(mapValue.Type().Key())
+				get(data, key.Interface())
+				if bool(C.pn_data_next(data)) {
+					val := reflect.New(mapValue.Type().Elem())
+					get(data, val.Interface())
+					mapValue.SetMapIndex(key.Elem(), val.Elem())
+				}
+			}
+		}
+		C.pn_data_exit(data)
+	}
+}
+
+func getList(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_LIST {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	count := int(C.pn_data_get_list(data))
+	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count; i++ {
+			if bool(C.pn_data_next(data)) {
+				val := reflect.New(listValue.Type().Elem())
+				get(data, val.Interface())
+				listValue.Index(i).Set(val.Elem())
+			}
+		}
+		C.pn_data_exit(data)
+	}
+	// FIXME aconway 2015-04-09: avoid the copy?
+	reflect.ValueOf(v).Elem().Set(listValue)
+}
+
+// decode from bytes.
+// Return bytes decoded or 0 if we could not decode a complete object.
+//
+func decode(data *C.pn_data_t, bytes []byte) int {
+	if len(bytes) == 0 {
+		return 0
+	}
+	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
+	if n == int(C.PN_UNDERFLOW) {
+		C.pn_error_clear(C.pn_data_error(data))
+		return 0
+	} else if n <= 0 {
+		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
+	}
+	return n
+}
diff --git a/go/amqp/url.go b/go/amqp/url.go
new file mode 100644
index 0000000..58711c7
--- /dev/null
+++ b/go/amqp/url.go
@@ -0,0 +1,96 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+/*
+#include <stdlib.h>
+#include <string.h>
+#include <proton/url.h>
+
+// Helper function for setting URL fields.
+typedef void (*setter_fn)(pn_url_t* url, const char* value);
+inline void	set(pn_url_t *url, setter_fn s, const char* value) {
+  s(url, value);
+}
+*/
+import "C"
+
+import (
+	"net"
+	"net/url"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+const (
+	amqp  string = "amqp"
+	amqps        = "amqps"
+)
+
+// ParseUrl parses an AMQP URL string and returns a net/url.Url.
+//
+// It is more forgiving than net/url.Parse and allows most of the parts of the
+// URL to be missing, assuming AMQP defaults.
+//
+func ParseURL(s string) (u *url.URL, err error) {
+	cstr := C.CString(s)
+	defer C.free(unsafe.Pointer(cstr))
+	pnUrl := C.pn_url_parse(cstr)
+	if pnUrl == nil {
+		return nil, internal.Errorf("bad URL %#v", s)
+	}
+	defer C.pn_url_free(pnUrl)
+
+	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
+	username := C.GoString(C.pn_url_get_username(pnUrl))
+	password := C.GoString(C.pn_url_get_password(pnUrl))
+	host := C.GoString(C.pn_url_get_host(pnUrl))
+	port := C.GoString(C.pn_url_get_port(pnUrl))
+	path := C.GoString(C.pn_url_get_path(pnUrl))
+
+	if err != nil {
+		return nil, internal.Errorf("bad URL %#v: %s", s, err)
+	}
+	if scheme == "" {
+		scheme = amqp
+	}
+	if port == "" {
+		if scheme == amqps {
+			port = amqps
+		} else {
+			port = amqp
+		}
+	}
+	var user *url.Userinfo
+	if password != "" {
+		user = url.UserPassword(username, password)
+	} else if username != "" {
+		user = url.User(username)
+	}
+
+	u = &url.URL{
+		Scheme: scheme,
+		User:   user,
+		Host:   net.JoinHostPort(host, port),
+		Path:   path,
+	}
+
+	return u, nil
+}
diff --git a/go/amqp/url_test.go b/go/amqp/url_test.go
new file mode 100644
index 0000000..f80f1c4
--- /dev/null
+++ b/go/amqp/url_test.go
@@ -0,0 +1,51 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"fmt"
+)
+
+func ExampleParseURL() {
+	for _, s := range []string{
+		"amqp://username:password@host:1234/path",
+		"host:1234",
+		"host",
+		":1234",
+		"host/path",
+		"amqps://host",
+		"",
+	} {
+		u, err := ParseURL(s)
+		if err != nil {
+			fmt.Println(err)
+		} else {
+			fmt.Println(u)
+		}
+	}
+	// Output:
+	// amqp://username:password@host:1234/path
+	// amqp://host:1234
+	// amqp://host:amqp
+	// amqp://:1234
+	// amqp://host:amqp/path
+	// amqps://host:amqps
+	// proton: bad URL ""
+}
diff --git a/go/event/doc.go b/go/event/doc.go
new file mode 100644
index 0000000..7a9ec12
--- /dev/null
+++ b/go/event/doc.go
@@ -0,0 +1,38 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package event provides a low-level API to the proton AMQP engine.
+
+For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
+It provides a higher-level, concurrent API that is easier to use.
+
+The API is event based. There are two alternative styles of handler. EventHandler
+provides the core proton events. MessagingHandler provides a slighly simplified
+view of the event stream and automates some common tasks.
+
+See type Pump documentation for more details of the interaction between proton
+events and goroutines.
+*/
+package event
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.
diff --git a/go/event/handlers.go b/go/event/handlers.go
new file mode 100644
index 0000000..d76fac9
--- /dev/null
+++ b/go/event/handlers.go
@@ -0,0 +1,411 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+)
+
+// EventHandler handles core proton events.
+type EventHandler interface {
+	// HandleEvent is called with an event.
+	// Typically HandleEvent() is implemented as a switch on e.Type()
+	HandleEvent(e Event) error
+}
+
+// cHandler wraps a C pn_handler_t
+type cHandler struct {
+	pn *C.pn_handler_t
+}
+
+func (h cHandler) HandleEvent(e Event) error {
+	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
+	return nil // FIXME aconway 2015-03-31: error handling
+}
+
+// MessagingHandler provides an alternative interface to EventHandler.
+// it is easier to use for most applications that send and receive messages.
+//
+// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
+// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
+//
+type MessagingHandler interface {
+	HandleMessagingEvent(MessagingEventType, Event) error
+}
+
+// MessagingEventType provides a set of events that are easier to work with than the
+// core events defined by EventType
+//
+// There are 3 types of "endpoint": Connection, Session and Link.
+// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
+// The meaning of these events is as follows:
+//
+// Opening: The remote end opened, the local end will open automatically.
+//
+// Opened: Both ends are open, regardless of which end opened first.
+//
+// Closing: The remote end closed without error, the local end will close automatically.
+//
+// Error: The remote end closed with an error, the local end will close automatically.
+//
+// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
+//
+type MessagingEventType int
+
+const (
+	// The event loop starts.
+	MStart MessagingEventType = iota
+	// The peer closes the connection with an error condition.
+	MConnectionError
+	// The peer closes the session with an error condition.
+	MSessionError
+	// The peer closes the link with an error condition.
+	MLinkError
+	// The peer Initiates the opening of the connection.
+	MConnectionOpening
+	// The peer initiates the opening of the session.
+	MSessionOpening
+	// The peer initiates the opening of the link.
+	MLinkOpening
+	// The connection is opened.
+	MConnectionOpened
+	// The session is opened.
+	MSessionOpened
+	// The link is opened.
+	MLinkOpened
+	// The peer initiates the closing of the connection.
+	MConnectionClosing
+	// The peer initiates the closing of the session.
+	MSessionClosing
+	// The peer initiates the closing of the link.
+	MLinkClosing
+	// Both ends of the connection are closed.
+	MConnectionClosed
+	// Both ends of the session are closed.
+	MSessionClosed
+	// Both ends of the link are closed.
+	MLinkClosed
+	// The connection is disconnected.
+	MConnectionDisconnected
+	// The session's connection was disconnected
+	MSessionDisconnected
+	// The session's connection was disconnected
+	MLinkDisconnected
+	// The sender link has credit and messages can
+	// therefore be transferred.
+	MSendable
+	// The remote peer accepts an outgoing message.
+	MAccepted
+	// The remote peer rejects an outgoing message.
+	MRejected
+	// The peer releases an outgoing message. Note that this may be in response to
+	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
+	MReleased
+	// The peer has settled the outgoing message. This is the point at which it
+	// shouod never be retransmitted.
+	MSettled
+	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
+	// To manage the outcome of this messages (e.g. to accept or reject the message)
+	// use Event.Delivery().
+	MMessage
+	// The event loop terminates, there are no more events to process.
+	MFinal
+)
+
+func (t MessagingEventType) String() string {
+	switch t {
+	case MStart:
+		return "Start"
+	case MConnectionError:
+		return "ConnectionError"
+	case MSessionError:
+		return "SessionError"
+	case MLinkError:
+		return "LinkError"
+	case MConnectionOpening:
+		return "ConnectionOpening"
+	case MSessionOpening:
+		return "SessionOpening"
+	case MLinkOpening:
+		return "LinkOpening"
+	case MConnectionOpened:
+		return "ConnectionOpened"
+	case MSessionOpened:
+		return "SessionOpened"
+	case MLinkOpened:
+		return "LinkOpened"
+	case MConnectionClosing:
+		return "ConnectionClosing"
+	case MSessionClosing:
+		return "SessionClosing"
+	case MLinkClosing:
+		return "LinkClosing"
+	case MConnectionClosed:
+		return "ConnectionClosed"
+	case MSessionClosed:
+		return "SessionClosed"
+	case MLinkClosed:
+		return "LinkClosed"
+	case MConnectionDisconnected:
+		return "ConnectionDisconnected"
+	case MSessionDisconnected:
+		return "MSessionDisconnected"
+	case MLinkDisconnected:
+		return "MLinkDisconnected"
+	case MSendable:
+		return "Sendable"
+	case MAccepted:
+		return "Accepted"
+	case MRejected:
+		return "Rejected"
+	case MReleased:
+		return "Released"
+	case MSettled:
+		return "Settled"
+	case MMessage:
+		return "Message"
+	default:
+		return "Unknown"
+	}
+}
+
+// ResourceHandler provides a simple way to track the creation and deletion of
+// various proton objects.
+// endpointDelegator captures common patterns for endpoints opening/closing
+type endpointDelegator struct {
+	remoteOpen, remoteClose, localOpen, localClose EventType
+	opening, opened, closing, closed, error        MessagingEventType
+	endpoint                                       func(Event) Endpoint
+	delegate                                       MessagingHandler
+}
+
+// HandleEvent handles an open/close event for an endpoint in a generic way.
+func (d endpointDelegator) HandleEvent(e Event) (err error) {
+	endpoint := d.endpoint(e)
+	state := endpoint.State()
+
+	switch e.Type() {
+
+	case d.localOpen:
+		if state.Is(SRemoteActive) {
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		}
+
+	case d.remoteOpen:
+		switch {
+		case state.Is(SLocalActive):
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		case state.Is(SLocalUninit):
+			err = d.delegate.HandleMessagingEvent(d.opening, e)
+			if err == nil {
+				endpoint.Open()
+			}
+		}
+
+	case d.remoteClose:
+		var err1 error
+		if endpoint.RemoteCondition().IsSet() { // Closed with error
+			err1 = d.delegate.HandleMessagingEvent(d.error, e)
+			if err1 == nil { // Don't overwrite an application error.
+				err1 = endpoint.RemoteCondition().Error()
+			}
+		} else {
+			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
+		}
+		if state.Is(SLocalClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		} else if state.Is(SLocalActive) {
+			endpoint.Close()
+		}
+		if err1 != nil { // Keep the first error.
+			err = err1
+		}
+
+	case d.localClose:
+		if state.Is(SRemoteClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		}
+
+	default:
+		// We shouldn't be called with any other event type.
+		panic(internal.Errorf("internal error, not an open/close event: %s", e))
+	}
+
+	return err
+}
+
+// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
+// You can modify the exported fields before you pass the MessagingDelegator to
+// a Pump.
+type MessagingDelegator struct {
+	delegate                   MessagingHandler
+	connection, session, link  endpointDelegator
+	handshaker, flowcontroller EventHandler
+
+	// AutoSettle (default true) automatically pre-settle outgoing messages.
+	AutoSettle bool
+	// AutoAccept (default true) automatically accept and settle incoming messages
+	// if they are not settled by the delegate.
+	AutoAccept bool
+	// Prefetch (default 10) initial credit to issue for incoming links.
+	Prefetch int
+	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
+	PeerCloseError bool
+}
+
+func NewMessagingDelegator(h MessagingHandler) EventHandler {
+	return &MessagingDelegator{
+		delegate: h,
+		connection: endpointDelegator{
+			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
+			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
+			MConnectionError,
+			func(e Event) Endpoint { return e.Connection() },
+			h,
+		},
+		session: endpointDelegator{
+			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
+			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
+			MSessionError,
+			func(e Event) Endpoint { return e.Session() },
+			h,
+		},
+		link: endpointDelegator{
+			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
+			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
+			MLinkError,
+			func(e Event) Endpoint { return e.Link() },
+			h,
+		},
+		flowcontroller: nil,
+		AutoSettle:     true,
+		AutoAccept:     true,
+		Prefetch:       10,
+		PeerCloseError: false,
+	}
+}
+
+func handleIf(h EventHandler, e Event) error {
+	if h != nil {
+		return h.HandleEvent(e)
+	}
+	return nil
+}
+
+// Handle a proton event by passing the corresponding MessagingEvent(s) to
+// the MessagingHandler.
+func (d *MessagingDelegator) HandleEvent(e Event) error {
+	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
+
+	switch e.Type() {
+
+	case EConnectionInit:
+		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
+		d.delegate.HandleMessagingEvent(MStart, e)
+
+	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
+		return d.connection.HandleEvent(e)
+
+	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
+		return d.session.HandleEvent(e)
+
+	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
+		return d.link.HandleEvent(e)
+
+	case ELinkFlow:
+		if e.Link().IsSender() && e.Link().Credit() > 0 {
+			return d.delegate.HandleMessagingEvent(MSendable, e)
+		}
+
+	case EDelivery:
+		if e.Delivery().Link().IsReceiver() {
+			d.incoming(e)
+		} else {
+			d.outgoing(e)
+		}
+
+	case ETransportTailClosed:
+		c := e.Connection()
+		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
+			e2 := e
+			e2.link = l
+			e2.session = l.Session()
+			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
+		}
+		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
+			e2 := e
+			e2.session = s
+			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
+		}
+		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
+		d.delegate.HandleMessagingEvent(MFinal, e)
+	}
+	return nil
+}
+
+func (d *MessagingDelegator) incoming(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Readable() && !delivery.Partial() {
+		if e.Link().State().Is(SLocalClosed) {
+			e.Link().Advance()
+			if d.AutoAccept {
+				delivery.Release(false)
+			}
+		} else {
+			err = d.delegate.HandleMessagingEvent(MMessage, e)
+			e.Link().Advance()
+			if d.AutoAccept && !delivery.Settled() {
+				if err == nil {
+					delivery.Accept()
+				} else {
+					delivery.Reject()
+				}
+			}
+		}
+	} else if delivery.Updated() && delivery.Settled() {
+		err = d.delegate.HandleMessagingEvent(MSettled, e)
+	}
+	return
+}
+
+func (d *MessagingDelegator) outgoing(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Updated() {
+		switch delivery.Remote().Type() {
+		case Accepted:
+			err = d.delegate.HandleMessagingEvent(MAccepted, e)
+		case Rejected:
+			err = d.delegate.HandleMessagingEvent(MRejected, e)
+		case Released, Modified:
+			err = d.delegate.HandleMessagingEvent(MReleased, e)
+		}
+		if err == nil && delivery.Settled() {
+			err = d.delegate.HandleMessagingEvent(MSettled, e)
+		}
+		if err == nil && d.AutoSettle {
+			delivery.Settle()
+		}
+	}
+	return
+}
diff --git a/go/event/message.go b/go/event/message.go
new file mode 100644
index 0000000..d900744
--- /dev/null
+++ b/go/event/message.go
@@ -0,0 +1,75 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/internal"
+)
+
+// DecodeMessage decodes the message containined in a delivery event.
+func DecodeMessage(e Event) (m amqp.Message, err error) {
+	defer internal.DoRecover(&err)
+	delivery := e.Delivery()
+	if !delivery.Readable() || delivery.Partial() {
+		return nil, internal.Errorf("attempting to get incomplete message")
+	}
+	data := make([]byte, delivery.Pending())
+	result := delivery.Link().Recv(data)
+	if result != len(data) {
+		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
+	}
+	return amqp.DecodeMessage(data)
+}
+
+// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
+var tags amqp.UidCounter
+
+// Send sends a amqp.Message over a Link.
+// Returns a Delivery that can be use to determine the outcome of the message.
+func (link Link) Send(m amqp.Message) (Delivery, error) {
+	if !link.IsSender() {
+		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
+	}
+	// FIXME aconway 2015-04-08: buffering, error handling
+	delivery := link.Delivery(tags.Next())
+	bytes, err := m.Encode(nil)
+	if err != nil {
+		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
+	}
+	result := link.SendBytes(bytes)
+	link.Advance()
+	if result != len(bytes) {
+		if result < 0 {
+			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
+		} else {
+			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
+		}
+	}
+	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
+		delivery.Settle()
+	}
+	return delivery, nil
+}
diff --git a/go/event/pump.go b/go/event/pump.go
new file mode 100644
index 0000000..db022ff
--- /dev/null
+++ b/go/event/pump.go
@@ -0,0 +1,357 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/connection.h>
+// #include <proton/transport.h>
+// #include <proton/event.h>
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+// #include <proton/tr

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[34/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a
deleted file mode 100644
index 12ca729..0000000
--- a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a
+++ /dev/null
@@ -1,1726 +0,0 @@
-!<arch>
-__.PKGDEF       0           0     0     644     30839     `
-go object linux amd64 go1.4.2 X:precisestack
-
-$$
-package amqp
-	import net "net"
-	import runtime "runtime"
-	import time "time"
-	import url "net/url"
-	import io "io"
-	import cgo "runtime/cgo"
-	import strconv "strconv"
-	import syscall "syscall"
-	import fmt "fmt"
-	import internal "qpid.apache.org/proton/go/internal"
-	import reflect "reflect"
-	import atomic "sync/atomic"
-	import bytes "bytes"
-	import unsafe "unsafe"
-	type @"".Error struct { Name string; Description string }
-	func (@"".c·2 @"".Error) Error () (? string)
-	func @"".Errorf (@"".name·2 string "esc:0x2", @"".format·3 string "esc:0x0", @"".arg·4 ...interface {} "esc:0x0") (? @"".Error)
-	func @"".MakeError (@"".err·2 error) (? @"".Error)
-	var @"".InternalError string
-	var @"".NotFound string
-	var @"".UnauthorizedAccess string
-	var @"".DecodeError string
-	var @"".ResourceLimit string
-	var @"".NotAllowed string
-	var @"".InvalidField string
-	var @"".NotImplemented string
-	var @"".ResourceLocked string
-	var @"".PreerrorFailed string
-	var @"".ResourceDeleted string
-	var @"".IllegalState string
-	var @"".FrameSizeTooSmall string
-	type @"".UidCounter struct { @"".count uint64 }
-	func (@"".uc·2 *@"".UidCounter) Next () (? string)
-	func (@"".uc·2 *@"".UidCounter) NextInt () (? uint64)
-	func @"".Marshal (@"".v·3 interface {}, @"".buffer·4 []byte) (@"".outbuf·1 []byte, @"".err·2 error)
-	type @"io".Writer interface { Write(@"io".p []byte) (@"io".n int, @"io".err error) }
-	type @"".Encoder struct { @"".writer @"io".Writer; @"".buffer []byte }
-	func (@"".e·2 *@"".Encoder) Encode (@"".v·3 interface {}) (@"".err·1 error)
-	func @"".NewEncoder (@"".w·2 @"io".Writer) (? *@"".Encoder) { return (&@"".Encoder{ @"".writer:@"".w·2, @"".buffer:make([]byte, 0x100) }) }
-	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
-	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
-	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
-	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
-	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
-	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
-	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
-	type @"time".Duration int64
-	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
-	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
-	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
-	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
-	func (@"time".d·2 @"time".Duration) String () (? string)
-	type @"time".Month int
-	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
-	type @"time".Weekday int
-	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
-	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
-	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
-	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
-	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
-	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
-	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
-	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
-	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
-	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
-	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
-	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
-	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
-	type @"".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGroupId(? string); SetGroupSequence(? int32); SetInferred(? bo
 ol); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
-	func @"".NewMessage () (? @"".Message)
-	func @"".NewMessageWith (@"".body·2 interface {}) (? @"".Message)
-	func @"".DecodeMessage (@"".data·3 []byte "esc:0x0") (? @"".Message, ? error)
-	type @"".Sections []interface {}
-	type @"".Type uint32
-	func (@"".t·2 @"".Type) String () (? string)
-	type @"".Map map[interface {}]interface {}
-	func (@"".m·2 @"".Map) GoString () (? string)
-	type @"".List []interface {}
-	func (@"".l·2 @"".List) GoString () (? string)
-	type @"".Symbol string
-	func (@"".s·2 @"".Symbol) GoString () (? string)
-	type @"".Binary string
-	func (@"".b·2 @"".Binary) GoString () (? string)
-	type @"reflect".ChanDir int
-	func (@"reflect".d·2 @"reflect".ChanDir) String () (? string)
-	type @"reflect".StructTag string
-	func (@"reflect".tag·2 @"reflect".StructTag "esc:0x0") Get (@"reflect".key·3 string "esc:0x0") (? string)
-	type @"reflect".StructField struct { Name string; PkgPath string; Type @"reflect".Type; Tag @"reflect".StructTag; Offset uintptr; Index []int; Anonymous bool }
-	type @"reflect".Kind uint
-	func (@"reflect".k·2 @"reflect".Kind) String () (? string)
-	type @"reflect".typeAlg struct { @"reflect".hash func(? @"unsafe".Pointer, ? uintptr, ? uintptr) (? uintptr); @"reflect".equal func(? @"unsafe".Pointer, ? @"unsafe".Pointer, ? uintptr) (? bool) }
-	type @"reflect".method struct { @"reflect".name *string; @"reflect".pkgPath *string; @"reflect".mtyp *@"reflect".rtype; @"reflect".typ *@"reflect".rtype; @"reflect".ifn @"unsafe".Pointer; @"reflect".tfn @"unsafe".Pointer }
-	type @"reflect".uncommonType struct { @"reflect".name *string; @"reflect".pkgPath *string; @"reflect".methods []@"reflect".method }
-	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x1") Method (@"reflect".i·3 int) (@"reflect".m·1 @"reflect".Method)
-	func (@"reflect".t·3 *@"reflect".uncommonType "esc:0x0") MethodByName (@"reflect".name·4 string "esc:0x0") (@"reflect".m·1 @"reflect".Method, @"reflect".ok·2 bool)
-	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x1") Name () (? string) { if @"reflect".t·2 == nil || @"reflect".t·2.@"reflect".name == nil { return "" }; return *@"reflect".t·2.@"reflect".name }
-	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x0") NumMethod () (? int) { if @"reflect".t·2 == nil { return 0x0 }; return len(@"reflect".t·2.@"reflect".methods) }
-	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x1") PkgPath () (? string) { if @"reflect".t·2 == nil || @"reflect".t·2.@"reflect".pkgPath == nil { return "" }; return *@"reflect".t·2.@"reflect".pkgPath }
-	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x2") @"reflect".uncommon () (? *@"reflect".uncommonType) { return @"reflect".t·2 }
-	type @"reflect".rtype struct { @"reflect".size uintptr; @"reflect".hash uint32; _ uint8; @"reflect".align uint8; @"reflect".fieldAlign uint8; @"reflect".kind uint8; @"reflect".alg *@"reflect".typeAlg; @"reflect".gc [2]@"unsafe".Pointer; @"reflect".string *string; @"reflect".? *@"reflect".uncommonType; @"reflect".ptrToThis *@"reflect".rtype; @"reflect".zero @"unsafe".Pointer }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Align () (? int) { return int(@"reflect".t·2.@"reflect".align) }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") AssignableTo (@"reflect".u·3 @"reflect".Type "esc:0x0") (? bool)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Bits () (? int)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") ChanDir () (? @"reflect".ChanDir)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Comparable () (? bool) { return @"reflect".t·2.@"reflect".alg != nil && @"reflect".t·2.@"reflect".alg.@"reflect".equal != nil }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") ConvertibleTo (@"reflect".u·3 @"reflect".Type "esc:0x0") (? bool)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") Elem () (? @"reflect".Type)
-	func (@"reflect".t·2 *@"reflect".rtype) Field (@"reflect".i·3 int) (? @"reflect".StructField)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") FieldAlign () (? int) { return int(@"reflect".t·2.@"reflect".fieldAlign) }
-	func (@"reflect".t·2 *@"reflect".rtype) FieldByIndex (@"reflect".index·3 []int "esc:0x0") (? @"reflect".StructField)
-	func (@"reflect".t·3 *@"reflect".rtype) FieldByName (@"reflect".name·4 string "esc:0x0") (? @"reflect".StructField, ? bool)
-	func (@"reflect".t·3 *@"reflect".rtype) FieldByNameFunc (@"reflect".match·4 func(? string) (? bool) "esc:0x0") (? @"reflect".StructField, ? bool)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Implements (@"reflect".u·3 @"reflect".Type) (? bool)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") In (@"reflect".i·3 int) (? @"reflect".Type)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") IsVariadic () (? bool)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") Key () (? @"reflect".Type)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Kind () (? @"reflect".Kind) { return @"reflect".Kind(@"reflect".t·2.@"reflect".kind & 0x1F) }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Len () (? int)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Method (@"reflect".i·3 int) (@"reflect".m·1 @"reflect".Method)
-	func (@"reflect".t·3 *@"reflect".rtype "esc:0x0") MethodByName (@"reflect".name·4 string "esc:0x0") (@"reflect".m·1 @"reflect".Method, @"reflect".ok·2 bool)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") Name () (? string)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumField () (? int)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumIn () (? int)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumMethod () (? int)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumOut () (? int)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Out (@"reflect".i·3 int) (? @"reflect".Type)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") PkgPath () (? string)
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Size () (? uintptr) { return @"reflect".t·2.@"reflect".size }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") String () (? string) { return *@"reflect".t·2.@"reflect".string }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x2") @"reflect".common () (? *@"reflect".rtype) { return @"reflect".t·2 }
-	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") @"reflect".pointers () (? bool) { return @"reflect".t·2.@"reflect".kind & 0x80 == 0x0 }
-	func (@"reflect".t·2 *@"reflect".rtype) @"reflect".ptrTo () (? *@"reflect".rtype)
-	type @"reflect".flag uintptr
-	func (@"reflect".f·2 @"reflect".flag) @"reflect".kind () (? @"reflect".Kind) { return @"reflect".Kind(@"reflect".f·2 & @"reflect".flag(0x1F)) }
-	func (@"reflect".f·1 @"reflect".flag) @"reflect".mustBe (@"reflect".expected·2 @"reflect".Kind)
-	func (@"reflect".f·1 @"reflect".flag) @"reflect".mustBeAssignable ()
-	func (@"reflect".f·1 @"reflect".flag) @"reflect".mustBeExported ()
-	type @"reflect".Value struct { @"reflect".typ *@"reflect".rtype; @"reflect".ptr @"unsafe".Pointer; @"reflect".? @"reflect".flag }
-	func (@"reflect".v·2 @"reflect".Value) Addr () (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Bool () (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x1") Bytes () (? []byte)
-	func (@"reflect".v·2 @"reflect".Value) Call (@"reflect".in·3 []@"reflect".Value "esc:0x0") (? []@"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) CallSlice (@"reflect".in·3 []@"reflect".Value "esc:0x0") (? []@"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") CanAddr () (? bool) { return @"reflect".v·2.@"reflect".flag & @"reflect".flag(0x80) != @"reflect".flag(0x0) }
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") CanInterface () (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") CanSet () (? bool) { return @"reflect".v·2.@"reflect".flag & @"reflect".flag(0xA0) == @"reflect".flag(0x80) }
-	func (@"reflect".v·2 @"reflect".Value) Cap () (? int)
-	func (@"reflect".v·1 @"reflect".Value) Close ()
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Complex () (? complex128)
-	func (@"reflect".v·2 @"reflect".Value) Convert (@"reflect".t·3 @"reflect".Type) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Elem () (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Field (@"reflect".i·3 int) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x2") FieldByIndex (@"reflect".index·3 []int "esc:0x0") (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) FieldByName (@"reflect".name·3 string "esc:0x0") (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) FieldByNameFunc (@"reflect".match·3 func(? string) (? bool) "esc:0x0") (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Float () (? float64)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Index (@"reflect".i·3 int) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Int () (? int64)
-	func (@"reflect".v·2 @"reflect".Value) Interface () (@"reflect".i·1 interface {})
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") InterfaceData () (? [2]uintptr)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") IsNil () (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") IsValid () (? bool) { return @"reflect".v·2.@"reflect".flag != @"reflect".flag(0x0) }
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Kind () (? @"reflect".Kind)
-	func (@"reflect".v·2 @"reflect".Value) Len () (? int)
-	func (@"reflect".v·2 @"reflect".Value) MapIndex (@"reflect".key·3 @"reflect".Value) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) MapKeys () (? []@"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x2") Method (@"reflect".i·3 int) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x2") MethodByName (@"reflect".name·3 string "esc:0x0") (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") NumField () (? int)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") NumMethod () (? int)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowComplex (@"reflect".x·3 complex128) (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowFloat (@"reflect".x·3 float64) (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowInt (@"reflect".x·3 int64) (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowUint (@"reflect".x·3 uint64) (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x2") Pointer () (? uintptr)
-	func (@"reflect".v·3 @"reflect".Value) Recv () (@"reflect".x·1 @"reflect".Value, @"reflect".ok·2 bool)
-	func (@"reflect".v·1 @"reflect".Value) Send (@"reflect".x·2 @"reflect".Value)
-	func (@"reflect".v·1 @"reflect".Value) Set (@"reflect".x·2 @"reflect".Value)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetBool (@"reflect".x·2 bool)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetBytes (@"reflect".x·2 []byte)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetCap (@"reflect".n·2 int)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetComplex (@"reflect".x·2 complex128)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetFloat (@"reflect".x·2 float64)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetInt (@"reflect".x·2 int64)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetLen (@"reflect".n·2 int)
-	func (@"reflect".v·1 @"reflect".Value) SetMapIndex (@"reflect".key·2 @"reflect".Value, @"reflect".val·3 @"reflect".Value)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetPointer (@"reflect".x·2 @"unsafe".Pointer)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetString (@"reflect".x·2 string)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetUint (@"reflect".x·2 uint64)
-	func (@"reflect".v·2 @"reflect".Value) Slice (@"reflect".i·3 int, @"reflect".j·4 int) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) Slice3 (@"reflect".i·3 int, @"reflect".j·4 int, @"reflect".k·5 int) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) String () (? string)
-	func (@"reflect".v·3 @"reflect".Value) TryRecv () (@"reflect".x·1 @"reflect".Value, @"reflect".ok·2 bool)
-	func (@"reflect".v·2 @"reflect".Value) TrySend (@"reflect".x·3 @"reflect".Value) (? bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Type () (? @"reflect".Type)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Uint () (? uint64)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x2") UnsafeAddr () (? uintptr)
-	func (@"reflect".v·2 @"reflect".Value) @"reflect".assignTo (@"reflect".context·3 string "esc:0x0", @"reflect".dst·4 *@"reflect".rtype, @"reflect".target·5 @"unsafe".Pointer) (? @"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value) @"reflect".call (@"reflect".op·3 string "esc:0x0", @"reflect".in·4 []@"reflect".Value "esc:0x0") (? []@"reflect".Value)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x3") @"reflect".pointer () (? @"unsafe".Pointer)
-	func (@"reflect".v·3 @"reflect".Value) @"reflect".recv (@"reflect".nb·4 bool) (@"reflect".val·1 @"reflect".Value, @"reflect".ok·2 bool)
-	func (@"reflect".v·2 @"reflect".Value "esc:0x1") @"reflect".runes () (? []rune)
-	func (@"reflect".v·2 @"reflect".Value) @"reflect".send (@"reflect".x·3 @"reflect".Value, @"reflect".nb·4 bool) (@"reflect".selected·1 bool)
-	func (@"reflect".v·1 @"reflect".Value "esc:0x0") @"reflect".setRunes (@"reflect".x·2 []rune)
-	type @"reflect".Method struct { Name string; PkgPath string; Type @"reflect".Type; Func @"reflect".Value; Index int }
-	type @"reflect".Type interface { Align() (? int); AssignableTo(@"reflect".u @"reflect".Type) (? bool); Bits() (? int); ChanDir() (? @"reflect".ChanDir); Comparable() (? bool); ConvertibleTo(@"reflect".u @"reflect".Type) (? bool); Elem() (? @"reflect".Type); Field(@"reflect".i int) (? @"reflect".StructField); FieldAlign() (? int); FieldByIndex(@"reflect".index []int) (? @"reflect".StructField); FieldByName(@"reflect".name string) (? @"reflect".StructField, ? bool); FieldByNameFunc(@"reflect".match func(? string) (? bool)) (? @"reflect".StructField, ? bool); Implements(@"reflect".u @"reflect".Type) (? bool); In(@"reflect".i int) (? @"reflect".Type); IsVariadic() (? bool); Key() (? @"reflect".Type); Kind() (? @"reflect".Kind); Len() (? int); Method(? int) (? @"reflect".Method); MethodByName(? string) (? @"reflect".Method, ? bool); Name() (? string); NumField() (? int); NumIn() (? int); NumMethod() (? int); NumOut() (? int); Out(@"reflect".i int) (? @"reflect".Type); PkgPath() (? strin
 g); Size() (? uintptr); String() (? string); @"reflect".common() (? *@"reflect".rtype); @"reflect".uncommon() (? *@"reflect".uncommonType) }
-	type @"".BadUnmarshal struct { AMQPType string; GoType @"reflect".Type }
-	func (@"".e·2 @"".BadUnmarshal) Error () (? string)
-	type @"io".Reader interface { Read(@"io".p []byte) (@"io".n int, @"io".err error) }
-	type @"bytes".readOp int
-	type @"bytes".Buffer struct { @"bytes".buf []byte; @"bytes".off int; @"bytes".runeBytes [4]byte; @"bytes".bootstrap [64]byte; @"bytes".lastRead @"bytes".readOp }
-	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x1") Bytes () (? []byte) { return @"bytes".b·2.@"bytes".buf[@"bytes".b·2.@"bytes".off:] }
-	func (@"bytes".b·1 *@"bytes".Buffer) Grow (@"bytes".n·2 int)
-	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") Len () (? int) { return len(@"bytes".b·2.@"bytes".buf) - @"bytes".b·2.@"bytes".off }
-	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x1") Next (@"bytes".n·3 int) (? []byte)
-	func (@"bytes".b·3 *@"bytes".Buffer) Read (@"bytes".p·4 []byte "esc:0x0") (@"bytes".n·1 int, @"bytes".err·2 error)
-	func (@"bytes".b·3 *@"bytes".Buffer) ReadByte () (@"bytes".c·1 byte, @"bytes".err·2 error)
-	func (@"bytes".b·3 *@"bytes".Buffer "esc:0x0") ReadBytes (@"bytes".delim·4 byte) (@"bytes".line·1 []byte, @"bytes".err·2 error)
-	func (@"bytes".b·3 *@"bytes".Buffer) ReadFrom (@"bytes".r·4 @"io".Reader) (@"bytes".n·1 int64, @"bytes".err·2 error)
-	func (@"bytes".b·4 *@"bytes".Buffer) ReadRune () (@"bytes".r·1 rune, @"bytes".size·2 int, @"bytes".err·3 error)
-	func (@"bytes".b·3 *@"bytes".Buffer "esc:0x0") ReadString (@"bytes".delim·4 byte) (@"bytes".line·1 string, @"bytes".err·2 error)
-	func (@"bytes".b·1 *@"bytes".Buffer) Reset ()
-	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") String () (? string) { if @"bytes".b·2 == nil { return "<nil>" }; return string(@"bytes".b·2.@"bytes".buf[@"bytes".b·2.@"bytes".off:]) }
-	func (@"bytes".b·1 *@"bytes".Buffer) Truncate (@"bytes".n·2 int)
-	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") UnreadByte () (? error)
-	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") UnreadRune () (? error)
-	func (@"bytes".b·3 *@"bytes".Buffer) Write (@"bytes".p·4 []byte "esc:0x0") (@"bytes".n·1 int, @"bytes".err·2 error)
-	func (@"bytes".b·2 *@"bytes".Buffer) WriteByte (@"bytes".c·3 byte) (? error)
-	func (@"bytes".b·3 *@"bytes".Buffer) WriteRune (@"bytes".r·4 rune) (@"bytes".n·1 int, @"bytes".err·2 error)
-	func (@"bytes".b·3 *@"bytes".Buffer) WriteString (@"bytes".s·4 string "esc:0x0") (@"bytes".n·1 int, @"bytes".err·2 error)
-	func (@"bytes".b·3 *@"bytes".Buffer) WriteTo (@"bytes".w·4 @"io".Writer) (@"bytes".n·1 int64, @"bytes".err·2 error)
-	func (@"bytes".b·2 *@"bytes".Buffer) @"bytes".grow (@"bytes".n·3 int) (? int)
-	func (@"bytes".b·3 *@"bytes".Buffer "esc:0x1") @"bytes".readSlice (@"bytes".delim·4 byte) (@"bytes".line·1 []byte, @"bytes".err·2 error)
-	type @"".Decoder struct { @"".reader @"io".Reader; @"".buffer @"bytes".Buffer }
-	func (@"".d·2 *@"".Decoder) Buffered () (? @"io".Reader)
-	func (@"".d·2 *@"".Decoder) Decode (@"".v·3 interface {}) (@"".err·1 error)
-	func (@"".d·2 *@"".Decoder) @"".more () (? error)
-	func @"".NewDecoder (@"".r·2 @"io".Reader) (? *@"".Decoder) { return (&@"".Decoder{ @"".reader:@"".r·2, @"".buffer:(@"bytes".Buffer{  }) }) }
-	func @"".Unmarshal (@"".bytes·3 []byte "esc:0x0", @"".v·4 interface {}) (@"".n·1 int, @"".err·2 error)
-	type @"net/url".Userinfo struct { @"net/url".username string; @"net/url".password string; @"net/url".passwordSet bool }
-	func (@"net/url".u·3 *@"net/url".Userinfo "esc:0x1") Password () (? string, ? bool) { if @"net/url".u·3.@"net/url".passwordSet { return @"net/url".u·3.@"net/url".password, true }; return "", false }
-	func (@"net/url".u·2 *@"net/url".Userinfo "esc:0x1") String () (? string)
-	func (@"net/url".u·2 *@"net/url".Userinfo "esc:0x1") Username () (? string) { return @"net/url".u·2.@"net/url".username }
-	type @"net/url".Values map[string][]string
-	func (@"net/url".v·1 @"net/url".Values "esc:0x0") Add (@"net/url".key·2 string, @"net/url".value·3 string) { @"net/url".v·1[@"net/url".key·2] = append(@"net/url".v·1[@"net/url".key·2], @"net/url".value·3) }
-	func (@"net/url".v·1 @"net/url".Values "esc:0x0") Del (@"net/url".key·2 string "esc:0x0") { delete(@"net/url".v·1, @"net/url".key·2) }
-	func (@"net/url".v·2 @"net/url".Values "esc:0x0") Encode () (? string)
-	func (@"net/url".v·2 @"net/url".Values "esc:0x0") Get (@"net/url".key·3 string "esc:0x0") (? string) { if @"net/url".v·2 == nil { return "" }; var @"net/url".vs·4 []string; ; var @"net/url".ok·5 bool; ; @"net/url".vs·4, @"net/url".ok·5 = @"net/url".v·2[@"net/url".key·3]; if !@"net/url".ok·5 || len(@"net/url".vs·4) == 0x0 { return "" }; return @"net/url".vs·4[0x0] }
-	func (@"net/url".v·1 @"net/url".Values "esc:0x0") Set (@"net/url".key·2 string, @"net/url".value·3 string) { @"net/url".v·1[@"net/url".key·2] = ([]string{ 0x0:@"net/url".value·3 }) }
-	type @"net/url".URL struct { Scheme string; Opaque string; User *@"net/url".Userinfo; Host string; Path string; RawQuery string; Fragment string }
-	func (@"net/url".u·2 *@"net/url".URL "esc:0x0") IsAbs () (? bool) { return @"net/url".u·2.Scheme != "" }
-	func (@"net/url".u·3 *@"net/url".URL "esc:0x2") Parse (@"net/url".ref·4 string) (? *@"net/url".URL, ? error)
-	func (@"net/url".u·2 *@"net/url".URL) Query () (? @"net/url".Values)
-	func (@"net/url".u·2 *@"net/url".URL "esc:0x1") RequestURI () (? string)
-	func (@"net/url".u·2 *@"net/url".URL "esc:0x2") ResolveReference (@"net/url".ref·3 *@"net/url".URL "esc:0x2") (? *@"net/url".URL)
-	func (@"net/url".u·2 *@"net/url".URL "esc:0x0") String () (? string)
-	func @"".ParseURL (@"".s·3 string) (@"".u·1 *@"net/url".URL, @"".err·2 error)
-	func @"".init ()
-	const @"".minEncode = 0x100
-	var @"time".months [12]string
-	var @"time".days [7]string
-	var @"time".Local *@"time".Location
-	var @"time".UTC *@"time".Location
-
-$$
-_go_.6          0           0     0     644     468681    `
-go object linux amd64 go1.4.2 X:precisestack
-
-!
-go13ld
-fmt.areflect.astrconv.async/atomic.aruntime/cgo.asyscall.aio.aHqpid.apache.org/proton/go/internal.atime.abytes.a
-net.anet/url.a�"".Error.Error��dH�%H;aw���H��HDŽ$�HDŽ$�H�|$`1��H�\$`H���H��H��H�\$HH�T$PH�L$XH�H�$H��$�H�\$�H�L$H�D$H�\$HH�$H�L$8H�L$H�D$@H�D$�H�H�$H��$�H�\$H�D$�H�L$H�D$H�\$HH��H�$H�L$8H�L$H�D$@H�D$�H�H�,$H��H��H�H�H�\$HH�\$H�\$PH�\$H�\$XH�\$ �H�L$(H�D$0H��$�H��$�H�ĀÉ�����
- 0runtime.morestack_noctxtz� runtime.duffzero�type.string�runtime.convT2E�2runtime.writebarrieriface�type.string�runtime.convT2E�2runtime.writebarrieriface�2go.string."proton %s: %s"�fmt.Sprintf`�"".autotmp_0008"type.interface {}"".autotmp_0007�"type.interface {}"".autotmp_0005o&type.[]interface {}"".autotmp_0003?(type.[2]interface {}"".~r0@type.string"".ctype."".Error����
�B���4Tgclocals·89e6b2848881d386696738078d0e941dTgclocals·aa288e3c39d4102a912a36b10515d40d�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/error.go�"".Errorf��dH�%H;aw���H��XH��$�1��H�\$pH�$H�\$xH�\$H��$�H�\$H��$�H�\$H��$�H�\$ �H�l$(H�T$0H�|$81��H�\$`H�\$8H�t$hH�t$@H
 �l$HH�T$PH�t$8H��$�H���H��X�
- 0runtime.morestack_noctxtJ� runtime.duffzero�fmt.Sprintf�� runtime.duffzero�� runtime.duffcopy��
-"".autotmp_0013?type."".Error"".~r3ptype."".Error"".arg@&type.[]interface {}"".format type.string"".nametype.string����H)�
-c]Tgclocals·9cbabfc7b1ba9b18a1b3687d46073813Tgclocals·44568aa369055d8938d809aa5d80843b�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/error.go�"".MakeError��dH�%H;aw���H��`H�|$x1��H�\$hH�$H�\$pH�\$�H�\$H�,$H��H��H�H��H�T$H�D$H�D$8H�$H�T$0H�����H�\$H�\$ H�\$H�\$(H�\$pH�$H�\$hH�[ ��H�l$H�T$H�|$@1��H�\$ H�\$@H�t$(H�t$HH�l$PH�T$XH�t$@H�l$xH���H��`�
- 0runtime.morestack_noctxtD� runtime.duffzerotruntime.convI2E�reflect.TypeOf�
-�
-�� runtime.duffzero�� runtime.duffcopy`�
-"".autotmp_0017?type."".Error"".autotmp_0015type.string"".autotmp_0014_"type.reflect.Type"".~r1 type."".Error"".errtype.error����R&�9dSTgclocals·cede55e64cfaf842aa360488b9c978baTgclocals·4398bb51467914f29637b614067b995f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/error.go�0"".(*UidCounter).NextInt��dH�%H;aw���H��H�\$ H�$H�<$tH�D$�H�\$H�\$(H��É%��
- 0runtime.morestack_noctxth*sync/atomic.AddUint64 0"".~r0type.uint64
-"".uc&type.*"".UidCounter0,/0	P
-D6
-3Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go�*"".(*UidCounter).Next��dH�%H;aw���H�� H�D$0H�D$8H�\$(H�$�H�\$H�$H�D$ �H�L$H�D$H�L$0H�D$8H�� �
- 0runtime.morestack_noctxtl0"".(*UidCounter).NextInt�$strconv.FormatUint0@"".~r0type.string
-"".uc&type.*"".UidCounter@O?p
-N,D
-5;Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go�""._Cgo_ptr H�\$H�\$� "".~r1&type.unsafe.Pointer"".ptr&type.unsafe.PointerTgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9ffqpid.apache.org/proton/go/amqp/_obj/_cgo_gotypes.go�"""._Cfunc_CString��dH�%H;aw���H��PH�\$`H��H�$H�H���H�t$H�t$ H�t$H����H��@H��@H�L$HH�T$XH�L$`H�D$@H�L$0H9�}H��H�t$8H�4$H�T$(H�T$H�D$�H�D$`H�\$H��t%H=@sH��H�\$ H�\$hH��P����׉�t���
- 0runtime.morestack_noctxtR.""._cgo_runtime_cmalloc`
-�runtime.memmove�$runtime.panicindex0�"".autotmp_0027type.uintptr"".autotmp_0026type.int"".autotmp_0025Otype.string"".autotmp_0024/type.[]uint8"".autotmp_0023type.int
-"".ppo.type.*[1073741824]uint8"".p_&type.unsafe.Pointer"".~r1 (type.*""._Ctype_char"".stype.string�����"|[0b3Tgclocals·d7e8a62d22b1cde6d92b17a55c33fe8fTgclocals·283619d6755c7337ece602447ba790ff�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�"""._Cfunc_GoBytes��dH�%H;aw���H��(H�D$@H�D$HH�D$PH�\$0H�$Hc\$8H�\$H�H���H�T$H�L$H�D$ H�T$@H�L$HH�D$PH��(�
- 0runtime.morestack_noctxt�.""._cgo_runtime_gobytes�
-PP"".~r2 type.[]uint8"".l$type.""._Ctype_int"".p&type.unsafe.PointerP\O
-��5K
-R.Tgclocals·69799e6b08b04134ac5d3d02564aacadTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�$""._Cfunc_GoString��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�H���H�L$H�D$H�L$(H�D$0H���
- 0runtime.morestack_noctxtp0""._cgo_runtime_gostring~
-00"".~r1type.string"".p(type.*""._Ctype_char0?/`�,4
-?!Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�&""._Cfunc_GoStringN��dH�%H;aw���H�� H�D$8H�D$@H�\$(H�$Hc\$0H�\$H�H���H�L$H�D$H�L$8H�D$@H�� �
- 0runtime.morestack_noctxt�2""._cgo_runtime_gostringn�
-@@"".~r2 type.string"".l$type.""._Ctype_int"".p(type.*""._Ctype_char@I?
p�,D
-I'Tgclocals·6a2e5ab2d393a1bfd331903fbd0fd425Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�""._Cfunc_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN>""._cgo_e3cd7c286e0f_Cfunc_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0&type.unsafe.Pointer0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�"""._Cfunc_pn_data��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLD""._cgo_e3cd7c286e0f_Cfunc_pn_datav:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0*type.""._Ctype_size_t0./P�#!
-BTgclocals·8512b64a8c2de1386e17b894ea692148Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_data_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_e3cd7c286e0f_Cfunc_pn_data_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_data_decode��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLR""._cgo_e3cd7c286e0f_Cfunc_pn_data_decodev:""._cgo_runtime_cgocall_errno�
-@0
-"".r10,type.""._Ctype_ssize_t
-"".p2 *type.""._Ctype_size_t
-"".p1(type.*""._Ctype_char
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·eaf31f95896361dc5cdd0293aac48f97Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_data_encode��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLR""._cgo_e3cd7c286e0f_Cfunc_pn_data_encodev:""._cgo_runtime_cgocall_errno�
-@0
-"".r10,type.""._Ctype_ssize_t
-"".p2 *type.""._Ctype_size_t
-"".p1(type.*""._Ctype_char
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·eaf31f95896361dc5cdd0293aac48f97Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_data_enter��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDP""._cgo_e3cd7c286e0f_Cfunc_pn_data_entern:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_data_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLP""._cgo_e3cd7c286e0f_Cfunc_pn_data_errorv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_error_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_exit��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDN""._cgo_e3cd7c286e0f_Cfunc_pn_data_exitn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNN""._cgo_e3cd7c286e0f_Cfunc_pn_data_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_binary��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^Z""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_binary�:""._cgo_runtime_cgocall_errno�
-00
-"".r12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_data_t07/`�,!
-KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_bool��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_booln:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_byte��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_byten:""._cgo_runtime_cgocall_errno|
- 0
-"".r1*type.""._Ctype_int8_t
-"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_char��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_chart:""._cgo_runtime_cgocall_errno�
- 0
-"".r10type.""._Ctype_pn_char_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_double��dH�%H;aw���H�����D$(H�H�$H�\$ H�\$H�H���H���
- 0runtime.morestack_noctxt<*$f64.0000000000000000L*$f64.0000000000000000fZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_double�:""._cgo_runtime_cgocall_errno�
- 0
-"".r1*type.""._Ctype_double
-"".p0@type.*""._Ctype_struct_pn_data_t0;/`�0!
-OTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_float��dH�%H;aw���H�����D$(H�H�$H�\$ H�\$H�H���H���
- 0runtime.morestack_noctxt<$f32.00000000L$f32.00000000fX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_float�:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.""._Ctype_float
-"".p0@type.*""._Ctype_struct_pn_data_t0;/`�0!
-OTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_get_int��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJT""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_intt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1,type.""._Ctype_int32_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_list��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_listv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1*type.""._Ctype_size_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_long��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_longv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1,type.""._Ctype_int64_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_get_map��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLT""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_mapv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1*type.""._Ctype_size_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_short��dH�%H;aw���H��f�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtHX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_shortr:""._cgo_runtime_cgocall_errno�
- 0
-"".r1,type.""._Ctype_int16_t
-"".p0@type.*""._Ctype_struct_pn_data_t0,/
-P�!!
-@Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_string��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^Z""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_string�:""._cgo_runtime_cgocall_errno�
-00
-"".r12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_data_t07/`�,!
-KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_symbol��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^Z""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_symbol�:""._cgo_runtime_cgocall_errno�
-00
-"".r12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_data_t07/`�,!
-KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_ubyte��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_ubyten:""._cgo_runtime_cgocall_errno|
- 0
-"".r1,type.""._Ctype_uint8_t
-"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_uint��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_uintt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint32_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_ulong��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_ulongv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_ushort��dH�%H;aw���H��f�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtHZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_ushortr:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint16_t
-"".p0@type.*""._Ctype_struct_pn_data_t0,/
-P�!!
-@Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_next��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDN""._cgo_e3cd7c286e0f_Cfunc_pn_data_nextn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_binary��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_binaryt:""._cgo_runtime_cgocall_errno�
-@0
-"".r10$type.""._Ctype_int
-"".p12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·1012e749cb483d93a3e4aab6e4099c45Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_bool��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_boolt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_byte��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_bytet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1*type.""._Ctype_int8_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_double��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_doublet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1*type.""._Ctype_double
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_float��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_floatt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.""._Ctype_float
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_put_int��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJT""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_intt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1,type.""._Ctype_int32_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_list��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_listt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_long��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_longt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1,type.""._Ctype_int64_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_put_map��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJT""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_mapt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_null��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_nullt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_short��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_shortt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1,type.""._Ctype_int16_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_string��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_stringt:""._cgo_runtime_cgocall_errno�
-@0
-"".r10$type.""._Ctype_int
-"".p12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·1012e749cb483d93a3e4aab6e4099c45Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_symbol��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_symbolt:""._cgo_runtime_cgocall_errno�
-@0
-"".r10$type.""._Ctype_int
-"".p12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·1012e749cb483d93a3e4aab6e4099c45Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_ubyte��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_ubytet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1,type.""._Ctype_uint8_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_uint��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_uintt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1.type.""._Ctype_uint32_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_ulong��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_ulongt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1.type.""._Ctype_uint64_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_ushort��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_ushortt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1.type.""._Ctype_uint16_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_data_rewind��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNR""._cgo_e3cd7c286e0f_Cfunc_pn_data_rewindx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_size��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLN""._cgo_e3cd7c286e0f_Cfunc_pn_data_sizev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1*type.""._Ctype_size_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_type��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJN""._cgo_e3cd7c286e0f_Cfunc_pn_data_typet:""._cgo_runtime_cgocall_errno�
- 0
-"".r10type.""._Ctype_pn_type_t
-"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_error_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNR""._cgo_e3cd7c286e0f_Cfunc_pn_error_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Btype.*""._Ctype_struct_pn_error_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�(""._Cfunc_pn_message��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^J""._cgo_e3cd7c286e0f_Cfunc_pn_message�:""._cgo_runtime_cgocall_errno�
-0
-"".r1Ftype.*""._Ctype_struct_pn_message_t07/`�,!
-KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_annotations��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLb""._cgo_e3cd7c286e0f_Cfunc_pn_message_annotationsv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_message_body��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLT""._cgo_e3cd7c286e0f_Cfunc_pn_message_bodyv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�F""._Cfunc_pn_message_correlation_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLh""._cgo_e3cd7c286e0f_Cfunc_pn_message_correlation_idv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_message_decode��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_message_decodet:""._cgo_runtime_cgocall_errno�
-@0
-"".r10$type.""._Ctype_int
-"".p2 *type.""._Ctype_size_t
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·eaf31f95896361dc5cdd0293aac48f97Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_message_encode��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_message_encodet:""._cgo_runtime_cgocall_errno�
-@0
-"".r10$type.""._Ctype_int
-"".p2 ,type.*""._Ctype_size_t
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·cd788548226369186d2e16a002d1f558Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_message_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_e3cd7c286e0f_Cfunc_pn_message_errorv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_error_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_message_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNT""._cgo_e3cd7c286e0f_Cfunc_pn_message_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ftype.*""._Ctype_struct_pn_message_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_get_address��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLb""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_addressv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�R""._Cfunc_pn_message_get_content_encoding��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLt""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_content_encodingv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�J""._Cfunc_pn_message_get_content_type��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLl""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_content_typev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�L""._Cfunc_pn_message_get_creation_time��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLn""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_creation_timev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1:type.""._Ctype_pn_timestamp_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_get_delivery_count��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_delivery_countt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint32_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�H""._Cfunc_pn_message_get_expiry_time��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_expiry_timev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1:type.""._Ctype_pn_timestamp_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_get_group_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_group_idv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_get_group_sequence��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_group_sequencet:""._cgo_runtime_cgocall_errno�
- 0
-"".r18type.""._Ctype_pn_sequence_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_get_priority��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDd""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_priorityn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1,type.""._Ctype_uint8_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_get_reply_to��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_reply_tov:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�T""._Cfunc_pn_message_get_reply_to_group_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLv""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_reply_to_group_idv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_get_subject��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLb""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_subjectv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_message_get_ttl��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_ttlt:""._cgo_runtime_cgocall_errno�
- 0
-"".r14type.""._Ctype_pn_millis_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_get_user_id��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^b""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_user_id�:""._cgo_runtime_cgocall_errno�
-00
-"".r12type.""._Ctype_struct___0
-"".p0Ftype.*""._Ctype_struct_pn_message_t07/`�,!
-KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_message_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLP""._cgo_e3cd7c286e0f_Cfunc_pn_message_idv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_instructions��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_e3cd7c286e0f_Cfunc_pn_message_instructionsv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�>""._Cfunc_pn_message_is_durable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD`""._cgo_e3cd7c286e0f_Cfunc_pn_message_is_durablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�L""._Cfunc_pn_message_is_first_acquirer��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDn""._cgo_e3cd7c286e0f_Cfunc_pn_message_is_first_acquirern:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_is_inferred��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDb""._cgo_e3cd7c286e0f_Cfunc_pn_message_is_inferredn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�>""._Cfunc_pn_message_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL`""._cgo_e3cd7c286e0f_Cfunc_pn_message_propertiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_address��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_addresst:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�R""._Cfunc_pn_message_set_content_encoding��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJt""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_content_encodingt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�J""._Cfunc_pn_message_set_content_type��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJl""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_content_typet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�L""._Cfunc_pn_message_set_creation_time��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJn""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_creation_timet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1:type.""._Ctype_pn_timestamp_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_set_delivery_count��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_delivery_countt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1.type.""._Ctype_uint32_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_durable��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_durablet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.""._Ctype__Bool
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�H""._Cfunc_pn_message_set_expiry_time��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJj""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_expiry_timet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1:type.""._Ctype_pn_timestamp_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_set_first_acquirer��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_first_acquirert:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.""._Ctype__Bool
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_group_id��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_group_idt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_set_group_sequence��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_group_sequencet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p18type.""._Ctype_pn_sequence_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_inferred��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_inferredt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.""._Ctype__Bool
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_priority��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_priorityt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1,type.""._Ctype_uint8_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_reply_to��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_reply_tot:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�T""._Cfunc_pn_message_set_reply_to_group_id��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJv""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_reply_to_group_idt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_subject��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_subjectt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_message_set_ttl��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_ttlt:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p14type.""._Ctype_pn_millis_t
-"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

-ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_user_id��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_user_idt:""._cgo_runtime_cgocall_errno�
-@0
-"".r10$type.""._Ctype_int
-"".p12type.""._Ctype_struct___0
-"".p0

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[13/36] qpid-proton git commit: PROTON-827: go binding: enable use of 'go get', reorganize packages names and layout.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/messaging/messaging.go b/proton-c/bindings/go/messaging/messaging.go
new file mode 100644
index 0000000..e653de2
--- /dev/null
+++ b/proton-c/bindings/go/messaging/messaging.go
@@ -0,0 +1,250 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package messaging
+
+// #include <proton/disposition.h>
+import "C"
+
+import (
+	"net"
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+)
+
+// Connection is a connection to a remote AMQP endpoint.
+//
+// You can set exported fields to configure the connection before calling
+// Connection.Open()
+//
+type Connection struct {
+	// Server = true means a the connection will do automatic protocol detection.
+	Server bool
+
+	// FIXME aconway 2015-04-17: Other parameters to set up SSL, SASL etc.
+
+	handler *handler
+	pump    *event.Pump
+	session Session
+}
+
+// Make an AMQP connection over a net.Conn connection.
+//
+// Use Connection.Close() to close the Connection, this will also close conn.
+// Using conn.Close() directly will cause an abrupt disconnect rather than an
+// orderly AMQP close.
+//
+func (c *Connection) Open(conn net.Conn) (err error) {
+	c.handler = newHandler(c)
+	c.pump, err = event.NewPump(conn,
+		event.NewMessagingDelegator(c.handler),
+	)
+	if err != nil {
+		return err
+	}
+	if c.Server {
+		c.pump.Server()
+	}
+	go c.pump.Run()
+	return nil
+}
+
+// Connect opens a default client connection. It is a shortcut for
+//    c := &Connection
+//    c.Open()
+//
+func Connect(conn net.Conn) (*Connection, error) {
+	c := &Connection{}
+	err := c.Open(conn)
+	return c, err
+}
+
+// Close the connection.
+//
+// Connections must be closed to clean up resources and stop associated goroutines.
+func (c *Connection) Close() error { return c.pump.Close() }
+
+// DefaultSession returns a default session for the connection.
+//
+// It is created on the first call to DefaultSession() and returned from all subsequent calls.
+// Use Session() for more control over creating sessions.
+//
+func (c *Connection) DefaultSession() (s Session, err error) {
+	if c.session.e.IsNil() {
+		c.session, err = c.Session()
+	}
+	return c.session, err
+}
+
+type sessionErr struct {
+	s   event.Session
+	err error
+}
+
+// Session creates a new session.
+func (c *Connection) Session() (Session, error) {
+	connection := c.pump.Connection()
+	result := make(chan sessionErr)
+	c.pump.Inject <- func() {
+		s, err := connection.Session()
+		if err == nil {
+			s.Open()
+		}
+		result <- sessionErr{s, err}
+	}
+	se := <-result
+	return Session{se.s, c.pump}, se.err
+}
+
+// FIXME aconway 2015-04-27: set sender name, options etc.
+
+// Sender creates a Sender that will send messages to the address addr.
+func (c *Connection) Sender(addr string) (s Sender, err error) {
+	session, err := c.DefaultSession()
+	if err != nil {
+		return Sender{}, err
+	}
+	result := make(chan Sender)
+	c.pump.Inject <- func() {
+		link := session.e.Sender(linkNames.Next())
+		if link.IsNil() {
+			err = session.e.Error()
+		} else {
+			link.Target().SetAddress(addr)
+			// FIXME aconway 2015-04-27: link options?
+			link.Open()
+		}
+		result <- Sender{Link{c, link}}
+	}
+	return <-result, err
+}
+
+// Receiver returns a receiver that will receive messages sent to address addr.
+func (c *Connection) Receiver(addr string) (r Receiver, err error) {
+	// FIXME aconway 2015-04-29: move code to session, in link.go?
+	session, err := c.DefaultSession()
+	if err != nil {
+		return Receiver{}, err
+	}
+	result := make(chan Receiver)
+	c.pump.Inject <- func() {
+		link := session.e.Receiver(linkNames.Next())
+		if link.IsNil() {
+			err = session.e.Error()
+		} else {
+			link.Source().SetAddress(addr)
+			// FIXME aconway 2015-04-27: link options?
+			link.Open()
+		}
+		// FIXME aconway 2015-04-29: hack to avoid blocking, need proper buffering linked to flow control
+		rchan := make(chan amqp.Message, 1000)
+		c.handler.receivers[link] = rchan
+		result <- Receiver{Link{c, link}, rchan}
+	}
+	return <-result, err
+}
+
+// FIXME aconway 2015-04-29: counter per session.
+var linkNames amqp.UidCounter
+
+// Session is an AMQP session, it contains Senders and Receivers.
+// Every Connection has a DefaultSession, you can create additional sessions
+// with Connection.Session()
+type Session struct {
+	e    event.Session
+	pump *event.Pump
+}
+
+// FIXME aconway 2015-05-05: REWORK Sender/receiver/session.
+
+// Disposition indicates the outcome of a settled message delivery.
+type Disposition uint64
+
+const (
+	// Message was accepted by the receiver
+	Accepted Disposition = C.PN_ACCEPTED
+	// Message was rejected as invalid by the receiver
+	Rejected = C.PN_REJECTED
+	// Message was not processed by the receiver but may be processed by some other receiver.
+	Released = C.PN_RELEASED
+)
+
+// String human readable name for a Disposition.
+func (d Disposition) String() string {
+	switch d {
+	case Accepted:
+		return "Accepted"
+	case Rejected:
+		return "Rejected"
+	case Released:
+		return "Released"
+	default:
+		return "Unknown"
+	}
+}
+
+// FIXME aconway 2015-04-29: How to signal errors via ack channels.
+
+// An Acknowledgement is a channel which will receive the Disposition of the message
+// when it is acknowledged. The channel is closed after the disposition is sent.
+type Acknowledgement <-chan Disposition
+
+// Link has common data and methods for Sender and Receiver links.
+type Link struct {
+	connection *Connection
+	elink      event.Link
+}
+
+// Sender sends messages.
+type Sender struct {
+	Link
+}
+
+// FIXME aconway 2015-04-28: allow user to specify delivery tag.
+// FIXME aconway 2015-04-28: should we provide a sending channel rather than a send function?
+
+// Send sends a message. If d is not nil, the disposition is retured on d.
+// If d is nil the message is sent pre-settled and no disposition is returned.
+func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
+	ackChan := make(chan Disposition, 1)
+	ack = ackChan
+	s.connection.pump.Inject <- func() {
+		// FIXME aconway 2015-04-28: flow control & credit, buffer or fail?
+		delivery, err := s.elink.Send(m)
+		if err == nil { // FIXME aconway 2015-04-28: error handling
+			s.connection.handler.acks[delivery] = ackChan
+		}
+	}
+	return ack, nil
+}
+
+// Close the sender.
+func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
+
+// Receiver receives messages via the channel Receive.
+type Receiver struct {
+	Link
+	// Channel of messag
+	Receive <-chan amqp.Message
+}
+
+// FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
+
+// Close the Receiver.
+func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[21/36] qpid-proton git commit: PROTON-827: Re-create go worspace, cmake support for testing.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go
----------------------------------------------------------------------
diff --git a/go b/go
new file mode 120000
index 0000000..d6afbc5
--- /dev/null
+++ b/go
@@ -0,0 +1 @@
+proton-c/bindings/go/src/qpid.apache.org/proton/go
\ No newline at end of file
diff --git a/go/README.md b/go/README.md
deleted file mode 100644
index 2b73583..0000000
--- a/go/README.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# *EXPERIMENTAL* Go binding for proton
-
-    NOTE: The go directory is in the proton repository root with a symlink at
-    proton-c/bindings/go to facilitate use of go tools: go get, godep and godoc.
-    There may be a cleaner solution to this in future.
-
-This is the beginning of a [Go](http://golang.org) binding for proton.
-
-This work is in early *experimental* stages, *everything* may change in future.
-Comments and contributions are strongly encouraged, this experiment is public so
-early feedback can guide development.
-
-- Email <pr...@qpid.apache.org>
-- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
-
-There are working [examples](../examples/go/README.md) and the examples README file
-explains how to install the packages in your go workspace and read the documentation.
-
-## Goals
-
-The API should
-
-- be idiomatic, unsurprising, and easy to use for Go developers.
-- support client and server development.
-- make simple tasks simple.
-- provide deep access to AMQP protocol when that is required.
-
-There are two types of developer we want to support
-
-1. Go developers using AMQP as a message transport:
-   - Straightforward conversions between Go built-in types and AMQP types.
-   - Easy message exchange via Go channels to support use in goroutines.
-
-2. AMQP-aware developers using Go as an implementation language:
-   - Go types to exactly represent all AMQP types and encoding details.
-   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
-
-## Status
-
-There are 3 go packages for proton:
-
-- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
-- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
-- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
-
-Most applications should use the `messaging` package. The `event` package is for
-applications that need low-level access to the proton engine.
-
-The `event` package is fairly complete, with the exception of the proton
-reactor. It's unclear if the reactor is important for go.
-
-The `messaging` package can run the examples but probably not much else. There
-is work to do on error handling and the API may change.
-
-There are working [examples](../../../examples/go/README.md) of a broker using `event` and
-a sender and receiver using `messaging`.
-
-## The event driven API
-
-See the package documentation for details.
-
-## The Go API
-
-The goal: A procedural API that allows any user goroutine to send and receive
-AMQP messages and other information (acknowledgments, flow control instructions
-etc.) using channels. There will be no user-visible locks and no need to run
-user code in special goroutines, e.g. as handlers in a proton event loop.
-
-See the package documentation for emerging details.
-
-Currently using a channel to receive messages, a function to send them (channels
-internally) and a channel as a "future" for acknowledgements to senders. This
-may change.
-
-## Why a separate API for Go?
-
-Go is a concurrent language and encourages applications to be divided into
-concurrent *goroutines*. It provides traditional locking but it encourages the
-use *channels* to communicate between goroutines without explicit locks:
-
-  "Share memory by communicating, don't communicate by sharing memory"
-
-The idea is that a given value is only operated on by one goroutine at a time,
-but values can easily be passed from one goroutine to another. This removes much
-of the need for locking.
-
-Go literature distinguishes between:
-
-- *concurrency*: "keeping track of things that could be done in parallel"
-- *parallelism*: "actually doing things in parallel"
-
-The application expresses concurrency by starting goroutines for potentially
-concurrent tasks. The Go run-times schedule the activity of goroutines onto a
-small number (possibly one) of actual parallel executions.
-
-Even with *no* parallelism, concurrency lets the Go run-times *order* work with
-respect to events like file descriptors being readable/writable, channels having
-data, timers firing etc. Go automatically takes care of switching out goroutines
-that block or sleep so it is normal to write code in terms of blocking calls.
-
-Event-driven API (like poll, epoll, select or the proton event API) also
-channel unpredictably ordered events to actions in one or a small pool of
-execution threads. However this requires a different style of programming:
-"event-driven" or "reactive" programming. Go developers call it "inside-out"
-programming. In an event-driven architecture blocking is a big problem as it
-consumes a scarce thread of execution, so actions that take time to complete
-have to be re-structured in terms of future event delivery.
-
-The promise of Go is that you can express your application in concurrent,
-procedural terms with simple blocking calls and the Go run-times will turn it
-inside-out for you. Write as many goroutines as you want, and let Go interleave
-and schedule them efficiently.
-
-For example: the Go equivalent of listening for connections is a goroutine with
-a simple endless loop that calls a blocking Listen() function and starts a
-goroutine for each new connection. Each connection has its own goroutine that
-deals with just that connection till it closes.
-
-The benefit is that the variables and logic live closer together. Once you're in
-a goroutine, you have everything you need in local variables, and they are
-preserved across blocking calls. There's no need to store details in context
-objects that you have to look up when handling a later event to figure out how
-to continue where you left off.
-
-So a Go-like proton API does not force the users code to run in an event-loop
-goroutine. Instead user goroutines communicate with the event loop(s) via
-channels.  There's no need to funnel connections into one event loop, in fact it
-makes no sense.  Connections can be processed concurrently so they should be
-processed in separate goroutines and left to Go to schedule. User goroutines can
-have simple loops that block channels till messages are available, the user can
-start as many or as few such goroutines as they wish to implement concurrency as
-simple or as complex as they wish. For example blocking request-response
-vs. asynchronous flows of messages and acknowledgments.
-
-## New to Go?
-
-If you are new to Go then these are a good place to start:
-
-- [A Tour of Go](http://tour.golang.org)
-- [Effective Go](http://golang.org/doc/effective_go.html)
-
-Then look at the tools and library docs at <http://golang.org> as you need them.
diff --git a/go/amqp/doc.go b/go/amqp/doc.go
deleted file mode 100644
index 7c00aa0..0000000
--- a/go/amqp/doc.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package amqp encodes and decodes AMQP messages and data as Go types.
-
-It follows the standard 'encoding' libraries pattern. The mapping between AMQP
-and Go types is described in the documentation of the Marshal and Unmarshal
-functions.
-
-The sub-packages 'event' and 'messaging' provide two alternative ways to write
-AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
-gives complete low-level control of the underlying proton C engine.
-
-AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
-*/
-package amqp
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.
-
-// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.
diff --git a/go/amqp/interop b/go/amqp/interop
deleted file mode 120000
index 8f50d0e..0000000
--- a/go/amqp/interop
+++ /dev/null
@@ -1 +0,0 @@
-../../../../tests/interop
\ No newline at end of file
diff --git a/go/amqp/interop_test.go b/go/amqp/interop_test.go
deleted file mode 100644
index 11049f7..0000000
--- a/go/amqp/interop_test.go
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Test that conversion of Go type to/from AMQP is compatible with other
-// bindings.
-//
-package amqp
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"reflect"
-	"strings"
-	"testing"
-)
-
-func assertEqual(want interface{}, got interface{}) {
-	if !reflect.DeepEqual(want, got) {
-		panic(fmt.Errorf("%#v != %#v", want, got))
-	}
-}
-
-func assertNil(err interface{}) {
-	if err != nil {
-		panic(err)
-	}
-}
-
-func getReader(name string) (r io.Reader) {
-	r, err := os.Open("interop/" + name + ".amqp")
-	if err != nil {
-		panic(fmt.Errorf("Can't open %#v: %v", name, err))
-	}
-	return
-}
-
-func remaining(d *Decoder) string {
-	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
-	return string(remainder)
-}
-
-// assertDecode: want is the expected value, gotPtr is a pointer to a
-// instance of the same type for Decode.
-func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
-
-	assertNil(d.Decode(gotPtr))
-
-	got := reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(want, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, gotPtr)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	got = reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-}
-
-func TestUnmarshal(t *testing.T) {
-	bytes, err := ioutil.ReadAll(getReader("strings"))
-	if err != nil {
-		t.Error(err)
-	}
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		n, err := Unmarshal(bytes, &got)
-		if err != nil {
-			t.Error(err)
-		}
-		if want != got {
-			t.Errorf("%#v != %#v", want, got)
-		}
-		bytes = bytes[n:]
-	}
-}
-
-func TestPrimitivesExact(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into exact types
-	var b bool
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	var u8 uint8
-	assertDecode(d, uint8(42), &u8)
-	var u16 uint16
-	assertDecode(d, uint16(42), &u16)
-	var i16 int16
-	assertDecode(d, int16(-42), &i16)
-	var u32 uint32
-	assertDecode(d, uint32(12345), &u32)
-	var i32 int32
-	assertDecode(d, int32(-12345), &i32)
-	var u64 uint64
-	assertDecode(d, uint64(12345), &u64)
-	var i64 int64
-	assertDecode(d, int64(-12345), &i64)
-	var f32 float32
-	assertDecode(d, float32(0.125), &f32)
-	var f64 float64
-	assertDecode(d, float64(0.125), &f64)
-}
-
-func TestPrimitivesCompatible(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into compatible types
-	var b bool
-	var i int
-	var u uint
-	var f float64
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, -42, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, 0.125, &f)
-	assertDecode(d, 0.125, &f)
-}
-
-// assertDecodeValue: want is the expected value, decode into a reflect.Value
-func assertDecodeInterface(d *Decoder, want interface{}) {
-
-	var got, got2 interface{}
-	assertNil(d.Decode(&got))
-
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(got, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, &got2)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	assertEqual(want, got2)
-}
-
-func TestPrimitivesInterface(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	assertDecodeInterface(d, true)
-	assertDecodeInterface(d, false)
-	assertDecodeInterface(d, uint8(42))
-	assertDecodeInterface(d, uint16(42))
-	assertDecodeInterface(d, int16(-42))
-	assertDecodeInterface(d, uint32(12345))
-	assertDecodeInterface(d, int32(-12345))
-	assertDecodeInterface(d, uint64(12345))
-	assertDecodeInterface(d, int64(-12345))
-	assertDecodeInterface(d, float32(0.125))
-	assertDecodeInterface(d, float64(0.125))
-}
-
-func TestStrings(t *testing.T) {
-	d := NewDecoder(getReader("strings"))
-	// Test decoding as plain Go strings
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		assertDecode(d, want, &got)
-	}
-	remains := remaining(d)
-	if remains != "" {
-		t.Errorf("leftover: %s", remains)
-	}
-
-	// Test decoding as specific string types
-	d = NewDecoder(getReader("strings"))
-	var bytes []byte
-	var str, sym string
-	assertDecode(d, []byte("abc\000defg"), &bytes)
-	assertDecode(d, "abcdefg", &str)
-	assertDecode(d, "abcdefg", &sym)
-	assertDecode(d, make([]byte, 0), &bytes)
-	assertDecode(d, "", &str)
-	assertDecode(d, "", &sym)
-	remains = remaining(d)
-	if remains != "" {
-		t.Fatalf("leftover: %s", remains)
-	}
-
-	// Test some error handling
-	d = NewDecoder(getReader("strings"))
-	var s string
-	err := d.Decode(s)
-	if err == nil {
-		t.Fatal("Expected error")
-	}
-	if !strings.Contains(err.Error(), "not a pointer") {
-		t.Error(err)
-	}
-	var i int
-	err = d.Decode(&i)
-	if !strings.Contains(err.Error(), "cannot unmarshal") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte{}, nil)
-	if !strings.Contains(err.Error(), "not enough data") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte("foobar"), nil)
-	if !strings.Contains(err.Error(), "invalid-argument") {
-		t.Error(err)
-	}
-}
-
-func TestEncodeDecode(t *testing.T) {
-	type data struct {
-		s  string
-		i  int
-		u8 uint8
-		b  bool
-		f  float32
-		v  interface{}
-	}
-
-	in := data{"foo", 42, 9, true, 1.234, "thing"}
-
-	buf := bytes.Buffer{}
-	e := NewEncoder(&buf)
-	assertNil(e.Encode(in.s))
-	assertNil(e.Encode(in.i))
-	assertNil(e.Encode(in.u8))
-	assertNil(e.Encode(in.b))
-	assertNil(e.Encode(in.f))
-	assertNil(e.Encode(in.v))
-
-	var out data
-	d := NewDecoder(&buf)
-	assertNil(d.Decode(&out.s))
-	assertNil(d.Decode(&out.i))
-	assertNil(d.Decode(&out.u8))
-	assertNil(d.Decode(&out.b))
-	assertNil(d.Decode(&out.f))
-	assertNil(d.Decode(&out.v))
-
-	assertEqual(in, out)
-}
-
-func TestMap(t *testing.T) {
-	d := NewDecoder(getReader("maps"))
-
-	// Generic map
-	var m Map
-	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
-
-	// Interface as map
-	var i interface{}
-	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
-
-	d = NewDecoder(getReader("maps"))
-	// Specific typed map
-	var m2 map[string]int
-	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
-
-	// Round trip a nested map
-	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
-	bytes, err := Marshal(m, nil)
-	assertNil(err)
-	_, err = Unmarshal(bytes, &i)
-	assertNil(err)
-	assertEqual(m, i)
-}
-
-func TestList(t *testing.T) {
-	d := NewDecoder(getReader("lists"))
-	var l List
-	assertDecode(d, List{int32(32), "foo", true}, &l)
-	assertDecode(d, List{}, &l)
-}
-
-func FIXMETestMessage(t *testing.T) {
-	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
-	bytes, err := ioutil.ReadAll(getReader("message"))
-	assertNil(err)
-	m, err := DecodeMessage(bytes)
-	assertNil(err)
-	fmt.Printf("%+v\n", m)
-	assertEqual(m.Body(), "hello")
-
-	bytes2 := make([]byte, len(bytes))
-	bytes2, err = m.Encode(bytes2)
-	assertNil(err)
-	assertEqual(bytes, bytes2)
-}
-
-// FIXME aconway 2015-03-13: finish the full interop test
diff --git a/go/amqp/marshal.go b/go/amqp/marshal.go
deleted file mode 100644
index e5c2945..0000000
--- a/go/amqp/marshal.go
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-func dataError(prefix string, data *C.pn_data_t) error {
-	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
-	if err != nil {
-		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
-	}
-	return err
-}
-
-/*
-Marshal encodes a Go value as AMQP data in buffer.
-If buffer is nil, or is not large enough, a new buffer  is created.
-
-Returns the buffer used for encoding with len() adjusted to the actual size of data.
-
-Go types are encoded as follows
-
- +-------------------------------------+--------------------------------------------+
- |Go type                              |AMQP type                                   |
- +-------------------------------------+--------------------------------------------+
- |bool                                 |bool                                        |
- +-------------------------------------+--------------------------------------------+
- |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
- +-------------------------------------+--------------------------------------------+
- |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
- +-------------------------------------+--------------------------------------------+
- |float32, float64                     |float, double.                              |
- +-------------------------------------+--------------------------------------------+
- |string                               |string                                      |
- +-------------------------------------+--------------------------------------------+
- |[]byte, Binary                       |binary                                      |
- +-------------------------------------+--------------------------------------------+
- |Symbol                               |symbol                                      |
- +-------------------------------------+--------------------------------------------+
- |interface{}                          |the contained type                          |
- +-------------------------------------+--------------------------------------------+
- |nil                                  |null                                        |
- +-------------------------------------+--------------------------------------------+
- |map[K]T                              |map with K and T converted as above         |
- +-------------------------------------+--------------------------------------------+
- |Map                                  |map, may have mixed types for keys, values  |
- +-------------------------------------+--------------------------------------------+
- |[]T                                  |list with T converted as above              |
- +-------------------------------------+--------------------------------------------+
- |List                                 |list, may have mixed types  values          |
- +-------------------------------------+--------------------------------------------+
-
-TODO Go types: array, slice, struct
-
-Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
-*/
-func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	put(data, v)
-	encode := func(buf []byte) ([]byte, error) {
-		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
-		switch {
-		case n == int(C.PN_OVERFLOW):
-			return buf, overflow
-		case n < 0:
-			return buf, dataError("marshal error", data)
-		default:
-			return buf[:n], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}
-
-const minEncode = 256
-
-// overflow is returned when an encoding function can't fit data in the buffer.
-var overflow = internal.Errorf("buffer too small")
-
-// encodeFn encodes into buffer[0:len(buffer)].
-// Returns buffer with length adjusted for data encoded.
-// If buffer too small, returns overflow as error.
-type encodeFn func(buffer []byte) ([]byte, error)
-
-// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
-// Returns the final buffer.
-func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
-	if buffer == nil || len(buffer) == 0 {
-		buffer = make([]byte, minEncode)
-	}
-	var err error
-	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
-		buffer = make([]byte, 2*len(buffer))
-	}
-	return buffer, err
-}
-
-func put(data *C.pn_data_t, v interface{}) {
-	switch v := v.(type) {
-	case nil:
-		C.pn_data_put_null(data)
-	case bool:
-		C.pn_data_put_bool(data, C.bool(v))
-	case int8:
-		C.pn_data_put_byte(data, C.int8_t(v))
-	case int16:
-		C.pn_data_put_short(data, C.int16_t(v))
-	case int32:
-		C.pn_data_put_int(data, C.int32_t(v))
-	case int64:
-		C.pn_data_put_long(data, C.int64_t(v))
-	case int:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_long(data, C.int64_t(v))
-		} else {
-			C.pn_data_put_int(data, C.int32_t(v))
-		}
-	case uint8:
-		C.pn_data_put_ubyte(data, C.uint8_t(v))
-	case uint16:
-		C.pn_data_put_ushort(data, C.uint16_t(v))
-	case uint32:
-		C.pn_data_put_uint(data, C.uint32_t(v))
-	case uint64:
-		C.pn_data_put_ulong(data, C.uint64_t(v))
-	case uint:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_ulong(data, C.uint64_t(v))
-		} else {
-			C.pn_data_put_uint(data, C.uint32_t(v))
-		}
-	case float32:
-		C.pn_data_put_float(data, C.float(v))
-	case float64:
-		C.pn_data_put_double(data, C.double(v))
-	case string:
-		C.pn_data_put_string(data, pnBytes([]byte(v)))
-	case []byte:
-		C.pn_data_put_binary(data, pnBytes(v))
-	case Binary:
-		C.pn_data_put_binary(data, pnBytes([]byte(v)))
-	case Symbol:
-		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
-	case Map: // Special map type
-		C.pn_data_put_map(data)
-		C.pn_data_enter(data)
-		for key, val := range v {
-			put(data, key)
-			put(data, val)
-		}
-		C.pn_data_exit(data)
-	default:
-		switch reflect.TypeOf(v).Kind() {
-		case reflect.Map:
-			putMap(data, v)
-		case reflect.Slice:
-			putList(data, v)
-		default:
-			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
-		}
-	}
-	err := dataError("marshal", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-func putMap(data *C.pn_data_t, v interface{}) {
-	mapValue := reflect.ValueOf(v)
-	C.pn_data_put_map(data)
-	C.pn_data_enter(data)
-	for _, key := range mapValue.MapKeys() {
-		put(data, key.Interface())
-		put(data, mapValue.MapIndex(key).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-func putList(data *C.pn_data_t, v interface{}) {
-	listValue := reflect.ValueOf(v)
-	C.pn_data_put_list(data)
-	C.pn_data_enter(data)
-	for i := 0; i < listValue.Len(); i++ {
-		put(data, listValue.Index(i).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-// Encoder encodes AMQP values to an io.Writer
-type Encoder struct {
-	writer io.Writer
-	buffer []byte
-}
-
-// New encoder returns a new encoder that writes to w.
-func NewEncoder(w io.Writer) *Encoder {
-	return &Encoder{w, make([]byte, minEncode)}
-}
-
-func (e *Encoder) Encode(v interface{}) (err error) {
-	e.buffer, err = Marshal(v, e.buffer)
-	if err == nil {
-		e.writer.Write(e.buffer)
-	}
-	return err
-}
-
-func replace(data *C.pn_data_t, v interface{}) {
-	C.pn_data_clear(data)
-	put(data, v)
-}
diff --git a/go/amqp/message.go b/go/amqp/message.go
deleted file mode 100644
index 87093f5..0000000
--- a/go/amqp/message.go
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
-
-// Message is the interface to an AMQP message.
-// Instances of this interface contain a pointer to the underlying struct.
-type Message interface {
-	/**
-	 * Inferred indicates how the message content
-	 * is encoded into AMQP sections. If inferred is true then binary and
-	 * list values in the body of the message will be encoded as AMQP DATA
-	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
-	 * then all values in the body of the message will be encoded as AMQP
-	 * VALUE sections regardless of their type.
-	 */
-	Inferred() bool
-	SetInferred(bool)
-
-	/**
-	 * Durable indicates that any parties taking responsibility
-	 * for the message must durably store the content.
-	 */
-	Durable() bool
-	SetDurable(bool)
-
-	/**
-	 * Priority impacts ordering guarantees. Within a
-	 * given ordered context, higher priority messages may jump ahead of
-	 * lower priority messages.
-	 */
-	Priority() uint8
-	SetPriority(uint8)
-
-	/**
-	 * TTL or Time To Live, a message it may be dropped after this duration
-	 */
-	TTL() time.Duration
-	SetTTL(time.Duration)
-
-	/**
-	 * FirstAcquirer indicates
-	 * that the recipient of the message is the first recipient to acquire
-	 * the message, i.e. there have been no failed delivery attempts to
-	 * other acquirers. Note that this does not mean the message has not
-	 * been delivered to, but not acquired, by other recipients.
-	 */
-	FirstAcquirer() bool
-	SetFirstAcquirer(bool)
-
-	/**
-	 * DeliveryCount tracks how many attempts have been made to
-	 * delivery a message.
-	 */
-	DeliveryCount() uint32
-	SetDeliveryCount(uint32)
-
-	/**
-	 * MessageId provides a unique identifier for a message.
-	 * it can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	MessageId() interface{}
-	SetMessageId(interface{})
-
-	UserId() string
-	SetUserId(string)
-
-	Address() string
-	SetAddress(string)
-
-	Subject() string
-	SetSubject(string)
-
-	ReplyTo() string
-	SetReplyTo(string)
-
-	/**
-	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	CorrelationId() interface{}
-	SetCorrelationId(interface{})
-
-	ContentType() string
-	SetContentType(string)
-
-	ContentEncoding() string
-	SetContentEncoding(string)
-
-	// ExpiryTime indicates an absoulte time when the message may be dropped.
-	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
-	ExpiryTime() time.Time
-	SetExpiryTime(time.Time)
-
-	CreationTime() time.Time
-	SetCreationTime(time.Time)
-
-	GroupId() string
-	SetGroupId(string)
-
-	GroupSequence() int32
-	SetGroupSequence(int32)
-
-	ReplyToGroupId() string
-	SetReplyToGroupId(string)
-
-	/**
-	 * Instructions can be used to access or modify AMQP delivery instructions.
-	 */
-	Instructions() *map[string]interface{}
-
-	/**
-	 * Annotations  can be used to access or modify AMQP annotations.
-	 */
-	Annotations() *map[string]interface{}
-
-	/**
-	 * Properties  can be used to access or modify the application properties of a message.
-	 */
-	Properties() *map[string]interface{}
-
-	/**
-	 * Body of the message can be any AMQP encodable type.
-	 */
-	Body() interface{}
-	SetBody(interface{})
-
-	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
-	// the message is encoded into it, otherwise a new buffer is created.
-	// Returns the buffer containing the message.
-	Encode(buffer []byte) ([]byte, error)
-}
-
-// NewMessage creates a new message instance. The returned interface contains a pointer.
-func NewMessage() Message {
-	pn := C.pn_message() // Pick up default setting from C message.
-	defer C.pn_message_free(pn)
-	return goMessage(pn)
-}
-
-// Message implementation copies all message data into Go space so it can be proprely
-// memory managed.
-//
-type message struct {
-	inferred, durable, firstAcquirer      bool
-	priority                              uint8
-	ttl                                   time.Duration
-	deliveryCount                         uint32
-	messageId                             interface{}
-	userId, address, subject, replyTo     string
-	contentType, contentEncoding          string
-	groupId, replyToGroupId               string
-	creationTime, expiryTime              time.Time
-	groupSequence                         int32
-	correlationId                         interface{}
-	instructions, annotations, properties map[string]interface{}
-	body                                  interface{}
-}
-
-func (m *message) Inferred() bool                        { return m.inferred }
-func (m *message) SetInferred(b bool)                    { m.inferred = b }
-func (m *message) Durable() bool                         { return m.durable }
-func (m *message) SetDurable(b bool)                     { m.durable = b }
-func (m *message) Priority() uint8                       { return m.priority }
-func (m *message) SetPriority(b uint8)                   { m.priority = b }
-func (m *message) TTL() time.Duration                    { return m.ttl }
-func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
-func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
-func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
-func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
-func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
-func (m *message) MessageId() interface{}                { return m.messageId }
-func (m *message) SetMessageId(id interface{})           { m.messageId = id }
-func (m *message) UserId() string                        { return m.userId }
-func (m *message) SetUserId(s string)                    { m.userId = s }
-func (m *message) Address() string                       { return m.address }
-func (m *message) SetAddress(s string)                   { m.address = s }
-func (m *message) Subject() string                       { return m.subject }
-func (m *message) SetSubject(s string)                   { m.subject = s }
-func (m *message) ReplyTo() string                       { return m.replyTo }
-func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
-func (m *message) CorrelationId() interface{}            { return m.correlationId }
-func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
-func (m *message) ContentType() string                   { return m.contentType }
-func (m *message) SetContentType(s string)               { m.contentType = s }
-func (m *message) ContentEncoding() string               { return m.contentEncoding }
-func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
-func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
-func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
-func (m *message) CreationTime() time.Time               { return m.creationTime }
-func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
-func (m *message) GroupId() string                       { return m.groupId }
-func (m *message) SetGroupId(s string)                   { m.groupId = s }
-func (m *message) GroupSequence() int32                  { return m.groupSequence }
-func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
-func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
-func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
-func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
-func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
-func (m *message) Properties() *map[string]interface{}   { return &m.properties }
-func (m *message) Body() interface{}                     { return m.body }
-func (m *message) SetBody(b interface{})                 { m.body = b }
-
-// rewindGet rewinds and then gets the value from a data object.
-func rewindGet(data *C.pn_data_t, v interface{}) {
-	if data != nil && C.pn_data_size(data) > 0 {
-		C.pn_data_rewind(data)
-		C.pn_data_next(data)
-		get(data, v)
-	}
-}
-
-// goMessage populates a Go message from a pn_message_t
-func goMessage(pn *C.pn_message_t) *message {
-	m := &message{
-		inferred:        bool(C.pn_message_is_inferred(pn)),
-		durable:         bool(C.pn_message_is_durable(pn)),
-		priority:        uint8(C.pn_message_get_priority(pn)),
-		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
-		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
-		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
-		userId:          goString(C.pn_message_get_user_id(pn)),
-		address:         C.GoString(C.pn_message_get_address(pn)),
-		subject:         C.GoString(C.pn_message_get_subject(pn)),
-		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
-		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
-		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
-		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
-		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
-		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
-		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
-		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
-		messageId:       nil,
-		correlationId:   nil,
-		instructions:    make(map[string]interface{}),
-		annotations:     make(map[string]interface{}),
-		properties:      make(map[string]interface{}),
-	}
-	rewindGet(C.pn_message_id(pn), &m.messageId)
-	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
-	rewindGet(C.pn_message_instructions(pn), &m.instructions)
-	rewindGet(C.pn_message_annotations(pn), &m.annotations)
-	rewindGet(C.pn_message_properties(pn), &m.properties)
-	rewindGet(C.pn_message_body(pn), &m.body)
-	return m
-}
-
-// pnMessage populates a pn_message_t from a Go message.
-func (m *message) pnMessage() *C.pn_message_t {
-	pn := C.pn_message()
-	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
-	C.pn_message_set_durable(pn, C.bool(m.Durable()))
-	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
-	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
-	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
-	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
-	replace(C.pn_message_id(pn), m.MessageId())
-	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
-	C.pn_message_set_address(pn, C.CString(m.Address()))
-	C.pn_message_set_subject(pn, C.CString(m.Subject()))
-	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
-	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
-	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
-	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
-	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
-	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
-	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
-	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
-	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
-	replace(C.pn_message_instructions(pn), *m.Instructions())
-	replace(C.pn_message_annotations(pn), *m.Annotations())
-	replace(C.pn_message_properties(pn), *m.Properties())
-	replace(C.pn_message_body(pn), m.Body())
-	return pn
-}
-
-// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
-
-// DecodeMessage decodes bytes as a message
-func DecodeMessage(data []byte) (Message, error) {
-	pnMsg := C.pn_message()
-	defer C.pn_message_free(pnMsg)
-	if len(data) == 0 {
-		return nil, internal.Errorf("empty buffer for decode")
-	}
-	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
-		return nil, internal.Errorf("decoding message: %s",
-			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
-	}
-	return goMessage(pnMsg), nil
-}
-
-// Encode the message into bufffer.
-// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
-// buffer will be returned.
-func (m *message) Encode(buffer []byte) ([]byte, error) {
-	pn := m.pnMessage()
-	defer C.pn_message_free(pn)
-	encode := func(buf []byte) ([]byte, error) {
-		len := cLen(buf)
-		result := C.pn_message_encode(pn, cPtr(buf), &len)
-		switch {
-		case result == C.PN_OVERFLOW:
-			return buf, overflow
-		case result < 0:
-			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
-		default:
-			return buf[:len], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}
diff --git a/go/amqp/message_test.go b/go/amqp/message_test.go
deleted file mode 100644
index 46e26de..0000000
--- a/go/amqp/message_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"reflect"
-	"testing"
-	"time"
-)
-
-func roundTrip(t *testing.T, m Message) {
-	buffer, err := m.Encode(nil)
-	if err != nil {
-		t.Fatalf("Encode failed: %v", err)
-	}
-	m2, err := DecodeMessage(buffer)
-	if err != nil {
-		t.Fatalf("Decode failed: %v", err)
-	}
-	if !reflect.DeepEqual(m, m2) {
-		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
-	}
-}
-
-func TestDefaultMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	// Check defaults
-	assertEqual(m.Inferred(), false)
-	assertEqual(m.Durable(), false)
-	assertEqual(m.Priority(), uint8(4))
-	assertEqual(m.TTL(), time.Duration(0))
-	assertEqual(m.UserId(), "")
-	assertEqual(m.Address(), "")
-	assertEqual(m.Subject(), "")
-	assertEqual(m.ReplyTo(), "")
-	assertEqual(m.ContentType(), "")
-	assertEqual(m.ContentEncoding(), "")
-	assertEqual(m.GroupId(), "")
-	assertEqual(m.GroupSequence(), int32(0))
-	assertEqual(m.ReplyToGroupId(), "")
-	assertEqual(m.MessageId(), nil)
-	assertEqual(m.CorrelationId(), nil)
-	assertEqual(*m.Instructions(), map[string]interface{}{})
-	assertEqual(*m.Annotations(), map[string]interface{}{})
-	assertEqual(*m.Properties(), map[string]interface{}{})
-	assertEqual(m.Body(), nil)
-
-	roundTrip(t, m)
-}
-
-func TestMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	m.SetInferred(false)
-	m.SetDurable(true)
-	m.SetPriority(42)
-	m.SetTTL(0)
-	m.SetUserId("user")
-	m.SetAddress("address")
-	m.SetSubject("subject")
-	m.SetReplyTo("replyto")
-	m.SetContentType("content")
-	m.SetContentEncoding("encoding")
-	m.SetGroupId("group")
-	m.SetGroupSequence(42)
-	m.SetReplyToGroupId("replytogroup")
-	m.SetMessageId("id")
-	m.SetCorrelationId("correlation")
-	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
-	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
-	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
-	m.SetBody("hello")
-	roundTrip(t, m)
-}
diff --git a/go/amqp/types.go b/go/amqp/types.go
deleted file mode 100644
index 8713520..0000000
--- a/go/amqp/types.go
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"reflect"
-	"time"
-	"unsafe"
-)
-
-func pnTypeString(pt C.pn_type_t) string {
-	switch pt {
-	case C.PN_NULL:
-		return "null"
-	case C.PN_BOOL:
-		return "bool"
-	case C.PN_UBYTE:
-		return "ubyte"
-	case C.PN_BYTE:
-		return "byte"
-	case C.PN_USHORT:
-		return "ushort"
-	case C.PN_SHORT:
-		return "short"
-	case C.PN_CHAR:
-		return "char"
-	case C.PN_UINT:
-		return "uint"
-	case C.PN_INT:
-		return "int"
-	case C.PN_ULONG:
-		return "ulong"
-	case C.PN_LONG:
-		return "long"
-	case C.PN_TIMESTAMP:
-		return "timestamp"
-	case C.PN_FLOAT:
-		return "float"
-	case C.PN_DOUBLE:
-		return "double"
-	case C.PN_DECIMAL32:
-		return "decimal32"
-	case C.PN_DECIMAL64:
-		return "decimal64"
-	case C.PN_DECIMAL128:
-		return "decimal128"
-	case C.PN_UUID:
-		return "uuid"
-	case C.PN_BINARY:
-		return "binary"
-	case C.PN_STRING:
-		return "string"
-	case C.PN_SYMBOL:
-		return "symbol"
-	case C.PN_DESCRIBED:
-		return "described"
-	case C.PN_ARRAY:
-		return "array"
-	case C.PN_LIST:
-		return "list"
-	case C.PN_MAP:
-		return "map"
-	case C.PN_DATA_TYPE_ERROR:
-		return "no-data"
-	default:
-		return fmt.Sprintf("unknown-type(%d)", pt)
-	}
-}
-
-// Go types
-var (
-	bytesType = reflect.TypeOf([]byte{})
-	valueType = reflect.TypeOf(reflect.Value{})
-)
-
-// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
-
-// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
-type Map map[interface{}]interface{}
-
-// List is a generic list that can hold mixed values and can represent any AMQP list.
-//
-type List []interface{}
-
-// Symbol is a string that is encoded as an AMQP symbol
-type Symbol string
-
-// Binary is a string that is encoded as an AMQP binary.
-// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
-// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
-type Binary string
-
-// GoString for Map prints values with their types, useful for debugging.
-func (m Map) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", m)
-	i := len(m)
-	for k, v := range m {
-		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
-		i--
-		if i > 0 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// GoString for List prints values with their types, useful for debugging.
-func (l List) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", l)
-	for i := 0; i < len(l); i++ {
-		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
-		if i == len(l)-1 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// pnTime converts Go time.Time to Proton millisecond Unix time.
-func pnTime(t time.Time) C.pn_timestamp_t {
-	secs := t.Unix()
-	// Note: sub-second accuracy is not guaraunteed if the Unix time in
-	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
-	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
-	return C.pn_timestamp_t(secs*1000 + msecs)
-}
-
-// goTime converts a pn_timestamp_t to a Go time.Time.
-func goTime(t C.pn_timestamp_t) time.Time {
-	secs := int64(t) / 1000
-	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
-	return time.Unix(secs, nsecs)
-}
-
-func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
-	if cBytes.start != nil {
-		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
-	}
-	return
-}
-
-func goString(cBytes C.pn_bytes_t) (str string) {
-	if cBytes.start != nil {
-		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
-	}
-	return
-}
-
-func pnBytes(b []byte) C.pn_bytes_t {
-	if len(b) == 0 {
-		return C.pn_bytes_t{0, nil}
-	} else {
-		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
-	}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}
diff --git a/go/amqp/uid.go b/go/amqp/uid.go
deleted file mode 100644
index 944bf6f..0000000
--- a/go/amqp/uid.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Generating unique IDs for various things.
-
-package amqp
-
-import (
-	"strconv"
-	"sync/atomic"
-)
-
-// A simple atomic counter to generate unique 64 bit IDs.
-type UidCounter struct{ count uint64 }
-
-// NextInt gets the next uint64 value from the atomic counter.
-func (uc *UidCounter) NextInt() uint64 {
-	return atomic.AddUint64(&uc.count, 1)
-}
-
-// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
-func (uc *UidCounter) Next() string {
-	return strconv.FormatUint(uc.NextInt(), 32)
-}
diff --git a/go/amqp/unmarshal.go b/go/amqp/unmarshal.go
deleted file mode 100644
index 89ab64a..0000000
--- a/go/amqp/unmarshal.go
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-oor more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-const minDecode = 1024
-
-// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
-type BadUnmarshal struct {
-	// The name of the AMQP type.
-	AMQPType string
-	// The Go type.
-	GoType reflect.Type
-}
-
-func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
-	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
-}
-
-func (e BadUnmarshal) Error() string {
-	if e.GoType.Kind() != reflect.Ptr {
-		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
-	} else {
-		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
-	}
-}
-
-//
-// Decoding from a pn_data_t
-//
-// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
-// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
-//
-
-// Decoder decodes AMQP values from an io.Reader.
-//
-type Decoder struct {
-	reader io.Reader
-	buffer bytes.Buffer
-}
-
-// NewDecoder returns a new decoder that reads from r.
-//
-// The decoder has it's own buffer and may read more data than required for the
-// AMQP values requested.  Use Buffered to see if there is data left in the
-// buffer.
-//
-func NewDecoder(r io.Reader) *Decoder {
-	return &Decoder{r, bytes.Buffer{}}
-}
-
-// Buffered returns a reader of the data remaining in the Decoder's buffer. The
-// reader is valid until the next call to Decode.
-//
-func (d *Decoder) Buffered() io.Reader {
-	return bytes.NewReader(d.buffer.Bytes())
-}
-
-// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
-//
-// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
-//
-func (d *Decoder) Decode(v interface{}) (err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	var n int
-	for n == 0 && err == nil {
-		n = unmarshal(data, d.buffer.Bytes(), v)
-		if n == 0 { // n == 0 means not enough data, read more
-			err = d.more()
-			if err != nil {
-				return
-			}
-		}
-	}
-	d.buffer.Next(n)
-	return
-}
-
-/*
-Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
-Types are converted as follows:
-
- +---------------------------+----------------------------------------------------------------------+
- |To Go types                |From AMQP types                                                       |
- +===========================+======================================================================+
- |bool                       |bool                                                                  |
- +---------------------------+----------------------------------------------------------------------+
- |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
- |int32, int64               |long.                                                                 |
- +---------------------------+----------------------------------------------------------------------+
- |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
- |uint32, uint64 types       |uint, ulong                                                           |
- +---------------------------+----------------------------------------------------------------------+
- |float32, float64           |Equivalent or smaller float or double.                                |
- +---------------------------+----------------------------------------------------------------------+
- |string, []byte             |string, symbol or binary.                                             |
- +---------------------------+----------------------------------------------------------------------+
- |Symbol                     |symbol                                                                |
- +---------------------------+----------------------------------------------------------------------+
- |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
- +---------------------------+----------------------------------------------------------------------+
- |Map                        |map, any AMQP map                                                     |
- +---------------------------+----------------------------------------------------------------------+
- |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
- |                           +------------------------+---------------------------------------------+
- |                           |AMQP Type               |Go Type in interface{}                       |
- |                           +========================+=============================================+
- |                           |bool                    |bool                                         |
- |                           +------------------------+---------------------------------------------+
- |                           |char                    |unint8                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |byte,short,int,long     |int8,int16,int32,int64                       |
- |                           +------------------------+---------------------------------------------+
- |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
- |                           +------------------------+---------------------------------------------+
- |                           |float, double           |float32, float64                             |
- |                           +------------------------+---------------------------------------------+
- |                           |string                  |string                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |symbol                  |Symbol                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |binary                  |Binary                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |nulll                   |nil                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |map                     |Map                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |list                    |List                                         |
- +---------------------------+------------------------+---------------------------------------------+
-
-The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
-
-TODO types
-
-AMQP: timestamp, decimal32/64/128, uuid, described, array.
-
-Go: array, struct.
-
-Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
-representation for those.
-*/
-func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	n = unmarshal(data, bytes, v)
-	if n == 0 {
-		err = internal.Errorf("not enough data")
-	}
-	return
-}
-
-// more reads more data when we can't parse a complete AMQP type
-func (d *Decoder) more() error {
-	var readSize int64 = minDecode
-	if int64(d.buffer.Len()) > readSize { // Grow by doubling
-		readSize = int64(d.buffer.Len())
-	}
-	var n int64
-	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
-	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
-		err = io.EOF
-	}
-	return err
-}
-
-// unmarshal decodes from bytes and converts into the value pointed to by v.
-// Used by Unmarshal and Decode
-//
-// Returns the number of bytes decoded or 0 if not enough data.
-//
-func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
-	n = decode(data, bytes)
-	if n == 0 {
-		return 0
-	}
-	get(data, v)
-	return
-}
-
-// get value from data into value pointed at by v.
-func get(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-
-	switch v := v.(type) {
-	case *bool:
-		switch pnType {
-		case C.PN_BOOL:
-			*v = bool(C.pn_data_get_bool(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int8(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int8(C.pn_data_get_byte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint8(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint8(C.pn_data_get_ubyte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int16(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int16(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int16(C.pn_data_get_short(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint16(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint16(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint16(C.pn_data_get_ushort(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int32(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int32(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int32(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int32(C.pn_data_get_int(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint32(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint32(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint32(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint32(C.pn_data_get_uint(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int64(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int64(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int64(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int64(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			*v = int64(C.pn_data_get_long(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint64(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint64(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint64(C.pn_data_get_ushort(data))
-		case C.PN_ULONG:
-			*v = uint64(C.pn_data_get_ulong(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = int(C.pn_data_get_long(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint(C.pn_data_get_uint(data))
-		case C.PN_ULONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = uint(C.pn_data_get_ulong(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float32:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float32(C.pn_data_get_float(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float64:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float64(C.pn_data_get_float(data))
-		case C.PN_DOUBLE:
-			*v = float64(C.pn_data_get_double(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *string:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goString(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goString(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goString(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *[]byte:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goBytes(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goBytes(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goBytes(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Binary:
-		switch pnType {
-		case C.PN_BINARY:
-			*v = Binary(goBytes(C.pn_data_get_binary(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Symbol:
-		switch pnType {
-		case C.PN_SYMBOL:
-			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *interface{}:
-		getInterface(data, v)
-
-	default:
-		if reflect.TypeOf(v).Kind() != reflect.Ptr {
-			panic(newBadUnmarshal(pnType, v))
-		}
-		switch reflect.TypeOf(v).Elem().Kind() {
-		case reflect.Map:
-			getMap(data, v)
-		case reflect.Slice:
-			getList(data, v)
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	}
-	err := dataError("unmarshaling", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-// Getting into an interface is driven completely by the AMQP type, since the interface{}
-// target is type-neutral.
-func getInterface(data *C.pn_data_t, v *interface{}) {
-	pnType := C.pn_data_type(data)
-	switch pnType {
-	case C.PN_NULL:
-		*v = nil
-	case C.PN_BOOL:
-		*v = bool(C.pn_data_get_bool(data))
-	case C.PN_UBYTE:
-		*v = uint8(C.pn_data_get_ubyte(data))
-	case C.PN_BYTE:
-		*v = int8(C.pn_data_get_byte(data))
-	case C.PN_USHORT:
-		*v = uint16(C.pn_data_get_ushort(data))
-	case C.PN_SHORT:
-		*v = int16(C.pn_data_get_short(data))
-	case C.PN_UINT:
-		*v = uint32(C.pn_data_get_uint(data))
-	case C.PN_INT:
-		*v = int32(C.pn_data_get_int(data))
-	case C.PN_CHAR:
-		*v = uint8(C.pn_data_get_char(data))
-	case C.PN_ULONG:
-		*v = uint64(C.pn_data_get_ulong(data))
-	case C.PN_LONG:
-		*v = int64(C.pn_data_get_long(data))
-	case C.PN_FLOAT:
-		*v = float32(C.pn_data_get_float(data))
-	case C.PN_DOUBLE:
-		*v = float64(C.pn_data_get_double(data))
-	case C.PN_BINARY:
-		*v = Binary(goBytes(C.pn_data_get_binary(data)))
-	case C.PN_STRING:
-		*v = goString(C.pn_data_get_string(data))
-	case C.PN_SYMBOL:
-		*v = Symbol(goString(C.pn_data_get_symbol(data)))
-	case C.PN_MAP:
-		m := make(Map)
-		get(data, &m)
-		*v = m // FIXME aconway 2015-03-13: avoid the copy?
-	case C.PN_LIST:
-		l := make(List, 0)
-		get(data, &l)
-		*v = l // FIXME aconway 2015-03-13: avoid the copy?
-	default:
-		panic(newBadUnmarshal(pnType, v))
-	}
-}
-
-// get into map pointed at by v
-func getMap(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_MAP {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	mapValue := reflect.ValueOf(v).Elem()
-	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
-	count := int(C.pn_data_get_map(data))
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count/2; i++ {
-			if bool(C.pn_data_next(data)) {
-				key := reflect.New(mapValue.Type().Key())
-				get(data, key.Interface())
-				if bool(C.pn_data_next(data)) {
-					val := reflect.New(mapValue.Type().Elem())
-					get(data, val.Interface())
-					mapValue.SetMapIndex(key.Elem(), val.Elem())
-				}
-			}
-		}
-		C.pn_data_exit(data)
-	}
-}
-
-func getList(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_LIST {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	count := int(C.pn_data_get_list(data))
-	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count; i++ {
-			if bool(C.pn_data_next(data)) {
-				val := reflect.New(listValue.Type().Elem())
-				get(data, val.Interface())
-				listValue.Index(i).Set(val.Elem())
-			}
-		}
-		C.pn_data_exit(data)
-	}
-	// FIXME aconway 2015-04-09: avoid the copy?
-	reflect.ValueOf(v).Elem().Set(listValue)
-}
-
-// decode from bytes.
-// Return bytes decoded or 0 if we could not decode a complete object.
-//
-func decode(data *C.pn_data_t, bytes []byte) int {
-	if len(bytes) == 0 {
-		return 0
-	}
-	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
-	if n == int(C.PN_UNDERFLOW) {
-		C.pn_error_clear(C.pn_data_error(data))
-		return 0
-	} else if n <= 0 {
-		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
-	}
-	return n
-}
diff --git a/go/amqp/url.go b/go/amqp/url.go
deleted file mode 100644
index 58711c7..0000000
--- a/go/amqp/url.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-/*
-#include <stdlib.h>
-#include <string.h>
-#include <proton/url.h>
-
-// Helper function for setting URL fields.
-typedef void (*setter_fn)(pn_url_t* url, const char* value);
-inline void	set(pn_url_t *url, setter_fn s, const char* value) {
-  s(url, value);
-}
-*/
-import "C"
-
-import (
-	"net"
-	"net/url"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-const (
-	amqp  string = "amqp"
-	amqps        = "amqps"
-)
-
-// ParseUrl parses an AMQP URL string and returns a net/url.Url.
-//
-// It is more forgiving than net/url.Parse and allows most of the parts of the
-// URL to be missing, assuming AMQP defaults.
-//
-func ParseURL(s string) (u *url.URL, err error) {
-	cstr := C.CString(s)
-	defer C.free(unsafe.Pointer(cstr))
-	pnUrl := C.pn_url_parse(cstr)
-	if pnUrl == nil {
-		return nil, internal.Errorf("bad URL %#v", s)
-	}
-	defer C.pn_url_free(pnUrl)
-
-	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
-	username := C.GoString(C.pn_url_get_username(pnUrl))
-	password := C.GoString(C.pn_url_get_password(pnUrl))
-	host := C.GoString(C.pn_url_get_host(pnUrl))
-	port := C.GoString(C.pn_url_get_port(pnUrl))
-	path := C.GoString(C.pn_url_get_path(pnUrl))
-
-	if err != nil {
-		return nil, internal.Errorf("bad URL %#v: %s", s, err)
-	}
-	if scheme == "" {
-		scheme = amqp
-	}
-	if port == "" {
-		if scheme == amqps {
-			port = amqps
-		} else {
-			port = amqp
-		}
-	}
-	var user *url.Userinfo
-	if password != "" {
-		user = url.UserPassword(username, password)
-	} else if username != "" {
-		user = url.User(username)
-	}
-
-	u = &url.URL{
-		Scheme: scheme,
-		User:   user,
-		Host:   net.JoinHostPort(host, port),
-		Path:   path,
-	}
-
-	return u, nil
-}
diff --git a/go/amqp/url_test.go b/go/amqp/url_test.go
deleted file mode 100644
index f80f1c4..0000000
--- a/go/amqp/url_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"fmt"
-)
-
-func ExampleParseURL() {
-	for _, s := range []string{
-		"amqp://username:password@host:1234/path",
-		"host:1234",
-		"host",
-		":1234",
-		"host/path",
-		"amqps://host",
-		"",
-	} {
-		u, err := ParseURL(s)
-		if err != nil {
-			fmt.Println(err)
-		} else {
-			fmt.Println(u)
-		}
-	}
-	// Output:
-	// amqp://username:password@host:1234/path
-	// amqp://host:1234
-	// amqp://host:amqp
-	// amqp://:1234
-	// amqp://host:amqp/path
-	// amqps://host:amqps
-	// proton: bad URL ""
-}
diff --git a/go/event/doc.go b/go/event/doc.go
deleted file mode 100644
index 7a9ec12..0000000
--- a/go/event/doc.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package event provides a low-level API to the proton AMQP engine.
-
-For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
-It provides a higher-level, concurrent API that is easier to use.
-
-The API is event based. There are two alternative styles of handler. EventHandler
-provides the core proton events. MessagingHandler provides a slighly simplified
-view of the event stream and automates some common tasks.
-
-See type Pump documentation for more details of the interaction between proton
-events and goroutines.
-*/
-package event
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.
diff --git a/go/event/genwrap.go b/go/event/genwrap.go
deleted file mode 100644
index 094b196..0000000
--- a/go/event/genwrap.go
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Code generator to generate a thin Go wrapper API around the C proton API.
-//
-
-package main
-
-import (
-	"flag"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path"
-	"regexp"
-	"strings"
-	"text/template"
-)
-
-func mixedCase(s string) string {
-	result := ""
-	for _, w := range strings.Split(s, "_") {
-		if w != "" {
-			result = result + strings.ToUpper(w[0:1]) + strings.ToLower(w[1:])
-		}
-	}
-	return result
-}
-
-func mixedCaseTrim(s, prefix string) string {
-	return mixedCase(strings.TrimPrefix(s, prefix))
-}
-
-var templateFuncs = template.FuncMap{"mixedCase": mixedCase, "mixedCaseTrim": mixedCaseTrim}
-
-func doTemplate(out io.Writer, data interface{}, tmpl string) {
-	panicIf(template.Must(template.New("").Funcs(templateFuncs).Parse(tmpl)).Execute(out, data))
-}
-
-type enumType struct {
-	Name   string
-	Values []string
-}
-
-// Find enums in a header file return map of enum name to values.
-func findEnums(header string) (enums []enumType) {
-	for _, enum := range enumDefRe.FindAllStringSubmatch(header, -1) {
-		enums = append(enums, enumType{enum[2], enumValRe.FindAllString(enum[1], -1)})
-	}
-	return enums
-}
-
-func genEnum(out io.Writer, name string, values []string) {
-	doTemplate(out, []interface{}{name, values}, `{{$enumName := index . 0}}{{$values := index . 1}}
-type {{mixedCase $enumName}} C.pn_{{$enumName}}_t
-const ({{range $values}}
-	{{mixedCase .}} {{mixedCase $enumName}} = C.{{.}} {{end}}
-)
-
-func (e {{mixedCase $enumName}}) String() string {
-	switch e {
-{{range $values}}
-	case C.{{.}}: return "{{mixedCaseTrim . "PN_"}}" {{end}}
-	}
-	return "unknown"
-}
-`)
-}
-
-var (
-	reSpace = regexp.MustCompile("\\s+")
-)
-
-func panicIf(err error) {
-	if err != nil {
-		panic(err)
-	}
-}
-
-func readHeader(name string) string {
-	file, err := os.Open(path.Join(*includeProton, name+".h"))
-	panicIf(err)
-	defer file.Close()
-	s, err := ioutil.ReadAll(file)
-	panicIf(err)
-	return string(s)
-}
-
-var copyright string = `/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-//
-// NOTE: This file was generated by genwrap.go, do not edit it by hand.
-//
-`
-
-type eventType struct {
-	// C, function and interface names for the event
-	Name, Cname, Fname, Iname string
-}
-
-func newEventType(cName string) eventType {
-	var etype eventType
-	etype.Cname = cName
-	etype.Name = mixedCaseTrim(cName, "PN_")
-	etype.Fname = "On" + etype.Name
-	etype.Iname = etype.Fname + "Interface"
-	return etype
-}
-
-var (
-	enumDefRe   = regexp.MustCompile("typedef enum {([^}]*)} pn_([a-z_]+)_t;")
-	enumValRe   = regexp.MustCompile("PN_[A-Z_]+")
-	skipEventRe = regexp.MustCompile("EVENT_NONE|REACTOR|SELECTABLE|TIMER")
-	skipFnRe    = regexp.MustCompile("attach|context|class|collect|^recv$|^send$|transport")
-)
-
-// Generate event wrappers.
-func event(out io.Writer) {
-	event_h := readHeader("event")
-
-	// Event is implented by hand in wrappers.go
-
-	// Get all the pn_event_type_t enum values
-	var etypes []eventType
-	enums := findEnums(event_h)
-	for _, e := range enums[0].Values {
-		if skipEventRe.FindStringSubmatch(e) == nil {
-			etypes = append(etypes, newEventType(e))
-		}
-	}
-
-	doTemplate(out, etypes, `
-type EventType int
-const ({{range .}}
-	 E{{.Name}} EventType = C.{{.Cname}}{{end}}
-)
-`)
-
-	doTemplate(out, etypes, `
-func (e EventType) String() string {
-	switch e {
-{{range .}}
-	case C.{{.Cname}}: return "{{.Name}}"{{end}}
-	}
-	return "Unknown"
-}
-`)
-}
-
-type genType struct {
-	Ctype, Gotype string
-	ToGo          func(value string) string
-	ToC           func(value string) string
-	Assign        func(value string) string
-}
-
-func (g genType) printBody(out io.Writer, value string) {
-	if g.Gotype != "" {
-		fmt.Fprintf(out, "return %s", g.ToGo(value))
-	} else {
-		fmt.Fprintf(out, "%s", value)
-	}
-}
-
-func (g genType) goLiteral(value string) string {
-	return fmt.Sprintf("%s{%s}", g.Gotype, value)
-}
-
-func (g genType) goConvert(value string) string {
-	switch g.Gotype {
-	case "string":
-		return fmt.Sprintf("C.GoString(%s)", value)
-	case "Event":
-		return fmt.Sprintf("makeEvent(%s)", value)
-	default:
-		return fmt.Sprintf("%s(%s)", g.Gotype, value)
-	}
-}
-
-var notStruct = map[string]bool{
-	"EventType":        true,
-	"SndSettleMode":    true,
-	"RcvSettleMode":    true,
-	"TerminusType":     true,
-	"State":            true,
-	"Durability":       true,
-	"ExpiryPolicy":     true,
-	"DistributionMode": true,
-}
-
-func mapType(ctype string) (g genType) {
-	g.Ctype = "C." + strings.Trim(ctype, " \n")
-
-	switch g.Ctype {
-	case "C.void":
-		g.Gotype = ""
-	case "C.size_t":
-		g.Gotype = "uint"
-	case "C.int":
-		g.Gotype = "int"
-	case "C.void *":
-		g.Gotype = "unsafe.Pointer"
-		g.Ctype = "unsafe.Pointer"
-	case "C.bool":
-		g.Gotype = "bool"
-	case "C.ssize_t":
-		g.Gotype = "int"
-	case "C.uint64_t":
-		g.Gotype = "uint64"
-	case "C.uint32_t":
-		g.Gotype = "uint16"
-	case "C.uint16_t":
-		g.Gotype = "uint32"
-	case "C.const char *":
-		fallthrough
-	case "C.char *":
-		g.Gotype = "string"
-		g.Ctype = "C.CString"
-		g.ToC = func(v string) string { return fmt.Sprintf("%sC", v) }
-		g.Assign = func(v string) string {
-			return fmt.Sprintf("%sC := C.CString(%s)\n defer C.free(unsafe.Pointer(%sC))\n", v, v, v)
-		}
-	case "C.pn_seconds_t":
-		g.Gotype = "time.Duration"
-		g.ToGo = func(v string) string { return fmt.Sprintf("(time.Duration(%s) * time.Second)", v) }
-	case "C.pn_error_t *":
-		g.Gotype = "error"
-		g.ToGo = func(v string) string { return fmt.Sprintf("internal.PnError(unsafe.Pointer(%s))", v) }
-	default:
-		pnId := regexp.MustCompile(" *pn_([a-z_]+)_t *\\*? *")
-		match := pnId.FindStringSubmatch(g.Ctype)
-		if match == nil {
-			panic(fmt.Errorf("unknown C type %#v", g.Ctype))
-		}
-		g.Gotype = mixedCase(match[1])
-		if !notStruct[g.Gotype] {
-			g.ToGo = g.goLiteral
-			g.ToC = func(v string) string { return v + ".pn" }
-		}
-	}
-	if g.ToGo == nil {
-		g.ToGo = g.goConvert // Use conversion by default.
-	}
-	if g.ToC == nil {
-		g.ToC = func(v string) string { return fmt.Sprintf("%s(%s)", g.Ctype, v) }
-	}
-	return
-}
-
-type genArg struct {
-	Name string
-	genType
-}
-
-var typeNameRe = regexp.MustCompile("^(.*( |\\*))([^ *]+)$")
-
-func splitArgs(argstr string) []genArg {
-	argstr = strings.Trim(argstr, " \n")
-	if argstr == "" {
-		return []genArg{}
-	}
-	args := make([]genArg, 0)
-	for _, item := range strings.Split(argstr, ",") {
-		item = strings.Trim(item, " \n")
-		typeName := typeNameRe.FindStringSubmatch(item)
-		if typeName == nil {
-			panic(fmt.Errorf("Can't split argument type/name %#v", item))
-		}
-		cType := strings.Trim(typeName[1], " \n")
-		name := strings.Trim(typeName[3], " \n")
-		if name == "type" {
-			name = "type_"
-		}
-		args = append(args, genArg{name, mapType(cType)})
-	}
-	return args
-}
-
-func goArgs(args []genArg) string {
-	l := ""
-	for i, arg := range args {
-		if i != 0 {
-			l += ", "
-		}
-		l += arg.Name + " " + arg.Gotype
-	}
-	return l
-}
-
-func cArgs(args []genArg) string {
-	l := ""
-	for _, arg := range args {
-		l += fmt.Sprintf(", %s", arg.ToC(arg.Name))
-	}
-	return l
-}
-
-func cAssigns(args []genArg) string {
-	l := "\n"
-	for _, arg := range args {
-		if arg.Assign != nil {
-			l += fmt.Sprintf("%s\n", arg.Assign(arg.Name))
-		}
-	}
-	return l
-}
-
-// Return the go name of the function or "" to skip the function.
-func goFnName(api, fname string) string {
-	// Skip class, context and attachment functions.
-	if skipFnRe.FindStringSubmatch(fname) != nil {
-		return ""
-	}
-	switch api + "." + fname {
-	case "link.get_drain":
-		return "IsDrain"
-	default:
-		return mixedCaseTrim(fname, "get_")
-	}
-}
-
-func apiWrapFns(api, header string, out io.Writer) {
-	fmt.Fprintf(out, "type %s struct{pn *C.pn_%s_t}\n", mixedCase(api), api)
-	fmt.Fprintf(out, "func (%c %s) IsNil() bool { return %c.pn == nil }\n", api[0], mixedCase(api), api[0])
-	fn := regexp.MustCompile(fmt.Sprintf(`PN_EXTERN ([a-z0-9_ ]+ *\*?) *pn_%s_([a-z_]+)\(pn_%s_t *\*[a-z_]+ *,? *([^)]*)\)`, api, api))
-	for _, m := range fn.FindAllStringSubmatch(header, -1) {
-		rtype, fname, argstr := mapType(m[1]), m[2], m[3]
-		gname := goFnName(api, fname)
-		if gname == "" { // Skip
-			continue
-		}
-		args := splitArgs(argstr)
-		fmt.Fprintf(out, "func (%c %s) %s", api[0], mixedCase(api), gname)
-		fmt.Fprintf(out, "(%s) %s { ", goArgs(args), rtype.Gotype)
-		fmt.Fprint(out, cAssigns(args))
-		rtype.printBody(out, fmt.Sprintf("C.pn_%s_%s(%c.pn%s)", api, fname, api[0], cArgs(args)))
-		fmt.Fprintf(out, "}\n")
-	}
-}
-
-var includeProton = flag.String("include", "", "path to proton include files, including /proton")
-
-func main() {
-	flag.Parse()
-	outpath := "wrappers_gen.go"
-	out, err := os.Create(outpath)
-	panicIf(err)
-	defer out.Close()
-
-	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
-	fmt.Fprintln(out, copyright)
-	fmt.Fprint(out, `
-package event
-
-import (
-	"time"
-  "unsafe"
-  "qpid.apache.org/proton/go/internal"
-)
-
-// #include <proton/types.h>
-// #include <proton/event.h>
-// #include <stdlib.h>
-`)
-	for _, api := range apis {
-		fmt.Fprintf(out, "// #include <proton/%s.h>\n", api)
-	}
-	fmt.Fprintln(out, `import "C"`)
-
-	event(out)
-
-	for _, api := range apis {
-		fmt.Fprintf(out, "// Wrappers for declarations in %s.h\n\n", api)
-		header := readHeader(api)
-		enums := findEnums(header)
-		for _, e := range enums {
-			genEnum(out, e.Name, e.Values)
-		}
-		apiWrapFns(api, header, out)
-	}
-	out.Close()
-
-	// Run gofmt.
-	cmd := exec.Command("gofmt", "-w", outpath)
-	cmd.Stdout = os.Stdout
-	cmd.Stderr = os.Stderr
-	err = cmd.Run()
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "gofmt: %s", err)
-		os.Exit(1)
-	}
-}
diff --git a/go/event/handlers.go b/go/event/handlers.go
deleted file mode 100644
index d76fac9..0000000
--- a/go/event/handlers.go
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-)
-
-// EventHandler handles core proton events.
-type EventHandler interface {
-	// HandleEvent is called with an event.
-	// Typically HandleEvent() is implemented as a switch on e.Type()
-	HandleEvent(e Event) error
-}
-
-// cHandler wraps a C pn_handler_t
-type cHandler struct {
-	pn *C.pn_handler_t
-}
-
-func (h cHandler) HandleEvent(e Event) error {
-	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
-	return nil // FIXME aconway 2015-03-31: error handling
-}
-
-// MessagingHandler provides an alternative interface to EventHandler.
-// it is easier to use for most applications that send and receive messages.
-//
-// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
-// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
-//
-type MessagingHandler interface {
-	HandleMessagingEvent(MessagingEventType, Event) error
-}
-
-// MessagingEventType provides a set of events that are easier to work with than the
-// core events defined by EventType
-//
-// There are 3 types of "endpoint": Connection, Session and Link.
-// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
-// The meaning of these events is as follows:
-//
-// Opening: The remote end opened, the local end will open automatically.
-//
-// Opened: Both ends are open, regardless of which end opened first.
-//
-// Closing: The remote end closed without error, the local end will close automatically.
-//
-// Error: The remote end closed with an error, the local end will close automatically.
-//
-// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
-//
-type MessagingEventType int
-
-const (
-	// The event loop starts.
-	MStart MessagingEventType = iota
-	// The peer closes the connection with an error condition.
-	MConnectionError
-	// The peer closes the session with an error condition.
-	MSessionError
-	// The peer closes the link with an error condition.
-	MLinkError
-	// The peer Initiates the opening of the connection.
-	MConnectionOpening
-	// The peer initiates the opening of the session.
-	MSessionOpening
-	// The peer initiates the opening of the link.
-	MLinkOpening
-	// The connection is opened.
-	MConnectionOpened
-	// The session is opened.
-	MSessionOpened
-	// The link is opened.
-	MLinkOpened
-	// The peer initiates the closing of the connection.
-	MConnectionClosing
-	// The peer initiates the closing of the session.
-	MSessionClosing
-	// The peer initiates the closing of the link.
-	MLinkClosing
-	// Both ends of the connection are closed.
-	MConnectionClosed
-	// Both ends of the session are closed.
-	MSessionClosed
-	// Both ends of the link are closed.
-	MLinkClosed
-	// The connection is disconnected.
-	MConnectionDisconnected
-	// The session's connection was disconnected
-	MSessionDisconnected
-	// The session's connection was disconnected
-	MLinkDisconnected
-	// The sender link has credit and messages can
-	// therefore be transferred.
-	MSendable
-	// The remote peer accepts an outgoing message.
-	MAccepted
-	// The remote peer rejects an outgoing message.
-	MRejected
-	// The peer releases an outgoing message. Note that this may be in response to
-	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
-	MReleased
-	// The peer has settled the outgoing message. This is the point at which it
-	// shouod never be retransmitted.
-	MSettled
-	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
-	// To manage the outcome of this messages (e.g. to accept or reject the message)
-	// use Event.Delivery().
-	MMessage
-	// The event loop terminates, there are no more events to process.
-	MFinal
-)
-
-func (t MessagingEventType) String() string {
-	switch t {
-	case MStart:
-		return "Start"
-	case MConnectionError:
-		return "ConnectionError"
-	case MSessionError:
-		return "SessionError"
-	case MLinkError:
-		return "LinkError"
-	case MConnectionOpening:
-		return "ConnectionOpening"
-	case MSessionOpening:
-		return "SessionOpening"
-	c

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[16/36] qpid-proton git commit: PROTON-827: go binding: minor example cleanup.

Posted by ac...@apache.org.
PROTON-827: go binding: minor example cleanup.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d8129acb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d8129acb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d8129acb

Branch: refs/heads/master
Commit: d8129acb0a7677eceb2bf88b8835f7b9dddfb466
Parents: 5598d50
Author: Alan Conway <ac...@redhat.com>
Authored: Mon May 11 17:34:13 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:14:37 2015 -0400

----------------------------------------------------------------------
 examples/go/receive.go | 174 ++++++++++++++++++++++++++++++++++++++++++++
 examples/go/send.go    | 156 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 330 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d8129acb/examples/go/receive.go
----------------------------------------------------------------------
diff --git a/examples/go/receive.go b/examples/go/receive.go
new file mode 100644
index 0000000..2545eab
--- /dev/null
+++ b/examples/go/receive.go
@@ -0,0 +1,174 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package main
+
+import (
+	"flag"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"log"
+	"math"
+	"net"
+	"os"
+	"path"
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/messaging"
+	"sync"
+	"time"
+)
+
+// Command-line flags
+var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
+var count = flag.Int64("count", 0, "Stop after receiving this many messages. 0 means unlimited.")
+var timeout = flag.Int64("time", 0, "Stop after this many seconds. 0 means unlimited.")
+var full = flag.Bool("full", false, "Print full message not just body.")
+
+func main() {
+	// Parse flags and arguments, print usage message on error.
+	flag.Usage = func() {
+		fmt.Fprintf(os.Stderr, `
+Usage: %s url [url ...]
+Receive messages from all the listed URLs concurrently and print them.
+`, os.Args[0])
+		flag.PrintDefaults()
+	}
+	flag.Parse()
+	urls := flag.Args() // Non-flag arguments are URLs to receive from
+	if len(urls) == 0 {
+		flag.Usage()
+		fmt.Fprintf(os.Stderr, "No URL provided")
+		os.Exit(1)
+	}
+	duration := time.Duration(*timeout) * time.Second
+	if duration == 0 {
+		duration = time.Duration(math.MaxInt64) // Not forever, but 290 years is close enough.
+	}
+	if *count == 0 {
+		*count = math.MaxInt64
+	}
+
+	// Create a goroutine for each URL that receives messages and sends them to
+	// the messages channel. main() receives and prints them.
+
+	messages := make(chan proton.Message) // Channel for messages from goroutines to main()
+	stop := make(chan struct{})           // Closing this channel means the program is stopping.
+
+	var wait sync.WaitGroup // Used by main() to wait for all goroutines to end.
+
+	wait.Add(len(urls)) // Wait for one goroutine per URL.
+
+	// Arrange to close all connections on exit
+	connections := make([]*messaging.Connection, len(urls))
+	defer func() {
+		for _, c := range connections {
+			if c != nil {
+				c.Close()
+			}
+		}
+	}()
+
+	for i, urlStr := range urls {
+		debug.Printf("Connecting to %s", urlStr)
+		go func(urlStr string) {
+			defer wait.Done()                   // Notify main() that this goroutine is done.
+			url, err := proton.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
+			fatalIf(err)
+
+			// Open a standard Go net.Conn and and AMQP connection using it.
+			conn, err := net.Dial("tcp", url.Host) // Note net.URL.Host is actually "host:port"
+			fatalIf(err)
+			pc, err := messaging.Connect(conn) // This is our AMQP connection.
+			fatalIf(err)
+			connections[i] = pc // So we can close it when main() ends
+
+			// Create a receiver using the path of the URL as the AMQP address
+			r, err := pc.Receiver(url.Path)
+			fatalIf(err)
+
+			for {
+				var m proton.Message
+				select { // Receive a message or stop.
+				case m = <-r.Receive:
+				case <-stop: // The program is stopping.
+					return
+				}
+				select { // Send m to main() or stop
+				case messages <- m: // Send m to main()
+				case <-stop: // The program is stopping.
+					return
+				}
+			}
+		}(urlStr)
+	}
+	info.Printf("Listening")
+
+	// time.After() returns a channel that will close when the timeout is up.
+	timer := time.After(duration)
+
+	// main() prints each message and checks for count or timeout being exceeded.
+	for i := int64(0); i < *count; i++ {
+		select {
+		case m := <-messages:
+			debug.Print(formatMessage{m})
+		case <-timer: // Timeout has expired
+			i = 0
+		}
+	}
+	info.Printf("Received %d messages", *count)
+	close(stop) // Signal all goroutines to stop.
+	wait.Wait() // Wait for all goroutines to finish.
+}
+
+// Logging
+func logger(prefix string, level int, w io.Writer) *log.Logger {
+	if *verbose >= level {
+		return log.New(w, prefix, 0)
+	}
+	return log.New(ioutil.Discard, "", 0)
+}
+
+var info, debug *log.Logger
+
+func init() {
+	flag.Parse()
+	name := path.Base(os.Args[0])
+	log.SetFlags(0)                                               // Use default logger for errors.
+	log.SetPrefix(fmt.Sprintf("%s: ", name))                      // Log errors on stderr.
+	info = logger(fmt.Sprintf("%s: ", name), 1, os.Stdout)        // Log info on stdout.
+	debug = logger(fmt.Sprintf("%s debug: ", name), 2, os.Stderr) // Log debug on stderr.
+}
+
+// Simple error handling for demo.
+func fatalIf(err error) {
+	if err != nil {
+		log.Fatal(err)
+	}
+}
+
+type formatMessage struct{ m proton.Message }
+
+func (fm formatMessage) String() string {
+	if *full {
+		return fmt.Sprintf("%#v", fm.m)
+	} else {
+		return fmt.Sprintf("%#v", fm.m.Body())
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d8129acb/examples/go/send.go
----------------------------------------------------------------------
diff --git a/examples/go/send.go b/examples/go/send.go
new file mode 100644
index 0000000..c4db7cd
--- /dev/null
+++ b/examples/go/send.go
@@ -0,0 +1,156 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package main
+
+import (
+	"flag"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"log"
+	"math"
+	"net"
+	"os"
+	"path"
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/messaging"
+	"sync"
+)
+
+// Command-line flags
+var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
+var count = flag.Int64("count", 1, "Send this may messages per address. 0 means unlimited.")
+
+// Ack associates an info string with an acknowledgement
+type Ack struct {
+	ack  messaging.Acknowledgement
+	info string
+}
+
+func main() {
+	// Parse flags and arguments, print usage message on error.
+	flag.Usage = func() {
+		fmt.Fprintf(os.Stderr, `
+Usage: %s url [url ...]
+Send messages to all the listed URLs concurrently.
+To each URL, send the string "path-n" where n is the message number.
+`, os.Args[0])
+		flag.PrintDefaults()
+	}
+	flag.Parse()
+	urls := flag.Args() // Non-flag arguments are URLs to receive from
+	if len(urls) == 0 {
+		flag.Usage()
+		fmt.Fprintf(os.Stderr, "No URL provided\n")
+		os.Exit(1)
+	}
+	if *count == 0 {
+		*count = math.MaxInt64
+	}
+
+	// Create a channel to receive all the acknowledgements
+	acks := make(chan Ack)
+
+	// Create a goroutine for each URL that sends messages.
+	var wait sync.WaitGroup // Used by main() to wait for all goroutines to end.
+	wait.Add(len(urls))     // Wait for one goroutine per URL.
+
+	// Arrange to close all connections on exit
+	connections := make([]*messaging.Connection, len(urls))
+	defer func() {
+		for _, c := range connections {
+			if c != nil {
+				c.Close()
+			}
+		}
+	}()
+
+	for i, urlStr := range urls {
+		debug.Printf("Connecting to %v", urlStr)
+		go func(urlStr string) {
+			defer wait.Done()                   // Notify main() that this goroutine is done.
+			url, err := proton.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
+			fatalIf(err)
+
+			// Open a standard Go net.Conn and and AMQP connection using it.
+			conn, err := net.Dial("tcp", url.Host) // Note net.URL.Host is actually "host:port"
+			fatalIf(err)
+			pc, err := messaging.Connect(conn) // This is our AMQP connection.
+			fatalIf(err)
+			connections[i] = pc // So we can close it when main() ends
+
+			// Create a sender using the path of the URL as the AMQP address
+			s, err := pc.Sender(url.Path)
+			fatalIf(err)
+
+			for i := int64(0); i < *count; i++ {
+				m := proton.NewMessage()
+				body := fmt.Sprintf("%v-%v", url.Path, i)
+				m.SetBody(body)
+				ack, err := s.Send(m)
+				fatalIf(err)
+				acks <- Ack{ack, body} // Send the acknowledgement to main()
+			}
+		}(urlStr)
+	}
+
+	// Wait for all the acknowledgements
+	expect := int(*count) * len(urls)
+	debug.Printf("Started senders, expect %v acknowledgements", expect)
+	for i := 0; i < expect; i++ {
+		ack, ok := <-acks
+		if !ok {
+			info.Fatalf("acks channel closed after only %d acks\n", i)
+		}
+		d := <-ack.ack
+		debug.Printf("acknowledgement[%v] %v", i, ack.info)
+		if d != messaging.Accepted {
+			info.Printf("Unexpected disposition %v", d)
+		}
+	}
+	info.Printf("Received all %v acknowledgements", expect)
+	wait.Wait() // Wait for all goroutines to finish.
+}
+
+// Logging
+func logger(prefix string, level int, w io.Writer) *log.Logger {
+	if *verbose >= level {
+		return log.New(w, prefix, 0)
+	}
+	return log.New(ioutil.Discard, "", 0)
+}
+
+var info, debug *log.Logger
+
+func init() {
+	flag.Parse()
+	name := path.Base(os.Args[0])
+	log.SetFlags(0)                                               // Use default logger for errors.
+	log.SetPrefix(fmt.Sprintf("%s: ", name))                      // Log errors on stderr.
+	info = logger(fmt.Sprintf("%s: ", name), 1, os.Stdout)        // Log info on stdout.
+	debug = logger(fmt.Sprintf("%s debug: ", name), 2, os.Stderr) // Log debug on stderr.
+}
+
+// Simple error handling for demo.
+func fatalIf(err error) {
+	if err != nil {
+		log.Fatal(err)
+	}
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[22/36] qpid-proton git commit: PROTON-827: Re-create go worspace, cmake support for testing.

Posted by ac...@apache.org.
PROTON-827: Re-create go worspace, cmake support for testing.

Re-created the go workspace structure in the repository so it can be set as a GOPATH element.
ctest runs package tests and examples.
make install go code to share/gocode
config.sh sets env. vars for CGO compilation.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/7cecb8ed
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/7cecb8ed
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/7cecb8ed

Branch: refs/heads/master
Commit: 7cecb8ed63313b9d8f02c50950244981999a888d
Parents: 7087b22
Author: Alan Conway <ac...@redhat.com>
Authored: Wed May 20 15:30:38 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:19:21 2015 -0400

----------------------------------------------------------------------
 config.sh.in                                    |  23 +-
 examples/CMakeLists.txt                         |   2 +-
 examples/go/CMakeLists.txt                      |  29 +
 examples/go/README.md                           |  55 +-
 examples/go/event/broker.go                     | 255 -------
 examples/go/example_test.go                     |  14 +-
 go                                              |   1 +
 go/README.md                                    | 142 ----
 go/amqp/doc.go                                  |  40 -
 go/amqp/interop                                 |   1 -
 go/amqp/interop_test.go                         | 308 --------
 go/amqp/marshal.go                              | 238 ------
 go/amqp/message.go                              | 342 ---------
 go/amqp/message_test.go                         |  90 ---
 go/amqp/types.go                                | 193 -----
 go/amqp/uid.go                                  |  40 -
 go/amqp/unmarshal.go                            | 552 --------------
 go/amqp/url.go                                  |  96 ---
 go/amqp/url_test.go                             |  51 --
 go/event/doc.go                                 |  38 -
 go/event/genwrap.go                             | 427 -----------
 go/event/handlers.go                            | 411 -----------
 go/event/message.go                             |  75 --
 go/event/pump.go                                | 357 ---------
 go/event/wrappers.go                            | 253 -------
 go/event/wrappers_gen.go                        | 732 -------------------
 go/internal/error.go                            | 125 ----
 go/messaging/doc.go                             |  28 -
 go/messaging/handler.go                         |  70 --
 go/messaging/messaging.go                       | 250 -------
 proton-c/bindings/CMakeLists.txt                |   9 +-
 proton-c/bindings/go/CMakeLists.txt             |  51 ++
 proton-c/bindings/go/README.md                  | 142 ++++
 proton-c/bindings/go/genwrap.go                 | 427 +++++++++++
 .../src/qpid.apache.org/proton/go/amqp/doc.go   |  40 +
 .../src/qpid.apache.org/proton/go/amqp/interop  |   1 +
 .../proton/go/amqp/interop_test.go              | 308 ++++++++
 .../qpid.apache.org/proton/go/amqp/marshal.go   | 238 ++++++
 .../qpid.apache.org/proton/go/amqp/message.go   | 342 +++++++++
 .../proton/go/amqp/message_test.go              |  90 +++
 .../src/qpid.apache.org/proton/go/amqp/types.go | 193 +++++
 .../src/qpid.apache.org/proton/go/amqp/uid.go   |  40 +
 .../qpid.apache.org/proton/go/amqp/unmarshal.go | 552 ++++++++++++++
 .../src/qpid.apache.org/proton/go/amqp/url.go   |  96 +++
 .../qpid.apache.org/proton/go/amqp/url_test.go  |  51 ++
 .../src/qpid.apache.org/proton/go/event/doc.go  |  38 +
 .../qpid.apache.org/proton/go/event/handlers.go | 411 +++++++++++
 .../qpid.apache.org/proton/go/event/message.go  |  75 ++
 .../src/qpid.apache.org/proton/go/event/pump.go | 357 +++++++++
 .../qpid.apache.org/proton/go/event/wrappers.go | 253 +++++++
 .../proton/go/event/wrappers_gen.go             | 732 +++++++++++++++++++
 .../qpid.apache.org/proton/go/internal/error.go | 125 ++++
 .../qpid.apache.org/proton/go/messaging/doc.go  |  28 +
 .../proton/go/messaging/handler.go              |  70 ++
 .../proton/go/messaging/messaging.go            | 250 +++++++
 55 files changed, 5000 insertions(+), 5157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/config.sh.in
----------------------------------------------------------------------
diff --git a/config.sh.in b/config.sh.in
index 25d08b1..744ddb3 100755
--- a/config.sh.in
+++ b/config.sh.in
@@ -18,6 +18,16 @@
 # under the License.
 #
 
+merge_paths() {
+    # Merge paths, remove duplicates (keep first instance)
+    path=$(echo $* | sed 's/:/ /'g) # Split with spaces.
+    newpath=""
+    for d in $path; do		# Remove duplicates
+	{ echo $newpath | grep -q "\(:\|^\)$d\(:\|$\)"; } || newpath="$newpath:$d"
+    done
+    echo $newpath | sed 's/^://' # Remove leading :
+}
+
 PROTON_HOME=@CMAKE_SOURCE_DIR@
 PROTON_BUILD=@CMAKE_BINARY_DIR@
 
@@ -50,10 +60,17 @@ export RUBYLIB=$RUBY_BINDINGS:$PROTON_HOME/proton-c/bindings/ruby/lib:$PROTON_HO
 # Perl
 export PERL5LIB=$PERL5LIB:$PERL_BINDINGS:$PROTON_HOME/proton-c/bindings/perl/lib
 
+# Go
+export GOPATH="$(merge_paths $PROTON_HOME/proton-c/bindings/go $GOPATH)"
+# Help Go compiler find libraries and include files.
+export C_INCLUDE_PATH="$(merge_paths $PROTON_HOME/proton-c/include $PROTON_BUILD/proton-c/include $C_INCLUDE_PATH)"
+export LIBRARY_PATH="$(merge_paths $PROTON_BUILD/proton-c $LIBRARY_PATH)"
+export LD_LIBRARY_PATH="$(merge_paths $PROTON_BUILD/proton-c $LD_LIBRARY_PATH)"
+
+
+
 # test applications
-export PATH="$PATH:$PROTON_BUILD/tests/tools/apps/c"
-export PATH="$PATH:$PROTON_HOME/tests/tools/apps/python"
-export PATH="$PATH:$PROTON_HOME/tests/python"
+export PATH="$(merge_paths $PATH $PROTON_BUILD/tests/tools/apps/c $PROTON_HOME/tests/tools/apps/python $PROTON_HOME/tests/python)"
 
 # can the test harness use valgrind?
 if [[ -x "$(type -p valgrind)" ]] ; then

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d695f3a..c4c4058 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -18,8 +18,8 @@
 #
 
 set (Proton_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-
 add_subdirectory(c)
+add_subdirectory(go)
 if (BUILD_CPP)
   add_subdirectory(cpp)
 endif()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/examples/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/go/CMakeLists.txt b/examples/go/CMakeLists.txt
new file mode 100644
index 0000000..464ed7c
--- /dev/null
+++ b/examples/go/CMakeLists.txt
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# FIXME aconway 2015-05-20:
+# - use proton build for Go includes & libs.
+# - pre-build go libraries? Respect user GOPATH?
+
+if(BUILD_GO)
+  add_test(
+    NAME go_example_test
+    COMMAND ${GO_TEST} example_test.go -rpath ${CMAKE_BINARY_DIR}/proton-c
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+endif()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/examples/go/README.md
----------------------------------------------------------------------
diff --git a/examples/go/README.md b/examples/go/README.md
index 8acef36..52bd8e4 100644
--- a/examples/go/README.md
+++ b/examples/go/README.md
@@ -9,48 +9,33 @@ There are 3 go packages for proton:
 Most applications should use the `messaging` package. The `event` package is for
 applications that need low-level access to the proton engine.
 
-## messaging examples
+## Example programs
 
-- [receive.go](receive.go) receive from many connections concurrently.
-- [send.go](send.go) send to many connections concurrently.
+- [receive.go](receive.go) receive from many connections concurrently using messaging package.
+- [send.go](send.go) send to many connections concurrently using messaging package.
+- [event_broker.go](event_broker.go) simple mini-broker using event package.
 
-## event examples
+## Using the Go packages
 
-- [broker.go](event/broker.go) simple mini-broker, queues are created automatically.
+Set your GOPATH environment variable to include `/<path-to-proton>/proton-c/bindings/go`
 
-## Installing the proton Go packages
+The proton Go packages include C code so the cgo compiler needs to be able to
+find the proton library and include files.  There are a couple of ways to do this:
 
-You need to install proton in a standard place such as `/usr` or `/usr/local` so go
-can find the proton C headers and libraries to build the C parts of the packages.
+1. Build proton in directory `$BUILD`. Source the script `$BUILD/config.sh` to set your environment.
 
-You should create a go workspace and set GOPATH as described in https://golang.org/doc/code.html
+2. Install proton to a standard prefix such as `/usr` or `/usr/local`. No need for further settings.
 
-To get the proton packages into your workspace you can clone the proton repository like this:
+3. Install proton to a non-standard prefix `$PREFIX`. Set the following:
 
-    git clone https://git.apache.org/qpid-proton.git $GOPATH/src/qpid.apache.org/proton
+        export LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH
+        export C_INCLUDE_PATH=$PREFIX/include:$C_INCLUDE_PATH
+        export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
 
-If you prefer to keep your proton clone elsewhere you can create a symlink to it in your workspace.
-
-You can also use `go get` as follows:
-
-    go get qpid.apache.org/proton/go/messaging
-
-Once installed you can use godoc to look at docmentation on the commane line or start a
-godoc web server like this:
-
-	godoc -http=:6060
-
-And look at the docs in your browser.
-
-Right now the layout of the documentation is a bit messed up, showing the long
-path for imports, i.e.
-
-    qpid.apache.org/proton/proton-c/bindings/go/amqp
-
-In your code you should use:
-
-    qpid.apache.org/proton/go/amqp
+Once you are set up, the go tools will work as normal. You can see documentation
+in your web browser at `localhost:6060` by running:
 
+    godoc -http=:6060
 
 ## Running the examples
 
@@ -69,15 +54,15 @@ the example source have more details.
 
 First start the broker:
 
-    go run event/broker.go
+    go run event_broker.go
 
 Send messages concurrently to queues "foo" and "bar", 10 messages to each queue:
 
-    go run go/send.go -count 10 localhost:/foo localhost:/bar
+    go run send.go -count 10 localhost:/foo localhost:/bar
 
 Receive messages concurrently from "foo" and "bar". Note -count 20 for 10 messages each on 2 queues:
 
-    go run go/receive.go -count 20 localhost:/foo localhost:/bar
+    go run receive.go -count 20 localhost:/foo localhost:/bar
 
 The broker and clients use the amqp port on the local host by default, to use a
 different address use the `-addr host:port` flag.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/examples/go/event/broker.go
----------------------------------------------------------------------
diff --git a/examples/go/event/broker.go b/examples/go/event/broker.go
deleted file mode 100644
index 0cb4bfa..0000000
--- a/examples/go/event/broker.go
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-//
-// This is a simple AMQP broker implemented using the event-handler interface.
-//
-// It maintains a set of named in-memory queues of messages. Clients can send
-// messages to queues or subscribe to receive messages from them.
-//
-//
-
-package main
-
-import (
-	"container/list"
-	"flag"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"net"
-	"os"
-	"path"
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-	"sync"
-)
-
-// Command-line flags
-var addr = flag.String("addr", ":amqp", "Listening address")
-var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
-var full = flag.Bool("full", false, "Print full message not just body.")
-
-func main() {
-	flag.Usage = func() {
-		fmt.Fprintf(os.Stderr, `
-Usage: %s
-A simple broker-like demo. Queues are created automatically for sender or receiver addrsses.
-`, os.Args[0])
-		flag.PrintDefaults()
-	}
-	flag.Parse()
-	b := newBroker()
-	err := b.listen(*addr)
-	fatalIf(err)
-}
-
-// queue is a structure representing a queue.
-type queue struct {
-	name      string              // Name of queue
-	messages  *list.List          // List of event.Message
-	consumers map[event.Link]bool // Set of consumer links
-}
-
-type logLink event.Link // Wrapper to print links in format for logging
-
-func (ll logLink) String() string {
-	l := event.Link(ll)
-	return fmt.Sprintf("%s[%p]", l.Name(), l.Session().Connection().Pump())
-}
-
-func (q *queue) subscribe(link event.Link) {
-	debug.Printf("link %s subscribed to queue %s", logLink(link), q.name)
-	q.consumers[link] = true
-}
-
-func (q *queue) unsubscribe(link event.Link) {
-	debug.Printf("link %s unsubscribed from queue %s", logLink(link), q.name)
-	delete(q.consumers, link)
-}
-
-func (q *queue) empty() bool {
-	return len(q.consumers) == 0 && q.messages.Len() == 0
-}
-
-func (q *queue) push(context *event.Pump, message amqp.Message) {
-	q.messages.PushBack(message)
-	q.pop(context)
-}
-
-func (q *queue) popTo(context *event.Pump, link event.Link) bool {
-	if q.messages.Len() != 0 && link.Credit() > 0 {
-		message := q.messages.Remove(q.messages.Front()).(amqp.Message)
-		debug.Printf("link %s <- queue %s: %s", logLink(link), q.name, formatMessage{message})
-		// The first return parameter is an event.Delivery.
-		// The Deliver can be used to track message status, e.g. so we can re-delver on failure.
-		// This demo broker doesn't do that.
-		linkPump := link.Session().Connection().Pump()
-		if context == linkPump {
-			if context == nil {
-				log.Fatal("pop in nil context")
-			}
-			link.Send(message) // link is in the current pump, safe to call Send() direct
-		} else {
-			linkPump.Inject <- func() { // Inject to link's pump
-				link.Send(message) // FIXME aconway 2015-05-04: error handlig
-			}
-		}
-		return true
-	}
-	return false
-}
-
-func (q *queue) pop(context *event.Pump) (popped bool) {
-	for c, _ := range q.consumers {
-		popped = popped || q.popTo(context, c)
-	}
-	return
-}
-
-// broker implements event.MessagingHandler and reacts to events by moving messages on or off queues.
-type broker struct {
-	queues map[string]*queue
-	lock   sync.Mutex // FIXME aconway 2015-05-04: un-golike, better broker coming...
-}
-
-func newBroker() *broker {
-	return &broker{queues: make(map[string]*queue)}
-}
-
-func (b *broker) getQueue(name string) *queue {
-	q := b.queues[name]
-	if q == nil {
-		debug.Printf("Create queue %s", name)
-		q = &queue{name, list.New(), make(map[event.Link]bool)}
-		b.queues[name] = q
-	}
-	return q
-}
-
-func (b *broker) unsubscribe(l event.Link) {
-	if l.IsSender() {
-		q := b.queues[l.RemoteSource().Address()]
-		if q != nil {
-			q.unsubscribe(l)
-			if q.empty() {
-				debug.Printf("Delete queue %s", q.name)
-				delete(b.queues, q.name)
-			}
-		}
-	}
-}
-
-func (b *broker) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
-	// FIXME aconway 2015-05-04: locking is un-golike, better example coming soon.
-	// Needed because the same handler is used for multiple connections concurrently
-	// and the queue data structures are not thread safe.
-	b.lock.Lock()
-	defer b.lock.Unlock()
-
-	switch t {
-
-	case event.MLinkOpening:
-		if e.Link().IsSender() {
-			q := b.getQueue(e.Link().RemoteSource().Address())
-			q.subscribe(e.Link())
-		}
-
-	case event.MLinkDisconnected, event.MLinkClosing:
-		b.unsubscribe(e.Link())
-
-	case event.MSendable:
-		q := b.getQueue(e.Link().RemoteSource().Address())
-		q.popTo(e.Connection().Pump(), e.Link())
-
-	case event.MMessage:
-		m, err := event.DecodeMessage(e)
-		fatalIf(err)
-		qname := e.Link().RemoteTarget().Address()
-		debug.Printf("link %s -> queue %s: %s", logLink(e.Link()), qname, formatMessage{m})
-		b.getQueue(qname).push(e.Connection().Pump(), m)
-	}
-	return nil
-}
-
-func (b *broker) listen(addr string) (err error) {
-	// Use the standard Go "net" package to listen for connections.
-	listener, err := net.Listen("tcp", addr)
-	if err != nil {
-		return err
-	}
-	info.Printf("Listening on %s", listener.Addr())
-	defer listener.Close()
-	for {
-		conn, err := listener.Accept()
-		if err != nil {
-			info.Printf("Accept error: %s", err)
-			continue
-		}
-		pump, err := event.NewPump(conn, event.NewMessagingDelegator(b))
-		fatalIf(err)
-		info.Printf("Accepted %s[%p]", pump, pump)
-		pump.Server()
-		go func() {
-			pump.Run()
-			if pump.Error == nil {
-				info.Printf("Closed %s", pump)
-			} else {
-				info.Printf("Closed %s: %s", pump, pump.Error)
-			}
-		}()
-	}
-}
-
-// Logging
-func logger(prefix string, level int, w io.Writer) *log.Logger {
-	if *verbose >= level {
-		return log.New(w, prefix, 0)
-	}
-	return log.New(ioutil.Discard, "", 0)
-}
-
-var info, debug *log.Logger
-
-func init() {
-	flag.Parse()
-	name := path.Base(os.Args[0])
-	log.SetFlags(0)
-	log.SetPrefix(fmt.Sprintf("%s: ", name))                      // Log errors on stderr.
-	info = logger(fmt.Sprintf("%s: ", name), 1, os.Stdout)        // Log info on stdout.
-	debug = logger(fmt.Sprintf("%s debug: ", name), 2, os.Stderr) // Log debug on stderr.
-}
-
-// Simple error handling for demo.
-func fatalIf(err error) {
-	if err != nil {
-		log.Fatal(err)
-	}
-}
-
-type formatMessage struct{ m amqp.Message }
-
-func (fm formatMessage) String() string {
-	if *full {
-		return fmt.Sprintf("%#v", fm.m)
-	} else {
-		return fmt.Sprintf("%#v", fm.m.Body())
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/examples/go/example_test.go
----------------------------------------------------------------------
diff --git a/examples/go/example_test.go b/examples/go/example_test.go
index e059c28..a4b4c2c 100644
--- a/examples/go/example_test.go
+++ b/examples/go/example_test.go
@@ -25,6 +25,7 @@ package main
 import (
 	"bufio"
 	"bytes"
+	"flag"
 	"fmt"
 	"io"
 	"io/ioutil"
@@ -77,11 +78,11 @@ func (b *broker) check() error {
 
 // Start the demo broker, wait till it is listening on *addr. No-op if already started.
 func (b *broker) start() error {
-	build("event/broker.go")
+	build("event_broker.go")
 	if b.cmd == nil { // Not already started
 		// FIXME aconway 2015-04-30: better way to pick/configure a broker port.
 		b.addr = fmt.Sprintf("127.0.0.1:%d", rand.Intn(10000)+10000)
-		b.cmd = exec.Command(exepath("broker"), "-addr", b.addr, "-verbose", "0")
+		b.cmd = exec.Command(exepath("event_broker"), "-addr", b.addr, "-verbose", "0")
 		b.runerr = make(chan error)
 		// Change the -verbose setting above to see broker output on stdout/stderr.
 		b.cmd.Stderr, b.cmd.Stdout = os.Stderr, os.Stdout
@@ -246,7 +247,12 @@ func init() {
 
 func build(prog string) {
 	if !built[prog] {
-		build := exec.Command("go", "build", path.Join(exampleDir, prog))
+		args := []string{"build"}
+		if *rpath != "" {
+			args = append(args, "-ldflags", "-r "+*rpath)
+		}
+		args = append(args, path.Join(exampleDir, prog))
+		build := exec.Command("go", args...)
 		build.Dir = binDir
 		out, err := build.CombinedOutput()
 		if err != nil {
@@ -256,6 +262,8 @@ func build(prog string) {
 	}
 }
 
+var rpath = flag.String("rpath", "", "Runtime path for test executables")
+
 func TestMain(m *testing.M) {
 	rand.Seed(time.Now().UTC().UnixNano())
 	var err error


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[12/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
PROTON-827: Switch go directory and symlink locations, problems with some go tools.

godoc and godep don't work well with the symlink.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9276ae33
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9276ae33
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9276ae33

Branch: refs/heads/master
Commit: 9276ae3386409fa9485bb956cf9ed7d6f29d0371
Parents: 7bc3e0e
Author: Alan Conway <ac...@redhat.com>
Authored: Thu May 14 10:18:10 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:14:37 2015 -0400

----------------------------------------------------------------------
 go                                              |    1 -
 go/README.md                                    |  142 +
 go/amqp/doc.go                                  |   40 +
 go/amqp/interop                                 |    1 +
 go/amqp/interop_test.go                         |  308 ++
 go/amqp/marshal.go                              |  238 ++
 go/amqp/message.go                              |  342 ++
 go/amqp/message_test.go                         |   90 +
 go/amqp/types.go                                |  193 +
 go/amqp/uid.go                                  |   40 +
 go/amqp/unmarshal.go                            |  552 +++
 go/amqp/url.go                                  |   96 +
 go/amqp/url_test.go                             |   51 +
 go/event/doc.go                                 |   38 +
 go/event/handlers.go                            |  411 +++
 go/event/message.go                             |   75 +
 go/event/pump.go                                |  357 ++
 go/event/wrappers.go                            |  253 ++
 go/event/wrappers_gen.go                        |  732 ++++
 go/internal/error.go                            |  125 +
 go/messaging/doc.go                             |   28 +
 go/messaging/handler.go                         |   70 +
 go/messaging/messaging.go                       |  250 ++
 proton-c/bindings/go/README.md                  |  138 -
 proton-c/bindings/go/amqp/doc.go                |   40 -
 proton-c/bindings/go/amqp/interop               |    1 -
 proton-c/bindings/go/amqp/interop_test.go       |  308 --
 proton-c/bindings/go/amqp/marshal.go            |  238 --
 proton-c/bindings/go/amqp/message.go            |  342 --
 proton-c/bindings/go/amqp/message_test.go       |   90 -
 proton-c/bindings/go/amqp/types.go              |  193 -
 proton-c/bindings/go/amqp/uid.go                |   40 -
 proton-c/bindings/go/amqp/unmarshal.go          |  552 ---
 proton-c/bindings/go/amqp/url.go                |   96 -
 proton-c/bindings/go/amqp/url_test.go           |   51 -
 proton-c/bindings/go/event/doc.go               |   38 -
 proton-c/bindings/go/event/handlers.go          |  411 ---
 proton-c/bindings/go/event/message.go           |   75 -
 proton-c/bindings/go/event/pump.go              |  357 --
 proton-c/bindings/go/event/wrappers.go          |  253 --
 proton-c/bindings/go/event/wrappers_gen.go      |  732 ----
 proton-c/bindings/go/internal/error.go          |  125 -
 proton-c/bindings/go/messaging/doc.go           |   28 -
 proton-c/bindings/go/messaging/handler.go       |   70 -
 proton-c/bindings/go/messaging/messaging.go     |  250 --
 .../qpid.apache.org/proton/go/amqp.a            | 1726 +++++++++
 .../qpid.apache.org/proton/go/event.a           | 3318 +++++++++++++++++
 .../qpid.apache.org/proton/go/internal.a        |  Bin 0 -> 102074 bytes
 .../qpid.apache.org/proton/go/messaging.a       | 1100 ++++++
 .../qpid.apache.org/proton/go/reactor.a         | 3319 ++++++++++++++++++
 50 files changed, 13895 insertions(+), 4429 deletions(-)
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[24/36] qpid-proton git commit: PROTON-827: Update README to mention online documentation.

Posted by ac...@apache.org.
PROTON-827: Update README to mention online documentation.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/32487f0a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/32487f0a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/32487f0a

Branch: refs/heads/master
Commit: 32487f0a81348008afa9c66a1d208984ceeb8eff
Parents: 495d741
Author: Alan Conway <ac...@redhat.com>
Authored: Fri May 29 15:23:30 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:19:56 2015 -0400

----------------------------------------------------------------------
 proton-c/bindings/go/README.md | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/32487f0a/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
index 2b73583..0f16b8e 100644
--- a/proton-c/bindings/go/README.md
+++ b/proton-c/bindings/go/README.md
@@ -1,20 +1,19 @@
 # *EXPERIMENTAL* Go binding for proton
 
-    NOTE: The go directory is in the proton repository root with a symlink at
-    proton-c/bindings/go to facilitate use of go tools: go get, godep and godoc.
-    There may be a cleaner solution to this in future.
+This is an *experimental* [Go](http://golang.org) binding for proton.
+The API is subject to change but there is enough to get a good idea of where it is headed.
 
-This is the beginning of a [Go](http://golang.org) binding for proton.
-
-This work is in early *experimental* stages, *everything* may change in future.
-Comments and contributions are strongly encouraged, this experiment is public so
-early feedback can guide development.
+Feedback is strongly encouraged:
 
 - Email <pr...@qpid.apache.org>
 - Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
 
-There are working [examples](../examples/go/README.md) and the examples README file
-explains how to install the packages in your go workspace and read the documentation.
+The package documentation is available at: <http://godoc.org/qpid.apache.org/proton/go>
+
+See the [examples](../../../examples/go/README.md) for working examples and
+practical instructions on how to get started.
+
+The rest of this page discusses the high-level goals and design issues.
 
 ## Goals
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[33/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a
deleted file mode 100644
index 9871ec9..0000000
--- a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/event.a
+++ /dev/null
@@ -1,3318 +0,0 @@
-!<arch>
-__.PKGDEF       0           0     0     644     33134     `
-go object linux amd64 go1.4.2 X:precisestack
-
-$$
-package event
-	import net "net"
-	import sync "sync"
-	import runtime "runtime"
-	import time "time"
-	import io "io"
-	import cgo "runtime/cgo"
-	import amqp "qpid.apache.org/proton/go/amqp"
-	import os "os"
-	import syscall "syscall"
-	import fmt "fmt"
-	import internal "qpid.apache.org/proton/go/internal"
-	import reflect "reflect"
-	import path "path"
-	import unsafe "unsafe"
-	type @""._Ctype_struct_pn_event_t struct {}
-	type @"".EventType int
-	func (@"".e·2 @"".EventType) String () (? string)
-	type @""._Ctype_struct_pn_connection_t struct {}
-	type @"sync".Mutex struct { @"sync".state int32; @"sync".sema uint32 }
-	func (@"sync".m·1 *@"sync".Mutex) Lock ()
-	func (@"sync".m·1 *@"sync".Mutex) Unlock ()
-	type @"qpid.apache.org/proton/go/internal".FirstError struct { @"qpid.apache.org/proton/go/internal".err error; @"qpid.apache.org/proton/go/internal".lock @"sync".Mutex }
-	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Get () (? error)
-	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Set (@"qpid.apache.org/proton/go/internal".err·3 error) (? error)
-	type @"net".Addr interface { Network() (? string); String() (? string) }
-	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
-	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
-	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
-	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
-	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
-	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
-	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
-	type @"time".Duration int64
-	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
-	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
-	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
-	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
-	func (@"time".d·2 @"time".Duration) String () (? string)
-	type @"time".Month int
-	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
-	type @"time".Weekday int
-	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
-	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
-	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
-	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
-	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
-	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
-	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
-	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
-	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
-	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
-	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
-	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
-	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
-	type @"net".Conn interface { Close() (? error); LocalAddr() (? @"net".Addr); Read(@"net".b []byte) (@"net".n int, @"net".err error); RemoteAddr() (? @"net".Addr); SetDeadline(@"net".t @"time".Time) (? error); SetReadDeadline(@"net".t @"time".Time) (? error); SetWriteDeadline(@"net".t @"time".Time) (? error); Write(@"net".b []byte) (@"net".n int, @"net".err error) }
-	type @""._Ctype_struct_pn_transport_t struct {}
-	type @""._Ctype_struct_pn_collector_t struct {}
-	type @"".bufferChan struct { @"".buffers chan []byte; @"".buf1 []byte; @"".buf2 []byte }
-	func (@"".b·2 *@"".bufferChan) @"".buffer () (? []byte) { @"".b·2.@"".buf1, @"".b·2.@"".buf2 = @"".b·2.@"".buf2, @"".b·2.@"".buf1; return @"".b·2.@"".buf1[:cap(@"".b·2.@"".buf1)] }
-	type @"sync".Once struct { @"sync".m @"sync".Mutex; @"sync".done uint32 }
-	func (@"sync".o·1 *@"sync".Once) Do (@"sync".f·2 func() "esc:0x0")
-	type @"".Pump struct { @"".err @"qpid.apache.org/proton/go/internal".FirstError; @"".inject chan func(); @"".conn @"net".Conn; @"".connection @"".Connection; @"".transport *@""._Ctype_struct_pn_transport_t; @"".collector *@""._Ctype_struct_pn_collector_t; @"".read *@"".bufferChan; @"".write *@"".bufferChan; @"".handlers []@"".EventHandler; @"".running chan struct {}; @"".closeOnce @"sync".Once }
-	func (@"".p·1 *@"".Pump) Close (@"".err·2 error)
-	func (@"".p·2 *@"".Pump "esc:0x1") Connection () (? @"".Connection) { return @"".p·2.@"".connection }
-	func (@"".p·2 *@"".Pump) Error () (? error)
-	func (@"".p·2 *@"".Pump) Id () (? string)
-	func (@"".p·2 *@"".Pump) Inject (@"".f·3 func()) (? error)
-	func (@"".p·2 *@"".Pump) InjectWait (@"".f·3 func()) (@"".err·1 error)
-	func (@"".p·1 *@"".Pump) Run ()
-	func (@"".p·1 *@"".Pump "esc:0x0") Server ()
-	func (@"".p·2 *@"".Pump) String () (? string)
-	func (@"".p·2 *@"".Pump "esc:0x0") @"".handle (@"".e·3 @"".Event) (? error)
-	func (@"".p·1 *@"".Pump "esc:0x0") @"".pop (@"".buf·2 *[]byte)
-	func (@"".p·2 *@"".Pump "esc:0x0") @"".process () (? error)
-	func (@"".p·1 *@"".Pump "esc:0x0") @"".push (@"".buf·2 []byte "esc:0x0")
-	type @""._Ctype_struct_pn_link_t struct {}
-	type @""._Ctype_struct_pn_delivery_t struct {}
-	type @"qpid.apache.org/proton/go/amqp".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"qpid.apache.org/proton/go/amqp".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGr
 oupId(? string); SetGroupSequence(? int32); SetInferred(? bool); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
-	type @""._Ctype_size_t uint64
-	type @""._Ctype_char int8
-	type @""._Ctype_struct___0 struct { @"".size @""._Ctype_size_t; @"".start *@""._Ctype_char }
-	type @"".DeliveryTag struct { @"".pn @""._Ctype_struct___0 }
-	func (@"".t·2 @"".DeliveryTag) String () (? string)
-	type @""._Ctype_struct_pn_disposition_t struct {}
-	type @""._Ctype_struct_pn_condition_t struct {}
-	type @""._Ctype_struct_pn_data_t struct {}
-	type @"".Data struct { @"".pn *@""._Ctype_struct_pn_data_t }
-	func (@"".d·1 @"".Data "esc:0x0") Clear ()
-	func (@"".d·2 @"".Data "esc:0x0") Error () (? error)
-	func (@"".d·1 @"".Data "esc:0x0") Free ()
-	func (@"".d·2 @"".Data "esc:0x2") Pointer () (? @"unsafe".Pointer) { return @"unsafe".Pointer(@"".d·2.@"".pn) }
-	func (@"".d·1 @"".Data "esc:0x0") Rewind ()
-	type @"".Condition struct { @"".pn *@""._Ctype_struct_pn_condition_t }
-	func (@"".c·1 @"".Condition "esc:0x0") Clear ()
-	func (@"".c·2 @"".Condition "esc:0x0") Description () (? string)
-	func (@"".c·2 @"".Condition "esc:0x0") Error () (? error)
-	func (@"".c·2 @"".Condition "esc:0x0") Info () (? @"".Data)
-	func (@"".c·2 @"".Condition "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
-	func (@"".c·2 @"".Condition "esc:0x0") IsRedirect () (? bool)
-	func (@"".c·2 @"".Condition "esc:0x0") IsSet () (? bool)
-	func (@"".c·2 @"".Condition "esc:0x0") Name () (? string)
-	func (@"".c·2 @"".Condition "esc:0x0") RedirectHost () (? string)
-	func (@"".c·2 @"".Condition "esc:0x0") RedirectPort () (? int)
-	func (@"".c·2 @"".Condition "esc:0x0") SetDescription (@"".description·3 string "esc:0x0") (? int)
-	func (@"".c·1 @"".Condition "esc:0x0") SetError (@"".err·2 error)
-	func (@"".c·2 @"".Condition "esc:0x0") SetName (@"".name·3 string "esc:0x0") (? int)
-	type @"".Disposition struct { @"".pn *@""._Ctype_struct_pn_disposition_t }
-	func (@"".d·2 @"".Disposition "esc:0x0") Annotations () (? @"".Data)
-	func (@"".d·2 @"".Disposition "esc:0x0") Condition () (? @"".Condition)
-	func (@"".d·2 @"".Disposition "esc:0x0") Data () (? @"".Data)
-	func (@"".d·2 @"".Disposition "esc:0x0") IsFailed () (? bool)
-	func (@"".d·2 @"".Disposition "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
-	func (@"".d·2 @"".Disposition "esc:0x0") IsUndeliverable () (? bool)
-	func (@"".d·2 @"".Disposition "esc:0x0") SectionNumber () (? uint16)
-	func (@"".d·2 @"".Disposition "esc:0x0") SectionOffset () (? uint64)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetFailed (@"".failed·2 bool)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionNumber (@"".section_number·2 uint16)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionOffset (@"".section_offset·2 uint64)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetUndeliverable (@"".undeliverable·2 bool)
-	func (@"".d·2 @"".Disposition "esc:0x0") Type () (? uint64)
-	type @"".Delivery struct { @"".pn *@""._Ctype_struct_pn_delivery_t }
-	func (@"".d·1 @"".Delivery "esc:0x0") Accept ()
-	func (@"".d·2 @"".Delivery "esc:0x0") Buffered () (? bool)
-	func (@"".d·1 @"".Delivery "esc:0x0") Clear ()
-	func (@"".d·2 @"".Delivery "esc:0x0") Current () (? bool)
-	func (@"".d·1 @"".Delivery "esc:0x0") Dump ()
-	func (@"".d·2 @"".Delivery "esc:0x0") HasMessage () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
-	func (@"".d·2 @"".Delivery "esc:0x0") Link () (? @"".Link)
-	func (@"".d·2 @"".Delivery "esc:0x0") Local () (? @"".Disposition)
-	func (@"".d·2 @"".Delivery "esc:0x0") LocalState () (? uint64)
-	func (@"".delivery·3 @"".Delivery "esc:0x0") Message () (@"".m·1 @"qpid.apache.org/proton/go/amqp".Message, @"".err·2 error)
-	func (@"".d·2 @"".Delivery "esc:0x0") Partial () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Pending () (? uint)
-	func (@"".d·2 @"".Delivery "esc:0x0") Readable () (? bool)
-	func (@"".d·1 @"".Delivery "esc:0x0") Reject ()
-	func (@"".d·1 @"".Delivery "esc:0x0") Release (@"".delivered·2 bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Remote () (? @"".Disposition)
-	func (@"".d·2 @"".Delivery "esc:0x0") RemoteState () (? uint64)
-	func (@"".d·1 @"".Delivery "esc:0x0") Settle ()
-	func (@"".d·1 @"".Delivery "esc:0x0") SettleAs (@"".disposition·2 uint64)
-	func (@"".d·2 @"".Delivery "esc:0x0") Settled () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Tag () (? @"".DeliveryTag)
-	func (@"".d·1 @"".Delivery "esc:0x0") Update (@"".state·2 uint64)
-	func (@"".d·2 @"".Delivery "esc:0x0") Updated () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Writable () (? bool)
-	type @"".State uint8
-	func (@"".s·2 @"".State) Is (@"".bits·3 @"".State) (? bool) { return @"".s·2 & @"".bits·3 != @"".State(0x0) }
-	func (@"".s·2 @"".State) Local () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x7)) }
-	func (@"".s·2 @"".State) Remote () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x38)) }
-	type @""._Ctype_struct_pn_session_t struct {}
-	type @"".Session struct { @"".pn *@""._Ctype_struct_pn_session_t }
-	func (@"".s·1 @"".Session "esc:0x0") Close ()
-	func (@"".s·2 @"".Session "esc:0x0") Condition () (? @"".Condition)
-	func (@"".s·2 @"".Session "esc:0x0") Connection () (? @"".Connection)
-	func (@"".s·2 @"".Session "esc:0x0") Error () (? error)
-	func (@"".s·1 @"".Session "esc:0x0") Free ()
-	func (@"".s·2 @"".Session "esc:0x0") IncomingBytes () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") IncomingCapacity () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") IsNil () (? bool) { return @"".s·2.@"".pn == nil }
-	func (@"".s·2 @"".Session "esc:0x0") Next (@"".state·3 @"".State) (? @"".Session)
-	func (@"".s·1 @"".Session "esc:0x0") Open ()
-	func (@"".s·2 @"".Session "esc:0x0") OutgoingBytes () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") OutgoingWindow () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") Receiver (@"".name·3 string "esc:0x0") (? @"".Link)
-	func (@"".s·2 @"".Session "esc:0x0") RemoteCondition () (? @"".Condition)
-	func (@"".s·2 @"".Session "esc:0x0") Sender (@"".name·3 string "esc:0x0") (? @"".Link)
-	func (@"".s·1 @"".Session "esc:0x0") SetIncomingCapacity (@"".capacity·2 uint)
-	func (@"".s·1 @"".Session "esc:0x0") SetOutgoingWindow (@"".window·2 uint)
-	func (@"".s·2 @"".Session "esc:0x0") State () (? @"".State)
-	func (@"".s·2 @"".Session) String () (? string)
-	type @""._Ctype_struct_pn_terminus_t struct {}
-	type @"".TerminusType uint32
-	func (@"".e·2 @"".TerminusType) String () (? string)
-	type @"".DistributionMode uint32
-	func (@"".e·2 @"".DistributionMode) String () (? string)
-	type @"".Durability uint32
-	func (@"".e·2 @"".Durability) String () (? string)
-	type @"".ExpiryPolicy uint32
-	func (@"".e·2 @"".ExpiryPolicy) String () (? string)
-	type @"".Terminus struct { @"".pn *@""._Ctype_struct_pn_terminus_t }
-	func (@"".t·2 @"".Terminus "esc:0x0") Address () (? string)
-	func (@"".t·2 @"".Terminus "esc:0x0") Capabilities () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") Copy (@"".src·3 @"".Terminus "esc:0x0") (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") Durability () (? @"".Durability)
-	func (@"".t·2 @"".Terminus "esc:0x0") ExpiryPolicy () (? @"".ExpiryPolicy)
-	func (@"".t·2 @"".Terminus "esc:0x0") Filter () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") IsDynamic () (? bool)
-	func (@"".t·2 @"".Terminus "esc:0x0") IsNil () (? bool) { return @"".t·2.@"".pn == nil }
-	func (@"".t·2 @"".Terminus "esc:0x0") Outcomes () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") Properties () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetAddress (@"".address·3 string "esc:0x0") (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetDistributionMode (@"".mode·3 @"".DistributionMode) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetDurability (@"".durability·3 @"".Durability) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetDynamic (@"".dynamic·3 bool) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetExpiryPolicy (@"".policy·3 @"".ExpiryPolicy) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetTimeout (@"".timeout·3 @"time".Duration) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetType (@"".type_·3 @"".TerminusType) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") Timeout () (? @"time".Duration)
-	func (@"".t·2 @"".Terminus "esc:0x0") Type () (? @"".TerminusType)
-	type @"".SndSettleMode uint32
-	func (@"".e·2 @"".SndSettleMode) String () (? string)
-	type @"".RcvSettleMode uint32
-	func (@"".e·2 @"".RcvSettleMode) String () (? string)
-	type @"".Link struct { @"".pn *@""._Ctype_struct_pn_link_t }
-	func (@"".l·2 @"".Link "esc:0x0") Advance () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") Available () (? int)
-	func (@"".l·1 @"".Link "esc:0x0") Close ()
-	func (@"".l·2 @"".Link "esc:0x0") Condition () (? @"".Condition)
-	func (@"".l·2 @"".Link "esc:0x0") Credit () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") Current () (? @"".Delivery)
-	func (@"".l·2 @"".Link "esc:0x0") Delivery (@"".tag·3 string "esc:0x0") (? @"".Delivery)
-	func (@"".l·1 @"".Link "esc:0x0") Detach ()
-	func (@"".l·1 @"".Link "esc:0x0") Drain (@"".credit·2 int)
-	func (@"".l·2 @"".Link "esc:0x0") Drained () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") Draining () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") Error () (? error)
-	func (@"".l·1 @"".Link "esc:0x0") Flow (@"".credit·2 int)
-	func (@"".l·1 @"".Link "esc:0x0") Free ()
-	func (@"".l·2 @"".Link "esc:0x0") IsDrain () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") IsNil () (? bool) { return @"".l·2.@"".pn == nil }
-	func (@"".l·2 @"".Link "esc:0x0") IsReceiver () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") IsSender () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") Name () (? string)
-	func (@"".l·2 @"".Link "esc:0x0") Next (@"".state·3 @"".State) (? @"".Link)
-	func (@"".l·1 @"".Link "esc:0x0") Offered (@"".credit·2 int)
-	func (@"".l·1 @"".Link "esc:0x0") Open ()
-	func (@"".l·2 @"".Link "esc:0x0") Queued () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") RcvSettleMode () (? @"".RcvSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") Recv (@"".buf·3 []byte "esc:0x0") (? int)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteCondition () (? @"".Condition)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteCredit () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteRcvSettleMode () (? @"".RcvSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteSndSettleMode () (? @"".SndSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteSource () (? @"".Terminus)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteTarget () (? @"".Terminus)
-	func (@"".link·3 @"".Link "esc:0x0") Send (@"".m·4 @"qpid.apache.org/proton/go/amqp".Message) (? @"".Delivery, ? error)
-	func (@"".l·2 @"".Link "esc:0x0") SendBytes (@"".bytes·3 []byte "esc:0x0") (? int)
-	func (@"".l·2 @"".Link "esc:0x0") Session () (? @"".Session)
-	func (@"".l·1 @"".Link "esc:0x0") SetDrain (@"".drain·2 bool)
-	func (@"".l·1 @"".Link "esc:0x0") SetRcvSettleMode (@"".mode·2 @"".RcvSettleMode)
-	func (@"".l·1 @"".Link "esc:0x0") SetSndSettleMode (@"".mode·2 @"".SndSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") SndSettleMode () (? @"".SndSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") Source () (? @"".Terminus)
-	func (@"".l·2 @"".Link "esc:0x0") State () (? @"".State)
-	func (@"".l·2 @"".Link "esc:0x0") String () (? string)
-	func (@"".l·2 @"".Link "esc:0x0") Target () (? @"".Terminus)
-	func (@"".l·2 @"".Link "esc:0x0") Unsettled () (? int)
-	type @"".Connection struct { @"".pn *@""._Ctype_struct_pn_connection_t }
-	func (@"".c·1 @"".Connection "esc:0x0") Close ()
-	func (@"".c·2 @"".Connection "esc:0x0") Condition () (? @"".Condition)
-	func (@"".c·2 @"".Connection "esc:0x0") Container () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") DesiredCapabilities () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") Error () (? error)
-	func (@"".c·1 @"".Connection "esc:0x0") Free ()
-	func (@"".c·2 @"".Connection "esc:0x0") Hostname () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
-	func (@"".c·2 @"".Connection "esc:0x0") LinkHead (@"".s·3 @"".State) (? @"".Link)
-	func (@"".c·2 @"".Connection "esc:0x0") Links (@"".state·3 @"".State) (@"".links·1 []@"".Link)
-	func (@"".c·2 @"".Connection "esc:0x0") OfferedCapabilities () (? @"".Data)
-	func (@"".c·1 @"".Connection "esc:0x0") Open ()
-	func (@"".c·2 @"".Connection "esc:0x0") Properties () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") Pump () (? *@"".Pump)
-	func (@"".c·1 @"".Connection "esc:0x0") Release ()
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteCondition () (? @"".Condition)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteContainer () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteDesiredCapabilities () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteHostname () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteOfferedCapabilities () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteProperties () (? @"".Data)
-	func (@"".c·1 @"".Connection "esc:0x0") Reset ()
-	func (@"".c·3 @"".Connection "esc:0x0") Session () (? @"".Session, ? error)
-	func (@"".c·2 @"".Connection "esc:0x0") SessionHead (@"".s·3 @"".State) (? @"".Session)
-	func (@"".c·2 @"".Connection "esc:0x0") Sessions (@"".state·3 @"".State) (@"".sessions·1 []@"".Session)
-	func (@"".c·1 @"".Connection "esc:0x0") SetContainer (@"".container·2 string "esc:0x0")
-	func (@"".c·1 @"".Connection "esc:0x0") SetHostname (@"".hostname·2 string "esc:0x0")
-	func (@"".c·1 @"".Connection "esc:0x0") SetPassword (@"".password·2 string "esc:0x0")
-	func (@"".c·1 @"".Connection "esc:0x0") SetUser (@"".user·2 string "esc:0x0")
-	func (@"".c·2 @"".Connection "esc:0x0") State () (? @"".State)
-	func (@"".c·2 @"".Connection "esc:0x0") String () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") User () (? string)
-	type @"".Event struct { @"".pn *@""._Ctype_struct_pn_event_t; @"".eventType @"".EventType; @"".connection @"".Connection; @"".session @"".Session; @"".link @"".Link; @"".delivery @"".Delivery }
-	func (@"".e·2 @"".Event "esc:0x2") Connection () (? @"".Connection) { return @"".e·2.@"".connection }
-	func (@"".e·2 @"".Event "esc:0x2") Delivery () (? @"".Delivery) { return @"".e·2.@"".delivery }
-	func (@"".e·2 @"".Event "esc:0x0") IsNil () (? bool) { return @"".e·2.@"".eventType == @"".EventType(0x0) }
-	func (@"".e·2 @"".Event "esc:0x2") Link () (? @"".Link) { return @"".e·2.@"".link }
-	func (@"".e·2 @"".Event "esc:0x2") Session () (? @"".Session) { return @"".e·2.@"".session }
-	func (@"".e·2 @"".Event "esc:0x0") String () (? string)
-	func (@"".e·2 @"".Event "esc:0x0") Type () (? @"".EventType) { return @"".e·2.@"".eventType }
-	type @"".EventHandler interface { HandleEvent(@"".e @"".Event) (? error) }
-	type @"".MessagingEventType int
-	func (@"".t·2 @"".MessagingEventType) String () (? string)
-	type @"".MessagingHandler interface { HandleMessagingEvent(? @"".MessagingEventType, ? @"".Event) (? error) }
-	const @"".MStart @"".MessagingEventType = 0x0
-	const @"".MConnectionError @"".MessagingEventType = 0x1
-	const @"".MSessionError @"".MessagingEventType = 0x2
-	const @"".MLinkError @"".MessagingEventType = 0x3
-	const @"".MConnectionOpening @"".MessagingEventType = 0x4
-	const @"".MSessionOpening @"".MessagingEventType = 0x5
-	const @"".MLinkOpening @"".MessagingEventType = 0x6
-	const @"".MConnectionOpened @"".MessagingEventType = 0x7
-	const @"".MSessionOpened @"".MessagingEventType = 0x8
-	const @"".MLinkOpened @"".MessagingEventType = 0x9
-	const @"".MConnectionClosing @"".MessagingEventType = 0xA
-	const @"".MSessionClosing @"".MessagingEventType = 0xB
-	const @"".MLinkClosing @"".MessagingEventType = 0xC
-	const @"".MConnectionClosed @"".MessagingEventType = 0xD
-	const @"".MSessionClosed @"".MessagingEventType = 0xE
-	const @"".MLinkClosed @"".MessagingEventType = 0xF
-	const @"".MConnectionDisconnected @"".MessagingEventType = 0x10
-	const @"".MSessionDisconnected @"".MessagingEventType = 0x11
-	const @"".MLinkDisconnected @"".MessagingEventType = 0x12
-	const @"".MSendable @"".MessagingEventType = 0x13
-	const @"".MAccepted @"".MessagingEventType = 0x14
-	const @"".MRejected @"".MessagingEventType = 0x15
-	const @"".MReleased @"".MessagingEventType = 0x16
-	const @"".MSettled @"".MessagingEventType = 0x17
-	const @"".MMessage @"".MessagingEventType = 0x18
-	const @"".MFinal @"".MessagingEventType = 0x19
-	type @"".Endpoint interface { Close(); Condition() (? @"".Condition); Open(); RemoteCondition() (? @"".Condition); State() (? @"".State); String() (? string) }
-	type @"".endpointDelegator struct { @"".remoteOpen @"".EventType; @"".remoteClose @"".EventType; @"".localOpen @"".EventType; @"".localClose @"".EventType; @"".opening @"".MessagingEventType; @"".opened @"".MessagingEventType; @"".closing @"".MessagingEventType; @"".closed @"".MessagingEventType; @"".error @"".MessagingEventType; @"".endpoint func(? @"".Event) (? @"".Endpoint); @"".delegate @"".MessagingHandler }
-	func (@"".d·2 @"".endpointDelegator) HandleEvent (@"".e·3 @"".Event) (@"".err·1 error)
-	type @"".MessagingDelegator struct { @"".delegate @"".MessagingHandler; @"".connection @"".endpointDelegator; @"".session @"".endpointDelegator; @"".link @"".endpointDelegator; @"".handshaker @"".EventHandler; @"".flowcontroller @"".EventHandler; AutoSettle bool; AutoAccept bool; Prefetch int; PeerCloseError bool }
-	func (@"".d·2 *@"".MessagingDelegator) HandleEvent (@"".e·3 @"".Event) (? error)
-	func (@"".d·2 *@"".MessagingDelegator) @"".incoming (@"".e·3 @"".Event) (@"".err·1 error)
-	func (@"".d·2 *@"".MessagingDelegator) @"".outgoing (@"".e·3 @"".Event) (@"".err·1 error)
-	func @"".NewMessagingDelegator (@"".h·2 @"".MessagingHandler) (? *@"".MessagingDelegator)
-	func @"".NewPump (@"".conn·3 @"net".Conn, @"".handlers·4 ...@"".EventHandler) (? *@"".Pump, ? error)
-	func @"".NewData (@"".p·2 @"unsafe".Pointer "esc:0x2") (? @"".Data) { return (@"".Data{ @"".pn:(*@""._Ctype_struct_pn_data_t)(@"".p·2) }) }
-	const @"".SLocalUninit @"".State = 0x1
-	const @"".SLocalActive = 0x2
-	const @"".SLocalClosed = 0x4
-	const @"".SRemoteUninit = 0x8
-	const @"".SRemoteActive = 0x10
-	const @"".SRemoteClosed = 0x20
-	func @"".CloseError (@"".e·1 @"".Endpoint, @"".err·2 error)
-	const @"".Received uint64 = 0x23
-	const @"".Accepted = 0x24
-	const @"".Rejected = 0x25
-	const @"".Released = 0x26
-	const @"".Modified = 0x27
-	const @"".EConnectionInit @"".EventType = 0x5
-	const @"".EConnectionBound @"".EventType = 0x6
-	const @"".EConnectionUnbound @"".EventType = 0x7
-	const @"".EConnectionLocalOpen @"".EventType = 0x8
-	const @"".EConnectionRemoteOpen @"".EventType = 0x9
-	const @"".EConnectionLocalClose @"".EventType = 0xA
-	const @"".EConnectionRemoteClose @"".EventType = 0xB
-	const @"".EConnectionFinal @"".EventType = 0xC
-	const @"".ESessionInit @"".EventType = 0xD
-	const @"".ESessionLocalOpen @"".EventType = 0xE
-	const @"".ESessionRemoteOpen @"".EventType = 0xF
-	const @"".ESessionLocalClose @"".EventType = 0x10
-	const @"".ESessionRemoteClose @"".EventType = 0x11
-	const @"".ESessionFinal @"".EventType = 0x12
-	const @"".ELinkInit @"".EventType = 0x13
-	const @"".ELinkLocalOpen @"".EventType = 0x14
-	const @"".ELinkRemoteOpen @"".EventType = 0x15
-	const @"".ELinkLocalClose @"".EventType = 0x16
-	const @"".ELinkRemoteClose @"".EventType = 0x17
-	const @"".ELinkLocalDetach @"".EventType = 0x18
-	const @"".ELinkRemoteDetach @"".EventType = 0x19
-	const @"".ELinkFlow @"".EventType = 0x1A
-	const @"".ELinkFinal @"".EventType = 0x1B
-	const @"".EDelivery @"".EventType = 0x1C
-	const @"".ETransport @"".EventType = 0x1D
-	const @"".ETransportAuthenticated @"".EventType = 0x1E
-	const @"".ETransportError @"".EventType = 0x1F
-	const @"".ETransportHeadClosed @"".EventType = 0x20
-	const @"".ETransportTailClosed @"".EventType = 0x21
-	const @"".ETransportClosed @"".EventType = 0x22
-	const @"".PnSndUnsettled @"".SndSettleMode = 0x0
-	const @"".PnSndSettled @"".SndSettleMode = 0x1
-	const @"".PnSndMixed @"".SndSettleMode = 0x2
-	const @"".PnRcvFirst @"".RcvSettleMode = 0x0
-	const @"".PnRcvSecond @"".RcvSettleMode = 0x1
-	const @"".PnUnspecified @"".TerminusType = 0x0
-	const @"".PnSource @"".TerminusType = 0x1
-	const @"".PnTarget @"".TerminusType = 0x2
-	const @"".PnCoordinator @"".TerminusType = 0x3
-	const @"".PnNondurable @"".Durability = 0x0
-	const @"".PnConfiguration @"".Durability = 0x1
-	const @"".PnDeliveries @"".Durability = 0x2
-	const @"".PnExpireWithLink @"".ExpiryPolicy = 0x0
-	const @"".PnExpireWithSession @"".ExpiryPolicy = 0x1
-	const @"".PnExpireWithConnection @"".ExpiryPolicy = 0x2
-	const @"".PnExpireNever @"".ExpiryPolicy = 0x3
-	const @"".PnDistModeUnspecified @"".DistributionMode = 0x0
-	const @"".PnDistModeCopy @"".DistributionMode = 0x1
-	const @"".PnDistModeMove @"".DistributionMode = 0x2
-	func @"".init ()
-	var @"time".months [12]string
-	var @"time".days [7]string
-	var @"time".Local *@"time".Location
-	var @"time".UTC *@"time".Location
-	const @""._Cconst_PN_LOCAL_MASK = 0x7
-	const @""._Cconst_PN_REMOTE_MASK = 0x38
-
-$$
-_go_.6          0           0     0     644     981748    `
-go object linux amd64 go1.4.2 X:precisestack
-
-!
-go13ldruntime/cgo.asyscall.aHqpid.apache.org/proton/go/internal.a@qpid.apache.org/proton/go/amqp.a
-fmt.aio.a
-net.aos.apath.async.areflect.atime.a�""._Cgo_ptr H�\$H�\$� "".~r1&type.unsafe.Pointer"".ptr&type.unsafe.PointerTgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9fhqpid.apache.org/proton/go/event/_obj/_cgo_gotypes.go�"""._Cfunc_CString��dH�%H;aw���H��PH�\$`H��H�$H�H���H�t$H�t$ H�t$H����H��@H��@H�L$HH�T$XH�L$`H�D$@H�L$0H9�}H��H�t$8H�4$H�T$(H�T$H�D$�H�D$`H�\$H��t%H=@sH��H�\$ H�\$hH��P����׉�t���
- 0runtime.morestack_noctxtR.""._cgo_runtime_cmalloc`
-�runtime.memmove�$runtime.panicindex0�"".autotmp_0015type.uintptr"".autotmp_0014type.int"".autotmp_0013Otype.string"".autotmp_0012/type.[]uint8"".autotmp_0011type.int
-"".ppo.type.*[1073741824]uint8"".p_&type.unsafe.Pointer"".~r1 (type.*""._Ctype_char"".stype.string�����$�[0b3Tgclocals·d7e8a62d22b1cde6d92b17a55c33fe8fTgclocals·283619d6755c7337ece602447ba790ff�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�$""._Cfunc_GoString��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�H���H�L$H�D$H�L$(H�D$0H���
- 0runtime.morestack_noctxtp0""._cgo_runtime_gostring~
-00"".~r1type.string"".p(type.*""._Ctype_char0?/`�,4
-?!Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�&""._Cfunc_GoStringN��dH�%H;aw���H�� H�D$8H�D$@H�\$(H�$Hc\$0H�\$H�H���H�L$H�D$H�L$8H�D$@H�� �
- 0runtime.morestack_noctxt�2""._cgo_runtime_gostringn�
-@@"".~r2 type.string"".l$type.""._Ctype_int"".p(type.*""._Ctype_char@I?
p�,D
-I'Tgclocals·6a2e5ab2d393a1bfd331903fbd0fd425Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�""._Cfunc_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN>""._cgo_6c239f814c3a_Cfunc_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0&type.unsafe.Pointer0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/� ""._Cfunc_memcpy��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLB""._cgo_6c239f814c3a_Cfunc_memcpyv:""._cgo_runtime_cgocall_errno�
-@0
-"".r10&type.unsafe.Pointer
-"".p2 *type.""._Ctype_size_t
-"".p1&type.unsafe.Pointer
-"".p0&type.unsafe.Pointer0./P�#!
-BTgclocals·a05343871e6f69ae44bc4db2bd3d1078Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�,""._Cfunc_pn_collector��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^N""._cgo_6c239f814c3a_Cfunc_pn_collector�:""._cgo_runtime_cgocall_errno�
-0
-"".r1Jtype.*""._Ctype_struct_pn_collector_t07/`�,!
-KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_collector_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNX""._cgo_6c239f814c3a_Cfunc_pn_collector_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Jtype.*""._Ctype_struct_pn_collector_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_collector_peek��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_collector_peekv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_event_t
-"".p0Jtype.*""._Ctype_struct_pn_collector_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_collector_pop��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDV""._cgo_6c239f814c3a_Cfunc_pn_collector_popn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Jtype.*""._Ctype_struct_pn_collector_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_condition_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_condition_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�L""._Cfunc_pn_condition_get_description��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLn""._cgo_6c239f814c3a_Cfunc_pn_condition_get_descriptionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_condition_get_name��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL`""._cgo_6c239f814c3a_Cfunc_pn_condition_get_namev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_condition_info��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_condition_infov:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_condition_is_redirect��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDf""._cgo_6c239f814c3a_Cfunc_pn_condition_is_redirectn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_condition_is_set��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_condition_is_setn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_condition_redirect_host��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_6c239f814c3a_Cfunc_pn_condition_redirect_hostv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_condition_redirect_port��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJj""._cgo_6c239f814c3a_Cfunc_pn_condition_redirect_portt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�L""._Cfunc_pn_condition_set_description��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJn""._cgo_6c239f814c3a_Cfunc_pn_condition_set_descriptiont:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_condition_set_name��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJ`""._cgo_6c239f814c3a_Cfunc_pn_condition_set_namet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_connection��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^P""._cgo_6c239f814c3a_Cfunc_pn_connection�:""._cgo_runtime_cgocall_errno�
-0
-"".r1Ltype.*""._Ctype_struct_pn_connection_t07/`�,!
-KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN\""._cgo_6c239f814c3a_Cfunc_pn_connection_closex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_connection_collect��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN`""._cgo_6c239f814c3a_Cfunc_pn_connection_collectx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1Jtype.*""._Ctype_struct_pn_collector_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�B""._Cfunc_pn_connection_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_6c239f814c3a_Cfunc_pn_connection_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�X""._Cfunc_pn_connection_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLz""._cgo_6c239f814c3a_Cfunc_pn_connection_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_connection_errorv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_error_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_connection_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_connection_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�J""._Cfunc_pn_connection_get_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLl""._cgo_6c239f814c3a_Cfunc_pn_connection_get_containerv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_connection_get_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_6c239f814c3a_Cfunc_pn_connection_get_hostnamev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�@""._Cfunc_pn_connection_get_user��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLb""._cgo_6c239f814c3a_Cfunc_pn_connection_get_userv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�X""._Cfunc_pn_connection_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLz""._cgo_6c239f814c3a_Cfunc_pn_connection_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_connection_open��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_connection_openx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_connection_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLf""._cgo_6c239f814c3a_Cfunc_pn_connection_propertiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�>""._Cfunc_pn_connection_release��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN`""._cgo_6c239f814c3a_Cfunc_pn_connection_releasex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�P""._Cfunc_pn_connection_remote_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLr""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�P""._Cfunc_pn_connection_remote_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLr""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_containerv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�f""._Cfunc_pn_connection_remote_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL�""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�N""._Cfunc_pn_connection_remote_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLp""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_hostnamev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�f""._Cfunc_pn_connection_remote_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL�""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�R""._Cfunc_pn_connection_remote_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLt""._cgo_6c239f814c3a_Cfunc_pn_connection_remote_propertiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_reset��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN\""._cgo_6c239f814c3a_Cfunc_pn_connection_resetx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�J""._Cfunc_pn_connection_set_container��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNl""._cgo_6c239f814c3a_Cfunc_pn_connection_set_containerx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_connection_set_hostname��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNj""._cgo_6c239f814c3a_Cfunc_pn_connection_set_hostnamex:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_connection_set_password��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNj""._cgo_6c239f814c3a_Cfunc_pn_connection_set_passwordx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�@""._Cfunc_pn_connection_set_user��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNb""._cgo_6c239f814c3a_Cfunc_pn_connection_set_userx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_connection_state��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJ\""._cgo_6c239f814c3a_Cfunc_pn_connection_statet:""._cgo_runtime_cgocall_errno�
- 0
-"".r12type.""._Ctype_pn_state_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_data_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_6c239f814c3a_Cfunc_pn_data_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_data_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLP""._cgo_6c239f814c3a_Cfunc_pn_data_errorv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_error_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�,""._Cfunc_pn_data_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNN""._cgo_6c239f814c3a_Cfunc_pn_data_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�0""._Cfunc_pn_data_rewind��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNR""._cgo_6c239f814c3a_Cfunc_pn_data_rewindx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�*""._Cfunc_pn_delivery��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLL""._cgo_6c239f814c3a_Cfunc_pn_deliveryv:""._cgo_runtime_cgocall_errno�
-@0
-"".r10Htype.*""._Ctype_struct_pn_delivery_t
-"".p12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_link_t0./P�#!
-BTgclocals·9d50c2650bd14b076465d970d8016122Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�<""._Cfunc_pn_delivery_buffered��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD^""._cgo_6c239f814c3a_Cfunc_pn_delivery_bufferedn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_delivery_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNX""._cgo_6c239f814c3a_Cfunc_pn_delivery_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_current��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_currentn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_delivery_dump��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNV""._cgo_6c239f814c3a_Cfunc_pn_delivery_dumpx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_delivery_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_6c239f814c3a_Cfunc_pn_delivery_linkv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_link_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_delivery_local��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_delivery_localv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ntype.*""._Ctype_struct_pn_disposition_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�B""._Cfunc_pn_delivery_local_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_6c239f814c3a_Cfunc_pn_delivery_local_statev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_partial��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_partialn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_pending��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_delivery_pendingv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1*type.""._Ctype_size_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�<""._Cfunc_pn_delivery_readable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD^""._cgo_6c239f814c3a_Cfunc_pn_delivery_readablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_delivery_remote��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLZ""._cgo_6c239f814c3a_Cfunc_pn_delivery_remotev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ntype.*""._Ctype_struct_pn_disposition_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_delivery_remote_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLf""._cgo_6c239f814c3a_Cfunc_pn_delivery_remote_statev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_delivery_settle��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_delivery_settlex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_settled��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_settledn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_delivery_tag��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^T""._cgo_6c239f814c3a_Cfunc_pn_delivery_tag�:""._cgo_runtime_cgocall_errno�
-00
-"".r12type.""._Ctype_struct___0
-"".p0Htype.*""._Ctype_struct_pn_delivery_t07/`�,!
-KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�8""._Cfunc_pn_delivery_update��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_6c239f814c3a_Cfunc_pn_delivery_updatex:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1.type.""._Ctype_uint64_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_delivery_updated��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_6c239f814c3a_Cfunc_pn_delivery_updatedn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�<""._Cfunc_pn_delivery_writable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD^""._cgo_6c239f814c3a_Cfunc_pn_delivery_writablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�H""._Cfunc_pn_disposition_annotations��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_6c239f814c3a_Cfunc_pn_disposition_annotationsv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_disposition_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLf""._cgo_6c239f814c3a_Cfunc_pn_disposition_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_disposition_data��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_disposition_datav:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_get_section_number��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJx""._cgo_6c239f814c3a_Cfunc_pn_disposition_get_section_numbert:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint32_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_get_section_offset��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLx""._cgo_6c239f814c3a_Cfunc_pn_disposition_get_section_offsetv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�D""._Cfunc_pn_disposition_is_failed��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDf""._cgo_6c239f814c3a_Cfunc_pn_disposition_is_failedn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�R""._Cfunc_pn_disposition_is_undeliverable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDt""._cgo_6c239f814c3a_Cfunc_pn_disposition_is_undeliverablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�F""._Cfunc_pn_disposition_set_failed��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNh""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_failedx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_set_section_number��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNx""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_section_numberx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1.type.""._Ctype_uint32_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�V""._Cfunc_pn_disposition_set_section_offset��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNx""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_section_offsetx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1.type.""._Ctype_uint64_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�T""._Cfunc_pn_disposition_set_undeliverable��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNv""._cgo_6c239f814c3a_Cfunc_pn_disposition_set_undeliverablex:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�	$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_disposition_type��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_disposition_typev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�	#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�"""._Cfunc_pn_dtag��dH�%H;aw���H��H�D$0H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^D""._cgo_6c239f814c3a_Cfunc_pn_dtag�:""._cgo_runtime_cgocall_errno�
-@0
-"".r1 2type.""._Ctype_struct___0
-"".p1*type.""._Ctype_size_t
-"".p0(type.*""._Ctype_char07/`�	,!
-KTgclocals·2ab34f76b7fe498424f2c49491d7ce91Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_event_connection��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_6c239f814c3a_Cfunc_pn_event_connectionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ltype.*""._Ctype_struct_pn_connection_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_event_delivery��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_event_deliveryv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Htype.*""._Ctype_struct_pn_delivery_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_event_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLP""._cgo_6c239f814c3a_Cfunc_pn_event_linkv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_link_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_event_session��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_6c239f814c3a_Cfunc_pn_event_sessionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ftype.*""._Ctype_struct_pn_session_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_event_type��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJP""._cgo_6c239f814c3a_Cfunc_pn_event_typet:""._cgo_runtime_cgocall_errno�
- 0
-"".r1<type.""._Ctype_pn_event_type_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0-/	P�	"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_flowcontroller��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_flowcontrollerv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ftype.*""._Ctype_struct_pn_handler_t
-"".p0$type.""._Ctype_int0./P�	#!
-BTgclocals·8512b64a8c2de1386e17b894ea692148Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�:""._Cfunc_pn_handler_dispatch��dH�%H;aw���H��H�\$8H�\$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN\""._cgo_6c239f814c3a_Cfunc_pn_handler_dispatchx:""._cgo_runtime_cgocall_errno�
-00
-"".r10&type.""._Ctype_void
-"".p2 <type.""._Ctype_pn_event_type_t
-"".p1Btype.*""._Ctype_struct_pn_event_t
-"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
-C
Tgclocals·72c306c66d827d7caa50958774c351b5Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_handler_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNT""._cgo_6c239f814c3a_Cfunc_pn_handler_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_link_advance��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDT""._cgo_6c239f814c3a_Cfunc_pn_link_advancen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_link_t0*/P�
-!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_link_available��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_6c239f814c3a_Cfunc_pn_link_availablet:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
-"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_link_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_6c239f814c3a_Cfunc_pn_link_closex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_link_t0//P�
-$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�6""._Cfunc_pn_link_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_6c239f814c3a_Cfunc_pn_link_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0@type.*""._Ctype_struct_pn_link_t0./P�
-#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�0""._Cfunc_pn_link_credit��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJR""._cgo_6c239f814c3a_Cfunc_pn_link_creditt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
-"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_link_current��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLT""._cgo_6c239f814c3a_Cfunc_pn_link_currentv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Htype.*""._Ctype_struct_pn_delivery_t
-"".p0@type.*""._Ctype_struct_pn_link_t0./P�
-#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�0""._Cfunc_pn_link_detach��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNR""._cgo_6c239f814c3a_Cfunc_pn_link_detachx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_link_t0//P�
-$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�.""._Cfunc_pn_link_drain��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_6c239f814c3a_Cfunc_pn_link_drainx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0//P�
-$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�2""._Cfunc_pn_link_drained��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJT""._cgo_6c239f814c3a_Cfunc_pn_link_drainedt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
-"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/�4""._Cfunc_pn_link_draining��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDV""._cgo_6c239f814c3a_Cfunc_pn_link_drainingn

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[07/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/event/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/wrappers_gen.go b/proton-c/bindings/go/event/wrappers_gen.go
deleted file mode 100644
index 73f0d3b..0000000
--- a/proton-c/bindings/go/event/wrappers_gen.go
+++ /dev/null
@@ -1,732 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-//
-// NOTE: This file was generated by genwrap.go, do not edit it by hand.
-//
-
-package event
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// #include <proton/types.h>
-// #include <proton/event.h>
-// #include <stdlib.h>
-// #include <proton/session.h>
-// #include <proton/link.h>
-// #include <proton/delivery.h>
-// #include <proton/disposition.h>
-// #include <proton/condition.h>
-// #include <proton/terminus.h>
-// #include <proton/connection.h>
-import "C"
-
-type EventType int
-
-const (
-	EConnectionInit         EventType = C.PN_CONNECTION_INIT
-	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
-	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
-	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
-	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
-	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
-	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
-	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
-	ESessionInit            EventType = C.PN_SESSION_INIT
-	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
-	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
-	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
-	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
-	ESessionFinal           EventType = C.PN_SESSION_FINAL
-	ELinkInit               EventType = C.PN_LINK_INIT
-	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
-	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
-	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
-	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
-	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
-	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
-	ELinkFlow               EventType = C.PN_LINK_FLOW
-	ELinkFinal              EventType = C.PN_LINK_FINAL
-	EDelivery               EventType = C.PN_DELIVERY
-	ETransport              EventType = C.PN_TRANSPORT
-	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
-	ETransportError         EventType = C.PN_TRANSPORT_ERROR
-	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
-	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
-	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
-)
-
-func (e EventType) String() string {
-	switch e {
-
-	case C.PN_CONNECTION_INIT:
-		return "ConnectionInit"
-	case C.PN_CONNECTION_BOUND:
-		return "ConnectionBound"
-	case C.PN_CONNECTION_UNBOUND:
-		return "ConnectionUnbound"
-	case C.PN_CONNECTION_LOCAL_OPEN:
-		return "ConnectionLocalOpen"
-	case C.PN_CONNECTION_REMOTE_OPEN:
-		return "ConnectionRemoteOpen"
-	case C.PN_CONNECTION_LOCAL_CLOSE:
-		return "ConnectionLocalClose"
-	case C.PN_CONNECTION_REMOTE_CLOSE:
-		return "ConnectionRemoteClose"
-	case C.PN_CONNECTION_FINAL:
-		return "ConnectionFinal"
-	case C.PN_SESSION_INIT:
-		return "SessionInit"
-	case C.PN_SESSION_LOCAL_OPEN:
-		return "SessionLocalOpen"
-	case C.PN_SESSION_REMOTE_OPEN:
-		return "SessionRemoteOpen"
-	case C.PN_SESSION_LOCAL_CLOSE:
-		return "SessionLocalClose"
-	case C.PN_SESSION_REMOTE_CLOSE:
-		return "SessionRemoteClose"
-	case C.PN_SESSION_FINAL:
-		return "SessionFinal"
-	case C.PN_LINK_INIT:
-		return "LinkInit"
-	case C.PN_LINK_LOCAL_OPEN:
-		return "LinkLocalOpen"
-	case C.PN_LINK_REMOTE_OPEN:
-		return "LinkRemoteOpen"
-	case C.PN_LINK_LOCAL_CLOSE:
-		return "LinkLocalClose"
-	case C.PN_LINK_REMOTE_CLOSE:
-		return "LinkRemoteClose"
-	case C.PN_LINK_LOCAL_DETACH:
-		return "LinkLocalDetach"
-	case C.PN_LINK_REMOTE_DETACH:
-		return "LinkRemoteDetach"
-	case C.PN_LINK_FLOW:
-		return "LinkFlow"
-	case C.PN_LINK_FINAL:
-		return "LinkFinal"
-	case C.PN_DELIVERY:
-		return "Delivery"
-	case C.PN_TRANSPORT:
-		return "Transport"
-	case C.PN_TRANSPORT_AUTHENTICATED:
-		return "TransportAuthenticated"
-	case C.PN_TRANSPORT_ERROR:
-		return "TransportError"
-	case C.PN_TRANSPORT_HEAD_CLOSED:
-		return "TransportHeadClosed"
-	case C.PN_TRANSPORT_TAIL_CLOSED:
-		return "TransportTailClosed"
-	case C.PN_TRANSPORT_CLOSED:
-		return "TransportClosed"
-	}
-	return "Unknown"
-}
-
-// Wrappers for declarations in session.h
-
-type Session struct{ pn *C.pn_session_t }
-
-func (s Session) IsNil() bool { return s.pn == nil }
-func (s Session) Free() {
-	C.pn_session_free(s.pn)
-}
-func (s Session) State() State {
-	return State(C.pn_session_state(s.pn))
-}
-func (s Session) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
-}
-func (s Session) Condition() Condition {
-	return Condition{C.pn_session_condition(s.pn)}
-}
-func (s Session) RemoteCondition() Condition {
-	return Condition{C.pn_session_remote_condition(s.pn)}
-}
-func (s Session) Connection() Connection {
-	return Connection{C.pn_session_connection(s.pn)}
-}
-func (s Session) Open() {
-	C.pn_session_open(s.pn)
-}
-func (s Session) Close() {
-	C.pn_session_close(s.pn)
-}
-func (s Session) IncomingCapacity() uint {
-	return uint(C.pn_session_get_incoming_capacity(s.pn))
-}
-func (s Session) SetIncomingCapacity(capacity uint) {
-	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
-}
-func (s Session) OutgoingBytes() uint {
-	return uint(C.pn_session_outgoing_bytes(s.pn))
-}
-func (s Session) IncomingBytes() uint {
-	return uint(C.pn_session_incoming_bytes(s.pn))
-}
-func (s Session) Next(state State) Session {
-	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
-}
-
-// Wrappers for declarations in link.h
-
-type SndSettleMode C.pn_snd_settle_mode_t
-
-const (
-	PnSndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
-	PnSndSettled   SndSettleMode = C.PN_SND_SETTLED
-	PnSndMixed     SndSettleMode = C.PN_SND_MIXED
-)
-
-func (e SndSettleMode) String() string {
-	switch e {
-
-	case C.PN_SND_UNSETTLED:
-		return "SndUnsettled"
-	case C.PN_SND_SETTLED:
-		return "SndSettled"
-	case C.PN_SND_MIXED:
-		return "SndMixed"
-	}
-	return "unknown"
-}
-
-type RcvSettleMode C.pn_rcv_settle_mode_t
-
-const (
-	PnRcvFirst  RcvSettleMode = C.PN_RCV_FIRST
-	PnRcvSecond RcvSettleMode = C.PN_RCV_SECOND
-)
-
-func (e RcvSettleMode) String() string {
-	switch e {
-
-	case C.PN_RCV_FIRST:
-		return "RcvFirst"
-	case C.PN_RCV_SECOND:
-		return "RcvSecond"
-	}
-	return "unknown"
-}
-
-type Link struct{ pn *C.pn_link_t }
-
-func (l Link) IsNil() bool { return l.pn == nil }
-func (l Link) Free() {
-	C.pn_link_free(l.pn)
-}
-func (l Link) Name() string {
-	return C.GoString(C.pn_link_name(l.pn))
-}
-func (l Link) IsSender() bool {
-	return bool(C.pn_link_is_sender(l.pn))
-}
-func (l Link) IsReceiver() bool {
-	return bool(C.pn_link_is_receiver(l.pn))
-}
-func (l Link) State() State {
-	return State(C.pn_link_state(l.pn))
-}
-func (l Link) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
-}
-func (l Link) Condition() Condition {
-	return Condition{C.pn_link_condition(l.pn)}
-}
-func (l Link) RemoteCondition() Condition {
-	return Condition{C.pn_link_remote_condition(l.pn)}
-}
-func (l Link) Session() Session {
-	return Session{C.pn_link_session(l.pn)}
-}
-func (l Link) Next(state State) Link {
-	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
-}
-func (l Link) Open() {
-	C.pn_link_open(l.pn)
-}
-func (l Link) Close() {
-	C.pn_link_close(l.pn)
-}
-func (l Link) Detach() {
-	C.pn_link_detach(l.pn)
-}
-func (l Link) Source() Terminus {
-	return Terminus{C.pn_link_source(l.pn)}
-}
-func (l Link) Target() Terminus {
-	return Terminus{C.pn_link_target(l.pn)}
-}
-func (l Link) RemoteSource() Terminus {
-	return Terminus{C.pn_link_remote_source(l.pn)}
-}
-func (l Link) RemoteTarget() Terminus {
-	return Terminus{C.pn_link_remote_target(l.pn)}
-}
-func (l Link) Current() Delivery {
-	return Delivery{C.pn_link_current(l.pn)}
-}
-func (l Link) Advance() bool {
-	return bool(C.pn_link_advance(l.pn))
-}
-func (l Link) Credit() int {
-	return int(C.pn_link_credit(l.pn))
-}
-func (l Link) Queued() int {
-	return int(C.pn_link_queued(l.pn))
-}
-func (l Link) RemoteCredit() int {
-	return int(C.pn_link_remote_credit(l.pn))
-}
-func (l Link) IsDrain() bool {
-	return bool(C.pn_link_get_drain(l.pn))
-}
-func (l Link) Drained() int {
-	return int(C.pn_link_drained(l.pn))
-}
-func (l Link) Available() int {
-	return int(C.pn_link_available(l.pn))
-}
-func (l Link) SndSettleMode() SndSettleMode {
-	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
-}
-func (l Link) RcvSettleMode() RcvSettleMode {
-	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
-}
-func (l Link) SetSndSettleMode(mode SndSettleMode) {
-	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
-}
-func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
-	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
-}
-func (l Link) RemoteSndSettleMode() SndSettleMode {
-	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
-}
-func (l Link) RemoteRcvSettleMode() RcvSettleMode {
-	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
-}
-func (l Link) Unsettled() int {
-	return int(C.pn_link_unsettled(l.pn))
-}
-func (l Link) Offered(credit int) {
-	C.pn_link_offered(l.pn, C.int(credit))
-}
-func (l Link) Flow(credit int) {
-	C.pn_link_flow(l.pn, C.int(credit))
-}
-func (l Link) Drain(credit int) {
-	C.pn_link_drain(l.pn, C.int(credit))
-}
-func (l Link) SetDrain(drain bool) {
-	C.pn_link_set_drain(l.pn, C.bool(drain))
-}
-func (l Link) Draining() bool {
-	return bool(C.pn_link_draining(l.pn))
-}
-
-// Wrappers for declarations in delivery.h
-
-type Delivery struct{ pn *C.pn_delivery_t }
-
-func (d Delivery) IsNil() bool { return d.pn == nil }
-func (d Delivery) Tag() DeliveryTag {
-	return DeliveryTag{C.pn_delivery_tag(d.pn)}
-}
-func (d Delivery) Link() Link {
-	return Link{C.pn_delivery_link(d.pn)}
-}
-func (d Delivery) Local() Disposition {
-	return Disposition{C.pn_delivery_local(d.pn)}
-}
-func (d Delivery) LocalState() uint64 {
-	return uint64(C.pn_delivery_local_state(d.pn))
-}
-func (d Delivery) Remote() Disposition {
-	return Disposition{C.pn_delivery_remote(d.pn)}
-}
-func (d Delivery) RemoteState() uint64 {
-	return uint64(C.pn_delivery_remote_state(d.pn))
-}
-func (d Delivery) Settled() bool {
-	return bool(C.pn_delivery_settled(d.pn))
-}
-func (d Delivery) Pending() uint {
-	return uint(C.pn_delivery_pending(d.pn))
-}
-func (d Delivery) Partial() bool {
-	return bool(C.pn_delivery_partial(d.pn))
-}
-func (d Delivery) Writable() bool {
-	return bool(C.pn_delivery_writable(d.pn))
-}
-func (d Delivery) Readable() bool {
-	return bool(C.pn_delivery_readable(d.pn))
-}
-func (d Delivery) Updated() bool {
-	return bool(C.pn_delivery_updated(d.pn))
-}
-func (d Delivery) Update(state uint64) {
-	C.pn_delivery_update(d.pn, C.uint64_t(state))
-}
-func (d Delivery) Clear() {
-	C.pn_delivery_clear(d.pn)
-}
-func (d Delivery) Current() bool {
-	return bool(C.pn_delivery_current(d.pn))
-}
-func (d Delivery) Settle() {
-	C.pn_delivery_settle(d.pn)
-}
-func (d Delivery) Dump() {
-	C.pn_delivery_dump(d.pn)
-}
-func (d Delivery) Buffered() bool {
-	return bool(C.pn_delivery_buffered(d.pn))
-}
-
-// Wrappers for declarations in disposition.h
-
-type Disposition struct{ pn *C.pn_disposition_t }
-
-func (d Disposition) IsNil() bool { return d.pn == nil }
-func (d Disposition) Type() uint64 {
-	return uint64(C.pn_disposition_type(d.pn))
-}
-func (d Disposition) Condition() Condition {
-	return Condition{C.pn_disposition_condition(d.pn)}
-}
-func (d Disposition) Data() Data {
-	return Data{C.pn_disposition_data(d.pn)}
-}
-func (d Disposition) SectionNumber() uint16 {
-	return uint16(C.pn_disposition_get_section_number(d.pn))
-}
-func (d Disposition) SetSectionNumber(section_number uint16) {
-	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
-}
-func (d Disposition) SectionOffset() uint64 {
-	return uint64(C.pn_disposition_get_section_offset(d.pn))
-}
-func (d Disposition) SetSectionOffset(section_offset uint64) {
-	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
-}
-func (d Disposition) IsFailed() bool {
-	return bool(C.pn_disposition_is_failed(d.pn))
-}
-func (d Disposition) SetFailed(failed bool) {
-	C.pn_disposition_set_failed(d.pn, C.bool(failed))
-}
-func (d Disposition) IsUndeliverable() bool {
-	return bool(C.pn_disposition_is_undeliverable(d.pn))
-}
-func (d Disposition) SetUndeliverable(undeliverable bool) {
-	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
-}
-func (d Disposition) Annotations() Data {
-	return Data{C.pn_disposition_annotations(d.pn)}
-}
-
-// Wrappers for declarations in condition.h
-
-type Condition struct{ pn *C.pn_condition_t }
-
-func (c Condition) IsNil() bool { return c.pn == nil }
-func (c Condition) IsSet() bool {
-	return bool(C.pn_condition_is_set(c.pn))
-}
-func (c Condition) Clear() {
-	C.pn_condition_clear(c.pn)
-}
-func (c Condition) Name() string {
-	return C.GoString(C.pn_condition_get_name(c.pn))
-}
-func (c Condition) SetName(name string) int {
-	nameC := C.CString(name)
-	defer C.free(unsafe.Pointer(nameC))
-
-	return int(C.pn_condition_set_name(c.pn, nameC))
-}
-func (c Condition) Description() string {
-	return C.GoString(C.pn_condition_get_description(c.pn))
-}
-func (c Condition) SetDescription(description string) int {
-	descriptionC := C.CString(description)
-	defer C.free(unsafe.Pointer(descriptionC))
-
-	return int(C.pn_condition_set_description(c.pn, descriptionC))
-}
-func (c Condition) Info() Data {
-	return Data{C.pn_condition_info(c.pn)}
-}
-func (c Condition) IsRedirect() bool {
-	return bool(C.pn_condition_is_redirect(c.pn))
-}
-func (c Condition) RedirectHost() string {
-	return C.GoString(C.pn_condition_redirect_host(c.pn))
-}
-func (c Condition) RedirectPort() int {
-	return int(C.pn_condition_redirect_port(c.pn))
-}
-
-// Wrappers for declarations in terminus.h
-
-type TerminusType C.pn_terminus_type_t
-
-const (
-	PnUnspecified TerminusType = C.PN_UNSPECIFIED
-	PnSource      TerminusType = C.PN_SOURCE
-	PnTarget      TerminusType = C.PN_TARGET
-	PnCoordinator TerminusType = C.PN_COORDINATOR
-)
-
-func (e TerminusType) String() string {
-	switch e {
-
-	case C.PN_UNSPECIFIED:
-		return "Unspecified"
-	case C.PN_SOURCE:
-		return "Source"
-	case C.PN_TARGET:
-		return "Target"
-	case C.PN_COORDINATOR:
-		return "Coordinator"
-	}
-	return "unknown"
-}
-
-type Durability C.pn_durability_t
-
-const (
-	PnNondurable    Durability = C.PN_NONDURABLE
-	PnConfiguration Durability = C.PN_CONFIGURATION
-	PnDeliveries    Durability = C.PN_DELIVERIES
-)
-
-func (e Durability) String() string {
-	switch e {
-
-	case C.PN_NONDURABLE:
-		return "Nondurable"
-	case C.PN_CONFIGURATION:
-		return "Configuration"
-	case C.PN_DELIVERIES:
-		return "Deliveries"
-	}
-	return "unknown"
-}
-
-type ExpiryPolicy C.pn_expiry_policy_t
-
-const (
-	PnExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
-	PnExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
-	PnExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
-	PnExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
-)
-
-func (e ExpiryPolicy) String() string {
-	switch e {
-
-	case C.PN_EXPIRE_WITH_LINK:
-		return "ExpireWithLink"
-	case C.PN_EXPIRE_WITH_SESSION:
-		return "ExpireWithSession"
-	case C.PN_EXPIRE_WITH_CONNECTION:
-		return "ExpireWithConnection"
-	case C.PN_EXPIRE_NEVER:
-		return "ExpireNever"
-	}
-	return "unknown"
-}
-
-type DistributionMode C.pn_distribution_mode_t
-
-const (
-	PnDistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
-	PnDistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
-	PnDistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
-)
-
-func (e DistributionMode) String() string {
-	switch e {
-
-	case C.PN_DIST_MODE_UNSPECIFIED:
-		return "DistModeUnspecified"
-	case C.PN_DIST_MODE_COPY:
-		return "DistModeCopy"
-	case C.PN_DIST_MODE_MOVE:
-		return "DistModeMove"
-	}
-	return "unknown"
-}
-
-type Terminus struct{ pn *C.pn_terminus_t }
-
-func (t Terminus) IsNil() bool { return t.pn == nil }
-func (t Terminus) Type() TerminusType {
-	return TerminusType(C.pn_terminus_get_type(t.pn))
-}
-func (t Terminus) SetType(type_ TerminusType) int {
-	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
-}
-func (t Terminus) Address() string {
-	return C.GoString(C.pn_terminus_get_address(t.pn))
-}
-func (t Terminus) SetAddress(address string) int {
-	addressC := C.CString(address)
-	defer C.free(unsafe.Pointer(addressC))
-
-	return int(C.pn_terminus_set_address(t.pn, addressC))
-}
-func (t Terminus) SetDistributionMode(mode DistributionMode) int {
-	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
-}
-func (t Terminus) Durability() Durability {
-	return Durability(C.pn_terminus_get_durability(t.pn))
-}
-func (t Terminus) SetDurability(durability Durability) int {
-	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
-}
-func (t Terminus) ExpiryPolicy() ExpiryPolicy {
-	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
-}
-func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
-	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
-}
-func (t Terminus) Timeout() time.Duration {
-	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
-}
-func (t Terminus) SetTimeout(timeout time.Duration) int {
-	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
-}
-func (t Terminus) IsDynamic() bool {
-	return bool(C.pn_terminus_is_dynamic(t.pn))
-}
-func (t Terminus) SetDynamic(dynamic bool) int {
-	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
-}
-func (t Terminus) Properties() Data {
-	return Data{C.pn_terminus_properties(t.pn)}
-}
-func (t Terminus) Capabilities() Data {
-	return Data{C.pn_terminus_capabilities(t.pn)}
-}
-func (t Terminus) Outcomes() Data {
-	return Data{C.pn_terminus_outcomes(t.pn)}
-}
-func (t Terminus) Filter() Data {
-	return Data{C.pn_terminus_filter(t.pn)}
-}
-func (t Terminus) Copy(src Terminus) int {
-	return int(C.pn_terminus_copy(t.pn, src.pn))
-}
-
-// Wrappers for declarations in connection.h
-
-type Connection struct{ pn *C.pn_connection_t }
-
-func (c Connection) IsNil() bool { return c.pn == nil }
-func (c Connection) Free() {
-	C.pn_connection_free(c.pn)
-}
-func (c Connection) Release() {
-	C.pn_connection_release(c.pn)
-}
-func (c Connection) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
-}
-func (c Connection) State() State {
-	return State(C.pn_connection_state(c.pn))
-}
-func (c Connection) Open() {
-	C.pn_connection_open(c.pn)
-}
-func (c Connection) Close() {
-	C.pn_connection_close(c.pn)
-}
-func (c Connection) Reset() {
-	C.pn_connection_reset(c.pn)
-}
-func (c Connection) Condition() Condition {
-	return Condition{C.pn_connection_condition(c.pn)}
-}
-func (c Connection) RemoteCondition() Condition {
-	return Condition{C.pn_connection_remote_condition(c.pn)}
-}
-func (c Connection) Container() string {
-	return C.GoString(C.pn_connection_get_container(c.pn))
-}
-func (c Connection) SetContainer(container string) {
-	containerC := C.CString(container)
-	defer C.free(unsafe.Pointer(containerC))
-
-	C.pn_connection_set_container(c.pn, containerC)
-}
-func (c Connection) SetUser(user string) {
-	userC := C.CString(user)
-	defer C.free(unsafe.Pointer(userC))
-
-	C.pn_connection_set_user(c.pn, userC)
-}
-func (c Connection) SetPassword(password string) {
-	passwordC := C.CString(password)
-	defer C.free(unsafe.Pointer(passwordC))
-
-	C.pn_connection_set_password(c.pn, passwordC)
-}
-func (c Connection) User() string {
-	return C.GoString(C.pn_connection_get_user(c.pn))
-}
-func (c Connection) Hostname() string {
-	return C.GoString(C.pn_connection_get_hostname(c.pn))
-}
-func (c Connection) SetHostname(hostname string) {
-	hostnameC := C.CString(hostname)
-	defer C.free(unsafe.Pointer(hostnameC))
-
-	C.pn_connection_set_hostname(c.pn, hostnameC)
-}
-func (c Connection) RemoteContainer() string {
-	return C.GoString(C.pn_connection_remote_container(c.pn))
-}
-func (c Connection) RemoteHostname() string {
-	return C.GoString(C.pn_connection_remote_hostname(c.pn))
-}
-func (c Connection) OfferedCapabilities() Data {
-	return Data{C.pn_connection_offered_capabilities(c.pn)}
-}
-func (c Connection) DesiredCapabilities() Data {
-	return Data{C.pn_connection_desired_capabilities(c.pn)}
-}
-func (c Connection) Properties() Data {
-	return Data{C.pn_connection_properties(c.pn)}
-}
-func (c Connection) RemoteOfferedCapabilities() Data {
-	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
-}
-func (c Connection) RemoteDesiredCapabilities() Data {
-	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
-}
-func (c Connection) RemoteProperties() Data {
-	return Data{C.pn_connection_remote_properties(c.pn)}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/internal/error.go b/proton-c/bindings/go/internal/error.go
deleted file mode 100644
index 01ba890..0000000
--- a/proton-c/bindings/go/internal/error.go
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Internal implementation details - ignore.
-package internal
-
-// #cgo LDFLAGS: -lqpid-proton
-// #include <proton/error.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"fmt"
-	"runtime"
-	"sync"
-	"sync/atomic"
-	"unsafe"
-)
-
-// Error type for all proton errors.
-type Error string
-
-// Error prefixes error message with proton:
-func (e Error) Error() string {
-	return "proton: " + string(e)
-}
-
-// Errorf creates an Error with a formatted message
-func Errorf(format string, a ...interface{}) Error {
-	return Error(fmt.Sprintf(format, a...))
-}
-
-type PnErrorCode int
-
-func (e PnErrorCode) String() string {
-	switch e {
-	case C.PN_EOS:
-		return "end-of-data"
-	case C.PN_ERR:
-		return "error"
-	case C.PN_OVERFLOW:
-		return "overflow"
-	case C.PN_UNDERFLOW:
-		return "underflow"
-	case C.PN_STATE_ERR:
-		return "bad-state"
-	case C.PN_ARG_ERR:
-		return "invalid-argument"
-	case C.PN_TIMEOUT:
-		return "timeout"
-	case C.PN_INTR:
-		return "interrupted"
-	case C.PN_INPROGRESS:
-		return "in-progress"
-	default:
-		return fmt.Sprintf("unknown-error(%d)", e)
-	}
-}
-
-func PnError(p unsafe.Pointer) error {
-	e := (*C.pn_error_t)(p)
-	if e == nil || C.pn_error_code(e) == 0 {
-		return nil
-	}
-	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
-}
-
-// DoRecover is called to recover from internal panics
-func DoRecover(err *error) {
-	r := recover()
-	switch r := r.(type) {
-	case nil: // We are not recovering
-		return
-	case runtime.Error: // Don't catch runtime.Error
-		panic(r)
-	case error:
-		*err = r
-	default:
-		panic(r)
-	}
-}
-
-// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
-func panicIf(condition bool, fmt string, args ...interface{}) {
-	if condition {
-		panic(Errorf(fmt, args...))
-	}
-}
-
-// FirstError is a goroutine-safe error holder that keeps the first error that is set.
-type FirstError struct {
-	err  atomic.Value
-	once sync.Once
-}
-
-// Set the error if not allread set.
-func (e *FirstError) Set(err error) {
-	e.once.Do(func() { e.err.Store(err) })
-}
-
-// Get the error.
-func (e *FirstError) Get() error {
-	v := e.err.Load()
-	if v != nil {
-		return v.(error)
-	} else {
-		return nil
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/messaging/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/messaging/doc.go b/proton-c/bindings/go/messaging/doc.go
deleted file mode 100644
index c815f4e..0000000
--- a/proton-c/bindings/go/messaging/doc.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package messaging provides a procedural, concurrent Go API for exchanging AMQP messages.
-*/
-package messaging
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/messaging/handler.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/messaging/handler.go b/proton-c/bindings/go/messaging/handler.go
deleted file mode 100644
index 4a97b9d..0000000
--- a/proton-c/bindings/go/messaging/handler.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package messaging
-
-import (
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-)
-
-// FIXME aconway 2015-04-28: cleanup - exposing delivery vs. disposition.
-
-type acksMap map[event.Delivery]chan Disposition
-type receiverMap map[event.Link]chan amqp.Message
-
-type handler struct {
-	connection *Connection
-	acks       acksMap
-	receivers  receiverMap
-}
-
-func newHandler(c *Connection) *handler {
-	return &handler{c, make(acksMap), make(receiverMap)}
-}
-
-func (h *handler) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
-	switch t {
-	// FIXME aconway 2015-04-29: handle errors.
-	case event.MConnectionClosed:
-		for _, ack := range h.acks {
-			// FIXME aconway 2015-04-29: communicate error info
-			close(ack)
-		}
-
-	case event.MSettled:
-		ack := h.acks[e.Delivery()]
-		if ack != nil {
-			ack <- Disposition(e.Delivery().Remote().Type())
-			close(ack)
-			delete(h.acks, e.Delivery())
-		}
-
-	case event.MMessage:
-		r := h.receivers[e.Link()]
-		if r != nil {
-			m, _ := event.DecodeMessage(e)
-			// FIXME aconway 2015-04-29: hack, direct send, possible blocking.
-			r <- m
-		} else {
-			// FIXME aconway 2015-04-29: Message with no receiver - log? panic? deadletter? drop?
-		}
-	}
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/messaging/messaging.go b/proton-c/bindings/go/messaging/messaging.go
deleted file mode 100644
index e653de2..0000000
--- a/proton-c/bindings/go/messaging/messaging.go
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package messaging
-
-// #include <proton/disposition.h>
-import "C"
-
-import (
-	"net"
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-)
-
-// Connection is a connection to a remote AMQP endpoint.
-//
-// You can set exported fields to configure the connection before calling
-// Connection.Open()
-//
-type Connection struct {
-	// Server = true means a the connection will do automatic protocol detection.
-	Server bool
-
-	// FIXME aconway 2015-04-17: Other parameters to set up SSL, SASL etc.
-
-	handler *handler
-	pump    *event.Pump
-	session Session
-}
-
-// Make an AMQP connection over a net.Conn connection.
-//
-// Use Connection.Close() to close the Connection, this will also close conn.
-// Using conn.Close() directly will cause an abrupt disconnect rather than an
-// orderly AMQP close.
-//
-func (c *Connection) Open(conn net.Conn) (err error) {
-	c.handler = newHandler(c)
-	c.pump, err = event.NewPump(conn,
-		event.NewMessagingDelegator(c.handler),
-	)
-	if err != nil {
-		return err
-	}
-	if c.Server {
-		c.pump.Server()
-	}
-	go c.pump.Run()
-	return nil
-}
-
-// Connect opens a default client connection. It is a shortcut for
-//    c := &Connection
-//    c.Open()
-//
-func Connect(conn net.Conn) (*Connection, error) {
-	c := &Connection{}
-	err := c.Open(conn)
-	return c, err
-}
-
-// Close the connection.
-//
-// Connections must be closed to clean up resources and stop associated goroutines.
-func (c *Connection) Close() error { return c.pump.Close() }
-
-// DefaultSession returns a default session for the connection.
-//
-// It is created on the first call to DefaultSession() and returned from all subsequent calls.
-// Use Session() for more control over creating sessions.
-//
-func (c *Connection) DefaultSession() (s Session, err error) {
-	if c.session.e.IsNil() {
-		c.session, err = c.Session()
-	}
-	return c.session, err
-}
-
-type sessionErr struct {
-	s   event.Session
-	err error
-}
-
-// Session creates a new session.
-func (c *Connection) Session() (Session, error) {
-	connection := c.pump.Connection()
-	result := make(chan sessionErr)
-	c.pump.Inject <- func() {
-		s, err := connection.Session()
-		if err == nil {
-			s.Open()
-		}
-		result <- sessionErr{s, err}
-	}
-	se := <-result
-	return Session{se.s, c.pump}, se.err
-}
-
-// FIXME aconway 2015-04-27: set sender name, options etc.
-
-// Sender creates a Sender that will send messages to the address addr.
-func (c *Connection) Sender(addr string) (s Sender, err error) {
-	session, err := c.DefaultSession()
-	if err != nil {
-		return Sender{}, err
-	}
-	result := make(chan Sender)
-	c.pump.Inject <- func() {
-		link := session.e.Sender(linkNames.Next())
-		if link.IsNil() {
-			err = session.e.Error()
-		} else {
-			link.Target().SetAddress(addr)
-			// FIXME aconway 2015-04-27: link options?
-			link.Open()
-		}
-		result <- Sender{Link{c, link}}
-	}
-	return <-result, err
-}
-
-// Receiver returns a receiver that will receive messages sent to address addr.
-func (c *Connection) Receiver(addr string) (r Receiver, err error) {
-	// FIXME aconway 2015-04-29: move code to session, in link.go?
-	session, err := c.DefaultSession()
-	if err != nil {
-		return Receiver{}, err
-	}
-	result := make(chan Receiver)
-	c.pump.Inject <- func() {
-		link := session.e.Receiver(linkNames.Next())
-		if link.IsNil() {
-			err = session.e.Error()
-		} else {
-			link.Source().SetAddress(addr)
-			// FIXME aconway 2015-04-27: link options?
-			link.Open()
-		}
-		// FIXME aconway 2015-04-29: hack to avoid blocking, need proper buffering linked to flow control
-		rchan := make(chan amqp.Message, 1000)
-		c.handler.receivers[link] = rchan
-		result <- Receiver{Link{c, link}, rchan}
-	}
-	return <-result, err
-}
-
-// FIXME aconway 2015-04-29: counter per session.
-var linkNames amqp.UidCounter
-
-// Session is an AMQP session, it contains Senders and Receivers.
-// Every Connection has a DefaultSession, you can create additional sessions
-// with Connection.Session()
-type Session struct {
-	e    event.Session
-	pump *event.Pump
-}
-
-// FIXME aconway 2015-05-05: REWORK Sender/receiver/session.
-
-// Disposition indicates the outcome of a settled message delivery.
-type Disposition uint64
-
-const (
-	// Message was accepted by the receiver
-	Accepted Disposition = C.PN_ACCEPTED
-	// Message was rejected as invalid by the receiver
-	Rejected = C.PN_REJECTED
-	// Message was not processed by the receiver but may be processed by some other receiver.
-	Released = C.PN_RELEASED
-)
-
-// String human readable name for a Disposition.
-func (d Disposition) String() string {
-	switch d {
-	case Accepted:
-		return "Accepted"
-	case Rejected:
-		return "Rejected"
-	case Released:
-		return "Released"
-	default:
-		return "Unknown"
-	}
-}
-
-// FIXME aconway 2015-04-29: How to signal errors via ack channels.
-
-// An Acknowledgement is a channel which will receive the Disposition of the message
-// when it is acknowledged. The channel is closed after the disposition is sent.
-type Acknowledgement <-chan Disposition
-
-// Link has common data and methods for Sender and Receiver links.
-type Link struct {
-	connection *Connection
-	elink      event.Link
-}
-
-// Sender sends messages.
-type Sender struct {
-	Link
-}
-
-// FIXME aconway 2015-04-28: allow user to specify delivery tag.
-// FIXME aconway 2015-04-28: should we provide a sending channel rather than a send function?
-
-// Send sends a message. If d is not nil, the disposition is retured on d.
-// If d is nil the message is sent pre-settled and no disposition is returned.
-func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
-	ackChan := make(chan Disposition, 1)
-	ack = ackChan
-	s.connection.pump.Inject <- func() {
-		// FIXME aconway 2015-04-28: flow control & credit, buffer or fail?
-		delivery, err := s.elink.Send(m)
-		if err == nil { // FIXME aconway 2015-04-28: error handling
-			s.connection.handler.acks[delivery] = ackChan
-		}
-	}
-	return ack, nil
-}
-
-// Close the sender.
-func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
-
-// Receiver receives messages via the channel Receive.
-type Receiver struct {
-	Link
-	// Channel of messag
-	Receive <-chan amqp.Message
-}
-
-// FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
-
-// Close the Receiver.
-func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[35/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
PROTON-827: Concurrent Go API for proton.

Provide a simple concurrent-safe, blocking API for proton.
See the qpid.apache.org/proton/concurrent package documentation for details.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/7b880b88
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/7b880b88
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/7b880b88

Branch: refs/heads/master
Commit: 7b880b88236fe5eecbae268b77e4bcdcface80f7
Parents: 32487f0
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Sep 8 13:33:57 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:19:57 2015 -0400

----------------------------------------------------------------------
 .gitignore                                      |    4 +
 examples/go/CMakeLists.txt                      |   20 +-
 examples/go/README.md                           |   15 +-
 examples/go/broker.go                           |  161 +
 examples/go/example_test.go                     |  149 +-
 examples/go/receive.go                          |   93 +-
 examples/go/send.go                             |  105 +-
 examples/go/util/queue.go                       |  106 +
 examples/go/util/util.go                        |   69 +
 proton-c/bindings/go/CMakeLists.txt             |   45 +-
 proton-c/bindings/go/README.md                  |   97 +-
 proton-c/bindings/go/genwrap.go                 |   28 +-
 .../qpid.apache.org/proton/go/amqp.a            | 1726 ---------
 .../qpid.apache.org/proton/go/event.a           | 3318 -----------------
 .../qpid.apache.org/proton/go/internal.a        |  Bin 102074 -> 0 bytes
 .../qpid.apache.org/proton/go/messaging.a       | 1100 ------
 .../qpid.apache.org/proton/go/reactor.a         | 3319 ------------------
 .../go/src/qpid.apache.org/proton/amqp/doc.go   |   34 +
 .../go/src/qpid.apache.org/proton/amqp/error.go |   66 +
 .../go/src/qpid.apache.org/proton/amqp/interop  |    1 +
 .../qpid.apache.org/proton/amqp/interop_test.go |  381 ++
 .../src/qpid.apache.org/proton/amqp/marshal.go  |  250 ++
 .../src/qpid.apache.org/proton/amqp/message.go  |  347 ++
 .../qpid.apache.org/proton/amqp/message_test.go |  166 +
 .../go/src/qpid.apache.org/proton/amqp/types.go |  198 ++
 .../qpid.apache.org/proton/amqp/unmarshal.go    |  556 +++
 .../go/src/qpid.apache.org/proton/amqp/url.go   |   96 +
 .../src/qpid.apache.org/proton/amqp/url_test.go |   51 +
 .../proton/concurrent/connection.go             |  167 +
 .../proton/concurrent/container.go              |   71 +
 .../qpid.apache.org/proton/concurrent/doc.go    |   38 +
 .../proton/concurrent/endpoint.go               |   86 +
 .../proton/concurrent/handler.go                |  137 +
 .../qpid.apache.org/proton/concurrent/link.go   |  232 ++
 .../proton/concurrent/messaging_test.go         |  205 ++
 .../proton/concurrent/receiver.go               |  242 ++
 .../qpid.apache.org/proton/concurrent/sender.go |  190 +
 .../proton/concurrent/session.go                |  115 +
 .../qpid.apache.org/proton/concurrent/time.go   |   71 +
 .../go/src/qpid.apache.org/proton/doc.go        |   46 +
 .../go/src/qpid.apache.org/proton/engine.go     |  402 +++
 .../src/qpid.apache.org/proton/go/amqp/doc.go   |   40 -
 .../src/qpid.apache.org/proton/go/amqp/interop  |    1 -
 .../proton/go/amqp/interop_test.go              |  308 --
 .../qpid.apache.org/proton/go/amqp/marshal.go   |  238 --
 .../qpid.apache.org/proton/go/amqp/message.go   |  342 --
 .../proton/go/amqp/message_test.go              |   90 -
 .../src/qpid.apache.org/proton/go/amqp/types.go |  193 -
 .../src/qpid.apache.org/proton/go/amqp/uid.go   |   40 -
 .../qpid.apache.org/proton/go/amqp/unmarshal.go |  552 ---
 .../src/qpid.apache.org/proton/go/amqp/url.go   |   96 -
 .../qpid.apache.org/proton/go/amqp/url_test.go  |   51 -
 .../src/qpid.apache.org/proton/go/event/doc.go  |   38 -
 .../qpid.apache.org/proton/go/event/handlers.go |  411 ---
 .../qpid.apache.org/proton/go/event/message.go  |   75 -
 .../src/qpid.apache.org/proton/go/event/pump.go |  360 --
 .../qpid.apache.org/proton/go/event/wrappers.go |  253 --
 .../proton/go/event/wrappers_gen.go             |  732 ----
 .../qpid.apache.org/proton/go/internal/error.go |  126 -
 .../qpid.apache.org/proton/go/messaging/doc.go  |   28 -
 .../proton/go/messaging/handler.go              |   70 -
 .../proton/go/messaging/messaging.go            |  261 --
 .../go/src/qpid.apache.org/proton/handlers.go   |  399 +++
 .../qpid.apache.org/proton/internal/error.go    |  121 +
 .../proton/internal/flexchannel.go              |   82 +
 .../proton/internal/flexchannel_test.go         |   89 +
 .../qpid.apache.org/proton/internal/safemap.go  |   57 +
 .../src/qpid.apache.org/proton/internal/uuid.go |   70 +
 .../go/src/qpid.apache.org/proton/message.go    |   79 +
 .../go/src/qpid.apache.org/proton/wrappers.go   |  335 ++
 .../src/qpid.apache.org/proton/wrappers_gen.go  |  874 +++++
 proton-c/include/proton/link.h                  |    2 +-
 72 files changed, 6884 insertions(+), 14032 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 4075b3f..ad4eebb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,7 @@ proton-c/bindings/go/bin
 
 # Testresults from the jenkins build script
 testresults
+
+# Go binding build output
+/proton-c/bindings/go/pkg
+/proton-c/bindings/go/bin

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/go/CMakeLists.txt b/examples/go/CMakeLists.txt
index 464ed7c..873180d 100644
--- a/examples/go/CMakeLists.txt
+++ b/examples/go/CMakeLists.txt
@@ -17,13 +17,21 @@
 # under the License.
 #
 
-# FIXME aconway 2015-05-20:
-# - use proton build for Go includes & libs.
-# - pre-build go libraries? Respect user GOPATH?
-
 if(BUILD_GO)
+  set(examples receive send broker)
+
+  foreach(example ${examples})
+    add_custom_target(go-example-${example} ALL
+      COMMAND ${GO_BUILD} ${GO_EXAMPLE_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/${example} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.go
+      DEPENDS go-packages qpid-proton)
+  endforeach()
+  add_custom_target(go-example-test ALL
+      COMMAND ${GO_TEST} -c ${GO_EXAMPLE_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/example_test ${CMAKE_CURRENT_SOURCE_DIR}/example_test.go
+      DEPENDS go-packages qpid-proton)
+
   add_test(
     NAME go_example_test
-    COMMAND ${GO_TEST} example_test.go -rpath ${CMAKE_BINARY_DIR}/proton-c
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+    COMMAND ${CMAKE_CURRENT_BINARY_DIR}/example_test -broker broker)
+
+  list(APPEND ADDITIONAL_MAKE_CLEAN_FILES ${examples})
 endif()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/README.md
----------------------------------------------------------------------
diff --git a/examples/go/README.md b/examples/go/README.md
index 52bd8e4..33c3d88 100644
--- a/examples/go/README.md
+++ b/examples/go/README.md
@@ -2,18 +2,17 @@
 
 There are 3 go packages for proton:
 
-- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
-- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
-- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+- qpid.apache.org/proton/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/concurrent: easy-to-use, concurrent API for concurrent clients and servers.
+- qpid.apache.org/proton: Low-level access to the proton engine.
 
-Most applications should use the `messaging` package. The `event` package is for
+Most applications should use the `proton/concurrent` package. The `proton` package is for
 applications that need low-level access to the proton engine.
 
 ## Example programs
 
-- [receive.go](receive.go) receive from many connections concurrently using messaging package.
-- [send.go](send.go) send to many connections concurrently using messaging package.
-- [event_broker.go](event_broker.go) simple mini-broker using event package.
+- [receive.go](receive.go) receive from many connections concurrently.
+- [send.go](send.go) send to many connections concurrently.
 
 ## Using the Go packages
 
@@ -54,7 +53,7 @@ the example source have more details.
 
 First start the broker:
 
-    go run event_broker.go
+    go run reactor_broker.go
 
 Send messages concurrently to queues "foo" and "bar", 10 messages to each queue:
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/broker.go
----------------------------------------------------------------------
diff --git a/examples/go/broker.go b/examples/go/broker.go
new file mode 100644
index 0000000..3f85e9e
--- /dev/null
+++ b/examples/go/broker.go
@@ -0,0 +1,161 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// This is a simple AMQP broker implemented using the concurrent interface.
+//
+// It maintains a set of named in-memory queues of messages. Clients can send
+// messages to queues or subscribe to receive messages from them.
+//
+//
+
+package main
+
+import (
+	"./util"
+	"flag"
+	"fmt"
+	"log"
+	"net"
+	"os"
+	"qpid.apache.org/proton/concurrent"
+)
+
+// Usage and command-line flags
+func usage() {
+	fmt.Fprintf(os.Stderr, `
+Usage: %s
+A simple broker-like demo. Queues are created automatically for sender or receiver addrsses.
+`, os.Args[0])
+	flag.PrintDefaults()
+}
+
+var addr = flag.String("addr", ":amqp", "Listening address")
+
+func main() {
+	flag.Usage = usage
+	flag.Parse()
+	b := newBroker()
+	err := b.listen(*addr)
+	util.ExitIf(err)
+}
+
+type broker struct {
+	container concurrent.Container
+	queues    util.QueueMap
+}
+
+func newBroker() *broker {
+	return &broker{
+		container: concurrent.NewContainer(""),
+		queues:    util.MakeQueueMap(),
+	}
+}
+
+// Listen for incoming connections
+func (b *broker) listen(addr string) (err error) {
+	listener, err := net.Listen("tcp", addr)
+	if err != nil {
+		return err
+	}
+	log.Printf("Listening on %s\n", listener.Addr())
+	defer listener.Close()
+	for {
+		conn, err := listener.Accept()
+		if err != nil {
+			return err
+		}
+		c, err := b.container.NewConnection(conn)
+		if err != nil {
+			return err
+		}
+		// Make this a server connection. Must be done before Open()
+		c.Server() // Server-side protocol negotiation.
+		c.Listen() // Enable remotely-opened endpoints.
+		if err := c.Open(); err != nil {
+			return err
+		}
+		util.Debugf("accept %s\n", c)
+		// Accept remotely-opened endpoints on the connection
+		go b.accept(c)
+	}
+}
+
+// accept remotely-opened endpoints (Session, Sender and Receiver)
+func (b *broker) accept(c concurrent.Connection) {
+	for ep, err := c.Accept(); err == nil; ep, err = c.Accept() {
+		switch ep := ep.(type) {
+		case concurrent.Session:
+			util.Debugf("accept session %s\n", ep)
+			ep.Open()
+		case concurrent.Sender:
+			util.Debugf("accept sender %s\n", ep)
+			ep.Open()
+			go b.sender(ep)
+		case concurrent.Receiver:
+			util.Debugf("accept receiver %s\n", ep)
+			ep.SetCapacity(100, true) // Pre-fetch 100 messages
+			ep.Open()
+			go b.receiver(ep)
+		}
+	}
+}
+
+// sender pops from a the queue in the sender's Source address and send messages.
+func (b *broker) sender(sender concurrent.Sender) {
+	qname := sender.Settings().Source
+	if qname == "" {
+		log.Printf("invalid consumer, no source address: %s", sender)
+		return
+	}
+	q := b.queues.Get(qname)
+	for {
+		m := <-q.Pop
+		if m == nil {
+			break
+		}
+		if sm, err := sender.Send(m); err == nil {
+			sm.Forget() // FIXME aconway 2015-09-24: Ignore acknowledgements
+			util.Debugf("send %s: %s\n", sender, util.FormatMessage(m))
+		} else {
+			util.Debugf("send error %s: %s\n", sender, err)
+			q.Putback <- m
+			break
+		}
+	}
+}
+
+func (b *broker) receiver(receiver concurrent.Receiver) {
+	qname := receiver.Settings().Target
+	if qname == "" {
+		log.Printf("invalid producer, no target address: %s", receiver)
+		return
+	}
+	q := b.queues.Get(qname)
+	for {
+		if rm, err := receiver.Receive(); err == nil {
+			util.Debugf("recv %s: %s\n", receiver, util.FormatMessage(rm.Message))
+			q.Push <- rm.Message
+			rm.Accept()
+		} else {
+			util.Debugf("recv error %s: %s\n", receiver, err)
+			break
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/example_test.go
----------------------------------------------------------------------
diff --git a/examples/go/example_test.go b/examples/go/example_test.go
index 8879c38..2afd95c 100644
--- a/examples/go/example_test.go
+++ b/examples/go/example_test.go
@@ -28,21 +28,20 @@ import (
 	"flag"
 	"fmt"
 	"io"
-	"io/ioutil"
 	"math/rand"
 	"net"
 	"os"
 	"os/exec"
-	"path"
 	"path/filepath"
 	"reflect"
+	"strings"
 	"testing"
 	"time"
 )
 
-func panicIf(err error) {
+func fatalIf(t *testing.T, err error) {
 	if err != nil {
-		panic(err)
+		t.Fatalf("%s", err)
 	}
 }
 
@@ -77,16 +76,18 @@ func (b *broker) check() error {
 }
 
 // Start the demo broker, wait till it is listening on *addr. No-op if already started.
-func (b *broker) start() error {
+func (b *broker) start(t *testing.T) error {
 	if b.cmd == nil { // Not already started
-		// FIXME aconway 2015-04-30: better way to pick/configure a broker port.
 		b.addr = fmt.Sprintf("127.0.0.1:%d", rand.Intn(10000)+10000)
-		b.cmd = exampleCommand("event_broker", "-addr", b.addr)
+		b.cmd = exampleCommand(t, *brokerName, "-addr", b.addr)
 		b.runerr = make(chan error)
 		b.cmd.Stderr, b.cmd.Stdout = os.Stderr, os.Stdout
-		go func() {
-			b.runerr <- b.cmd.Run()
-		}()
+		b.err = b.cmd.Start()
+		if b.err == nil {
+			go func() { b.runerr <- b.cmd.Wait() }()
+		} else {
+			b.runerr <- b.err
+		}
 		b.err = b.check()
 	}
 	return b.err
@@ -95,7 +96,7 @@ func (b *broker) start() error {
 func (b *broker) stop() {
 	if b != nil && b.cmd != nil {
 		b.cmd.Process.Kill()
-		b.cmd.Wait()
+		<-b.runerr
 	}
 }
 
@@ -106,22 +107,49 @@ func checkEqual(want interface{}, got interface{}) error {
 	return fmt.Errorf("%#v != %#v", want, got)
 }
 
-// runCommand returns an exec.Cmd to run an example.
-func exampleCommand(prog string, arg ...string) *exec.Cmd {
-	build(prog + ".go")
+// 'go build' uses the installed copy of the proton Go libraries, which may be out of date.
+func checkStaleLibs(t *testing.T) {
+	var stale []string
+	pp := "qpid.apache.org/proton"
+	for _, p := range []string{pp, pp + "/amqp", pp + "/concurrent"} {
+		out, err := exec.Command("go", "list", "-f", "{{.Stale}}", p).CombinedOutput()
+		if err != nil {
+			t.Fatalf("failed to execute 'go list': %v\n%v", err, string(out))
+		}
+		if string(out) != "false\n" {
+			stale = append(stale, pp)
+		}
+	}
+	if len(stale) > 0 {
+		t.Fatalf("Stale libraries, run 'go install %s'", strings.Trim(fmt.Sprint(stale), "[]"))
+	}
+}
+
+// exampleCommand returns an exec.Cmd to run an example.
+func exampleCommand(t *testing.T, prog string, arg ...string) (cmd *exec.Cmd) {
+	checkStaleLibs(t)
 	args := []string{}
 	if *debug {
 		args = append(args, "-debug=true")
 	}
 	args = append(args, arg...)
-	cmd := exec.Command(exepath(prog), args...)
+	prog, err := filepath.Abs(prog)
+	fatalIf(t, err)
+	if _, err := os.Stat(prog); err == nil {
+		cmd = exec.Command(prog, args...)
+	} else if _, err := os.Stat(prog + ".go"); err == nil {
+		args = append([]string{"run", prog + ".go"}, args...)
+		cmd = exec.Command("go", args...)
+	} else {
+		t.Fatalf("Cannot find binary or source for %s", prog)
+	}
 	cmd.Stderr = os.Stderr
 	return cmd
 }
 
 // Run an example Go program, return the combined output as a string.
-func runExample(prog string, arg ...string) (string, error) {
-	cmd := exampleCommand(prog, arg...)
+func runExample(t *testing.T, prog string, arg ...string) (string, error) {
+	cmd := exampleCommand(t, prog, arg...)
 	out, err := cmd.Output()
 	return string(out), err
 }
@@ -133,8 +161,8 @@ func prefix(prefix string, err error) error {
 	return nil
 }
 
-func runExampleWant(want string, prog string, args ...string) error {
-	out, err := runExample(prog, args...)
+func runExampleWant(t *testing.T, want string, prog string, args ...string) error {
+	out, err := runExample(t, prog, args...)
 	if err != nil {
 		return fmt.Errorf("%s failed: %s: %s", prog, err, out)
 	}
@@ -142,7 +170,10 @@ func runExampleWant(want string, prog string, args ...string) error {
 }
 
 func exampleArgs(args ...string) []string {
-	return append(args, testBroker.addr+"/foo", testBroker.addr+"/bar", testBroker.addr+"/baz")
+	for i := 0; i < *connections; i++ {
+		args = append(args, fmt.Sprintf("%s/%s%d", testBroker.addr, "q", i))
+	}
+	return args
 }
 
 // Send then receive
@@ -150,18 +181,18 @@ func TestExampleSendReceive(t *testing.T) {
 	if testing.Short() {
 		t.Skip("Skip demo tests in short mode")
 	}
-	testBroker.start()
-	err := runExampleWant(
-		"Received all 15 acknowledgements\n",
+	testBroker.start(t)
+	err := runExampleWant(t,
+		fmt.Sprintf("Received all %d acknowledgements\n", expected),
 		"send",
-		exampleArgs("-count", "5")...)
+		exampleArgs("-count", fmt.Sprintf("%d", *count))...)
 	if err != nil {
 		t.Fatal(err)
 	}
-	err = runExampleWant(
-		"Listening on 3 connections\nReceived 15 messages\n",
+	err = runExampleWant(t,
+		fmt.Sprintf("Listening on %v connections\nReceived %v messages\n", *connections, *count**connections),
 		"receive",
-		exampleArgs("-count", "15")...)
+		exampleArgs("-count", fmt.Sprintf("%d", *count**connections))...)
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -175,8 +206,8 @@ func init() { ready = fmt.Errorf("Ready") }
 // Send ready on errchan when it is listening.
 // Send final error when it is done.
 // Returns the Cmd, caller must Wait()
-func goReceiveWant(errchan chan<- error, want string, arg ...string) *exec.Cmd {
-	cmd := exampleCommand("receive", arg...)
+func goReceiveWant(t *testing.T, errchan chan<- error, want string, arg ...string) *exec.Cmd {
+	cmd := exampleCommand(t, "receive", arg...)
 	go func() {
 		pipe, err := cmd.StdoutPipe()
 		if err != nil {
@@ -209,11 +240,12 @@ func TestExampleReceiveSend(t *testing.T) {
 	if testing.Short() {
 		t.Skip("Skip demo tests in short mode")
 	}
-	testBroker.start()
+	testBroker.start(t)
 	recvErr := make(chan error)
-	recvCmd := goReceiveWant(recvErr,
-		"Received 15 messages\n",
-		exampleArgs("-count", "15")...)
+	recvCmd := goReceiveWant(
+		t, recvErr,
+		fmt.Sprintf("Received %d messages\n", expected),
+		exampleArgs(fmt.Sprintf("-count=%d", expected))...)
 	defer func() {
 		recvCmd.Process.Kill()
 		recvCmd.Wait()
@@ -221,10 +253,10 @@ func TestExampleReceiveSend(t *testing.T) {
 	if err := <-recvErr; err != ready { // Wait for receiver ready
 		t.Fatal(err)
 	}
-	err := runExampleWant(
-		"Received all 15 acknowledgements\n",
+	err := runExampleWant(t,
+		fmt.Sprintf("Received all %d acknowledgements\n", expected),
 		"send",
-		exampleArgs("-count", "5")...)
+		exampleArgs("-count", fmt.Sprintf("%d", *count))...)
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -233,51 +265,18 @@ func TestExampleReceiveSend(t *testing.T) {
 	}
 }
 
-func exepath(relative string) string {
-	if binDir == "" {
-		panic("bindir not set, cannot run example binaries")
-	}
-	return path.Join(binDir, relative)
-}
-
 var testBroker *broker
-var binDir, exampleDir string
-var built map[string]bool
-
-func init() {
-	built = make(map[string]bool)
-}
 
-func build(prog string) {
-	if !built[prog] {
-		args := []string{"build"}
-		if *rpath != "" {
-			args = append(args, "-ldflags", "-r "+*rpath)
-		}
-		args = append(args, path.Join(exampleDir, prog))
-		build := exec.Command("go", args...)
-		build.Dir = binDir
-		out, err := build.CombinedOutput()
-		if err != nil {
-			panic(fmt.Errorf("%v: %s", err, out))
-		}
-		built[prog] = true
-	}
-}
-
-var rpath = flag.String("rpath", "", "Runtime path for test executables")
 var debug = flag.Bool("debug", false, "Debugging output from examples")
+var brokerName = flag.String("broker", "broker", "Name of broker executable to run")
+var count = flag.Int("count", 3, "Count of messages to send in tests")
+var connections = flag.Int("connections", 3, "Number of connections to make in tests")
+var expected int
 
 func TestMain(m *testing.M) {
+	expected = (*count) * (*connections)
 	rand.Seed(time.Now().UTC().UnixNano())
-	var err error
-	exampleDir, err = filepath.Abs(".")
-	panicIf(err)
-	binDir, err = ioutil.TempDir("", "example_test.go")
-	panicIf(err)
-	defer os.Remove(binDir) // Clean up binaries
-	testBroker = &broker{}  // Broker is started on-demand by tests.
-	testBroker.stop()
+	testBroker = &broker{} // Broker is started on-demand by tests.
 	status := m.Run()
 	testBroker.stop()
 	os.Exit(status)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/receive.go
----------------------------------------------------------------------
diff --git a/examples/go/receive.go b/examples/go/receive.go
index b1eb309..a45ffe3 100644
--- a/examples/go/receive.go
+++ b/examples/go/receive.go
@@ -20,12 +20,14 @@ under the License.
 package main
 
 import (
+	"./util"
 	"flag"
 	"fmt"
+	"log"
 	"net"
 	"os"
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/messaging"
+	"qpid.apache.org/proton/amqp"
+	"qpid.apache.org/proton/concurrent"
 	"sync"
 )
 
@@ -37,9 +39,7 @@ Receive messages from all the listed URLs concurrently and print them.
 	flag.PrintDefaults()
 }
 
-var debug = flag.Bool("debug", false, "Print detailed debug output")
 var count = flag.Uint64("count", 1, "Stop after receiving this many messages.")
-var full = flag.Bool("full", false, "Print full message not just body.")
 
 func main() {
 	flag.Usage = usage
@@ -47,7 +47,7 @@ func main() {
 
 	urls := flag.Args() // Non-flag arguments are URLs to receive from
 	if len(urls) == 0 {
-		fmt.Fprintln(os.Stderr, "No URL provided")
+		log.Println("No URL provided")
 		usage()
 		os.Exit(1)
 	}
@@ -57,39 +57,46 @@ func main() {
 	var wait sync.WaitGroup             // Used by main() to wait for all goroutines to end.
 	wait.Add(len(urls))                 // Wait for one goroutine per URL.
 
-	connections := make([]*messaging.Connection, len(urls)) // Store connctions to close on exit
+	container := concurrent.NewContainer("")
+	connections := make(chan concurrent.Connection, len(urls)) // Connections to close on exit
 
 	// Start a goroutine to for each URL to receive messages and send them to the messages channel.
 	// main() receives and prints them.
-	for i, urlStr := range urls {
-		debugf("debug: Connecting to %s\n", urlStr)
+	for _, urlStr := range urls {
+		util.Debugf("Connecting to %s\n", urlStr)
 		go func(urlStr string) { // Start the goroutine
 
 			defer wait.Done()                 // Notify main() when this goroutine is done.
 			url, err := amqp.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
-			exitIf(err)
+			util.ExitIf(err)
 
-			// Open a standard Go net.Conn and and AMQP connection using it.
+			// Open a new connection
 			conn, err := net.Dial("tcp", url.Host) // Note net.URL.Host is actually "host:port"
-			exitIf(err)
-			pc, err := messaging.Connect(conn) // This is our AMQP connection.
-			exitIf(err)
-			connections[i] = pc // Save connection so it will be closed when main() ends
-
-			// Create a receiver using the path of the URL as the AMQP address
-			r, err := pc.Receiver(url.Path)
-			exitIf(err)
-
-			// Loop receiving messages
+			util.ExitIf(err)
+			c, err := container.NewConnection(conn)
+			util.ExitIf(err)
+			util.ExitIf(c.Open())
+			connections <- c // Save connection so we can Close() when main() ends
+
+			// Create and open a session
+			ss, err := c.NewSession()
+			util.ExitIf(err)
+			err = ss.Open()
+			util.ExitIf(err)
+
+			// Create a Receiver using the path of the URL as the source address
+			r, err := ss.Receiver(url.Path)
+			util.ExitIf(err)
+
+			// Loop receiving messages and sending them to the main() goroutine
 			for {
-				var m amqp.Message
-				select { // Receive a message or stop.
-				case m = <-r.Receive:
-				case <-stop: // The program is stopping.
+				rm, err := r.Receive()
+				if err == concurrent.Closed {
 					return
 				}
+				util.ExitIf(err)
 				select { // Send m to main() or stop
-				case messages <- m: // Send m to main()
+				case messages <- rm.Message: // Send to main()
 				case <-stop: // The program is stopping.
 					return
 				}
@@ -102,37 +109,17 @@ func main() {
 
 	// print each message until the count is exceeded.
 	for i := uint64(0); i < *count; i++ {
-		debugf("%s\n", formatMessage(<-messages))
+		m := <-messages
+		util.Debugf("%s\n", util.FormatMessage(m))
 	}
 	fmt.Printf("Received %d messages\n", *count)
+
+	// Close all connections, this will interrupt goroutines blocked in Receiver.Receive()
+	for i := 0; i < len(urls); i++ {
+		c := <-connections
+		c.Disconnect(nil) // FIXME aconway 2015-09-25: Close
+	}
 	close(stop) // Signal all goroutines to stop.
 	wait.Wait() // Wait for all goroutines to finish.
 	close(messages)
-	for _, c := range connections { // Close all connections
-		if c != nil {
-			c.Close()
-		}
-	}
-}
-
-// Simple debug logging
-func debugf(format string, data ...interface{}) {
-	if *debug {
-		fmt.Fprintf(os.Stderr, format, data...)
-	}
-}
-
-// Simple error handling for demo.
-func exitIf(err error) {
-	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
-	}
-}
-
-func formatMessage(m amqp.Message) string {
-	if *full {
-		return fmt.Sprintf("%#v", m)
-	} else {
-		return fmt.Sprintf("%#v", m.Body())
-	}
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/send.go
----------------------------------------------------------------------
diff --git a/examples/go/send.go b/examples/go/send.go
index 98acefa..7fa5416 100644
--- a/examples/go/send.go
+++ b/examples/go/send.go
@@ -20,12 +20,14 @@ under the License.
 package main
 
 import (
+	"./util"
 	"flag"
 	"fmt"
+	"log"
 	"net"
 	"os"
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/messaging"
+	"qpid.apache.org/proton/amqp"
+	"qpid.apache.org/proton/concurrent"
 	"sync"
 )
 
@@ -37,13 +39,11 @@ Send messages to each URL concurrently with body "<url-path>-<n>" where n is the
 	flag.PrintDefaults()
 }
 
-var debug = flag.Bool("debug", false, "Print detailed debug output")
 var count = flag.Int64("count", 1, "Send this may messages per address.")
 
-// Ack associates an info string with an acknowledgement
-type Ack struct {
-	ack  messaging.Acknowledgement
-	info string
+type sent struct {
+	name        string
+	sentMessage concurrent.SentMessage
 }
 
 func main() {
@@ -52,63 +52,68 @@ func main() {
 
 	urls := flag.Args() // Non-flag arguments are URLs to receive from
 	if len(urls) == 0 {
-		fmt.Fprintln(os.Stderr, "No URL provided")
+		log.Println("No URL provided")
 		flag.Usage()
 		os.Exit(1)
 	}
 
-	acks := make(chan Ack)  // Channel to receive all the acknowledgements
-	var wait sync.WaitGroup // Used by main() to wait for all goroutines to end.
-	wait.Add(len(urls))     // Wait for one goroutine per URL.
+	sentChan := make(chan sent) // Channel to receive all the delivery receipts.
+	var wait sync.WaitGroup     // Used by main() to wait for all goroutines to end.
+	wait.Add(len(urls))         // Wait for one goroutine per URL.
 
-	connections := make([]*messaging.Connection, len(urls)) // Store connctions to close on exit
+	container := concurrent.NewContainer("")
+	var connections []concurrent.Connection // Store connctions to close on exit
 
-	// Start a goroutine for each URL to send messages, receive the acknowledgements and
-	// send them to the acks channel.
-	for i, urlStr := range urls {
-		debugf("Connecting to %v\n", urlStr)
+	// Start a goroutine for each URL to send messages.
+	for _, urlStr := range urls {
+		util.Debugf("Connecting to %v\n", urlStr)
 		go func(urlStr string) {
 
 			defer wait.Done()                 // Notify main() that this goroutine is done.
 			url, err := amqp.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
-			exitIf(err)
+			util.ExitIf(err)
 
-			// Open a standard Go net.Conn and and AMQP connection using it.
+			// Open a new connection
 			conn, err := net.Dial("tcp", url.Host) // Note net.URL.Host is actually "host:port"
-			exitIf(err)
-			pc, err := messaging.Connect(conn) // This is our AMQP connection.
-			exitIf(err)
-			connections[i] = pc // Save connection so it will be closed when main() ends
-
-			// Create a sender using the path of the URL as the AMQP address
-			s, err := pc.Sender(url.Path)
-			exitIf(err)
-
-			// Loop sending messages, receiving acknowledgements and sending them to the acks channel.
+			util.ExitIf(err)
+			c, err := container.NewConnection(conn)
+			util.ExitIf(err)
+			err = c.Open()
+			util.ExitIf(err)
+			connections = append(connections, c) // Save connection so it will be closed when main() ends
+
+			// Create and open a session
+			ss, err := c.NewSession()
+			util.ExitIf(err)
+			err = ss.Open()
+			util.ExitIf(err)
+
+			// Create a Sender using the path of the URL as the AMQP address
+			s, err := ss.Sender(url.Path)
+			util.ExitIf(err)
+
+			// Loop sending messages.
 			for i := int64(0); i < *count; i++ {
 				m := amqp.NewMessage()
 				body := fmt.Sprintf("%v-%v", url.Path, i)
-				m.SetBody(body)
-				// Note Send is *asynchronous*, ack is a channel that will receive the acknowledgement.
-				ack, err := s.Send(m)
-				exitIf(err)
-				acks <- Ack{ack, body} // Send the acknowledgement to main()
+				m.Marshal(body)
+				sentMessage, err := s.Send(m)
+				util.ExitIf(err)
+				sentChan <- sent{body, sentMessage}
 			}
 		}(urlStr)
 	}
 
 	// Wait for all the acknowledgements
 	expect := int(*count) * len(urls)
-	debugf("Started senders, expect %v acknowledgements\n", expect)
+	util.Debugf("Started senders, expect %v acknowledgements\n", expect)
 	for i := 0; i < expect; i++ {
-		ack, ok := <-acks
-		if !ok {
-			exitIf(fmt.Errorf("acks channel closed after only %d acks\n", i))
-		}
-		d := <-ack.ack
-		debugf("acknowledgement[%v] %v\n", i, ack.info)
-		if d != messaging.Accepted {
-			fmt.Printf("Unexpected disposition %v\n", d)
+		d := <-sentChan
+		disposition, err := d.sentMessage.Disposition()
+		if err != nil {
+			util.Debugf("acknowledgement[%v] %v error: %v\n", i, d.name, err)
+		} else {
+			util.Debugf("acknowledgement[%v]  %v (%v)\n", i, d.name, disposition)
 		}
 	}
 	fmt.Printf("Received all %v acknowledgements\n", expect)
@@ -116,21 +121,7 @@ func main() {
 	wait.Wait()                     // Wait for all goroutines to finish.
 	for _, c := range connections { // Close all connections
 		if c != nil {
-			c.Close()
+			c.Close(nil)
 		}
 	}
 }
-
-// Simple debug logging
-func debugf(format string, data ...interface{}) {
-	if *debug {
-		fmt.Fprintf(os.Stderr, format, data...)
-	}
-}
-
-// Simple error handling for demo.
-func exitIf(err error) {
-	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/util/queue.go
----------------------------------------------------------------------
diff --git a/examples/go/util/queue.go b/examples/go/util/queue.go
new file mode 100644
index 0000000..075c4d2
--- /dev/null
+++ b/examples/go/util/queue.go
@@ -0,0 +1,106 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package util
+
+import (
+	"container/list"
+	"qpid.apache.org/proton/amqp"
+	"sync"
+)
+
+// Queue is a concurrent-safe queue of amqp.Message.
+type Queue struct {
+	name     string
+	messages list.List // List of amqp.Message
+	// Send to Push to push a message onto back of queue
+	Push chan amqp.Message
+	// Receive from Pop to pop a message from the front of the queue.
+	Pop chan amqp.Message
+	// Send to Putback to put an unsent message back on the front of the queue.
+	Putback chan amqp.Message
+}
+
+func NewQueue(name string) *Queue {
+	q := &Queue{
+		name:    name,
+		Push:    make(chan amqp.Message),
+		Pop:     make(chan amqp.Message),
+		Putback: make(chan amqp.Message),
+	}
+	go q.run()
+	return q
+}
+
+// Close the queue. Any remaining messages on Pop can still be received.
+func (q *Queue) Close() { close(q.Push); close(q.Putback) }
+
+// Run runs the queue, returns when q.Close() is called.
+func (q *Queue) run() {
+	defer close(q.Pop)
+	for {
+		var pop chan amqp.Message
+		var front amqp.Message
+		if el := q.messages.Front(); el != nil {
+			front = el.Value.(amqp.Message)
+			pop = q.Pop // Only select for pop if there is something to pop.
+		}
+		select {
+		case m, ok := <-q.Push:
+			if !ok {
+				return
+			}
+			Debugf("%s push: %s\n", q.name, FormatMessage(m))
+			q.messages.PushBack(m)
+		case m, ok := <-q.Putback:
+			Debugf("%s put-back: %s\n", q.name, FormatMessage(m))
+			if !ok {
+				return
+			}
+			q.messages.PushFront(m)
+		case pop <- front:
+			Debugf("%s pop: %s\n", q.name, FormatMessage(front))
+			q.messages.Remove(q.messages.Front())
+		}
+	}
+}
+
+// QueueMap is a concurrent-safe map of queues that creates new queues
+// on demand.
+type QueueMap struct {
+	lock sync.Mutex
+	m    map[string]*Queue
+}
+
+func MakeQueueMap() QueueMap { return QueueMap{m: make(map[string]*Queue)} }
+
+func (qm *QueueMap) Get(name string) *Queue {
+	if name == "" {
+		panic("Attempt to get queue with no name")
+	}
+	qm.lock.Lock()
+	defer qm.lock.Unlock()
+	q := qm.m[name]
+	if q == nil {
+		q = NewQueue(name)
+		qm.m[name] = q
+		Debugf("queue %s create", name)
+	}
+	return q
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/examples/go/util/util.go
----------------------------------------------------------------------
diff --git a/examples/go/util/util.go b/examples/go/util/util.go
new file mode 100644
index 0000000..72c6646
--- /dev/null
+++ b/examples/go/util/util.go
@@ -0,0 +1,69 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// util contains utility types and functions to simplify parts of the example
+// code that are not related to the use of proton.
+package util
+
+import (
+	"flag"
+	"fmt"
+	"log"
+	"os"
+	"path"
+	"qpid.apache.org/proton/amqp"
+)
+
+// Debug flag "-debug" enables debug output with Debugf
+var Debug = flag.Bool("debug", false, "Print detailed debug output")
+
+// Full flag "-full" enables full message output by FormatMessage
+var Full = flag.Bool("full", false, "Print full message not just body.")
+
+// Debugf logs debug messages if "-debug" flag is set.
+func Debugf(format string, data ...interface{}) {
+	if *Debug {
+		log.Printf(format, data...)
+	}
+}
+
+// Simple error handling for demo.
+func ExitIf(err error) {
+	if err != nil {
+		log.Println(err)
+		os.Exit(1)
+	}
+}
+
+// FormatMessage formats a message as a string, just the body by default or
+// the full message (with properties etc.) if "-full" flag is set.
+func FormatMessage(m amqp.Message) string {
+	if *Full {
+		return fmt.Sprintf("%#v", m)
+	} else {
+		return fmt.Sprintf("%#v", m.Body())
+	}
+}
+
+// For example programs, use the program name as the log prefix.
+func init() {
+	log.SetFlags(0)
+	_, prog := path.Split(os.Args[0])
+	log.SetPrefix(prog + ": ")
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/CMakeLists.txt b/proton-c/bindings/go/CMakeLists.txt
index ea6238f..0631eae 100644
--- a/proton-c/bindings/go/CMakeLists.txt
+++ b/proton-c/bindings/go/CMakeLists.txt
@@ -17,32 +17,49 @@
 # under the License.
 #
 
-# FIXME aconway 2015-05-20: install targets for go source.
-
 set(GO_BUILD_FLAGS "" CACHE STRING "Flags for 'go build'")
-set(GO_TEST_FLAGS "-v" CACHE STRING "Flags for 'go test'")
+set(GO_TEST_FLAGS "-v -race" CACHE STRING "Flags for 'go test'")
 
 separate_arguments(GO_BUILD_FLAGS)
 separate_arguments(GO_TEST_FLAGS)
-list(APPEND GO_BUILD_FLAGS "-ldflags=-r ${CMAKE_BINARY_DIR}/proton-c")
 
 if (BUILD_GO)
-  # Build in the source tree, go tools aren't friendly otherwise.
-  # All build output goes in git-ignored pkg or bin subdirectories.
-  set(qgo "qpid.apache.org/proton/go")
-  set(packages ${qgo}/amqp ${qgo}/event ${qgo}/messaging)
-
   # Following are CACHE INTERNAL so examples/CMakeLists.txt can see them.
   set(GO_ENV ${env_py} --
     "GOPATH=${CMAKE_CURRENT_SOURCE_DIR}"
     "CGO_CFLAGS=-I${CMAKE_SOURCE_DIR}/proton-c/include"
     "CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/proton-c"
-    ${GO_EXE} CACHE INTERNAL "Run go with environment set"
-    )
-  set(GO_BUILD ${GO_ENV} build ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go build")
-  set(GO_TEST ${GO_ENV} test ${GO_BUILD_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
+    ${GO_EXE} CACHE INTERNAL "Run go with environment set")
+
+  # Set rpath so test and example executables will use the proton library from this build.
+  execute_process(COMMAND ${GO_EXE} version OUTPUT_VARIABLE go_out)
+  if (go_out MATCHES "gccgo")
+    set(GO_RPATH_FLAGS -gccgoflags "-Wl,-rpath=${CMAKE_BINARY_DIR}/proton-c")
+  else()
+    set(GO_RPATH_FLAGS -ldflags "-r ${CMAKE_BINARY_DIR}/proton-c")
+  endif()
+
+  set(GO_BUILD ${GO_ENV} build ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} CACHE INTERNAL "Run go build")
+  set(GO_INSTALL ${GO_ENV} install ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go install")
+  set(GO_TEST ${GO_ENV} test ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
+
+  # Install packages in the source tree, go tools aren't friendly otherwise.
+  # All build output goes in git-ignored pkg or bin subdirectories.
+  set(qgo "qpid.apache.org/proton")
+  set(packages ${qgo} ${qgo}/amqp ${qgo}/concurrent ${qgo}/internal)
+  add_custom_target(go-packages ALL
+    COMMAND ${GO_INSTALL} ${packages}
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    DEPENDS qpid-proton)
+
+  add_test(
+    NAME go_test_packages
+    COMMAND ${GO_TEST} ${packages}
+    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
 
-  add_test(NAME go_package_test COMMAND ${GO_TEST} ${packages})
+  list(APPEND ADDITIONAL_MAKE_CLEAN_FILES
+    ${CMAKE_CURRENT_SOURCE_DIR}/pkg
+    ${CMAKE_CURRENT_SOURCE_DIR}/bin)
 
   set (GO_INSTALL_DIR ${SHARE_INSTALL_DIR}/gocode/src CACHE PATH "Installation directory for Go code")
   mark_as_advanced (GO_INSTALL_DIR)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
index 0f16b8e..98a432a 100644
--- a/proton-c/bindings/go/README.md
+++ b/proton-c/bindings/go/README.md
@@ -8,7 +8,7 @@ Feedback is strongly encouraged:
 - Email <pr...@qpid.apache.org>
 - Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
 
-The package documentation is available at: <http://godoc.org/qpid.apache.org/proton/go>
+The package documentation is available at: <http://godoc.org/qpid.apache.org/proton>
 
 See the [examples](../../../examples/go/README.md) for working examples and
 practical instructions on how to get started.
@@ -38,40 +38,32 @@ There are two types of developer we want to support
 
 There are 3 go packages for proton:
 
-- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
-- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
-- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+- qpid.apache.org/proton/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/concurrent: easy-to-use, concurrent API for clients and servers.
+- qpid.apache.org/proton: full low-level access to the proton engine.
 
-Most applications should use the `messaging` package. The `event` package is for
-applications that need low-level access to the proton engine.
+The `amqp` package provides conversions between AMQP and Go data types that are
+used by the other two packages.
 
-The `event` package is fairly complete, with the exception of the proton
-reactor. It's unclear if the reactor is important for go.
+The `concurrent` package provides a simple procedural API that can be used with
+goroutines to construct concurrent AMQP clients and servers.
 
-The `messaging` package can run the examples but probably not much else. There
-is work to do on error handling and the API may change.
+The `proton` package is a concurrency-unsafe, event-driven API. It is a very
+thin wrapper providing almost direct access to the underlying proton C API.
 
-There are working [examples](../../../examples/go/README.md) of a broker using `event` and
-a sender and receiver using `messaging`.
+The `concurrent` package will probably be more familiar and convenient to Go
+programmers for most use cases. The `proton` package may be more familiar if
+you have used proton in other languages.
 
-## The event driven API
+Note the `concurrent` package itself is implemented in terms of the `proton`
+package. It takes care of running concurrency-unsafe `proton` code in dedicated
+goroutines and setting up channels to move data between user and proton
+goroutines safely. It hides all this complexity behind a simple procedural
+interface rather than presenting an event-driven interface.
 
-See the package documentation for details.
+See the [examples](../../../examples/go/README.md) for a better illustration of the APIs.
 
-## The Go API
-
-The goal: A procedural API that allows any user goroutine to send and receive
-AMQP messages and other information (acknowledgments, flow control instructions
-etc.) using channels. There will be no user-visible locks and no need to run
-user code in special goroutines, e.g. as handlers in a proton event loop.
-
-See the package documentation for emerging details.
-
-Currently using a channel to receive messages, a function to send them (channels
-internally) and a channel as a "future" for acknowledgements to senders. This
-may change.
-
-## Why a separate API for Go?
+### Why two APIs?
 
 Go is a concurrent language and encourages applications to be divided into
 concurrent *goroutines*. It provides traditional locking but it encourages the
@@ -80,8 +72,7 @@ use *channels* to communicate between goroutines without explicit locks:
   "Share memory by communicating, don't communicate by sharing memory"
 
 The idea is that a given value is only operated on by one goroutine at a time,
-but values can easily be passed from one goroutine to another. This removes much
-of the need for locking.
+but values can easily be passed from one goroutine to another.
 
 Go literature distinguishes between:
 
@@ -97,8 +88,8 @@ respect to events like file descriptors being readable/writable, channels having
 data, timers firing etc. Go automatically takes care of switching out goroutines
 that block or sleep so it is normal to write code in terms of blocking calls.
 
-Event-driven API (like poll, epoll, select or the proton event API) also
-channel unpredictably ordered events to actions in one or a small pool of
+Event-driven programming (such as poll, epoll, select or the `proton` package)
+also channels unpredictably ordered events to actions in one or a small pool of
 execution threads. However this requires a different style of programming:
 "event-driven" or "reactive" programming. Go developers call it "inside-out"
 programming. In an event-driven architecture blocking is a big problem as it
@@ -121,15 +112,39 @@ preserved across blocking calls. There's no need to store details in context
 objects that you have to look up when handling a later event to figure out how
 to continue where you left off.
 
-So a Go-like proton API does not force the users code to run in an event-loop
-goroutine. Instead user goroutines communicate with the event loop(s) via
-channels.  There's no need to funnel connections into one event loop, in fact it
-makes no sense.  Connections can be processed concurrently so they should be
-processed in separate goroutines and left to Go to schedule. User goroutines can
-have simple loops that block channels till messages are available, the user can
-start as many or as few such goroutines as they wish to implement concurrency as
-simple or as complex as they wish. For example blocking request-response
-vs. asynchronous flows of messages and acknowledgments.
+The `proton` API is important because it is close to the original proton-C
+reactive API and gives you direct access to the underlying library. However it
+is un-Go-like in it's event-driven nature, and it requires care as methods on
+values associated with the same underlying proton engine are not
+concurrent-safe.
+
+The `concurrent` API hides the event-driven details behind a simple blocking API
+that can be safely called from arbitrary goroutines. Under the covers data is
+passed through channels to dedicated goroutines running separate `proton` event
+loops for each connection.
+
+### Design of the concurrent API
+
+The details are still being worked out (see the code) but some basic principles have been
+established.
+
+Code from the `proton` package runs _only_ in a dedicated goroutine (per
+connection). This makes it safe to use proton C data structures associated with
+that connection.
+
+Code in the `concurrent` package can run in any goroutine, and holds `proton`
+package values with proton object pointers.  To use those values, it "injects" a
+function into the proton goroutine via a special channel. Injected functions
+can use temporary channels to allow the calling code to wait for results. Such
+waiting is only for the local event-loop, not across network calls.
+
+The API exposes blocking calls returning normal error values, no exposed
+channels or callbacks. The user can write simple blocking code or start their
+own goroutine loops and channels as appropriate. Details of our internal channel
+use and error handling are hidden, which simplifies the API and gives us more
+implementation flexibility.
+
+TODO: lifecycle rules for proton objects.
 
 ## New to Go?
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/genwrap.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/genwrap.go b/proton-c/bindings/go/genwrap.go
index 27e5966..dd2780c 100644
--- a/proton-c/bindings/go/genwrap.go
+++ b/proton-c/bindings/go/genwrap.go
@@ -36,7 +36,7 @@ import (
 )
 
 var includeProton = "../../include/proton"
-var outpath = "src/qpid.apache.org/proton/go/event/wrappers_gen.go"
+var outpath = "src/qpid.apache.org/proton/wrappers_gen.go"
 
 func main() {
 	flag.Parse()
@@ -44,15 +44,15 @@ func main() {
 	panicIf(err)
 	defer out.Close()
 
-	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
+	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection", "transport"}
 	fmt.Fprintln(out, copyright)
 	fmt.Fprint(out, `
-package event
+package proton
 
 import (
 	"time"
   "unsafe"
-  "qpid.apache.org/proton/go/internal"
+  "qpid.apache.org/proton/internal"
 )
 
 // #include <proton/types.h>
@@ -122,10 +122,11 @@ func findEnums(header string) (enums []enumType) {
 }
 
 func genEnum(out io.Writer, name string, values []string) {
-	doTemplate(out, []interface{}{name, values}, `{{$enumName := index . 0}}{{$values := index . 1}}
+	doTemplate(out, []interface{}{name, values}, `
+{{$enumName := index . 0}}{{$values := index . 1}}
 type {{mixedCase $enumName}} C.pn_{{$enumName}}_t
 const ({{range $values}}
-	{{mixedCase .}} {{mixedCase $enumName}} = C.{{.}} {{end}}
+	{{mixedCaseTrim . "PN_"}} {{mixedCase $enumName}} = C.{{.}} {{end}}
 )
 
 func (e {{mixedCase $enumName}}) String() string {
@@ -177,7 +178,8 @@ under the License.
 */
 
 //
-// NOTE: This file was generated by genwrap.go, do not edit it by hand.
+// NOTE: DO NOT EDIT. This file was generated by genwrap.go from the proton header files.
+// Update the generator and re-run if you need to modify this code.
 //
 `
 
@@ -199,7 +201,7 @@ var (
 	enumDefRe   = regexp.MustCompile("typedef enum {([^}]*)} pn_([a-z_]+)_t;")
 	enumValRe   = regexp.MustCompile("PN_[A-Z_]+")
 	skipEventRe = regexp.MustCompile("EVENT_NONE|REACTOR|SELECTABLE|TIMER")
-	skipFnRe    = regexp.MustCompile("attach|context|class|collect|^recv$|^send$|transport")
+	skipFnRe    = regexp.MustCompile("attach|context|class|collect|link_recv|link_send|transport_.*logf$|transport_.*trace|transport_head|transport_push")
 )
 
 // Generate event wrappers.
@@ -311,6 +313,13 @@ func mapType(ctype string) (g genType) {
 	case "C.pn_seconds_t":
 		g.Gotype = "time.Duration"
 		g.ToGo = func(v string) string { return fmt.Sprintf("(time.Duration(%s) * time.Second)", v) }
+	case "C.pn_millis_t":
+		g.Gotype = "time.Duration"
+		g.ToGo = func(v string) string { return fmt.Sprintf("(time.Duration(%s) * time.Millisecond)", v) }
+	case "C.pn_timestamp_t":
+		g.Gotype = "time.Time"
+		g.ToC = func(v string) string { return fmt.Sprintf("pnTime(%s)", v) }
+		g.ToGo = func(v string) string { return fmt.Sprintf("goTime(%s)", v) }
 	case "C.pn_error_t *":
 		g.Gotype = "error"
 		g.ToGo = func(v string) string { return fmt.Sprintf("internal.PnError(unsafe.Pointer(%s))", v) }
@@ -396,7 +405,7 @@ func cAssigns(args []genArg) string {
 // Return the go name of the function or "" to skip the function.
 func goFnName(api, fname string) string {
 	// Skip class, context and attachment functions.
-	if skipFnRe.FindStringSubmatch(fname) != nil {
+	if skipFnRe.FindStringSubmatch(api+"_"+fname) != nil {
 		return ""
 	}
 	switch api + "." + fname {
@@ -410,6 +419,7 @@ func goFnName(api, fname string) string {
 func apiWrapFns(api, header string, out io.Writer) {
 	fmt.Fprintf(out, "type %s struct{pn *C.pn_%s_t}\n", mixedCase(api), api)
 	fmt.Fprintf(out, "func (%c %s) IsNil() bool { return %c.pn == nil }\n", api[0], mixedCase(api), api[0])
+	fmt.Fprintf(out, "func (%c %s) CPtr() unsafe.Pointer { return unsafe.Pointer(%c.pn) }\n", api[0], mixedCase(api), api[0])
 	fn := regexp.MustCompile(fmt.Sprintf(`PN_EXTERN ([a-z0-9_ ]+ *\*?) *pn_%s_([a-z_]+)\(pn_%s_t *\*[a-z_]+ *,? *([^)]*)\)`, api, api))
 	for _, m := range fn.FindAllStringSubmatch(header, -1) {
 		rtype, fname, argstr := mapType(m[1]), m[2], m[3]


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[08/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/message.go b/proton-c/bindings/go/amqp/message.go
deleted file mode 100644
index 87093f5..0000000
--- a/proton-c/bindings/go/amqp/message.go
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
-
-// Message is the interface to an AMQP message.
-// Instances of this interface contain a pointer to the underlying struct.
-type Message interface {
-	/**
-	 * Inferred indicates how the message content
-	 * is encoded into AMQP sections. If inferred is true then binary and
-	 * list values in the body of the message will be encoded as AMQP DATA
-	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
-	 * then all values in the body of the message will be encoded as AMQP
-	 * VALUE sections regardless of their type.
-	 */
-	Inferred() bool
-	SetInferred(bool)
-
-	/**
-	 * Durable indicates that any parties taking responsibility
-	 * for the message must durably store the content.
-	 */
-	Durable() bool
-	SetDurable(bool)
-
-	/**
-	 * Priority impacts ordering guarantees. Within a
-	 * given ordered context, higher priority messages may jump ahead of
-	 * lower priority messages.
-	 */
-	Priority() uint8
-	SetPriority(uint8)
-
-	/**
-	 * TTL or Time To Live, a message it may be dropped after this duration
-	 */
-	TTL() time.Duration
-	SetTTL(time.Duration)
-
-	/**
-	 * FirstAcquirer indicates
-	 * that the recipient of the message is the first recipient to acquire
-	 * the message, i.e. there have been no failed delivery attempts to
-	 * other acquirers. Note that this does not mean the message has not
-	 * been delivered to, but not acquired, by other recipients.
-	 */
-	FirstAcquirer() bool
-	SetFirstAcquirer(bool)
-
-	/**
-	 * DeliveryCount tracks how many attempts have been made to
-	 * delivery a message.
-	 */
-	DeliveryCount() uint32
-	SetDeliveryCount(uint32)
-
-	/**
-	 * MessageId provides a unique identifier for a message.
-	 * it can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	MessageId() interface{}
-	SetMessageId(interface{})
-
-	UserId() string
-	SetUserId(string)
-
-	Address() string
-	SetAddress(string)
-
-	Subject() string
-	SetSubject(string)
-
-	ReplyTo() string
-	SetReplyTo(string)
-
-	/**
-	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	CorrelationId() interface{}
-	SetCorrelationId(interface{})
-
-	ContentType() string
-	SetContentType(string)
-
-	ContentEncoding() string
-	SetContentEncoding(string)
-
-	// ExpiryTime indicates an absoulte time when the message may be dropped.
-	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
-	ExpiryTime() time.Time
-	SetExpiryTime(time.Time)
-
-	CreationTime() time.Time
-	SetCreationTime(time.Time)
-
-	GroupId() string
-	SetGroupId(string)
-
-	GroupSequence() int32
-	SetGroupSequence(int32)
-
-	ReplyToGroupId() string
-	SetReplyToGroupId(string)
-
-	/**
-	 * Instructions can be used to access or modify AMQP delivery instructions.
-	 */
-	Instructions() *map[string]interface{}
-
-	/**
-	 * Annotations  can be used to access or modify AMQP annotations.
-	 */
-	Annotations() *map[string]interface{}
-
-	/**
-	 * Properties  can be used to access or modify the application properties of a message.
-	 */
-	Properties() *map[string]interface{}
-
-	/**
-	 * Body of the message can be any AMQP encodable type.
-	 */
-	Body() interface{}
-	SetBody(interface{})
-
-	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
-	// the message is encoded into it, otherwise a new buffer is created.
-	// Returns the buffer containing the message.
-	Encode(buffer []byte) ([]byte, error)
-}
-
-// NewMessage creates a new message instance. The returned interface contains a pointer.
-func NewMessage() Message {
-	pn := C.pn_message() // Pick up default setting from C message.
-	defer C.pn_message_free(pn)
-	return goMessage(pn)
-}
-
-// Message implementation copies all message data into Go space so it can be proprely
-// memory managed.
-//
-type message struct {
-	inferred, durable, firstAcquirer      bool
-	priority                              uint8
-	ttl                                   time.Duration
-	deliveryCount                         uint32
-	messageId                             interface{}
-	userId, address, subject, replyTo     string
-	contentType, contentEncoding          string
-	groupId, replyToGroupId               string
-	creationTime, expiryTime              time.Time
-	groupSequence                         int32
-	correlationId                         interface{}
-	instructions, annotations, properties map[string]interface{}
-	body                                  interface{}
-}
-
-func (m *message) Inferred() bool                        { return m.inferred }
-func (m *message) SetInferred(b bool)                    { m.inferred = b }
-func (m *message) Durable() bool                         { return m.durable }
-func (m *message) SetDurable(b bool)                     { m.durable = b }
-func (m *message) Priority() uint8                       { return m.priority }
-func (m *message) SetPriority(b uint8)                   { m.priority = b }
-func (m *message) TTL() time.Duration                    { return m.ttl }
-func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
-func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
-func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
-func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
-func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
-func (m *message) MessageId() interface{}                { return m.messageId }
-func (m *message) SetMessageId(id interface{})           { m.messageId = id }
-func (m *message) UserId() string                        { return m.userId }
-func (m *message) SetUserId(s string)                    { m.userId = s }
-func (m *message) Address() string                       { return m.address }
-func (m *message) SetAddress(s string)                   { m.address = s }
-func (m *message) Subject() string                       { return m.subject }
-func (m *message) SetSubject(s string)                   { m.subject = s }
-func (m *message) ReplyTo() string                       { return m.replyTo }
-func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
-func (m *message) CorrelationId() interface{}            { return m.correlationId }
-func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
-func (m *message) ContentType() string                   { return m.contentType }
-func (m *message) SetContentType(s string)               { m.contentType = s }
-func (m *message) ContentEncoding() string               { return m.contentEncoding }
-func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
-func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
-func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
-func (m *message) CreationTime() time.Time               { return m.creationTime }
-func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
-func (m *message) GroupId() string                       { return m.groupId }
-func (m *message) SetGroupId(s string)                   { m.groupId = s }
-func (m *message) GroupSequence() int32                  { return m.groupSequence }
-func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
-func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
-func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
-func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
-func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
-func (m *message) Properties() *map[string]interface{}   { return &m.properties }
-func (m *message) Body() interface{}                     { return m.body }
-func (m *message) SetBody(b interface{})                 { m.body = b }
-
-// rewindGet rewinds and then gets the value from a data object.
-func rewindGet(data *C.pn_data_t, v interface{}) {
-	if data != nil && C.pn_data_size(data) > 0 {
-		C.pn_data_rewind(data)
-		C.pn_data_next(data)
-		get(data, v)
-	}
-}
-
-// goMessage populates a Go message from a pn_message_t
-func goMessage(pn *C.pn_message_t) *message {
-	m := &message{
-		inferred:        bool(C.pn_message_is_inferred(pn)),
-		durable:         bool(C.pn_message_is_durable(pn)),
-		priority:        uint8(C.pn_message_get_priority(pn)),
-		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
-		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
-		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
-		userId:          goString(C.pn_message_get_user_id(pn)),
-		address:         C.GoString(C.pn_message_get_address(pn)),
-		subject:         C.GoString(C.pn_message_get_subject(pn)),
-		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
-		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
-		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
-		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
-		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
-		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
-		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
-		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
-		messageId:       nil,
-		correlationId:   nil,
-		instructions:    make(map[string]interface{}),
-		annotations:     make(map[string]interface{}),
-		properties:      make(map[string]interface{}),
-	}
-	rewindGet(C.pn_message_id(pn), &m.messageId)
-	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
-	rewindGet(C.pn_message_instructions(pn), &m.instructions)
-	rewindGet(C.pn_message_annotations(pn), &m.annotations)
-	rewindGet(C.pn_message_properties(pn), &m.properties)
-	rewindGet(C.pn_message_body(pn), &m.body)
-	return m
-}
-
-// pnMessage populates a pn_message_t from a Go message.
-func (m *message) pnMessage() *C.pn_message_t {
-	pn := C.pn_message()
-	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
-	C.pn_message_set_durable(pn, C.bool(m.Durable()))
-	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
-	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
-	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
-	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
-	replace(C.pn_message_id(pn), m.MessageId())
-	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
-	C.pn_message_set_address(pn, C.CString(m.Address()))
-	C.pn_message_set_subject(pn, C.CString(m.Subject()))
-	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
-	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
-	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
-	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
-	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
-	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
-	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
-	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
-	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
-	replace(C.pn_message_instructions(pn), *m.Instructions())
-	replace(C.pn_message_annotations(pn), *m.Annotations())
-	replace(C.pn_message_properties(pn), *m.Properties())
-	replace(C.pn_message_body(pn), m.Body())
-	return pn
-}
-
-// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
-
-// DecodeMessage decodes bytes as a message
-func DecodeMessage(data []byte) (Message, error) {
-	pnMsg := C.pn_message()
-	defer C.pn_message_free(pnMsg)
-	if len(data) == 0 {
-		return nil, internal.Errorf("empty buffer for decode")
-	}
-	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
-		return nil, internal.Errorf("decoding message: %s",
-			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
-	}
-	return goMessage(pnMsg), nil
-}
-
-// Encode the message into bufffer.
-// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
-// buffer will be returned.
-func (m *message) Encode(buffer []byte) ([]byte, error) {
-	pn := m.pnMessage()
-	defer C.pn_message_free(pn)
-	encode := func(buf []byte) ([]byte, error) {
-		len := cLen(buf)
-		result := C.pn_message_encode(pn, cPtr(buf), &len)
-		switch {
-		case result == C.PN_OVERFLOW:
-			return buf, overflow
-		case result < 0:
-			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
-		default:
-			return buf[:len], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/message_test.go b/proton-c/bindings/go/amqp/message_test.go
deleted file mode 100644
index 46e26de..0000000
--- a/proton-c/bindings/go/amqp/message_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"reflect"
-	"testing"
-	"time"
-)
-
-func roundTrip(t *testing.T, m Message) {
-	buffer, err := m.Encode(nil)
-	if err != nil {
-		t.Fatalf("Encode failed: %v", err)
-	}
-	m2, err := DecodeMessage(buffer)
-	if err != nil {
-		t.Fatalf("Decode failed: %v", err)
-	}
-	if !reflect.DeepEqual(m, m2) {
-		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
-	}
-}
-
-func TestDefaultMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	// Check defaults
-	assertEqual(m.Inferred(), false)
-	assertEqual(m.Durable(), false)
-	assertEqual(m.Priority(), uint8(4))
-	assertEqual(m.TTL(), time.Duration(0))
-	assertEqual(m.UserId(), "")
-	assertEqual(m.Address(), "")
-	assertEqual(m.Subject(), "")
-	assertEqual(m.ReplyTo(), "")
-	assertEqual(m.ContentType(), "")
-	assertEqual(m.ContentEncoding(), "")
-	assertEqual(m.GroupId(), "")
-	assertEqual(m.GroupSequence(), int32(0))
-	assertEqual(m.ReplyToGroupId(), "")
-	assertEqual(m.MessageId(), nil)
-	assertEqual(m.CorrelationId(), nil)
-	assertEqual(*m.Instructions(), map[string]interface{}{})
-	assertEqual(*m.Annotations(), map[string]interface{}{})
-	assertEqual(*m.Properties(), map[string]interface{}{})
-	assertEqual(m.Body(), nil)
-
-	roundTrip(t, m)
-}
-
-func TestMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	m.SetInferred(false)
-	m.SetDurable(true)
-	m.SetPriority(42)
-	m.SetTTL(0)
-	m.SetUserId("user")
-	m.SetAddress("address")
-	m.SetSubject("subject")
-	m.SetReplyTo("replyto")
-	m.SetContentType("content")
-	m.SetContentEncoding("encoding")
-	m.SetGroupId("group")
-	m.SetGroupSequence(42)
-	m.SetReplyToGroupId("replytogroup")
-	m.SetMessageId("id")
-	m.SetCorrelationId("correlation")
-	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
-	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
-	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
-	m.SetBody("hello")
-	roundTrip(t, m)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/types.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/types.go b/proton-c/bindings/go/amqp/types.go
deleted file mode 100644
index 8713520..0000000
--- a/proton-c/bindings/go/amqp/types.go
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"reflect"
-	"time"
-	"unsafe"
-)
-
-func pnTypeString(pt C.pn_type_t) string {
-	switch pt {
-	case C.PN_NULL:
-		return "null"
-	case C.PN_BOOL:
-		return "bool"
-	case C.PN_UBYTE:
-		return "ubyte"
-	case C.PN_BYTE:
-		return "byte"
-	case C.PN_USHORT:
-		return "ushort"
-	case C.PN_SHORT:
-		return "short"
-	case C.PN_CHAR:
-		return "char"
-	case C.PN_UINT:
-		return "uint"
-	case C.PN_INT:
-		return "int"
-	case C.PN_ULONG:
-		return "ulong"
-	case C.PN_LONG:
-		return "long"
-	case C.PN_TIMESTAMP:
-		return "timestamp"
-	case C.PN_FLOAT:
-		return "float"
-	case C.PN_DOUBLE:
-		return "double"
-	case C.PN_DECIMAL32:
-		return "decimal32"
-	case C.PN_DECIMAL64:
-		return "decimal64"
-	case C.PN_DECIMAL128:
-		return "decimal128"
-	case C.PN_UUID:
-		return "uuid"
-	case C.PN_BINARY:
-		return "binary"
-	case C.PN_STRING:
-		return "string"
-	case C.PN_SYMBOL:
-		return "symbol"
-	case C.PN_DESCRIBED:
-		return "described"
-	case C.PN_ARRAY:
-		return "array"
-	case C.PN_LIST:
-		return "list"
-	case C.PN_MAP:
-		return "map"
-	case C.PN_DATA_TYPE_ERROR:
-		return "no-data"
-	default:
-		return fmt.Sprintf("unknown-type(%d)", pt)
-	}
-}
-
-// Go types
-var (
-	bytesType = reflect.TypeOf([]byte{})
-	valueType = reflect.TypeOf(reflect.Value{})
-)
-
-// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
-
-// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
-type Map map[interface{}]interface{}
-
-// List is a generic list that can hold mixed values and can represent any AMQP list.
-//
-type List []interface{}
-
-// Symbol is a string that is encoded as an AMQP symbol
-type Symbol string
-
-// Binary is a string that is encoded as an AMQP binary.
-// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
-// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
-type Binary string
-
-// GoString for Map prints values with their types, useful for debugging.
-func (m Map) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", m)
-	i := len(m)
-	for k, v := range m {
-		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
-		i--
-		if i > 0 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// GoString for List prints values with their types, useful for debugging.
-func (l List) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", l)
-	for i := 0; i < len(l); i++ {
-		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
-		if i == len(l)-1 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// pnTime converts Go time.Time to Proton millisecond Unix time.
-func pnTime(t time.Time) C.pn_timestamp_t {
-	secs := t.Unix()
-	// Note: sub-second accuracy is not guaraunteed if the Unix time in
-	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
-	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
-	return C.pn_timestamp_t(secs*1000 + msecs)
-}
-
-// goTime converts a pn_timestamp_t to a Go time.Time.
-func goTime(t C.pn_timestamp_t) time.Time {
-	secs := int64(t) / 1000
-	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
-	return time.Unix(secs, nsecs)
-}
-
-func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
-	if cBytes.start != nil {
-		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
-	}
-	return
-}
-
-func goString(cBytes C.pn_bytes_t) (str string) {
-	if cBytes.start != nil {
-		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
-	}
-	return
-}
-
-func pnBytes(b []byte) C.pn_bytes_t {
-	if len(b) == 0 {
-		return C.pn_bytes_t{0, nil}
-	} else {
-		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
-	}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/uid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/uid.go b/proton-c/bindings/go/amqp/uid.go
deleted file mode 100644
index 944bf6f..0000000
--- a/proton-c/bindings/go/amqp/uid.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Generating unique IDs for various things.
-
-package amqp
-
-import (
-	"strconv"
-	"sync/atomic"
-)
-
-// A simple atomic counter to generate unique 64 bit IDs.
-type UidCounter struct{ count uint64 }
-
-// NextInt gets the next uint64 value from the atomic counter.
-func (uc *UidCounter) NextInt() uint64 {
-	return atomic.AddUint64(&uc.count, 1)
-}
-
-// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
-func (uc *UidCounter) Next() string {
-	return strconv.FormatUint(uc.NextInt(), 32)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/unmarshal.go b/proton-c/bindings/go/amqp/unmarshal.go
deleted file mode 100644
index 89ab64a..0000000
--- a/proton-c/bindings/go/amqp/unmarshal.go
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-oor more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-const minDecode = 1024
-
-// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
-type BadUnmarshal struct {
-	// The name of the AMQP type.
-	AMQPType string
-	// The Go type.
-	GoType reflect.Type
-}
-
-func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
-	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
-}
-
-func (e BadUnmarshal) Error() string {
-	if e.GoType.Kind() != reflect.Ptr {
-		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
-	} else {
-		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
-	}
-}
-
-//
-// Decoding from a pn_data_t
-//
-// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
-// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
-//
-
-// Decoder decodes AMQP values from an io.Reader.
-//
-type Decoder struct {
-	reader io.Reader
-	buffer bytes.Buffer
-}
-
-// NewDecoder returns a new decoder that reads from r.
-//
-// The decoder has it's own buffer and may read more data than required for the
-// AMQP values requested.  Use Buffered to see if there is data left in the
-// buffer.
-//
-func NewDecoder(r io.Reader) *Decoder {
-	return &Decoder{r, bytes.Buffer{}}
-}
-
-// Buffered returns a reader of the data remaining in the Decoder's buffer. The
-// reader is valid until the next call to Decode.
-//
-func (d *Decoder) Buffered() io.Reader {
-	return bytes.NewReader(d.buffer.Bytes())
-}
-
-// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
-//
-// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
-//
-func (d *Decoder) Decode(v interface{}) (err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	var n int
-	for n == 0 && err == nil {
-		n = unmarshal(data, d.buffer.Bytes(), v)
-		if n == 0 { // n == 0 means not enough data, read more
-			err = d.more()
-			if err != nil {
-				return
-			}
-		}
-	}
-	d.buffer.Next(n)
-	return
-}
-
-/*
-Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
-Types are converted as follows:
-
- +---------------------------+----------------------------------------------------------------------+
- |To Go types                |From AMQP types                                                       |
- +===========================+======================================================================+
- |bool                       |bool                                                                  |
- +---------------------------+----------------------------------------------------------------------+
- |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
- |int32, int64               |long.                                                                 |
- +---------------------------+----------------------------------------------------------------------+
- |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
- |uint32, uint64 types       |uint, ulong                                                           |
- +---------------------------+----------------------------------------------------------------------+
- |float32, float64           |Equivalent or smaller float or double.                                |
- +---------------------------+----------------------------------------------------------------------+
- |string, []byte             |string, symbol or binary.                                             |
- +---------------------------+----------------------------------------------------------------------+
- |Symbol                     |symbol                                                                |
- +---------------------------+----------------------------------------------------------------------+
- |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
- +---------------------------+----------------------------------------------------------------------+
- |Map                        |map, any AMQP map                                                     |
- +---------------------------+----------------------------------------------------------------------+
- |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
- |                           +------------------------+---------------------------------------------+
- |                           |AMQP Type               |Go Type in interface{}                       |
- |                           +========================+=============================================+
- |                           |bool                    |bool                                         |
- |                           +------------------------+---------------------------------------------+
- |                           |char                    |unint8                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |byte,short,int,long     |int8,int16,int32,int64                       |
- |                           +------------------------+---------------------------------------------+
- |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
- |                           +------------------------+---------------------------------------------+
- |                           |float, double           |float32, float64                             |
- |                           +------------------------+---------------------------------------------+
- |                           |string                  |string                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |symbol                  |Symbol                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |binary                  |Binary                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |nulll                   |nil                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |map                     |Map                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |list                    |List                                         |
- +---------------------------+------------------------+---------------------------------------------+
-
-The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
-
-TODO types
-
-AMQP: timestamp, decimal32/64/128, uuid, described, array.
-
-Go: array, struct.
-
-Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
-representation for those.
-*/
-func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	n = unmarshal(data, bytes, v)
-	if n == 0 {
-		err = internal.Errorf("not enough data")
-	}
-	return
-}
-
-// more reads more data when we can't parse a complete AMQP type
-func (d *Decoder) more() error {
-	var readSize int64 = minDecode
-	if int64(d.buffer.Len()) > readSize { // Grow by doubling
-		readSize = int64(d.buffer.Len())
-	}
-	var n int64
-	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
-	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
-		err = io.EOF
-	}
-	return err
-}
-
-// unmarshal decodes from bytes and converts into the value pointed to by v.
-// Used by Unmarshal and Decode
-//
-// Returns the number of bytes decoded or 0 if not enough data.
-//
-func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
-	n = decode(data, bytes)
-	if n == 0 {
-		return 0
-	}
-	get(data, v)
-	return
-}
-
-// get value from data into value pointed at by v.
-func get(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-
-	switch v := v.(type) {
-	case *bool:
-		switch pnType {
-		case C.PN_BOOL:
-			*v = bool(C.pn_data_get_bool(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int8(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int8(C.pn_data_get_byte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint8(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint8(C.pn_data_get_ubyte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int16(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int16(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int16(C.pn_data_get_short(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint16(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint16(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint16(C.pn_data_get_ushort(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int32(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int32(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int32(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int32(C.pn_data_get_int(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint32(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint32(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint32(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint32(C.pn_data_get_uint(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int64(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int64(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int64(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int64(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			*v = int64(C.pn_data_get_long(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint64(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint64(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint64(C.pn_data_get_ushort(data))
-		case C.PN_ULONG:
-			*v = uint64(C.pn_data_get_ulong(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = int(C.pn_data_get_long(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint(C.pn_data_get_uint(data))
-		case C.PN_ULONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = uint(C.pn_data_get_ulong(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float32:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float32(C.pn_data_get_float(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float64:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float64(C.pn_data_get_float(data))
-		case C.PN_DOUBLE:
-			*v = float64(C.pn_data_get_double(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *string:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goString(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goString(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goString(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *[]byte:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goBytes(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goBytes(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goBytes(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Binary:
-		switch pnType {
-		case C.PN_BINARY:
-			*v = Binary(goBytes(C.pn_data_get_binary(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Symbol:
-		switch pnType {
-		case C.PN_SYMBOL:
-			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *interface{}:
-		getInterface(data, v)
-
-	default:
-		if reflect.TypeOf(v).Kind() != reflect.Ptr {
-			panic(newBadUnmarshal(pnType, v))
-		}
-		switch reflect.TypeOf(v).Elem().Kind() {
-		case reflect.Map:
-			getMap(data, v)
-		case reflect.Slice:
-			getList(data, v)
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	}
-	err := dataError("unmarshaling", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-// Getting into an interface is driven completely by the AMQP type, since the interface{}
-// target is type-neutral.
-func getInterface(data *C.pn_data_t, v *interface{}) {
-	pnType := C.pn_data_type(data)
-	switch pnType {
-	case C.PN_NULL:
-		*v = nil
-	case C.PN_BOOL:
-		*v = bool(C.pn_data_get_bool(data))
-	case C.PN_UBYTE:
-		*v = uint8(C.pn_data_get_ubyte(data))
-	case C.PN_BYTE:
-		*v = int8(C.pn_data_get_byte(data))
-	case C.PN_USHORT:
-		*v = uint16(C.pn_data_get_ushort(data))
-	case C.PN_SHORT:
-		*v = int16(C.pn_data_get_short(data))
-	case C.PN_UINT:
-		*v = uint32(C.pn_data_get_uint(data))
-	case C.PN_INT:
-		*v = int32(C.pn_data_get_int(data))
-	case C.PN_CHAR:
-		*v = uint8(C.pn_data_get_char(data))
-	case C.PN_ULONG:
-		*v = uint64(C.pn_data_get_ulong(data))
-	case C.PN_LONG:
-		*v = int64(C.pn_data_get_long(data))
-	case C.PN_FLOAT:
-		*v = float32(C.pn_data_get_float(data))
-	case C.PN_DOUBLE:
-		*v = float64(C.pn_data_get_double(data))
-	case C.PN_BINARY:
-		*v = Binary(goBytes(C.pn_data_get_binary(data)))
-	case C.PN_STRING:
-		*v = goString(C.pn_data_get_string(data))
-	case C.PN_SYMBOL:
-		*v = Symbol(goString(C.pn_data_get_symbol(data)))
-	case C.PN_MAP:
-		m := make(Map)
-		get(data, &m)
-		*v = m // FIXME aconway 2015-03-13: avoid the copy?
-	case C.PN_LIST:
-		l := make(List, 0)
-		get(data, &l)
-		*v = l // FIXME aconway 2015-03-13: avoid the copy?
-	default:
-		panic(newBadUnmarshal(pnType, v))
-	}
-}
-
-// get into map pointed at by v
-func getMap(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_MAP {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	mapValue := reflect.ValueOf(v).Elem()
-	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
-	count := int(C.pn_data_get_map(data))
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count/2; i++ {
-			if bool(C.pn_data_next(data)) {
-				key := reflect.New(mapValue.Type().Key())
-				get(data, key.Interface())
-				if bool(C.pn_data_next(data)) {
-					val := reflect.New(mapValue.Type().Elem())
-					get(data, val.Interface())
-					mapValue.SetMapIndex(key.Elem(), val.Elem())
-				}
-			}
-		}
-		C.pn_data_exit(data)
-	}
-}
-
-func getList(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_LIST {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	count := int(C.pn_data_get_list(data))
-	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count; i++ {
-			if bool(C.pn_data_next(data)) {
-				val := reflect.New(listValue.Type().Elem())
-				get(data, val.Interface())
-				listValue.Index(i).Set(val.Elem())
-			}
-		}
-		C.pn_data_exit(data)
-	}
-	// FIXME aconway 2015-04-09: avoid the copy?
-	reflect.ValueOf(v).Elem().Set(listValue)
-}
-
-// decode from bytes.
-// Return bytes decoded or 0 if we could not decode a complete object.
-//
-func decode(data *C.pn_data_t, bytes []byte) int {
-	if len(bytes) == 0 {
-		return 0
-	}
-	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
-	if n == int(C.PN_UNDERFLOW) {
-		C.pn_error_clear(C.pn_data_error(data))
-		return 0
-	} else if n <= 0 {
-		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
-	}
-	return n
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/url.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/url.go b/proton-c/bindings/go/amqp/url.go
deleted file mode 100644
index 58711c7..0000000
--- a/proton-c/bindings/go/amqp/url.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-/*
-#include <stdlib.h>
-#include <string.h>
-#include <proton/url.h>
-
-// Helper function for setting URL fields.
-typedef void (*setter_fn)(pn_url_t* url, const char* value);
-inline void	set(pn_url_t *url, setter_fn s, const char* value) {
-  s(url, value);
-}
-*/
-import "C"
-
-import (
-	"net"
-	"net/url"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-const (
-	amqp  string = "amqp"
-	amqps        = "amqps"
-)
-
-// ParseUrl parses an AMQP URL string and returns a net/url.Url.
-//
-// It is more forgiving than net/url.Parse and allows most of the parts of the
-// URL to be missing, assuming AMQP defaults.
-//
-func ParseURL(s string) (u *url.URL, err error) {
-	cstr := C.CString(s)
-	defer C.free(unsafe.Pointer(cstr))
-	pnUrl := C.pn_url_parse(cstr)
-	if pnUrl == nil {
-		return nil, internal.Errorf("bad URL %#v", s)
-	}
-	defer C.pn_url_free(pnUrl)
-
-	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
-	username := C.GoString(C.pn_url_get_username(pnUrl))
-	password := C.GoString(C.pn_url_get_password(pnUrl))
-	host := C.GoString(C.pn_url_get_host(pnUrl))
-	port := C.GoString(C.pn_url_get_port(pnUrl))
-	path := C.GoString(C.pn_url_get_path(pnUrl))
-
-	if err != nil {
-		return nil, internal.Errorf("bad URL %#v: %s", s, err)
-	}
-	if scheme == "" {
-		scheme = amqp
-	}
-	if port == "" {
-		if scheme == amqps {
-			port = amqps
-		} else {
-			port = amqp
-		}
-	}
-	var user *url.Userinfo
-	if password != "" {
-		user = url.UserPassword(username, password)
-	} else if username != "" {
-		user = url.User(username)
-	}
-
-	u = &url.URL{
-		Scheme: scheme,
-		User:   user,
-		Host:   net.JoinHostPort(host, port),
-		Path:   path,
-	}
-
-	return u, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/url_test.go b/proton-c/bindings/go/amqp/url_test.go
deleted file mode 100644
index f80f1c4..0000000
--- a/proton-c/bindings/go/amqp/url_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"fmt"
-)
-
-func ExampleParseURL() {
-	for _, s := range []string{
-		"amqp://username:password@host:1234/path",
-		"host:1234",
-		"host",
-		":1234",
-		"host/path",
-		"amqps://host",
-		"",
-	} {
-		u, err := ParseURL(s)
-		if err != nil {
-			fmt.Println(err)
-		} else {
-			fmt.Println(u)
-		}
-	}
-	// Output:
-	// amqp://username:password@host:1234/path
-	// amqp://host:1234
-	// amqp://host:amqp
-	// amqp://:1234
-	// amqp://host:amqp/path
-	// amqps://host:amqps
-	// proton: bad URL ""
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/event/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/doc.go b/proton-c/bindings/go/event/doc.go
deleted file mode 100644
index 7a9ec12..0000000
--- a/proton-c/bindings/go/event/doc.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package event provides a low-level API to the proton AMQP engine.
-
-For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
-It provides a higher-level, concurrent API that is easier to use.
-
-The API is event based. There are two alternative styles of handler. EventHandler
-provides the core proton events. MessagingHandler provides a slighly simplified
-view of the event stream and automates some common tasks.
-
-See type Pump documentation for more details of the interaction between proton
-events and goroutines.
-*/
-package event
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/event/handlers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/handlers.go b/proton-c/bindings/go/event/handlers.go
deleted file mode 100644
index d76fac9..0000000
--- a/proton-c/bindings/go/event/handlers.go
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-)
-
-// EventHandler handles core proton events.
-type EventHandler interface {
-	// HandleEvent is called with an event.
-	// Typically HandleEvent() is implemented as a switch on e.Type()
-	HandleEvent(e Event) error
-}
-
-// cHandler wraps a C pn_handler_t
-type cHandler struct {
-	pn *C.pn_handler_t
-}
-
-func (h cHandler) HandleEvent(e Event) error {
-	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
-	return nil // FIXME aconway 2015-03-31: error handling
-}
-
-// MessagingHandler provides an alternative interface to EventHandler.
-// it is easier to use for most applications that send and receive messages.
-//
-// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
-// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
-//
-type MessagingHandler interface {
-	HandleMessagingEvent(MessagingEventType, Event) error
-}
-
-// MessagingEventType provides a set of events that are easier to work with than the
-// core events defined by EventType
-//
-// There are 3 types of "endpoint": Connection, Session and Link.
-// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
-// The meaning of these events is as follows:
-//
-// Opening: The remote end opened, the local end will open automatically.
-//
-// Opened: Both ends are open, regardless of which end opened first.
-//
-// Closing: The remote end closed without error, the local end will close automatically.
-//
-// Error: The remote end closed with an error, the local end will close automatically.
-//
-// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
-//
-type MessagingEventType int
-
-const (
-	// The event loop starts.
-	MStart MessagingEventType = iota
-	// The peer closes the connection with an error condition.
-	MConnectionError
-	// The peer closes the session with an error condition.
-	MSessionError
-	// The peer closes the link with an error condition.
-	MLinkError
-	// The peer Initiates the opening of the connection.
-	MConnectionOpening
-	// The peer initiates the opening of the session.
-	MSessionOpening
-	// The peer initiates the opening of the link.
-	MLinkOpening
-	// The connection is opened.
-	MConnectionOpened
-	// The session is opened.
-	MSessionOpened
-	// The link is opened.
-	MLinkOpened
-	// The peer initiates the closing of the connection.
-	MConnectionClosing
-	// The peer initiates the closing of the session.
-	MSessionClosing
-	// The peer initiates the closing of the link.
-	MLinkClosing
-	// Both ends of the connection are closed.
-	MConnectionClosed
-	// Both ends of the session are closed.
-	MSessionClosed
-	// Both ends of the link are closed.
-	MLinkClosed
-	// The connection is disconnected.
-	MConnectionDisconnected
-	// The session's connection was disconnected
-	MSessionDisconnected
-	// The session's connection was disconnected
-	MLinkDisconnected
-	// The sender link has credit and messages can
-	// therefore be transferred.
-	MSendable
-	// The remote peer accepts an outgoing message.
-	MAccepted
-	// The remote peer rejects an outgoing message.
-	MRejected
-	// The peer releases an outgoing message. Note that this may be in response to
-	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
-	MReleased
-	// The peer has settled the outgoing message. This is the point at which it
-	// shouod never be retransmitted.
-	MSettled
-	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
-	// To manage the outcome of this messages (e.g. to accept or reject the message)
-	// use Event.Delivery().
-	MMessage
-	// The event loop terminates, there are no more events to process.
-	MFinal
-)
-
-func (t MessagingEventType) String() string {
-	switch t {
-	case MStart:
-		return "Start"
-	case MConnectionError:
-		return "ConnectionError"
-	case MSessionError:
-		return "SessionError"
-	case MLinkError:
-		return "LinkError"
-	case MConnectionOpening:
-		return "ConnectionOpening"
-	case MSessionOpening:
-		return "SessionOpening"
-	case MLinkOpening:
-		return "LinkOpening"
-	case MConnectionOpened:
-		return "ConnectionOpened"
-	case MSessionOpened:
-		return "SessionOpened"
-	case MLinkOpened:
-		return "LinkOpened"
-	case MConnectionClosing:
-		return "ConnectionClosing"
-	case MSessionClosing:
-		return "SessionClosing"
-	case MLinkClosing:
-		return "LinkClosing"
-	case MConnectionClosed:
-		return "ConnectionClosed"
-	case MSessionClosed:
-		return "SessionClosed"
-	case MLinkClosed:
-		return "LinkClosed"
-	case MConnectionDisconnected:
-		return "ConnectionDisconnected"
-	case MSessionDisconnected:
-		return "MSessionDisconnected"
-	case MLinkDisconnected:
-		return "MLinkDisconnected"
-	case MSendable:
-		return "Sendable"
-	case MAccepted:
-		return "Accepted"
-	case MRejected:
-		return "Rejected"
-	case MReleased:
-		return "Released"
-	case MSettled:
-		return "Settled"
-	case MMessage:
-		return "Message"
-	default:
-		return "Unknown"
-	}
-}
-
-// ResourceHandler provides a simple way to track the creation and deletion of
-// various proton objects.
-// endpointDelegator captures common patterns for endpoints opening/closing
-type endpointDelegator struct {
-	remoteOpen, remoteClose, localOpen, localClose EventType
-	opening, opened, closing, closed, error        MessagingEventType
-	endpoint                                       func(Event) Endpoint
-	delegate                                       MessagingHandler
-}
-
-// HandleEvent handles an open/close event for an endpoint in a generic way.
-func (d endpointDelegator) HandleEvent(e Event) (err error) {
-	endpoint := d.endpoint(e)
-	state := endpoint.State()
-
-	switch e.Type() {
-
-	case d.localOpen:
-		if state.Is(SRemoteActive) {
-			err = d.delegate.HandleMessagingEvent(d.opened, e)
-		}
-
-	case d.remoteOpen:
-		switch {
-		case state.Is(SLocalActive):
-			err = d.delegate.HandleMessagingEvent(d.opened, e)
-		case state.Is(SLocalUninit):
-			err = d.delegate.HandleMessagingEvent(d.opening, e)
-			if err == nil {
-				endpoint.Open()
-			}
-		}
-
-	case d.remoteClose:
-		var err1 error
-		if endpoint.RemoteCondition().IsSet() { // Closed with error
-			err1 = d.delegate.HandleMessagingEvent(d.error, e)
-			if err1 == nil { // Don't overwrite an application error.
-				err1 = endpoint.RemoteCondition().Error()
-			}
-		} else {
-			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
-		}
-		if state.Is(SLocalClosed) {
-			err = d.delegate.HandleMessagingEvent(d.closed, e)
-		} else if state.Is(SLocalActive) {
-			endpoint.Close()
-		}
-		if err1 != nil { // Keep the first error.
-			err = err1
-		}
-
-	case d.localClose:
-		if state.Is(SRemoteClosed) {
-			err = d.delegate.HandleMessagingEvent(d.closed, e)
-		}
-
-	default:
-		// We shouldn't be called with any other event type.
-		panic(internal.Errorf("internal error, not an open/close event: %s", e))
-	}
-
-	return err
-}
-
-// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
-// You can modify the exported fields before you pass the MessagingDelegator to
-// a Pump.
-type MessagingDelegator struct {
-	delegate                   MessagingHandler
-	connection, session, link  endpointDelegator
-	handshaker, flowcontroller EventHandler
-
-	// AutoSettle (default true) automatically pre-settle outgoing messages.
-	AutoSettle bool
-	// AutoAccept (default true) automatically accept and settle incoming messages
-	// if they are not settled by the delegate.
-	AutoAccept bool
-	// Prefetch (default 10) initial credit to issue for incoming links.
-	Prefetch int
-	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
-	PeerCloseError bool
-}
-
-func NewMessagingDelegator(h MessagingHandler) EventHandler {
-	return &MessagingDelegator{
-		delegate: h,
-		connection: endpointDelegator{
-			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
-			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
-			MConnectionError,
-			func(e Event) Endpoint { return e.Connection() },
-			h,
-		},
-		session: endpointDelegator{
-			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
-			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
-			MSessionError,
-			func(e Event) Endpoint { return e.Session() },
-			h,
-		},
-		link: endpointDelegator{
-			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
-			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
-			MLinkError,
-			func(e Event) Endpoint { return e.Link() },
-			h,
-		},
-		flowcontroller: nil,
-		AutoSettle:     true,
-		AutoAccept:     true,
-		Prefetch:       10,
-		PeerCloseError: false,
-	}
-}
-
-func handleIf(h EventHandler, e Event) error {
-	if h != nil {
-		return h.HandleEvent(e)
-	}
-	return nil
-}
-
-// Handle a proton event by passing the corresponding MessagingEvent(s) to
-// the MessagingHandler.
-func (d *MessagingDelegator) HandleEvent(e Event) error {
-	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
-
-	switch e.Type() {
-
-	case EConnectionInit:
-		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
-		d.delegate.HandleMessagingEvent(MStart, e)
-
-	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
-		return d.connection.HandleEvent(e)
-
-	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
-		return d.session.HandleEvent(e)
-
-	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
-		return d.link.HandleEvent(e)
-
-	case ELinkFlow:
-		if e.Link().IsSender() && e.Link().Credit() > 0 {
-			return d.delegate.HandleMessagingEvent(MSendable, e)
-		}
-
-	case EDelivery:
-		if e.Delivery().Link().IsReceiver() {
-			d.incoming(e)
-		} else {
-			d.outgoing(e)
-		}
-
-	case ETransportTailClosed:
-		c := e.Connection()
-		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
-			e2 := e
-			e2.link = l
-			e2.session = l.Session()
-			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
-		}
-		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
-			e2 := e
-			e2.session = s
-			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
-		}
-		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
-		d.delegate.HandleMessagingEvent(MFinal, e)
-	}
-	return nil
-}
-
-func (d *MessagingDelegator) incoming(e Event) (err error) {
-	delivery := e.Delivery()
-	if delivery.Readable() && !delivery.Partial() {
-		if e.Link().State().Is(SLocalClosed) {
-			e.Link().Advance()
-			if d.AutoAccept {
-				delivery.Release(false)
-			}
-		} else {
-			err = d.delegate.HandleMessagingEvent(MMessage, e)
-			e.Link().Advance()
-			if d.AutoAccept && !delivery.Settled() {
-				if err == nil {
-					delivery.Accept()
-				} else {
-					delivery.Reject()
-				}
-			}
-		}
-	} else if delivery.Updated() && delivery.Settled() {
-		err = d.delegate.HandleMessagingEvent(MSettled, e)
-	}
-	return
-}
-
-func (d *MessagingDelegator) outgoing(e Event) (err error) {
-	delivery := e.Delivery()
-	if delivery.Updated() {
-		switch delivery.Remote().Type() {
-		case Accepted:
-			err = d.delegate.HandleMessagingEvent(MAccepted, e)
-		case Rejected:
-			err = d.delegate.HandleMessagingEvent(MRejected, e)
-		case Released, Modified:
-			err = d.delegate.HandleMessagingEvent(MReleased, e)
-		}
-		if err == nil && delivery.Settled() {
-			err = d.delegate.HandleMessagingEvent(MSettled, e)
-		}
-		if err == nil && d.AutoSettle {
-			delivery.Settle()
-		}
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/event/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/message.go b/proton-c/bindings/go/event/message.go
deleted file mode 100644
index d900744..0000000
--- a/proton-c/bindings/go/event/message.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/internal"
-)
-
-// DecodeMessage decodes the message containined in a delivery event.
-func DecodeMessage(e Event) (m amqp.Message, err error) {
-	defer internal.DoRecover(&err)
-	delivery := e.Delivery()
-	if !delivery.Readable() || delivery.Partial() {
-		return nil, internal.Errorf("attempting to get incomplete message")
-	}
-	data := make([]byte, delivery.Pending())
-	result := delivery.Link().Recv(data)
-	if result != len(data) {
-		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
-	}
-	return amqp.DecodeMessage(data)
-}
-
-// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
-var tags amqp.UidCounter
-
-// Send sends a amqp.Message over a Link.
-// Returns a Delivery that can be use to determine the outcome of the message.
-func (link Link) Send(m amqp.Message) (Delivery, error) {
-	if !link.IsSender() {
-		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
-	}
-	// FIXME aconway 2015-04-08: buffering, error handling
-	delivery := link.Delivery(tags.Next())
-	bytes, err := m.Encode(nil)
-	if err != nil {
-		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
-	}
-	result := link.SendBytes(bytes)
-	link.Advance()
-	if result != len(bytes) {
-		if result < 0 {
-			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
-		} else {
-			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
-		}
-	}
-	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
-		delivery.Settle()
-	}
-	return delivery, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/event/pump.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/pump.go b/proton-c/bindings/go/event/pump.go
deleted file mode 100644
index db022ff..0000000
--- a/proton-c/bindings/go/event/pump.go
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/connection.h>
-// #include <proton/transport.h>
-// #include <proton/event.h>
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-// #include <proton/transport.h>
-// #include <proton/session.h>
-// #include <memory.h>
-// #include <stdlib.h>
-//
-// PN_HANDLE(REMOTE_ADDR)
-import "C"
-
-import (
-	"fmt"
-	"io"
-	"net"
-	"qpid.apache.org/proton/go/internal"
-	"sync"
-	"unsafe"
-)
-
-// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
-type bufferChan struct {
-	buffers    chan []byte
-	buf1, buf2 []byte
-}
-
-func newBufferChan(size int) *bufferChan {
-	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
-}
-
-func (b *bufferChan) buffer() []byte {
-	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
-	return b.buf1[:cap(b.buf1)]
-}
-
-// FIXME aconway 2015-05-04: direct sending to Inject may block user goroutines if
-// the pum stops. Make this a function that selects on running.
-
-// FIXME aconway 2015-05-05: for consistency should Pump be called Driver?
-
-/*
-Pump reads from a net.Conn, decodes AMQP events and calls the appropriate
-Handler functions. Actions taken by Handler functions (such as sending messages)
-are encoded and written to the net.Conn.
-
-The proton protocol engine is single threaded (per connection). The Pump runs
-proton in the goroutine that calls Pump.Run() and creates goroutines to feed
-data to/from a net.Conn. You can create multiple Pumps to handle multiple
-connections concurrently.
-
-Methods in this package can only be called in the goroutine that executes the
-corresponding Pump.Run(). You implement the EventHandler or MessagingHandler
-interfaces and provide those values to NewPump(). Their HandleEvent method will be
-called in the Pump goroutine, in typical event-driven style.
-
-Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
-other goroutines, store them, or use them as map indexes. Effectively they are
-just C pointers.  Other goroutines cannot call their methods directly but they
-can can create function closures that call their methods and send those closures
-to the Pump.Inject channel. They will execute safely in the pump
-goroutine. Injected functions, or your handlers, can set up channels to get
-results back to other goroutines.
-
-You are responsible for ensuring you don't use an event value after the C object
-has been deleted. The handler methods will tell you when a value is no longer
-valid. For example after a MethodHandler handles a LinkClosed event, that link
-is no longer valid. If you do Link.Close() yourself (in a handler or injected
-function) the link remains valid until the corresponing LinkClosed event is
-received by the handler.
-
-Pump.Close() will take care of cleaning up any remaining values and types when
-you are done with the Pump. All values associated with a pump become invalid
-when you call Pump.Close()
-
-The qpid.apache.org/proton/go/messaging package will do all this for you, so unless
-you are doing something fairly low-level it is probably a better choice.
-
-*/
-type Pump struct {
-	// Error is set on exit from Run() if there was an error.
-	Error error
-	// Channel to inject functions to be executed in the Pump's proton event loop.
-	Inject chan func()
-
-	conn       net.Conn
-	transport  *C.pn_transport_t
-	connection *C.pn_connection_t
-	collector  *C.pn_collector_t
-	read       *bufferChan    // Read buffers channel.
-	write      *bufferChan    // Write buffers channel.
-	handlers   []EventHandler // Handlers for proton events.
-	running    chan struct{}  // This channel will be closed when the goroutines are done.
-}
-
-const bufferSize = 4096
-
-var pumps map[*C.pn_connection_t]*Pump
-
-func init() {
-	pumps = make(map[*C.pn_connection_t]*Pump)
-}
-
-// NewPump initializes a pump with a connection and handlers. To start it running:
-//    p := NewPump(...)
-//    go run p.Run()
-// The goroutine will exit when the pump is closed or disconnected.
-// You can check for errors on Pump.Error.
-//
-func NewPump(conn net.Conn, handlers ...EventHandler) (*Pump, error) {
-	// Save the connection ID for Connection.String()
-	p := &Pump{
-		Inject:     make(chan func(), 100), // FIXME aconway 2015-05-04: blocking hack
-		conn:       conn,
-		transport:  C.pn_transport(),
-		connection: C.pn_connection(),
-		collector:  C.pn_collector(),
-		handlers:   handlers,
-		read:       newBufferChan(bufferSize),
-		write:      newBufferChan(bufferSize),
-		running:    make(chan struct{}),
-	}
-	if p.transport == nil || p.connection == nil || p.collector == nil {
-		return nil, internal.Errorf("failed to allocate pump")
-	}
-	pnErr := int(C.pn_transport_bind(p.transport, p.connection))
-	if pnErr != 0 {
-		return nil, internal.Errorf("cannot setup pump: %s", internal.PnErrorCode(pnErr))
-	}
-	C.pn_connection_collect(p.connection, p.collector)
-	C.pn_connection_open(p.connection)
-	pumps[p.connection] = p
-	return p, nil
-}
-
-func (p *Pump) String() string {
-	return fmt.Sprintf("(%s-%s)", p.conn.LocalAddr(), p.conn.RemoteAddr())
-}
-
-func (p *Pump) Id() string {
-	return fmt.Sprintf("%p", &p)
-}
-
-// setError sets error only if not already set
-func (p *Pump) setError(e error) {
-	if p.Error == nil {
-		p.Error = e
-	}
-}
-
-// Server puts the Pump in server mode, meaning it will auto-detect security settings on
-// the incoming connnection such as use of SASL and SSL.
-// Must be called before Run()
-//
-func (p *Pump) Server() {
-	C.pn_transport_set_server(p.transport)
-}
-
-func (p *Pump) free() {
-	if p.connection != nil {
-		C.pn_connection_free(p.connection)
-	}
-	if p.transport != nil {
-		C.pn_transport_free(p.transport)
-	}
-	if p.collector != nil {
-		C.pn_collector_free(p.collector)
-	}
-	for _, h := range p.handlers {
-		switch h := h.(type) {
-		case cHandler:
-			C.pn_handler_free(h.pn)
-		}
-	}
-}
-
-// Close closes the AMQP connection, the net.Conn, and stops associated goroutines.
-// It will cause Run() to return. Run() may return earlier if the network disconnects
-// but you must still call Close() to clean everything up.
-//
-// Methods on values associated with the pump (Connections, Sessions, Links) will panic
-// if called after Close()
-//
-func (p *Pump) Close() error {
-	// If the pump is still running, inject a close. Either way wait for it to finish.
-	select {
-	case p.Inject <- func() { C.pn_connection_close(p.connection) }:
-		<-p.running // Wait to finish
-	case <-p.running: // Wait for goroutines to finish
-	}
-	delete(pumps, p.connection)
-	p.free()
-	return p.Error
-}
-
-// Run the pump. Normally called in a goroutine as: go pump.Run()
-// An error dunring Run is stored on p.Error.
-//
-func (p *Pump) Run() {
-	// Signal errors from the read/write goroutines. Don't block if we don't
-	// read all the errors, we only care about the first.
-	error := make(chan error, 2)
-	// FIXME aconway 2015-05-04: 	stop := make(chan struct{}) // Closed to signal that read/write should stop.
-
-	wait := sync.WaitGroup{}
-	wait.Add(2)
-
-	go func() { // Read goroutine
-		defer wait.Done()
-		for {
-			rbuf := p.read.buffer()
-			n, err := p.conn.Read(rbuf)
-			if n > 0 {
-				p.read.buffers <- rbuf[:n]
-			} else if err != nil {
-				close(p.read.buffers)
-				error <- err
-				return
-			}
-		}
-	}()
-
-	go func() { // Write goroutine
-		defer wait.Done()
-		for {
-			wbuf, ok := <-p.write.buffers
-			if !ok {
-				return
-			}
-			_, err := p.conn.Write(wbuf)
-			if err != nil {
-				error <- err
-				return
-			}
-		}
-	}()
-
-	wbuf := p.write.buffer()[:0]
-loop:
-	for {
-		if len(wbuf) == 0 {
-			p.pop(&wbuf)
-		}
-		// Don't set wchan unless there is something to write.
-		var wchan chan []byte
-		if len(wbuf) > 0 {
-			wchan = p.write.buffers
-		}
-
-		select {
-		case buf := <-p.read.buffers: // Read a buffer
-			p.push(buf)
-		case wchan <- wbuf: // Write a buffer
-			wbuf = p.write.buffer()[:0]
-		case f := <-p.Inject: // Function injected from another goroutine
-			f()
-		case err := <-error: // Read or write error
-			p.setError(err)
-			C.pn_transport_close_tail(p.transport)
-			C.pn_transport_close_head(p.transport)
-		}
-		if err := p.process(); err != nil {
-			p.setError(err)
-			break loop
-		}
-	}
-	close(p.write.buffers)
-	p.conn.Close()
-	wait.Wait()
-	close(p.running) // Signal goroutines have exited and Error is set.
-}
-
-func minInt(a, b int) int {
-	if a < b {
-		return a
-	} else {
-		return b
-	}
-}
-
-func (p *Pump) pop(buf *[]byte) {
-	pending := int(C.pn_transport_pending(p.transport))
-	switch {
-	case pending == int(C.PN_EOS):
-		*buf = (*buf)[:]
-		return
-	case pending < 0:
-		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
-	}
-	size := minInt(pending, cap(*buf))
-	*buf = (*buf)[:size]
-	if size == 0 {
-		return
-	}
-	C.memcpy(unsafe.Pointer(&(*buf)[0]), unsafe.Pointer(C.pn_transport_head(p.transport)), C.size_t(size))
-	C.pn_transport_pop(p.transport, C.size_t(size))
-}
-
-func (p *Pump) push(buf []byte) {
-	buf2 := buf
-	for len(buf2) > 0 {
-		n := int(C.pn_transport_push(p.transport, (*C.char)(unsafe.Pointer((&buf2[0]))), C.size_t(len(buf2))))
-		if n <= 0 {
-			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
-		}
-		buf2 = buf2[n:]
-	}
-}
-
-func (p *Pump) handle(e Event) error {
-	for _, h := range p.handlers {
-		if err := h.HandleEvent(e); err != nil {
-			return err
-		}
-	}
-	if e.Type() == ETransportClosed {
-		return io.EOF
-	}
-	return nil
-}
-
-func (p *Pump) process() error {
-	// FIXME aconway 2015-05-04: if a Handler returns error we should stop the pump
-	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
-		e := makeEvent(ce)
-		if err := p.handle(e); err != nil {
-			return err
-		}
-		C.pn_collector_pop(p.collector)
-	}
-	return nil
-}
-
-// Connectoin gets the Pump's connection value.
-func (p *Pump) Connection() Connection { return Connection{p.connection} }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/event/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/wrappers.go b/proton-c/bindings/go/event/wrappers.go
deleted file mode 100644
index 7043b9c..0000000
--- a/proton-c/bindings/go/event/wrappers.go
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-//#include <proton/codec.h>
-//#include <proton/connection.h>
-//#include <proton/session.h>
-//#include <proton/session.h>
-//#include <proton/delivery.h>
-//#include <proton/link.h>
-//#include <proton/event.h>
-//#include <proton/transport.h>
-//#include <proton/link.h>
-//#include <stdlib.h>
-import "C"
-
-import (
-	"fmt"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-// FIXME aconway 2015-05-05: Documentation for generated types.
-
-// Event is an AMQP protocol event.
-type Event struct {
-	pn         *C.pn_event_t
-	eventType  EventType
-	connection Connection
-	session    Session
-	link       Link
-	delivery   Delivery
-}
-
-func makeEvent(pn *C.pn_event_t) Event {
-	return Event{
-		pn:         pn,
-		eventType:  EventType(C.pn_event_type(pn)),
-		connection: Connection{C.pn_event_connection(pn)},
-		session:    Session{C.pn_event_session(pn)},
-		link:       Link{C.pn_event_link(pn)},
-		delivery:   Delivery{C.pn_event_delivery(pn)},
-	}
-}
-func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
-func (e Event) Type() EventType        { return e.eventType }
-func (e Event) Connection() Connection { return e.connection }
-func (e Event) Session() Session       { return e.session }
-func (e Event) Link() Link             { return e.link }
-func (e Event) Delivery() Delivery     { return e.delivery }
-func (e Event) String() string         { return e.Type().String() }
-
-// Data holds a pointer to decoded AMQP data.
-// Use amqp.marshal/unmarshal to access it as Go data types.
-//
-type Data struct{ pn *C.pn_data_t }
-
-func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
-
-func (d Data) Free()                   { C.pn_data_free(d.pn) }
-func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
-func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
-func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
-func (d Data) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
-}
-
-// State holds the state flags for an AMQP endpoint.
-type State byte
-
-const (
-	SLocalUninit  State = C.PN_LOCAL_UNINIT
-	SLocalActive        = C.PN_LOCAL_ACTIVE
-	SLocalClosed        = C.PN_LOCAL_CLOSED
-	SRemoteUninit       = C.PN_REMOTE_UNINIT
-	SRemoteActive       = C.PN_REMOTE_ACTIVE
-	SRemoteClosed       = C.PN_REMOTE_CLOSED
-)
-
-// Is is True if bits & state is non 0.
-func (s State) Is(bits State) bool { return s&bits != 0 }
-
-// Return a State containig just the local flags
-func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
-
-// Return a State containig just the remote flags
-func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
-
-// Endpoint is the common interface for Connection, Link and Session.
-type Endpoint interface {
-	// State is the open/closed state.
-	State() State
-	// Open an endpoint.
-	Open()
-	// Close an endpoint.
-	Close()
-	// Condition holds a local error condition.
-	Condition() Condition
-	// RemoteCondition holds a remote error condition.
-	RemoteCondition() Condition
-}
-
-const (
-	Received uint64 = C.PN_RECEIVED
-	Accepted        = C.PN_ACCEPTED
-	Rejected        = C.PN_REJECTED
-	Released        = C.PN_RELEASED
-	Modified        = C.PN_MODIFIED
-)
-
-// SettleAs is equivalent to d.Update(disposition); d.Settle()
-// It is a no-op if e does not have a delivery.
-func (d Delivery) SettleAs(disposition uint64) {
-	d.Update(disposition)
-	d.Settle()
-}
-
-// Accept accepts and settles a delivery.
-func (d Delivery) Accept() { d.SettleAs(Accepted) }
-
-// Reject rejects and settles a delivery
-func (d Delivery) Reject() { d.SettleAs(Rejected) }
-
-// Release releases and settles a delivery
-// If delivered is true the delivery count for the message will be increased.
-func (d Delivery) Release(delivered bool) {
-	if delivered {
-		d.SettleAs(Modified)
-	} else {
-		d.SettleAs(Released)
-	}
-}
-
-// FIXME aconway 2015-05-05: don't expose DeliveryTag as a C pointer, just as a String?
-
-type DeliveryTag struct{ pn C.pn_delivery_tag_t }
-
-func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
-
-func (l Link) Recv(buf []byte) int {
-	if len(buf) == 0 {
-		return 0
-	}
-	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
-}
-
-func (l Link) SendBytes(bytes []byte) int {
-	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
-}
-
-func pnTag(tag string) C.pn_delivery_tag_t {
-	bytes := []byte(tag)
-	return C.pn_dtag(cPtr(bytes), cLen(bytes))
-}
-
-func (l Link) Delivery(tag string) Delivery {
-	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}
-
-func (s Session) Sender(name string) Link {
-	cname := C.CString(name)
-	defer C.free(unsafe.Pointer(cname))
-	return Link{C.pn_sender(s.pn, cname)}
-}
-
-func (s Session) Receiver(name string) Link {
-	cname := C.CString(name)
-	defer C.free(unsafe.Pointer(cname))
-	return Link{C.pn_receiver(s.pn, cname)}
-}
-
-func joinId(a, b interface{}) string {
-	return fmt.Sprintf("%s/%s", a, b)
-}
-
-// Pump associated with this connection.
-func (c Connection) Pump() *Pump { return pumps[c.pn] }
-
-// Unique (per process) string identifier for a connection, useful for debugging.
-func (c Connection) String() string { return pumps[c.pn].String() }
-
-// Head functions don't follow the normal naming conventions so missed by the generator.
-
-func (c Connection) LinkHead(s State) Link {
-	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
-}
-
-func (c Connection) SessionHead(s State) Session {
-	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
-}
-
-// Unique (per process) string identifier for a session, including connection identifier.
-func (s Session) String() string {
-	return joinId(s.Connection(), fmt.Sprintf("%p", s.pn))
-}
-
-// Unique (per process) string identifier for a link, inlcuding session identifier.
-func (l Link) String() string {
-	return joinId(l.Session(), l.Name())
-}
-
-// Error returns an error interface corresponding to Condition.
-func (c Condition) Error() error {
-	if c.IsNil() {
-		return nil
-	} else {
-		return fmt.Errorf("%s: %s", c.Name(), c.Description())
-	}
-}
-
-// SetIfUnset sets name and description on a condition if it is not already set.
-func (c Condition) SetIfUnset(name, description string) {
-	if !c.IsSet() {
-		c.SetName(name)
-		c.SetDescription(description)
-	}
-}
-
-func (c Connection) Session() (Session, error) {
-	s := Session{C.pn_session(c.pn)}
-	if s.IsNil() {
-		return s, Connection(c).Error()
-	}
-	return s, nil
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[14/36] qpid-proton git commit: PROTON-827: go binding: enable use of 'go get', reorganize packages names and layout.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/unmarshal.go b/proton-c/bindings/go/amqp/unmarshal.go
new file mode 100644
index 0000000..89ab64a
--- /dev/null
+++ b/proton-c/bindings/go/amqp/unmarshal.go
@@ -0,0 +1,552 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+oor more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+const minDecode = 1024
+
+// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
+type BadUnmarshal struct {
+	// The name of the AMQP type.
+	AMQPType string
+	// The Go type.
+	GoType reflect.Type
+}
+
+func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
+	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
+}
+
+func (e BadUnmarshal) Error() string {
+	if e.GoType.Kind() != reflect.Ptr {
+		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
+	} else {
+		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
+	}
+}
+
+//
+// Decoding from a pn_data_t
+//
+// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
+// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
+//
+
+// Decoder decodes AMQP values from an io.Reader.
+//
+type Decoder struct {
+	reader io.Reader
+	buffer bytes.Buffer
+}
+
+// NewDecoder returns a new decoder that reads from r.
+//
+// The decoder has it's own buffer and may read more data than required for the
+// AMQP values requested.  Use Buffered to see if there is data left in the
+// buffer.
+//
+func NewDecoder(r io.Reader) *Decoder {
+	return &Decoder{r, bytes.Buffer{}}
+}
+
+// Buffered returns a reader of the data remaining in the Decoder's buffer. The
+// reader is valid until the next call to Decode.
+//
+func (d *Decoder) Buffered() io.Reader {
+	return bytes.NewReader(d.buffer.Bytes())
+}
+
+// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
+//
+// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
+//
+func (d *Decoder) Decode(v interface{}) (err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	var n int
+	for n == 0 && err == nil {
+		n = unmarshal(data, d.buffer.Bytes(), v)
+		if n == 0 { // n == 0 means not enough data, read more
+			err = d.more()
+			if err != nil {
+				return
+			}
+		}
+	}
+	d.buffer.Next(n)
+	return
+}
+
+/*
+Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
+Types are converted as follows:
+
+ +---------------------------+----------------------------------------------------------------------+
+ |To Go types                |From AMQP types                                                       |
+ +===========================+======================================================================+
+ |bool                       |bool                                                                  |
+ +---------------------------+----------------------------------------------------------------------+
+ |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
+ |int32, int64               |long.                                                                 |
+ +---------------------------+----------------------------------------------------------------------+
+ |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
+ |uint32, uint64 types       |uint, ulong                                                           |
+ +---------------------------+----------------------------------------------------------------------+
+ |float32, float64           |Equivalent or smaller float or double.                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |string, []byte             |string, symbol or binary.                                             |
+ +---------------------------+----------------------------------------------------------------------+
+ |Symbol                     |symbol                                                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
+ +---------------------------+----------------------------------------------------------------------+
+ |Map                        |map, any AMQP map                                                     |
+ +---------------------------+----------------------------------------------------------------------+
+ |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |AMQP Type               |Go Type in interface{}                       |
+ |                           +========================+=============================================+
+ |                           |bool                    |bool                                         |
+ |                           +------------------------+---------------------------------------------+
+ |                           |char                    |unint8                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |byte,short,int,long     |int8,int16,int32,int64                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
+ |                           +------------------------+---------------------------------------------+
+ |                           |float, double           |float32, float64                             |
+ |                           +------------------------+---------------------------------------------+
+ |                           |string                  |string                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |symbol                  |Symbol                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |binary                  |Binary                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |nulll                   |nil                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |map                     |Map                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |list                    |List                                         |
+ +---------------------------+------------------------+---------------------------------------------+
+
+The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
+
+TODO types
+
+AMQP: timestamp, decimal32/64/128, uuid, described, array.
+
+Go: array, struct.
+
+Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
+representation for those.
+*/
+func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	n = unmarshal(data, bytes, v)
+	if n == 0 {
+		err = internal.Errorf("not enough data")
+	}
+	return
+}
+
+// more reads more data when we can't parse a complete AMQP type
+func (d *Decoder) more() error {
+	var readSize int64 = minDecode
+	if int64(d.buffer.Len()) > readSize { // Grow by doubling
+		readSize = int64(d.buffer.Len())
+	}
+	var n int64
+	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
+	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
+		err = io.EOF
+	}
+	return err
+}
+
+// unmarshal decodes from bytes and converts into the value pointed to by v.
+// Used by Unmarshal and Decode
+//
+// Returns the number of bytes decoded or 0 if not enough data.
+//
+func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
+	n = decode(data, bytes)
+	if n == 0 {
+		return 0
+	}
+	get(data, v)
+	return
+}
+
+// get value from data into value pointed at by v.
+func get(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+
+	switch v := v.(type) {
+	case *bool:
+		switch pnType {
+		case C.PN_BOOL:
+			*v = bool(C.pn_data_get_bool(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int8(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int8(C.pn_data_get_byte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint8(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint8(C.pn_data_get_ubyte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int16(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int16(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int16(C.pn_data_get_short(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint16(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint16(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint16(C.pn_data_get_ushort(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int32(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int32(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int32(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int32(C.pn_data_get_int(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint32(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint32(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint32(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint32(C.pn_data_get_uint(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int64(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int64(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int64(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int64(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			*v = int64(C.pn_data_get_long(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint64(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint64(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint64(C.pn_data_get_ushort(data))
+		case C.PN_ULONG:
+			*v = uint64(C.pn_data_get_ulong(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = int(C.pn_data_get_long(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint(C.pn_data_get_uint(data))
+		case C.PN_ULONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = uint(C.pn_data_get_ulong(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float32:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float32(C.pn_data_get_float(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float64:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float64(C.pn_data_get_float(data))
+		case C.PN_DOUBLE:
+			*v = float64(C.pn_data_get_double(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *string:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goString(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goString(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goString(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *[]byte:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goBytes(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goBytes(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goBytes(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Binary:
+		switch pnType {
+		case C.PN_BINARY:
+			*v = Binary(goBytes(C.pn_data_get_binary(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Symbol:
+		switch pnType {
+		case C.PN_SYMBOL:
+			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *interface{}:
+		getInterface(data, v)
+
+	default:
+		if reflect.TypeOf(v).Kind() != reflect.Ptr {
+			panic(newBadUnmarshal(pnType, v))
+		}
+		switch reflect.TypeOf(v).Elem().Kind() {
+		case reflect.Map:
+			getMap(data, v)
+		case reflect.Slice:
+			getList(data, v)
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	}
+	err := dataError("unmarshaling", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+// Getting into an interface is driven completely by the AMQP type, since the interface{}
+// target is type-neutral.
+func getInterface(data *C.pn_data_t, v *interface{}) {
+	pnType := C.pn_data_type(data)
+	switch pnType {
+	case C.PN_NULL:
+		*v = nil
+	case C.PN_BOOL:
+		*v = bool(C.pn_data_get_bool(data))
+	case C.PN_UBYTE:
+		*v = uint8(C.pn_data_get_ubyte(data))
+	case C.PN_BYTE:
+		*v = int8(C.pn_data_get_byte(data))
+	case C.PN_USHORT:
+		*v = uint16(C.pn_data_get_ushort(data))
+	case C.PN_SHORT:
+		*v = int16(C.pn_data_get_short(data))
+	case C.PN_UINT:
+		*v = uint32(C.pn_data_get_uint(data))
+	case C.PN_INT:
+		*v = int32(C.pn_data_get_int(data))
+	case C.PN_CHAR:
+		*v = uint8(C.pn_data_get_char(data))
+	case C.PN_ULONG:
+		*v = uint64(C.pn_data_get_ulong(data))
+	case C.PN_LONG:
+		*v = int64(C.pn_data_get_long(data))
+	case C.PN_FLOAT:
+		*v = float32(C.pn_data_get_float(data))
+	case C.PN_DOUBLE:
+		*v = float64(C.pn_data_get_double(data))
+	case C.PN_BINARY:
+		*v = Binary(goBytes(C.pn_data_get_binary(data)))
+	case C.PN_STRING:
+		*v = goString(C.pn_data_get_string(data))
+	case C.PN_SYMBOL:
+		*v = Symbol(goString(C.pn_data_get_symbol(data)))
+	case C.PN_MAP:
+		m := make(Map)
+		get(data, &m)
+		*v = m // FIXME aconway 2015-03-13: avoid the copy?
+	case C.PN_LIST:
+		l := make(List, 0)
+		get(data, &l)
+		*v = l // FIXME aconway 2015-03-13: avoid the copy?
+	default:
+		panic(newBadUnmarshal(pnType, v))
+	}
+}
+
+// get into map pointed at by v
+func getMap(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_MAP {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	mapValue := reflect.ValueOf(v).Elem()
+	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
+	count := int(C.pn_data_get_map(data))
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count/2; i++ {
+			if bool(C.pn_data_next(data)) {
+				key := reflect.New(mapValue.Type().Key())
+				get(data, key.Interface())
+				if bool(C.pn_data_next(data)) {
+					val := reflect.New(mapValue.Type().Elem())
+					get(data, val.Interface())
+					mapValue.SetMapIndex(key.Elem(), val.Elem())
+				}
+			}
+		}
+		C.pn_data_exit(data)
+	}
+}
+
+func getList(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_LIST {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	count := int(C.pn_data_get_list(data))
+	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count; i++ {
+			if bool(C.pn_data_next(data)) {
+				val := reflect.New(listValue.Type().Elem())
+				get(data, val.Interface())
+				listValue.Index(i).Set(val.Elem())
+			}
+		}
+		C.pn_data_exit(data)
+	}
+	// FIXME aconway 2015-04-09: avoid the copy?
+	reflect.ValueOf(v).Elem().Set(listValue)
+}
+
+// decode from bytes.
+// Return bytes decoded or 0 if we could not decode a complete object.
+//
+func decode(data *C.pn_data_t, bytes []byte) int {
+	if len(bytes) == 0 {
+		return 0
+	}
+	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
+	if n == int(C.PN_UNDERFLOW) {
+		C.pn_error_clear(C.pn_data_error(data))
+		return 0
+	} else if n <= 0 {
+		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
+	}
+	return n
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/url.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/url.go b/proton-c/bindings/go/amqp/url.go
new file mode 100644
index 0000000..58711c7
--- /dev/null
+++ b/proton-c/bindings/go/amqp/url.go
@@ -0,0 +1,96 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+/*
+#include <stdlib.h>
+#include <string.h>
+#include <proton/url.h>
+
+// Helper function for setting URL fields.
+typedef void (*setter_fn)(pn_url_t* url, const char* value);
+inline void	set(pn_url_t *url, setter_fn s, const char* value) {
+  s(url, value);
+}
+*/
+import "C"
+
+import (
+	"net"
+	"net/url"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+const (
+	amqp  string = "amqp"
+	amqps        = "amqps"
+)
+
+// ParseUrl parses an AMQP URL string and returns a net/url.Url.
+//
+// It is more forgiving than net/url.Parse and allows most of the parts of the
+// URL to be missing, assuming AMQP defaults.
+//
+func ParseURL(s string) (u *url.URL, err error) {
+	cstr := C.CString(s)
+	defer C.free(unsafe.Pointer(cstr))
+	pnUrl := C.pn_url_parse(cstr)
+	if pnUrl == nil {
+		return nil, internal.Errorf("bad URL %#v", s)
+	}
+	defer C.pn_url_free(pnUrl)
+
+	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
+	username := C.GoString(C.pn_url_get_username(pnUrl))
+	password := C.GoString(C.pn_url_get_password(pnUrl))
+	host := C.GoString(C.pn_url_get_host(pnUrl))
+	port := C.GoString(C.pn_url_get_port(pnUrl))
+	path := C.GoString(C.pn_url_get_path(pnUrl))
+
+	if err != nil {
+		return nil, internal.Errorf("bad URL %#v: %s", s, err)
+	}
+	if scheme == "" {
+		scheme = amqp
+	}
+	if port == "" {
+		if scheme == amqps {
+			port = amqps
+		} else {
+			port = amqp
+		}
+	}
+	var user *url.Userinfo
+	if password != "" {
+		user = url.UserPassword(username, password)
+	} else if username != "" {
+		user = url.User(username)
+	}
+
+	u = &url.URL{
+		Scheme: scheme,
+		User:   user,
+		Host:   net.JoinHostPort(host, port),
+		Path:   path,
+	}
+
+	return u, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/url_test.go b/proton-c/bindings/go/amqp/url_test.go
new file mode 100644
index 0000000..f80f1c4
--- /dev/null
+++ b/proton-c/bindings/go/amqp/url_test.go
@@ -0,0 +1,51 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"fmt"
+)
+
+func ExampleParseURL() {
+	for _, s := range []string{
+		"amqp://username:password@host:1234/path",
+		"host:1234",
+		"host",
+		":1234",
+		"host/path",
+		"amqps://host",
+		"",
+	} {
+		u, err := ParseURL(s)
+		if err != nil {
+			fmt.Println(err)
+		} else {
+			fmt.Println(u)
+		}
+	}
+	// Output:
+	// amqp://username:password@host:1234/path
+	// amqp://host:1234
+	// amqp://host:amqp
+	// amqp://:1234
+	// amqp://host:amqp/path
+	// amqps://host:amqps
+	// proton: bad URL ""
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/event/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/doc.go b/proton-c/bindings/go/event/doc.go
new file mode 100644
index 0000000..7a9ec12
--- /dev/null
+++ b/proton-c/bindings/go/event/doc.go
@@ -0,0 +1,38 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package event provides a low-level API to the proton AMQP engine.
+
+For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
+It provides a higher-level, concurrent API that is easier to use.
+
+The API is event based. There are two alternative styles of handler. EventHandler
+provides the core proton events. MessagingHandler provides a slighly simplified
+view of the event stream and automates some common tasks.
+
+See type Pump documentation for more details of the interaction between proton
+events and goroutines.
+*/
+package event
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/event/handlers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/handlers.go b/proton-c/bindings/go/event/handlers.go
new file mode 100644
index 0000000..d76fac9
--- /dev/null
+++ b/proton-c/bindings/go/event/handlers.go
@@ -0,0 +1,411 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+)
+
+// EventHandler handles core proton events.
+type EventHandler interface {
+	// HandleEvent is called with an event.
+	// Typically HandleEvent() is implemented as a switch on e.Type()
+	HandleEvent(e Event) error
+}
+
+// cHandler wraps a C pn_handler_t
+type cHandler struct {
+	pn *C.pn_handler_t
+}
+
+func (h cHandler) HandleEvent(e Event) error {
+	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
+	return nil // FIXME aconway 2015-03-31: error handling
+}
+
+// MessagingHandler provides an alternative interface to EventHandler.
+// it is easier to use for most applications that send and receive messages.
+//
+// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
+// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
+//
+type MessagingHandler interface {
+	HandleMessagingEvent(MessagingEventType, Event) error
+}
+
+// MessagingEventType provides a set of events that are easier to work with than the
+// core events defined by EventType
+//
+// There are 3 types of "endpoint": Connection, Session and Link.
+// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
+// The meaning of these events is as follows:
+//
+// Opening: The remote end opened, the local end will open automatically.
+//
+// Opened: Both ends are open, regardless of which end opened first.
+//
+// Closing: The remote end closed without error, the local end will close automatically.
+//
+// Error: The remote end closed with an error, the local end will close automatically.
+//
+// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
+//
+type MessagingEventType int
+
+const (
+	// The event loop starts.
+	MStart MessagingEventType = iota
+	// The peer closes the connection with an error condition.
+	MConnectionError
+	// The peer closes the session with an error condition.
+	MSessionError
+	// The peer closes the link with an error condition.
+	MLinkError
+	// The peer Initiates the opening of the connection.
+	MConnectionOpening
+	// The peer initiates the opening of the session.
+	MSessionOpening
+	// The peer initiates the opening of the link.
+	MLinkOpening
+	// The connection is opened.
+	MConnectionOpened
+	// The session is opened.
+	MSessionOpened
+	// The link is opened.
+	MLinkOpened
+	// The peer initiates the closing of the connection.
+	MConnectionClosing
+	// The peer initiates the closing of the session.
+	MSessionClosing
+	// The peer initiates the closing of the link.
+	MLinkClosing
+	// Both ends of the connection are closed.
+	MConnectionClosed
+	// Both ends of the session are closed.
+	MSessionClosed
+	// Both ends of the link are closed.
+	MLinkClosed
+	// The connection is disconnected.
+	MConnectionDisconnected
+	// The session's connection was disconnected
+	MSessionDisconnected
+	// The session's connection was disconnected
+	MLinkDisconnected
+	// The sender link has credit and messages can
+	// therefore be transferred.
+	MSendable
+	// The remote peer accepts an outgoing message.
+	MAccepted
+	// The remote peer rejects an outgoing message.
+	MRejected
+	// The peer releases an outgoing message. Note that this may be in response to
+	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
+	MReleased
+	// The peer has settled the outgoing message. This is the point at which it
+	// shouod never be retransmitted.
+	MSettled
+	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
+	// To manage the outcome of this messages (e.g. to accept or reject the message)
+	// use Event.Delivery().
+	MMessage
+	// The event loop terminates, there are no more events to process.
+	MFinal
+)
+
+func (t MessagingEventType) String() string {
+	switch t {
+	case MStart:
+		return "Start"
+	case MConnectionError:
+		return "ConnectionError"
+	case MSessionError:
+		return "SessionError"
+	case MLinkError:
+		return "LinkError"
+	case MConnectionOpening:
+		return "ConnectionOpening"
+	case MSessionOpening:
+		return "SessionOpening"
+	case MLinkOpening:
+		return "LinkOpening"
+	case MConnectionOpened:
+		return "ConnectionOpened"
+	case MSessionOpened:
+		return "SessionOpened"
+	case MLinkOpened:
+		return "LinkOpened"
+	case MConnectionClosing:
+		return "ConnectionClosing"
+	case MSessionClosing:
+		return "SessionClosing"
+	case MLinkClosing:
+		return "LinkClosing"
+	case MConnectionClosed:
+		return "ConnectionClosed"
+	case MSessionClosed:
+		return "SessionClosed"
+	case MLinkClosed:
+		return "LinkClosed"
+	case MConnectionDisconnected:
+		return "ConnectionDisconnected"
+	case MSessionDisconnected:
+		return "MSessionDisconnected"
+	case MLinkDisconnected:
+		return "MLinkDisconnected"
+	case MSendable:
+		return "Sendable"
+	case MAccepted:
+		return "Accepted"
+	case MRejected:
+		return "Rejected"
+	case MReleased:
+		return "Released"
+	case MSettled:
+		return "Settled"
+	case MMessage:
+		return "Message"
+	default:
+		return "Unknown"
+	}
+}
+
+// ResourceHandler provides a simple way to track the creation and deletion of
+// various proton objects.
+// endpointDelegator captures common patterns for endpoints opening/closing
+type endpointDelegator struct {
+	remoteOpen, remoteClose, localOpen, localClose EventType
+	opening, opened, closing, closed, error        MessagingEventType
+	endpoint                                       func(Event) Endpoint
+	delegate                                       MessagingHandler
+}
+
+// HandleEvent handles an open/close event for an endpoint in a generic way.
+func (d endpointDelegator) HandleEvent(e Event) (err error) {
+	endpoint := d.endpoint(e)
+	state := endpoint.State()
+
+	switch e.Type() {
+
+	case d.localOpen:
+		if state.Is(SRemoteActive) {
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		}
+
+	case d.remoteOpen:
+		switch {
+		case state.Is(SLocalActive):
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		case state.Is(SLocalUninit):
+			err = d.delegate.HandleMessagingEvent(d.opening, e)
+			if err == nil {
+				endpoint.Open()
+			}
+		}
+
+	case d.remoteClose:
+		var err1 error
+		if endpoint.RemoteCondition().IsSet() { // Closed with error
+			err1 = d.delegate.HandleMessagingEvent(d.error, e)
+			if err1 == nil { // Don't overwrite an application error.
+				err1 = endpoint.RemoteCondition().Error()
+			}
+		} else {
+			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
+		}
+		if state.Is(SLocalClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		} else if state.Is(SLocalActive) {
+			endpoint.Close()
+		}
+		if err1 != nil { // Keep the first error.
+			err = err1
+		}
+
+	case d.localClose:
+		if state.Is(SRemoteClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		}
+
+	default:
+		// We shouldn't be called with any other event type.
+		panic(internal.Errorf("internal error, not an open/close event: %s", e))
+	}
+
+	return err
+}
+
+// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
+// You can modify the exported fields before you pass the MessagingDelegator to
+// a Pump.
+type MessagingDelegator struct {
+	delegate                   MessagingHandler
+	connection, session, link  endpointDelegator
+	handshaker, flowcontroller EventHandler
+
+	// AutoSettle (default true) automatically pre-settle outgoing messages.
+	AutoSettle bool
+	// AutoAccept (default true) automatically accept and settle incoming messages
+	// if they are not settled by the delegate.
+	AutoAccept bool
+	// Prefetch (default 10) initial credit to issue for incoming links.
+	Prefetch int
+	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
+	PeerCloseError bool
+}
+
+func NewMessagingDelegator(h MessagingHandler) EventHandler {
+	return &MessagingDelegator{
+		delegate: h,
+		connection: endpointDelegator{
+			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
+			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
+			MConnectionError,
+			func(e Event) Endpoint { return e.Connection() },
+			h,
+		},
+		session: endpointDelegator{
+			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
+			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
+			MSessionError,
+			func(e Event) Endpoint { return e.Session() },
+			h,
+		},
+		link: endpointDelegator{
+			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
+			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
+			MLinkError,
+			func(e Event) Endpoint { return e.Link() },
+			h,
+		},
+		flowcontroller: nil,
+		AutoSettle:     true,
+		AutoAccept:     true,
+		Prefetch:       10,
+		PeerCloseError: false,
+	}
+}
+
+func handleIf(h EventHandler, e Event) error {
+	if h != nil {
+		return h.HandleEvent(e)
+	}
+	return nil
+}
+
+// Handle a proton event by passing the corresponding MessagingEvent(s) to
+// the MessagingHandler.
+func (d *MessagingDelegator) HandleEvent(e Event) error {
+	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
+
+	switch e.Type() {
+
+	case EConnectionInit:
+		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
+		d.delegate.HandleMessagingEvent(MStart, e)
+
+	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
+		return d.connection.HandleEvent(e)
+
+	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
+		return d.session.HandleEvent(e)
+
+	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
+		return d.link.HandleEvent(e)
+
+	case ELinkFlow:
+		if e.Link().IsSender() && e.Link().Credit() > 0 {
+			return d.delegate.HandleMessagingEvent(MSendable, e)
+		}
+
+	case EDelivery:
+		if e.Delivery().Link().IsReceiver() {
+			d.incoming(e)
+		} else {
+			d.outgoing(e)
+		}
+
+	case ETransportTailClosed:
+		c := e.Connection()
+		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
+			e2 := e
+			e2.link = l
+			e2.session = l.Session()
+			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
+		}
+		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
+			e2 := e
+			e2.session = s
+			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
+		}
+		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
+		d.delegate.HandleMessagingEvent(MFinal, e)
+	}
+	return nil
+}
+
+func (d *MessagingDelegator) incoming(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Readable() && !delivery.Partial() {
+		if e.Link().State().Is(SLocalClosed) {
+			e.Link().Advance()
+			if d.AutoAccept {
+				delivery.Release(false)
+			}
+		} else {
+			err = d.delegate.HandleMessagingEvent(MMessage, e)
+			e.Link().Advance()
+			if d.AutoAccept && !delivery.Settled() {
+				if err == nil {
+					delivery.Accept()
+				} else {
+					delivery.Reject()
+				}
+			}
+		}
+	} else if delivery.Updated() && delivery.Settled() {
+		err = d.delegate.HandleMessagingEvent(MSettled, e)
+	}
+	return
+}
+
+func (d *MessagingDelegator) outgoing(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Updated() {
+		switch delivery.Remote().Type() {
+		case Accepted:
+			err = d.delegate.HandleMessagingEvent(MAccepted, e)
+		case Rejected:
+			err = d.delegate.HandleMessagingEvent(MRejected, e)
+		case Released, Modified:
+			err = d.delegate.HandleMessagingEvent(MReleased, e)
+		}
+		if err == nil && delivery.Settled() {
+			err = d.delegate.HandleMessagingEvent(MSettled, e)
+		}
+		if err == nil && d.AutoSettle {
+			delivery.Settle()
+		}
+	}
+	return
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/event/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/message.go b/proton-c/bindings/go/event/message.go
new file mode 100644
index 0000000..d900744
--- /dev/null
+++ b/proton-c/bindings/go/event/message.go
@@ -0,0 +1,75 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/internal"
+)
+
+// DecodeMessage decodes the message containined in a delivery event.
+func DecodeMessage(e Event) (m amqp.Message, err error) {
+	defer internal.DoRecover(&err)
+	delivery := e.Delivery()
+	if !delivery.Readable() || delivery.Partial() {
+		return nil, internal.Errorf("attempting to get incomplete message")
+	}
+	data := make([]byte, delivery.Pending())
+	result := delivery.Link().Recv(data)
+	if result != len(data) {
+		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
+	}
+	return amqp.DecodeMessage(data)
+}
+
+// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
+var tags amqp.UidCounter
+
+// Send sends a amqp.Message over a Link.
+// Returns a Delivery that can be use to determine the outcome of the message.
+func (link Link) Send(m amqp.Message) (Delivery, error) {
+	if !link.IsSender() {
+		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
+	}
+	// FIXME aconway 2015-04-08: buffering, error handling
+	delivery := link.Delivery(tags.Next())
+	bytes, err := m.Encode(nil)
+	if err != nil {
+		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
+	}
+	result := link.SendBytes(bytes)
+	link.Advance()
+	if result != len(bytes) {
+		if result < 0 {
+			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
+		} else {
+			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
+		}
+	}
+	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
+		delivery.Settle()
+	}
+	return delivery, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/event/pump.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/pump.go b/proton-c/bindings/go/event/pump.go
new file mode 100644
index 0000000..db022ff
--- /dev/null
+++ b/proton-c/bindings/go/event/pump.go
@@ -0,0 +1,357 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/connection.h>
+// #include <proton/transport.h>
+// #include <proton/event.h>
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+// #include <proton/transport.h>
+// #include <proton/session.h>
+// #include <memory.h>
+// #include <stdlib.h>
+//
+// PN_HANDLE(REMOTE_ADDR)
+import "C"
+
+import (
+	"fmt"
+	"io"
+	"net"
+	"qpid.apache.org/proton/go/internal"
+	"sync"
+	"unsafe"
+)
+
+// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
+type bufferChan struct {
+	buffers    chan []byte
+	buf1, buf2 []byte
+}
+
+func newBufferChan(size int) *bufferChan {
+	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
+}
+
+func (b *bufferChan) buffer() []byte {
+	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
+	return b.buf1[:cap(b.buf1)]
+}
+
+// FIXME aconway 2015-05-04: direct sending to Inject may block user goroutines if
+// the pum stops. Make this a function that selects on running.
+
+// FIXME aconway 2015-05-05: for consistency should Pump be called Driver?
+
+/*
+Pump reads from a net.Conn, decodes AMQP events and calls the appropriate
+Handler functions. Actions taken by Handler functions (such as sending messages)
+are encoded and written to the net.Conn.
+
+The proton protocol engine is single threaded (per connection). The Pump runs
+proton in the goroutine that calls Pump.Run() and creates goroutines to feed
+data to/from a net.Conn. You can create multiple Pumps to handle multiple
+connections concurrently.
+
+Methods in this package can only be called in the goroutine that executes the
+corresponding Pump.Run(). You implement the EventHandler or MessagingHandler
+interfaces and provide those values to NewPump(). Their HandleEvent method will be
+called in the Pump goroutine, in typical event-driven style.
+
+Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
+other goroutines, store them, or use them as map indexes. Effectively they are
+just C pointers.  Other goroutines cannot call their methods directly but they
+can can create function closures that call their methods and send those closures
+to the Pump.Inject channel. They will execute safely in the pump
+goroutine. Injected functions, or your handlers, can set up channels to get
+results back to other goroutines.
+
+You are responsible for ensuring you don't use an event value after the C object
+has been deleted. The handler methods will tell you when a value is no longer
+valid. For example after a MethodHandler handles a LinkClosed event, that link
+is no longer valid. If you do Link.Close() yourself (in a handler or injected
+function) the link remains valid until the corresponing LinkClosed event is
+received by the handler.
+
+Pump.Close() will take care of cleaning up any remaining values and types when
+you are done with the Pump. All values associated with a pump become invalid
+when you call Pump.Close()
+
+The qpid.apache.org/proton/go/messaging package will do all this for you, so unless
+you are doing something fairly low-level it is probably a better choice.
+
+*/
+type Pump struct {
+	// Error is set on exit from Run() if there was an error.
+	Error error
+	// Channel to inject functions to be executed in the Pump's proton event loop.
+	Inject chan func()
+
+	conn       net.Conn
+	transport  *C.pn_transport_t
+	connection *C.pn_connection_t
+	collector  *C.pn_collector_t
+	read       *bufferChan    // Read buffers channel.
+	write      *bufferChan    // Write buffers channel.
+	handlers   []EventHandler // Handlers for proton events.
+	running    chan struct{}  // This channel will be closed when the goroutines are done.
+}
+
+const bufferSize = 4096
+
+var pumps map[*C.pn_connection_t]*Pump
+
+func init() {
+	pumps = make(map[*C.pn_connection_t]*Pump)
+}
+
+// NewPump initializes a pump with a connection and handlers. To start it running:
+//    p := NewPump(...)
+//    go run p.Run()
+// The goroutine will exit when the pump is closed or disconnected.
+// You can check for errors on Pump.Error.
+//
+func NewPump(conn net.Conn, handlers ...EventHandler) (*Pump, error) {
+	// Save the connection ID for Connection.String()
+	p := &Pump{
+		Inject:     make(chan func(), 100), // FIXME aconway 2015-05-04: blocking hack
+		conn:       conn,
+		transport:  C.pn_transport(),
+		connection: C.pn_connection(),
+		collector:  C.pn_collector(),
+		handlers:   handlers,
+		read:       newBufferChan(bufferSize),
+		write:      newBufferChan(bufferSize),
+		running:    make(chan struct{}),
+	}
+	if p.transport == nil || p.connection == nil || p.collector == nil {
+		return nil, internal.Errorf("failed to allocate pump")
+	}
+	pnErr := int(C.pn_transport_bind(p.transport, p.connection))
+	if pnErr != 0 {
+		return nil, internal.Errorf("cannot setup pump: %s", internal.PnErrorCode(pnErr))
+	}
+	C.pn_connection_collect(p.connection, p.collector)
+	C.pn_connection_open(p.connection)
+	pumps[p.connection] = p
+	return p, nil
+}
+
+func (p *Pump) String() string {
+	return fmt.Sprintf("(%s-%s)", p.conn.LocalAddr(), p.conn.RemoteAddr())
+}
+
+func (p *Pump) Id() string {
+	return fmt.Sprintf("%p", &p)
+}
+
+// setError sets error only if not already set
+func (p *Pump) setError(e error) {
+	if p.Error == nil {
+		p.Error = e
+	}
+}
+
+// Server puts the Pump in server mode, meaning it will auto-detect security settings on
+// the incoming connnection such as use of SASL and SSL.
+// Must be called before Run()
+//
+func (p *Pump) Server() {
+	C.pn_transport_set_server(p.transport)
+}
+
+func (p *Pump) free() {
+	if p.connection != nil {
+		C.pn_connection_free(p.connection)
+	}
+	if p.transport != nil {
+		C.pn_transport_free(p.transport)
+	}
+	if p.collector != nil {
+		C.pn_collector_free(p.collector)
+	}
+	for _, h := range p.handlers {
+		switch h := h.(type) {
+		case cHandler:
+			C.pn_handler_free(h.pn)
+		}
+	}
+}
+
+// Close closes the AMQP connection, the net.Conn, and stops associated goroutines.
+// It will cause Run() to return. Run() may return earlier if the network disconnects
+// but you must still call Close() to clean everything up.
+//
+// Methods on values associated with the pump (Connections, Sessions, Links) will panic
+// if called after Close()
+//
+func (p *Pump) Close() error {
+	// If the pump is still running, inject a close. Either way wait for it to finish.
+	select {
+	case p.Inject <- func() { C.pn_connection_close(p.connection) }:
+		<-p.running // Wait to finish
+	case <-p.running: // Wait for goroutines to finish
+	}
+	delete(pumps, p.connection)
+	p.free()
+	return p.Error
+}
+
+// Run the pump. Normally called in a goroutine as: go pump.Run()
+// An error dunring Run is stored on p.Error.
+//
+func (p *Pump) Run() {
+	// Signal errors from the read/write goroutines. Don't block if we don't
+	// read all the errors, we only care about the first.
+	error := make(chan error, 2)
+	// FIXME aconway 2015-05-04: 	stop := make(chan struct{}) // Closed to signal that read/write should stop.
+
+	wait := sync.WaitGroup{}
+	wait.Add(2)
+
+	go func() { // Read goroutine
+		defer wait.Done()
+		for {
+			rbuf := p.read.buffer()
+			n, err := p.conn.Read(rbuf)
+			if n > 0 {
+				p.read.buffers <- rbuf[:n]
+			} else if err != nil {
+				close(p.read.buffers)
+				error <- err
+				return
+			}
+		}
+	}()
+
+	go func() { // Write goroutine
+		defer wait.Done()
+		for {
+			wbuf, ok := <-p.write.buffers
+			if !ok {
+				return
+			}
+			_, err := p.conn.Write(wbuf)
+			if err != nil {
+				error <- err
+				return
+			}
+		}
+	}()
+
+	wbuf := p.write.buffer()[:0]
+loop:
+	for {
+		if len(wbuf) == 0 {
+			p.pop(&wbuf)
+		}
+		// Don't set wchan unless there is something to write.
+		var wchan chan []byte
+		if len(wbuf) > 0 {
+			wchan = p.write.buffers
+		}
+
+		select {
+		case buf := <-p.read.buffers: // Read a buffer
+			p.push(buf)
+		case wchan <- wbuf: // Write a buffer
+			wbuf = p.write.buffer()[:0]
+		case f := <-p.Inject: // Function injected from another goroutine
+			f()
+		case err := <-error: // Read or write error
+			p.setError(err)
+			C.pn_transport_close_tail(p.transport)
+			C.pn_transport_close_head(p.transport)
+		}
+		if err := p.process(); err != nil {
+			p.setError(err)
+			break loop
+		}
+	}
+	close(p.write.buffers)
+	p.conn.Close()
+	wait.Wait()
+	close(p.running) // Signal goroutines have exited and Error is set.
+}
+
+func minInt(a, b int) int {
+	if a < b {
+		return a
+	} else {
+		return b
+	}
+}
+
+func (p *Pump) pop(buf *[]byte) {
+	pending := int(C.pn_transport_pending(p.transport))
+	switch {
+	case pending == int(C.PN_EOS):
+		*buf = (*buf)[:]
+		return
+	case pending < 0:
+		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
+	}
+	size := minInt(pending, cap(*buf))
+	*buf = (*buf)[:size]
+	if size == 0 {
+		return
+	}
+	C.memcpy(unsafe.Pointer(&(*buf)[0]), unsafe.Pointer(C.pn_transport_head(p.transport)), C.size_t(size))
+	C.pn_transport_pop(p.transport, C.size_t(size))
+}
+
+func (p *Pump) push(buf []byte) {
+	buf2 := buf
+	for len(buf2) > 0 {
+		n := int(C.pn_transport_push(p.transport, (*C.char)(unsafe.Pointer((&buf2[0]))), C.size_t(len(buf2))))
+		if n <= 0 {
+			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
+		}
+		buf2 = buf2[n:]
+	}
+}
+
+func (p *Pump) handle(e Event) error {
+	for _, h := range p.handlers {
+		if err := h.HandleEvent(e); err != nil {
+			return err
+		}
+	}
+	if e.Type() == ETransportClosed {
+		return io.EOF
+	}
+	return nil
+}
+
+func (p *Pump) process() error {
+	// FIXME aconway 2015-05-04: if a Handler returns error we should stop the pump
+	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
+		e := makeEvent(ce)
+		if err := p.handle(e); err != nil {
+			return err
+		}
+		C.pn_collector_pop(p.collector)
+	}
+	return nil
+}
+
+// Connectoin gets the Pump's connection value.
+func (p *Pump) Connection() Connection { return Connection{p.connection} }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/event/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/wrappers.go b/proton-c/bindings/go/event/wrappers.go
new file mode 100644
index 0000000..7043b9c
--- /dev/null
+++ b/proton-c/bindings/go/event/wrappers.go
@@ -0,0 +1,253 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+//#include <proton/codec.h>
+//#include <proton/connection.h>
+//#include <proton/session.h>
+//#include <proton/session.h>
+//#include <proton/delivery.h>
+//#include <proton/link.h>
+//#include <proton/event.h>
+//#include <proton/transport.h>
+//#include <proton/link.h>
+//#include <stdlib.h>
+import "C"
+
+import (
+	"fmt"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+// FIXME aconway 2015-05-05: Documentation for generated types.
+
+// Event is an AMQP protocol event.
+type Event struct {
+	pn         *C.pn_event_t
+	eventType  EventType
+	connection Connection
+	session    Session
+	link       Link
+	delivery   Delivery
+}
+
+func makeEvent(pn *C.pn_event_t) Event {
+	return Event{
+		pn:         pn,
+		eventType:  EventType(C.pn_event_type(pn)),
+		connection: Connection{C.pn_event_connection(pn)},
+		session:    Session{C.pn_event_session(pn)},
+		link:       Link{C.pn_event_link(pn)},
+		delivery:   Delivery{C.pn_event_delivery(pn)},
+	}
+}
+func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
+func (e Event) Type() EventType        { return e.eventType }
+func (e Event) Connection() Connection { return e.connection }
+func (e Event) Session() Session       { return e.session }
+func (e Event) Link() Link             { return e.link }
+func (e Event) Delivery() Delivery     { return e.delivery }
+func (e Event) String() string         { return e.Type().String() }
+
+// Data holds a pointer to decoded AMQP data.
+// Use amqp.marshal/unmarshal to access it as Go data types.
+//
+type Data struct{ pn *C.pn_data_t }
+
+func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
+
+func (d Data) Free()                   { C.pn_data_free(d.pn) }
+func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
+func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
+func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
+func (d Data) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
+}
+
+// State holds the state flags for an AMQP endpoint.
+type State byte
+
+const (
+	SLocalUninit  State = C.PN_LOCAL_UNINIT
+	SLocalActive        = C.PN_LOCAL_ACTIVE
+	SLocalClosed        = C.PN_LOCAL_CLOSED
+	SRemoteUninit       = C.PN_REMOTE_UNINIT
+	SRemoteActive       = C.PN_REMOTE_ACTIVE
+	SRemoteClosed       = C.PN_REMOTE_CLOSED
+)
+
+// Is is True if bits & state is non 0.
+func (s State) Is(bits State) bool { return s&bits != 0 }
+
+// Return a State containig just the local flags
+func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
+
+// Return a State containig just the remote flags
+func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
+
+// Endpoint is the common interface for Connection, Link and Session.
+type Endpoint interface {
+	// State is the open/closed state.
+	State() State
+	// Open an endpoint.
+	Open()
+	// Close an endpoint.
+	Close()
+	// Condition holds a local error condition.
+	Condition() Condition
+	// RemoteCondition holds a remote error condition.
+	RemoteCondition() Condition
+}
+
+const (
+	Received uint64 = C.PN_RECEIVED
+	Accepted        = C.PN_ACCEPTED
+	Rejected        = C.PN_REJECTED
+	Released        = C.PN_RELEASED
+	Modified        = C.PN_MODIFIED
+)
+
+// SettleAs is equivalent to d.Update(disposition); d.Settle()
+// It is a no-op if e does not have a delivery.
+func (d Delivery) SettleAs(disposition uint64) {
+	d.Update(disposition)
+	d.Settle()
+}
+
+// Accept accepts and settles a delivery.
+func (d Delivery) Accept() { d.SettleAs(Accepted) }
+
+// Reject rejects and settles a delivery
+func (d Delivery) Reject() { d.SettleAs(Rejected) }
+
+// Release releases and settles a delivery
+// If delivered is true the delivery count for the message will be increased.
+func (d Delivery) Release(delivered bool) {
+	if delivered {
+		d.SettleAs(Modified)
+	} else {
+		d.SettleAs(Released)
+	}
+}
+
+// FIXME aconway 2015-05-05: don't expose DeliveryTag as a C pointer, just as a String?
+
+type DeliveryTag struct{ pn C.pn_delivery_tag_t }
+
+func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
+
+func (l Link) Recv(buf []byte) int {
+	if len(buf) == 0 {
+		return 0
+	}
+	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
+}
+
+func (l Link) SendBytes(bytes []byte) int {
+	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
+}
+
+func pnTag(tag string) C.pn_delivery_tag_t {
+	bytes := []byte(tag)
+	return C.pn_dtag(cPtr(bytes), cLen(bytes))
+}
+
+func (l Link) Delivery(tag string) Delivery {
+	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}
+
+func (s Session) Sender(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_sender(s.pn, cname)}
+}
+
+func (s Session) Receiver(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_receiver(s.pn, cname)}
+}
+
+func joinId(a, b interface{}) string {
+	return fmt.Sprintf("%s/%s", a, b)
+}
+
+// Pump associated with this connection.
+func (c Connection) Pump() *Pump { return pumps[c.pn] }
+
+// Unique (per process) string identifier for a connection, useful for debugging.
+func (c Connection) String() string { return pumps[c.pn].String() }
+
+// Head functions don't follow the normal naming conventions so missed by the generator.
+
+func (c Connection) LinkHead(s State) Link {
+	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
+}
+
+func (c Connection) SessionHead(s State) Session {
+	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
+}
+
+// Unique (per process) string identifier for a session, including connection identifier.
+func (s Session) String() string {
+	return joinId(s.Connection(), fmt.Sprintf("%p", s.pn))
+}
+
+// Unique (per process) string identifier for a link, inlcuding session identifier.
+func (l Link) String() string {
+	return joinId(l.Session(), l.Name())
+}
+
+// Error returns an error interface corresponding to Condition.
+func (c Condition) Error() error {
+	if c.IsNil() {
+		return nil
+	} else {
+		return fmt.Errorf("%s: %s", c.Name(), c.Description())
+	}
+}
+
+// SetIfUnset sets name and description on a condition if it is not already set.
+func (c Condition) SetIfUnset(name, description string) {
+	if !c.IsSet() {
+		c.SetName(name)
+		c.SetDescription(description)
+	}
+}
+
+func (c Connection) Session() (Session, error) {
+	s := Session{C.pn_session(c.pn)}
+	if s.IsNil() {
+		return s, Connection(c).Error()
+	}
+	return s, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/event/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/event/wrappers_gen.go b/proton-c/bindings/go/event/wrappers_gen.go
new file mode 100644
index 0000000..73f0d3b
--- /dev/null
+++ b/proton-c/bindings/go/event/wrappers_gen.go
@@ -0,0 +1,732 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// NOTE: This file was generated by genwrap.go, do not edit it by hand.
+//
+
+package event
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+// #include <proton/session.h>
+// #include <proton/link.h>
+// #include <proton/delivery.h>
+// #include <proton/disposition.h>
+// #include <proton/condition.h>
+// #include <proton/terminus.h>
+// #include <proton/connection.h>
+import "C"
+
+type EventType int
+
+const (
+	EConnectionInit         EventType = C.PN_CONNECTION_INIT
+	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
+	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
+	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
+	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
+	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
+	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
+	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
+	ESessionInit            EventType = C.PN_SESSION_INIT
+	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
+	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
+	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
+	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
+	ESessionFinal           EventType = C.PN_SESSION_FINAL
+	ELinkInit               EventType = C.PN_LINK_INIT
+	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
+	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
+	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
+	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
+	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
+	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
+	ELinkFlow               EventType = C.PN_LINK_FLOW
+	ELinkFinal              EventType = C.PN_LINK_FINAL
+	EDelivery               EventType = C.PN_DELIVERY
+	ETransport              EventType = C.PN_TRANSPORT
+	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
+	ETransportError         EventType = C.PN_TRANSPORT_ERROR
+	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
+	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
+	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
+)
+
+func (e EventType) String() string {
+	switch e {
+
+	case C.PN_CONNECTION_INIT:
+		return "ConnectionInit"
+	case C.PN_CONNECTION_BOUND:
+		return "ConnectionBound"
+	case C.PN_CONNECTION_UNBOUND:
+		return "ConnectionUnbound"
+	case C.PN_CONNECTION_LOCAL_OPEN:
+		return "ConnectionLocalOpen"
+	case C.PN_CONNECTION_REMOTE_OPEN:
+		return "ConnectionRemoteOpen"
+	case C.PN_CONNECTION_LOCAL_CLOSE:
+		return "ConnectionLocalClose"
+	case C.PN_CONNECTION_REMOTE_CLOSE:
+		return "ConnectionRemoteClose"
+	case C.PN_CONNECTION_FINAL:
+		return "ConnectionFinal"
+	case C.PN_SESSION_INIT:
+		return "SessionInit"
+	case C.PN_SESSION_LOCAL_OPEN:
+		return "SessionLocalOpen"
+	case C.PN_SESSION_REMOTE_OPEN:
+		return "SessionRemoteOpen"
+	case C.PN_SESSION_LOCAL_CLOSE:
+		return "SessionLocalClose"
+	case C.PN_SESSION_REMOTE_CLOSE:
+		return "SessionRemoteClose"
+	case C.PN_SESSION_FINAL:
+		return "SessionFinal"
+	case C.PN_LINK_INIT:
+		return "LinkInit"
+	case C.PN_LINK_LOCAL_OPEN:
+		return "LinkLocalOpen"
+	case C.PN_LINK_REMOTE_OPEN:
+		return "LinkRemoteOpen"
+	case C.PN_LINK_LOCAL_CLOSE:
+		return "LinkLocalClose"
+	case C.PN_LINK_REMOTE_CLOSE:
+		return "LinkRemoteClose"
+	case C.PN_LINK_LOCAL_DETACH:
+		return "LinkLocalDetach"
+	case C.PN_LINK_REMOTE_DETACH:
+		return "LinkRemoteDetach"
+	case C.PN_LINK_FLOW:
+		return "LinkFlow"
+	case C.PN_LINK_FINAL:
+		return "LinkFinal"
+	case C.PN_DELIVERY:
+		return "Delivery"
+	case C.PN_TRANSPORT:
+		return "Transport"
+	case C.PN_TRANSPORT_AUTHENTICATED:
+		return "TransportAuthenticated"
+	case C.PN_TRANSPORT_ERROR:
+		return "TransportError"
+	case C.PN_TRANSPORT_HEAD_CLOSED:
+		return "TransportHeadClosed"
+	case C.PN_TRANSPORT_TAIL_CLOSED:
+		return "TransportTailClosed"
+	case C.PN_TRANSPORT_CLOSED:
+		return "TransportClosed"
+	}
+	return "Unknown"
+}
+
+// Wrappers for declarations in session.h
+
+type Session struct{ pn *C.pn_session_t }
+
+func (s Session) IsNil() bool { return s.pn == nil }
+func (s Session) Free() {
+	C.pn_session_free(s.pn)
+}
+func (s Session) State() State {
+	return State(C.pn_session_state(s.pn))
+}
+func (s Session) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
+}
+func (s Session) Condition() Condition {
+	return Condition{C.pn_session_condition(s.pn)}
+}
+func (s Session) RemoteCondition() Condition {
+	return Condition{C.pn_session_remote_condition(s.pn)}
+}
+func (s Session) Connection() Connection {
+	return Connection{C.pn_session_connection(s.pn)}
+}
+func (s Session) Open() {
+	C.pn_session_open(s.pn)
+}
+func (s Session) Close() {
+	C.pn_session_close(s.pn)
+}
+func (s Session) IncomingCapacity() uint {
+	return uint(C.pn_session_get_incoming_capacity(s.pn))
+}
+func (s Session) SetIncomingCapacity(capacity uint) {
+	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
+}
+func (s Session) OutgoingBytes() uint {
+	return uint(C.pn_session_outgoing_bytes(s.pn))
+}
+func (s Session) IncomingBytes() uint {
+	return uint(C.pn_session_incoming_bytes(s.pn))
+}
+func (s Session) Next(state State) Session {
+	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
+}
+
+// Wrappers for declarations in link.h
+
+type SndSettleMode C.pn_snd_settle_mode_t
+
+const (
+	PnSndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
+	PnSndSettled   SndSettleMode = C.PN_SND_SETTLED
+	PnSndMixed     SndSettleMode = C.PN_SND_MIXED
+)
+
+func (e SndSettleMode) String() string {
+	switch e {
+
+	case C.PN_SND_UNSETTLED:
+		return "SndUnsettled"
+	case C.PN_SND_SETTLED:
+		return "SndSettled"
+	case C.PN_SND_MIXED:
+		return "SndMixed"
+	}
+	return "unknown"
+}
+
+type RcvSettleMode C.pn_rcv_settle_mode_t
+
+const (
+	PnRcvFirst  RcvSettleMode = C.PN_RCV_FIRST
+	PnRcvSecond RcvSettleMode = C.PN_RCV_SECOND
+)
+
+func (e RcvSettleMode) String() string {
+	switch e {
+
+	case C.PN_RCV_FIRST:
+		return "RcvFirst"
+	case C.PN_RCV_SECOND:
+		return "RcvSecond"
+	}
+	return "unknown"
+}
+
+type Link struct{ pn *C.pn_link_t }
+
+func (l Link) IsNil() bool { return l.pn == nil }
+func (l Link) Free() {
+	C.pn_link_free(l.pn)
+}
+func (l Link) Name() string {
+	return C.GoString(C.pn_link_name(l.pn))
+}
+func (l Link) IsSender() bool {
+	return bool(C.pn_link_is_sender(l.pn))
+}
+func (l Link) IsReceiver() bool {
+	return bool(C.pn_link_is_receiver(l.pn))
+}
+func (l Link) State() State {
+	return State(C.pn_link_state(l.pn))
+}
+func (l Link) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
+}
+func (l Link) Condition() Condition {
+	return Condition{C.pn_link_condition(l.pn)}
+}
+func (l Link) RemoteCondition() Condition {
+	return Condition{C.pn_link_remote_condition(l.pn)}
+}
+func (l Link) Session() Session {
+	return Session{C.pn_link_session(l.pn)}
+}
+func (l Link) Next(state State) Link {
+	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
+}
+func (l Link) Open() {
+	C.pn_link_open(l.pn)
+}
+func (l Link) Close() {
+	C.pn_link_close(l.pn)
+}
+func (l Link) Detach() {
+	C.pn_link_detach(l.pn)
+}
+func (l Link) Source() Terminus {
+	return Terminus{C.pn_link_source(l.pn)}
+}
+func (l Link) Target() Terminus {
+	return Terminus{C.pn_link_target(l.pn)}
+}
+func (l Link) RemoteSource() Terminus {
+	return Terminus{C.pn_link_remote_source(l.pn)}
+}
+func (l Link) RemoteTarget() Terminus {
+	return Terminus{C.pn_link_remote_target(l.pn)}
+}
+func (l Link) Current() Delivery {
+	return Delivery{C.pn_link_current(l.pn)}
+}
+func (l Link) Advance() bool {
+	return bool(C.pn_link_advance(l.pn))
+}
+func (l Link) Credit() int {
+	return int(C.pn_link_credit(l.pn))
+}
+func (l Link) Queued() int {
+	return int(C.pn_link_queued(l.pn))
+}
+func (l Link) RemoteCredit() int {
+	return int(C.pn_link_remote_credit(l.pn))
+}
+func (l Link) IsDrain() bool {
+	return bool(C.pn_link_get_drain(l.pn))
+}
+func (l Link) Drained() int {
+	return int(C.pn_link_drained(l.pn))
+}
+func (l Link) Available() int {
+	return int(C.pn_link_available(l.pn))
+}
+func (l Link) SndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
+}
+func (l Link) RcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
+}
+func (l Link) SetSndSettleMode(mode SndSettleMode) {
+	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
+}
+func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
+	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
+}
+func (l Link) RemoteSndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
+}
+func (l Link) RemoteRcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
+}
+func (l Link) Unsettled() int {
+	return int(C.pn_link_unsettled(l.pn))
+}
+func (l Link) Offered(credit int) {
+	C.pn_link_offered(l.pn, C.int(credit))
+}
+func (l Link) Flow(credit int) {
+	C.pn_link_flow(l.pn, C.int(credit))
+}
+func (l Link) Drain(credit int) {
+	C.pn_link_drain(l.pn, C.int(credit))
+}
+func (l Link) SetDrain(drain bool) {
+	C.pn_link_set_drain(l.pn, C.bool(drain))
+}
+func (l Link) Draining() bool {
+	return bool(C.pn_link_draining(l.pn))
+}
+
+// Wrappers for declarations in delivery.h
+
+type Delivery struct{ pn *C.pn_delivery_t }
+
+func (d Delivery) IsNil() bool { return d.pn == nil }
+func (d Delivery) Tag() DeliveryTag {
+	return DeliveryTag{C.pn_delivery_tag(d.pn)}
+}
+func (d Delivery) Link() Link {
+	return Link{C.pn_delivery_link(d.pn)}
+}
+func (d Delivery) Local() Disposition {
+	return Disposition{C.pn_delivery_local(d.pn)}
+}
+func (d Delivery) LocalState() uint64 {
+	return uint64(C.pn_delivery_local_state(d.pn))
+}
+func (d Delivery) Remote() Disposition {
+	return Disposition{C.pn_delivery_remote(d.pn)}
+}
+func (d Delivery) RemoteState() uint64 {
+	return uint64(C.pn_delivery_remote_state(d.pn))
+}
+func (d Delivery) Settled() bool {
+	return bool(C.pn_delivery_settled(d.pn))
+}
+func (d Delivery) Pending() uint {
+	return uint(C.pn_delivery_pending(d.pn))
+}
+func (d Delivery) Partial() bool {
+	return bool(C.pn_delivery_partial(d.pn))
+}
+func (d Delivery) Writable() bool {
+	return bool(C.pn_delivery_writable(d.pn))
+}
+func (d Delivery) Readable() bool {
+	return bool(C.pn_delivery_readable(d.pn))
+}
+func (d Delivery) Updated() bool {
+	return bool(C.pn_delivery_updated(d.pn))
+}
+func (d Delivery) Update(state uint64) {
+	C.pn_delivery_update(d.pn, C.uint64_t(state))
+}
+func (d Delivery) Clear() {
+	C.pn_delivery_clear(d.pn)
+}
+func (d Delivery) Current() bool {
+	return bool(C.pn_delivery_current(d.pn))
+}
+func (d Delivery) Settle() {
+	C.pn_delivery_settle(d.pn)
+}
+func (d Delivery) Dump() {
+	C.pn_delivery_dump(d.pn)
+}
+func (d Delivery) Buffered() bool {
+	return bool(C.pn_delivery_buffered(d.pn))
+}
+
+// Wrappers for declarations in disposition.h
+
+type Disposition struct{ pn *C.pn_disposition_t }
+
+func (d Disposition) IsNil() bool { return d.pn == nil }
+func (d Disposition) Type() uint64 {
+	return uint64(C.pn_disposition_type(d.pn))
+}
+func (d Disposition) Condition() Condition {
+	return Condition{C.pn_disposition_condition(d.pn)}
+}
+func (d Disposition) Data() Data {
+	return Data{C.pn_disposition_data(d.pn)}
+}
+func (d Disposition) SectionNumber() uint16 {
+	return uint16(C.pn_disposition_get_section_number(d.pn))
+}
+func (d Disposition) SetSectionNumber(section_number uint16) {
+	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
+}
+func (d Disposition) SectionOffset() uint64 {
+	return uint64(C.pn_disposition_get_section_offset(d.pn))
+}
+func (d Disposition) SetSectionOffset(section_offset uint64) {
+	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
+}
+func (d Disposition) IsFailed() bool {
+	return bool(C.pn_disposition_is_failed(d.pn))
+}
+func (d Disposition) SetFailed(failed bool) {
+	C.pn_disposition_set_failed(d.pn, C.bool(failed))
+}
+func (d Disposition) IsUndeliverable() bool {
+	return bool(C.pn_disposition_is_undeliverable(d.pn))
+}
+func (d Disposition) SetUndeliverable(undeliverable bool) {
+	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
+}
+func (d Disposition) Annotations() Data {
+	return Data{C.pn_disposition_annotations(d.pn)}
+}
+
+// Wrappers for declarations in condition.h
+
+type Condition struct{ pn *C.pn_condition_t }
+
+func (c Condition) IsNil() bool { return c.pn == nil }
+func (c Condition) IsSet() bool {
+	return bool(C.pn_condition_is_set(c.pn))
+}
+func (c Condition) Clear() {
+	C.pn_condition_clear(c.pn)
+}
+func (c Condition) Name() string {
+	return C.GoString(C.pn_condition_get_name(c.pn))
+}
+func (c Condition) SetName(name string) int {
+	nameC := C.CString(name)
+	defer C.free(unsafe.Pointer(nameC))
+
+	return int(C.pn_condition_set_name(c.pn, nameC))
+}
+func (c Condition) Description() string {
+	return C.GoString(C.pn_condition_get_description(c.pn))
+}
+func (c Condition) SetDescription(description string) int {
+	descriptionC := C.CString(description)
+	defer C.free(unsafe.Pointer(descriptionC))
+
+	return int(C.pn_condition_set_description(c.pn, descriptionC))
+}
+func (c Condition) Info() Data {
+	return Data{C.pn_condition_info(c.pn)}
+}
+func (c Condition) IsRedirect() bool {
+	return bool(C.pn_condition_is_redirect(c.pn))
+}
+func (c Condition) RedirectHost() string {
+	return C.GoString(C.pn_condition_redirect_host(c.pn))
+}
+func (c Condition) RedirectPort() int {
+	return int(C.pn_condition_redirect_port(c.pn))
+}
+
+// Wrappers for declarations in terminus.h
+
+type TerminusType C.pn_terminus_type_t
+
+const (
+	PnUnspecified TerminusType = C.PN_UNSPECIFIED
+	PnSource      TerminusType = C.PN_SOURCE
+	PnTarget      TerminusType = C.PN_TARGET
+	PnCoordinator TerminusType = C.PN_COORDINATOR
+)
+
+func (e TerminusType) String() string {
+	switch e {
+
+	case C.PN_UNSPECIFIED:
+		return "Unspecified"
+	case C.PN_SOURCE:
+		return "Source"
+	case C.PN_TARGET:
+		return "Target"
+	case C.PN_COORDINATOR:
+		return "Coordinator"
+	}
+	return "unknown"
+}
+
+type Durability C.pn_durability_t
+
+const (
+	PnNondurable    Durability = C.PN_NONDURABLE
+	PnConfiguration Durability = C.PN_CONFIGURATION
+	PnDeliveries    Durability = C.PN_DELIVERIES
+)
+
+func (e Durability) String() string {
+	switch e {
+
+	case C.PN_NONDURABLE:
+		return "Nondurable"
+	case C.PN_CONFIGURATION:
+		return "Configuration"
+	case C.PN_DELIVERIES:
+		return "Deliveries"
+	}
+	return "unknown"
+}
+
+type ExpiryPolicy C.pn_expiry_policy_t
+
+const (
+	PnExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
+	PnExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
+	PnExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
+	PnExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
+)
+
+func (e ExpiryPolicy) String() string {
+	switch e {
+
+	case C.PN_EXPIRE_WITH_LINK:
+		return "ExpireWithLink"
+	case C.PN_EXPIRE_WITH_SESSION:
+		return "ExpireWithSession"
+	case C.PN_EXPIRE_WITH_CONNECTION:
+		return "ExpireWithConnection"
+	case C.PN_EXPIRE_NEVER:
+		return "ExpireNever"
+	}
+	return "unknown"
+}
+
+type DistributionMode C.pn_distribution_mode_t
+
+const (
+	PnDistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
+	PnDistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
+	PnDistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
+)
+
+func (e DistributionMode) String() string {
+	switch e {
+
+	case C.PN_DIST_MODE_UNSPECIFIED:
+		return "DistModeUnspecified"
+	case C.PN_DIST_MODE_COPY:
+		return "DistModeCopy"
+	case C.PN_DIST_MODE_MOVE:
+		return "DistModeMove"
+	}
+	return "unknown"
+}
+
+type Terminus struct{ pn *C.pn_terminus_t }
+
+func (t Terminus) IsNil() bool { return t.pn == nil }
+func (t Terminus) Type() TerminusType {
+	return TerminusType(C.pn_terminus_get_type(t.pn))
+}
+func (t Terminus) SetType(type_ TerminusType) int {
+	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
+}
+func (t Terminus) Address() string {
+	return C.GoString(C.pn_terminus_get_address(t.pn))
+}
+func (t Terminus) SetAddress(address string) int {
+	addressC := C.CString(address)
+	defer C.free(unsafe.Pointer(addressC))
+
+	return int(C.pn_terminus_set_address(t.pn, addressC))
+}
+func (t Terminus) SetDistributionMode(mode DistributionMode) int {
+	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
+}
+func (t Terminus) Durability() Durability {
+	return Durability(C.pn_terminus_get_durability(t.pn))
+}
+func (t Terminus) SetDurability(durability Durability) int {
+	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
+}
+func (t Terminus) ExpiryPolicy() ExpiryPolicy {
+	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
+}
+func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
+	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
+}
+func (t Terminus) Timeout() time.Duration {
+	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
+}
+func (t Terminus) SetTimeout(timeout time.Duration) int {
+	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
+}
+func (t Terminus) IsDynamic() bool {
+	return bool(C.pn_terminus_is_dynamic(t.pn))
+}
+func (t Terminus) SetDynamic(dynamic bool) int {
+	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
+}
+func (t Terminus) Properties() Data {
+	return Data{C.pn_terminus_properties(t.pn)}
+}
+func (t Terminus) Capabilities() Data {
+	return Data{C.pn_terminus_capabilities(t.pn)}
+}
+func (t Terminus) Outcomes() Data {
+	return Data{C.pn_terminus_outcomes(t.pn)}
+}
+func (t Terminus) Filter() Data {
+	return Data{C.pn_terminus_filter(t.pn)}
+}
+func (t Terminus) Copy(src Terminus) int {
+	return int(C.pn_terminus_copy(t.pn, src.pn))
+}
+
+// Wrappers for declarations in connection.h
+
+type Connection struct{ pn *C.pn_connection_t }
+
+func (c Connection) IsNil() bool { return c.pn == nil }
+func (c Connection) Free() {
+	C.pn_connection_free(c.pn)
+}
+func (c Connection) Release() {
+	C.pn_connection_release(c.pn)
+}
+func (c Connection) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
+}
+func (c Connection) State() State {
+	return State(C.pn_connection_state(c.pn))
+}
+func (c Connection) Open() {
+	C.pn_connection_open(c.pn)
+}
+func (c Connection) Close() {
+	C.pn_connection_close(c.pn)
+}
+func (c Connection) Reset() {
+	C.pn_connection_reset(c.pn)
+}
+func (c Connection) Condition() Condition {
+	return Condition{C.pn_connection_condition(c.pn)}
+}
+func (c Connection) RemoteCondition() Condition {
+	return Condition{C.pn_connection_remote_condition(c.pn)}
+}
+func (c Connection) Container() string {
+	return C.GoString(C.pn_connection_get_container(c.pn))
+}
+func (c Connection) SetContainer(container string) {
+	containerC := C.CString(container)
+	defer C.free(unsafe.Pointer(containerC))
+
+	C.pn_connection_set_container(c.pn, containerC)
+}
+func (c Connection) SetUser(user string) {
+	userC := C.CString(user)
+	defer C.free(unsafe.Pointer(userC))
+
+	C.pn_connection_set_user(c.pn, userC)
+}
+func (c Connection) SetPassword(password string) {
+	passwordC := C.CString(password)
+	defer C.free(unsafe.Pointer(passwordC))
+
+	C.pn_connection_set_password(c.pn, passwordC)
+}
+func (c Connection) User() string {
+	return C.GoString(C.pn_connection_get_user(c.pn))
+}
+func (c Connection) Hostname() string {
+	return C.GoString(C.pn_connection_get_hostname(c.pn))
+}
+func (c Connection) SetHostname(hostname string) {
+	hostnameC := C.CString(hostname)
+	defer C.free(unsafe.Pointer(hostnameC))
+
+	C.pn_connection_set_hostname(c.pn, hostnameC)
+}
+func (c Connection) RemoteContainer() string {
+	return C.GoString(C.pn_connection_remote_container(c.pn))
+}
+func (c Connection) RemoteHostname() string {
+	return C.GoString(C.pn_connection_remote_hostname(c.pn))
+}
+func (c Connection) OfferedCapabilities() Data {
+	return Data{C.pn_connection_offered_capabilities(c.pn)}
+}
+func (c Connection) DesiredCapabilities() Data {
+	return Data{C.pn_connection_desired_capabilities(c.pn)}
+}
+func (c Connection) Properties() Data {
+	return Data{C.pn_connection_properties(c.pn)}
+}
+func (c Connection) RemoteOfferedCapabilities() Data {
+	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
+}
+func (c Connection) RemoteDesiredCapabilities() Data {
+	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
+}
+func (c Connection) RemoteProperties() Data {
+	return Data{C.pn_connection_remote_properties(c.pn)}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/internal/error.go b/proton-c/bindings/go/internal/error.go
new file mode 100644
index 0000000..01ba890
--- /dev/null
+++ b/proton-c/bindings/go/internal/error.go
@@ -0,0 +1,125 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Internal implementation details - ignore.
+package internal
+
+// #cgo LDFLAGS: -lqpid-proton
+// #include <proton/error.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"fmt"
+	"runtime"
+	"sync"
+	"sync/atomic"
+	"unsafe"
+)
+
+// Error type for all proton errors.
+type Error string
+
+// Error prefixes error message with proton:
+func (e Error) Error() string {
+	return "proton: " + string(e)
+}
+
+// Errorf creates an Error with a formatted message
+func Errorf(format string, a ...interface{}) Error {
+	return Error(fmt.Sprintf(format, a...))
+}
+
+type PnErrorCode int
+
+func (e PnErrorCode) String() string {
+	switch e {
+	case C.PN_EOS:
+		return "end-of-data"
+	case C.PN_ERR:
+		return "error"
+	case C.PN_OVERFLOW:
+		return "overflow"
+	case C.PN_UNDERFLOW:
+		return "underflow"
+	case C.PN_STATE_ERR:
+		return "bad-state"
+	case C.PN_ARG_ERR:
+		return "invalid-argument"
+	case C.PN_TIMEOUT:
+		return "timeout"
+	case C.PN_INTR:
+		return "interrupted"
+	case C.PN_INPROGRESS:
+		return "in-progress"
+	default:
+		return fmt.Sprintf("unknown-error(%d)", e)
+	}
+}
+
+func PnError(p unsafe.Pointer) error {
+	e := (*C.pn_error_t)(p)
+	if e == nil || C.pn_error_code(e) == 0 {
+		return nil
+	}
+	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
+}
+
+// DoRecover is called to recover from internal panics
+func DoRecover(err *error) {
+	r := recover()
+	switch r := r.(type) {
+	case nil: // We are not recovering
+		return
+	case runtime.Error: // Don't catch runtime.Error
+		panic(r)
+	case error:
+		*err = r
+	default:
+		panic(r)
+	}
+}
+
+// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
+func panicIf(condition bool, fmt string, args ...interface{}) {
+	if condition {
+		panic(Errorf(fmt, args...))
+	}
+}
+
+// FirstError is a goroutine-safe error holder that keeps the first error that is set.
+type FirstError struct {
+	err  atomic.Value
+	once sync.Once
+}
+
+// Set the error if not allread set.
+func (e *FirstError) Set(err error) {
+	e.once.Do(func() { e.err.Store(err) })
+}
+
+// Get the error.
+func (e *FirstError) Get() error {
+	v := e.err.Load()
+	if v != nil {
+		return v.(error)
+	} else {
+		return nil
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/messaging/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/messaging/doc.go b/proton-c/bindings/go/messaging/doc.go
new file mode 100644
index 0000000..c815f4e
--- /dev/null
+++ b/proton-c/bindings/go/messaging/doc.go
@@ -0,0 +1,28 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package messaging provides a procedural, concurrent Go API for exchanging AMQP messages.
+*/
+package messaging
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/messaging/handler.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/messaging/handler.go b/proton-c/bindings/go/messaging/handler.go
new file mode 100644
index 0000000..4a97b9d
--- /dev/null
+++ b/proton-c/bindings/go/messaging/handler.go
@@ -0,0 +1,70 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package messaging
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+)
+
+// FIXME aconway 2015-04-28: cleanup - exposing delivery vs. disposition.
+
+type acksMap map[event.Delivery]chan Disposition
+type receiverMap map[event.Link]chan amqp.Message
+
+type handler struct {
+	connection *Connection
+	acks       acksMap
+	receivers  receiverMap
+}
+
+func newHandler(c *Connection) *handler {
+	return &handler{c, make(acksMap), make(receiverMap)}
+}
+
+func (h *handler) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
+	switch t {
+	// FIXME aconway 2015-04-29: handle errors.
+	case event.MConnectionClosed:
+		for _, ack := range h.acks {
+			// FIXME aconway 2015-04-29: communicate error info
+			close(ack)
+		}
+
+	case event.MSettled:
+		ack := h.acks[e.Delivery()]
+		if ack != nil {
+			ack <- Disposition(e.Delivery().Remote().Type())
+			close(ack)
+			delete(h.acks, e.Delivery())
+		}
+
+	case event.MMessage:
+		r := h.receivers[e.Link()]
+		if r != nil {
+			m, _ := event.DecodeMessage(e)
+			// FIXME aconway 2015-04-29: hack, direct send, possible blocking.
+			r <- m
+		} else {
+			// FIXME aconway 2015-04-29: Message with no receiver - log? panic? deadletter? drop?
+		}
+	}
+	return nil
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[27/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go
deleted file mode 100644
index 8713520..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"reflect"
-	"time"
-	"unsafe"
-)
-
-func pnTypeString(pt C.pn_type_t) string {
-	switch pt {
-	case C.PN_NULL:
-		return "null"
-	case C.PN_BOOL:
-		return "bool"
-	case C.PN_UBYTE:
-		return "ubyte"
-	case C.PN_BYTE:
-		return "byte"
-	case C.PN_USHORT:
-		return "ushort"
-	case C.PN_SHORT:
-		return "short"
-	case C.PN_CHAR:
-		return "char"
-	case C.PN_UINT:
-		return "uint"
-	case C.PN_INT:
-		return "int"
-	case C.PN_ULONG:
-		return "ulong"
-	case C.PN_LONG:
-		return "long"
-	case C.PN_TIMESTAMP:
-		return "timestamp"
-	case C.PN_FLOAT:
-		return "float"
-	case C.PN_DOUBLE:
-		return "double"
-	case C.PN_DECIMAL32:
-		return "decimal32"
-	case C.PN_DECIMAL64:
-		return "decimal64"
-	case C.PN_DECIMAL128:
-		return "decimal128"
-	case C.PN_UUID:
-		return "uuid"
-	case C.PN_BINARY:
-		return "binary"
-	case C.PN_STRING:
-		return "string"
-	case C.PN_SYMBOL:
-		return "symbol"
-	case C.PN_DESCRIBED:
-		return "described"
-	case C.PN_ARRAY:
-		return "array"
-	case C.PN_LIST:
-		return "list"
-	case C.PN_MAP:
-		return "map"
-	case C.PN_DATA_TYPE_ERROR:
-		return "no-data"
-	default:
-		return fmt.Sprintf("unknown-type(%d)", pt)
-	}
-}
-
-// Go types
-var (
-	bytesType = reflect.TypeOf([]byte{})
-	valueType = reflect.TypeOf(reflect.Value{})
-)
-
-// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
-
-// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
-type Map map[interface{}]interface{}
-
-// List is a generic list that can hold mixed values and can represent any AMQP list.
-//
-type List []interface{}
-
-// Symbol is a string that is encoded as an AMQP symbol
-type Symbol string
-
-// Binary is a string that is encoded as an AMQP binary.
-// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
-// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
-type Binary string
-
-// GoString for Map prints values with their types, useful for debugging.
-func (m Map) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", m)
-	i := len(m)
-	for k, v := range m {
-		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
-		i--
-		if i > 0 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// GoString for List prints values with their types, useful for debugging.
-func (l List) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", l)
-	for i := 0; i < len(l); i++ {
-		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
-		if i == len(l)-1 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// pnTime converts Go time.Time to Proton millisecond Unix time.
-func pnTime(t time.Time) C.pn_timestamp_t {
-	secs := t.Unix()
-	// Note: sub-second accuracy is not guaraunteed if the Unix time in
-	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
-	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
-	return C.pn_timestamp_t(secs*1000 + msecs)
-}
-
-// goTime converts a pn_timestamp_t to a Go time.Time.
-func goTime(t C.pn_timestamp_t) time.Time {
-	secs := int64(t) / 1000
-	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
-	return time.Unix(secs, nsecs)
-}
-
-func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
-	if cBytes.start != nil {
-		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
-	}
-	return
-}
-
-func goString(cBytes C.pn_bytes_t) (str string) {
-	if cBytes.start != nil {
-		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
-	}
-	return
-}
-
-func pnBytes(b []byte) C.pn_bytes_t {
-	if len(b) == 0 {
-		return C.pn_bytes_t{0, nil}
-	} else {
-		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
-	}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go
deleted file mode 100644
index 944bf6f..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Generating unique IDs for various things.
-
-package amqp
-
-import (
-	"strconv"
-	"sync/atomic"
-)
-
-// A simple atomic counter to generate unique 64 bit IDs.
-type UidCounter struct{ count uint64 }
-
-// NextInt gets the next uint64 value from the atomic counter.
-func (uc *UidCounter) NextInt() uint64 {
-	return atomic.AddUint64(&uc.count, 1)
-}
-
-// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
-func (uc *UidCounter) Next() string {
-	return strconv.FormatUint(uc.NextInt(), 32)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go
deleted file mode 100644
index 89ab64a..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-oor more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-const minDecode = 1024
-
-// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
-type BadUnmarshal struct {
-	// The name of the AMQP type.
-	AMQPType string
-	// The Go type.
-	GoType reflect.Type
-}
-
-func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
-	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
-}
-
-func (e BadUnmarshal) Error() string {
-	if e.GoType.Kind() != reflect.Ptr {
-		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
-	} else {
-		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
-	}
-}
-
-//
-// Decoding from a pn_data_t
-//
-// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
-// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
-//
-
-// Decoder decodes AMQP values from an io.Reader.
-//
-type Decoder struct {
-	reader io.Reader
-	buffer bytes.Buffer
-}
-
-// NewDecoder returns a new decoder that reads from r.
-//
-// The decoder has it's own buffer and may read more data than required for the
-// AMQP values requested.  Use Buffered to see if there is data left in the
-// buffer.
-//
-func NewDecoder(r io.Reader) *Decoder {
-	return &Decoder{r, bytes.Buffer{}}
-}
-
-// Buffered returns a reader of the data remaining in the Decoder's buffer. The
-// reader is valid until the next call to Decode.
-//
-func (d *Decoder) Buffered() io.Reader {
-	return bytes.NewReader(d.buffer.Bytes())
-}
-
-// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
-//
-// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
-//
-func (d *Decoder) Decode(v interface{}) (err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	var n int
-	for n == 0 && err == nil {
-		n = unmarshal(data, d.buffer.Bytes(), v)
-		if n == 0 { // n == 0 means not enough data, read more
-			err = d.more()
-			if err != nil {
-				return
-			}
-		}
-	}
-	d.buffer.Next(n)
-	return
-}
-
-/*
-Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
-Types are converted as follows:
-
- +---------------------------+----------------------------------------------------------------------+
- |To Go types                |From AMQP types                                                       |
- +===========================+======================================================================+
- |bool                       |bool                                                                  |
- +---------------------------+----------------------------------------------------------------------+
- |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
- |int32, int64               |long.                                                                 |
- +---------------------------+----------------------------------------------------------------------+
- |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
- |uint32, uint64 types       |uint, ulong                                                           |
- +---------------------------+----------------------------------------------------------------------+
- |float32, float64           |Equivalent or smaller float or double.                                |
- +---------------------------+----------------------------------------------------------------------+
- |string, []byte             |string, symbol or binary.                                             |
- +---------------------------+----------------------------------------------------------------------+
- |Symbol                     |symbol                                                                |
- +---------------------------+----------------------------------------------------------------------+
- |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
- +---------------------------+----------------------------------------------------------------------+
- |Map                        |map, any AMQP map                                                     |
- +---------------------------+----------------------------------------------------------------------+
- |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
- |                           +------------------------+---------------------------------------------+
- |                           |AMQP Type               |Go Type in interface{}                       |
- |                           +========================+=============================================+
- |                           |bool                    |bool                                         |
- |                           +------------------------+---------------------------------------------+
- |                           |char                    |unint8                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |byte,short,int,long     |int8,int16,int32,int64                       |
- |                           +------------------------+---------------------------------------------+
- |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
- |                           +------------------------+---------------------------------------------+
- |                           |float, double           |float32, float64                             |
- |                           +------------------------+---------------------------------------------+
- |                           |string                  |string                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |symbol                  |Symbol                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |binary                  |Binary                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |nulll                   |nil                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |map                     |Map                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |list                    |List                                         |
- +---------------------------+------------------------+---------------------------------------------+
-
-The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
-
-TODO types
-
-AMQP: timestamp, decimal32/64/128, uuid, described, array.
-
-Go: array, struct.
-
-Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
-representation for those.
-*/
-func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	n = unmarshal(data, bytes, v)
-	if n == 0 {
-		err = internal.Errorf("not enough data")
-	}
-	return
-}
-
-// more reads more data when we can't parse a complete AMQP type
-func (d *Decoder) more() error {
-	var readSize int64 = minDecode
-	if int64(d.buffer.Len()) > readSize { // Grow by doubling
-		readSize = int64(d.buffer.Len())
-	}
-	var n int64
-	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
-	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
-		err = io.EOF
-	}
-	return err
-}
-
-// unmarshal decodes from bytes and converts into the value pointed to by v.
-// Used by Unmarshal and Decode
-//
-// Returns the number of bytes decoded or 0 if not enough data.
-//
-func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
-	n = decode(data, bytes)
-	if n == 0 {
-		return 0
-	}
-	get(data, v)
-	return
-}
-
-// get value from data into value pointed at by v.
-func get(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-
-	switch v := v.(type) {
-	case *bool:
-		switch pnType {
-		case C.PN_BOOL:
-			*v = bool(C.pn_data_get_bool(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int8(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int8(C.pn_data_get_byte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint8(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint8(C.pn_data_get_ubyte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int16(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int16(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int16(C.pn_data_get_short(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint16(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint16(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint16(C.pn_data_get_ushort(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int32(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int32(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int32(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int32(C.pn_data_get_int(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint32(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint32(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint32(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint32(C.pn_data_get_uint(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int64(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int64(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int64(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int64(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			*v = int64(C.pn_data_get_long(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint64(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint64(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint64(C.pn_data_get_ushort(data))
-		case C.PN_ULONG:
-			*v = uint64(C.pn_data_get_ulong(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = int(C.pn_data_get_long(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint(C.pn_data_get_uint(data))
-		case C.PN_ULONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = uint(C.pn_data_get_ulong(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float32:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float32(C.pn_data_get_float(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float64:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float64(C.pn_data_get_float(data))
-		case C.PN_DOUBLE:
-			*v = float64(C.pn_data_get_double(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *string:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goString(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goString(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goString(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *[]byte:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goBytes(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goBytes(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goBytes(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Binary:
-		switch pnType {
-		case C.PN_BINARY:
-			*v = Binary(goBytes(C.pn_data_get_binary(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Symbol:
-		switch pnType {
-		case C.PN_SYMBOL:
-			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *interface{}:
-		getInterface(data, v)
-
-	default:
-		if reflect.TypeOf(v).Kind() != reflect.Ptr {
-			panic(newBadUnmarshal(pnType, v))
-		}
-		switch reflect.TypeOf(v).Elem().Kind() {
-		case reflect.Map:
-			getMap(data, v)
-		case reflect.Slice:
-			getList(data, v)
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	}
-	err := dataError("unmarshaling", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-// Getting into an interface is driven completely by the AMQP type, since the interface{}
-// target is type-neutral.
-func getInterface(data *C.pn_data_t, v *interface{}) {
-	pnType := C.pn_data_type(data)
-	switch pnType {
-	case C.PN_NULL:
-		*v = nil
-	case C.PN_BOOL:
-		*v = bool(C.pn_data_get_bool(data))
-	case C.PN_UBYTE:
-		*v = uint8(C.pn_data_get_ubyte(data))
-	case C.PN_BYTE:
-		*v = int8(C.pn_data_get_byte(data))
-	case C.PN_USHORT:
-		*v = uint16(C.pn_data_get_ushort(data))
-	case C.PN_SHORT:
-		*v = int16(C.pn_data_get_short(data))
-	case C.PN_UINT:
-		*v = uint32(C.pn_data_get_uint(data))
-	case C.PN_INT:
-		*v = int32(C.pn_data_get_int(data))
-	case C.PN_CHAR:
-		*v = uint8(C.pn_data_get_char(data))
-	case C.PN_ULONG:
-		*v = uint64(C.pn_data_get_ulong(data))
-	case C.PN_LONG:
-		*v = int64(C.pn_data_get_long(data))
-	case C.PN_FLOAT:
-		*v = float32(C.pn_data_get_float(data))
-	case C.PN_DOUBLE:
-		*v = float64(C.pn_data_get_double(data))
-	case C.PN_BINARY:
-		*v = Binary(goBytes(C.pn_data_get_binary(data)))
-	case C.PN_STRING:
-		*v = goString(C.pn_data_get_string(data))
-	case C.PN_SYMBOL:
-		*v = Symbol(goString(C.pn_data_get_symbol(data)))
-	case C.PN_MAP:
-		m := make(Map)
-		get(data, &m)
-		*v = m // FIXME aconway 2015-03-13: avoid the copy?
-	case C.PN_LIST:
-		l := make(List, 0)
-		get(data, &l)
-		*v = l // FIXME aconway 2015-03-13: avoid the copy?
-	default:
-		panic(newBadUnmarshal(pnType, v))
-	}
-}
-
-// get into map pointed at by v
-func getMap(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_MAP {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	mapValue := reflect.ValueOf(v).Elem()
-	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
-	count := int(C.pn_data_get_map(data))
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count/2; i++ {
-			if bool(C.pn_data_next(data)) {
-				key := reflect.New(mapValue.Type().Key())
-				get(data, key.Interface())
-				if bool(C.pn_data_next(data)) {
-					val := reflect.New(mapValue.Type().Elem())
-					get(data, val.Interface())
-					mapValue.SetMapIndex(key.Elem(), val.Elem())
-				}
-			}
-		}
-		C.pn_data_exit(data)
-	}
-}
-
-func getList(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_LIST {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	count := int(C.pn_data_get_list(data))
-	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count; i++ {
-			if bool(C.pn_data_next(data)) {
-				val := reflect.New(listValue.Type().Elem())
-				get(data, val.Interface())
-				listValue.Index(i).Set(val.Elem())
-			}
-		}
-		C.pn_data_exit(data)
-	}
-	// FIXME aconway 2015-04-09: avoid the copy?
-	reflect.ValueOf(v).Elem().Set(listValue)
-}
-
-// decode from bytes.
-// Return bytes decoded or 0 if we could not decode a complete object.
-//
-func decode(data *C.pn_data_t, bytes []byte) int {
-	if len(bytes) == 0 {
-		return 0
-	}
-	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
-	if n == int(C.PN_UNDERFLOW) {
-		C.pn_error_clear(C.pn_data_error(data))
-		return 0
-	} else if n <= 0 {
-		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
-	}
-	return n
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go
deleted file mode 100644
index 58711c7..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-/*
-#include <stdlib.h>
-#include <string.h>
-#include <proton/url.h>
-
-// Helper function for setting URL fields.
-typedef void (*setter_fn)(pn_url_t* url, const char* value);
-inline void	set(pn_url_t *url, setter_fn s, const char* value) {
-  s(url, value);
-}
-*/
-import "C"
-
-import (
-	"net"
-	"net/url"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-const (
-	amqp  string = "amqp"
-	amqps        = "amqps"
-)
-
-// ParseUrl parses an AMQP URL string and returns a net/url.Url.
-//
-// It is more forgiving than net/url.Parse and allows most of the parts of the
-// URL to be missing, assuming AMQP defaults.
-//
-func ParseURL(s string) (u *url.URL, err error) {
-	cstr := C.CString(s)
-	defer C.free(unsafe.Pointer(cstr))
-	pnUrl := C.pn_url_parse(cstr)
-	if pnUrl == nil {
-		return nil, internal.Errorf("bad URL %#v", s)
-	}
-	defer C.pn_url_free(pnUrl)
-
-	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
-	username := C.GoString(C.pn_url_get_username(pnUrl))
-	password := C.GoString(C.pn_url_get_password(pnUrl))
-	host := C.GoString(C.pn_url_get_host(pnUrl))
-	port := C.GoString(C.pn_url_get_port(pnUrl))
-	path := C.GoString(C.pn_url_get_path(pnUrl))
-
-	if err != nil {
-		return nil, internal.Errorf("bad URL %#v: %s", s, err)
-	}
-	if scheme == "" {
-		scheme = amqp
-	}
-	if port == "" {
-		if scheme == amqps {
-			port = amqps
-		} else {
-			port = amqp
-		}
-	}
-	var user *url.Userinfo
-	if password != "" {
-		user = url.UserPassword(username, password)
-	} else if username != "" {
-		user = url.User(username)
-	}
-
-	u = &url.URL{
-		Scheme: scheme,
-		User:   user,
-		Host:   net.JoinHostPort(host, port),
-		Path:   path,
-	}
-
-	return u, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go
deleted file mode 100644
index f80f1c4..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"fmt"
-)
-
-func ExampleParseURL() {
-	for _, s := range []string{
-		"amqp://username:password@host:1234/path",
-		"host:1234",
-		"host",
-		":1234",
-		"host/path",
-		"amqps://host",
-		"",
-	} {
-		u, err := ParseURL(s)
-		if err != nil {
-			fmt.Println(err)
-		} else {
-			fmt.Println(u)
-		}
-	}
-	// Output:
-	// amqp://username:password@host:1234/path
-	// amqp://host:1234
-	// amqp://host:amqp
-	// amqp://:1234
-	// amqp://host:amqp/path
-	// amqps://host:amqps
-	// proton: bad URL ""
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go
deleted file mode 100644
index 7a9ec12..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package event provides a low-level API to the proton AMQP engine.
-
-For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
-It provides a higher-level, concurrent API that is easier to use.
-
-The API is event based. There are two alternative styles of handler. EventHandler
-provides the core proton events. MessagingHandler provides a slighly simplified
-view of the event stream and automates some common tasks.
-
-See type Pump documentation for more details of the interaction between proton
-events and goroutines.
-*/
-package event
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go
deleted file mode 100644
index d76fac9..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-)
-
-// EventHandler handles core proton events.
-type EventHandler interface {
-	// HandleEvent is called with an event.
-	// Typically HandleEvent() is implemented as a switch on e.Type()
-	HandleEvent(e Event) error
-}
-
-// cHandler wraps a C pn_handler_t
-type cHandler struct {
-	pn *C.pn_handler_t
-}
-
-func (h cHandler) HandleEvent(e Event) error {
-	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
-	return nil // FIXME aconway 2015-03-31: error handling
-}
-
-// MessagingHandler provides an alternative interface to EventHandler.
-// it is easier to use for most applications that send and receive messages.
-//
-// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
-// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
-//
-type MessagingHandler interface {
-	HandleMessagingEvent(MessagingEventType, Event) error
-}
-
-// MessagingEventType provides a set of events that are easier to work with than the
-// core events defined by EventType
-//
-// There are 3 types of "endpoint": Connection, Session and Link.
-// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
-// The meaning of these events is as follows:
-//
-// Opening: The remote end opened, the local end will open automatically.
-//
-// Opened: Both ends are open, regardless of which end opened first.
-//
-// Closing: The remote end closed without error, the local end will close automatically.
-//
-// Error: The remote end closed with an error, the local end will close automatically.
-//
-// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
-//
-type MessagingEventType int
-
-const (
-	// The event loop starts.
-	MStart MessagingEventType = iota
-	// The peer closes the connection with an error condition.
-	MConnectionError
-	// The peer closes the session with an error condition.
-	MSessionError
-	// The peer closes the link with an error condition.
-	MLinkError
-	// The peer Initiates the opening of the connection.
-	MConnectionOpening
-	// The peer initiates the opening of the session.
-	MSessionOpening
-	// The peer initiates the opening of the link.
-	MLinkOpening
-	// The connection is opened.
-	MConnectionOpened
-	// The session is opened.
-	MSessionOpened
-	// The link is opened.
-	MLinkOpened
-	// The peer initiates the closing of the connection.
-	MConnectionClosing
-	// The peer initiates the closing of the session.
-	MSessionClosing
-	// The peer initiates the closing of the link.
-	MLinkClosing
-	// Both ends of the connection are closed.
-	MConnectionClosed
-	// Both ends of the session are closed.
-	MSessionClosed
-	// Both ends of the link are closed.
-	MLinkClosed
-	// The connection is disconnected.
-	MConnectionDisconnected
-	// The session's connection was disconnected
-	MSessionDisconnected
-	// The session's connection was disconnected
-	MLinkDisconnected
-	// The sender link has credit and messages can
-	// therefore be transferred.
-	MSendable
-	// The remote peer accepts an outgoing message.
-	MAccepted
-	// The remote peer rejects an outgoing message.
-	MRejected
-	// The peer releases an outgoing message. Note that this may be in response to
-	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
-	MReleased
-	// The peer has settled the outgoing message. This is the point at which it
-	// shouod never be retransmitted.
-	MSettled
-	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
-	// To manage the outcome of this messages (e.g. to accept or reject the message)
-	// use Event.Delivery().
-	MMessage
-	// The event loop terminates, there are no more events to process.
-	MFinal
-)
-
-func (t MessagingEventType) String() string {
-	switch t {
-	case MStart:
-		return "Start"
-	case MConnectionError:
-		return "ConnectionError"
-	case MSessionError:
-		return "SessionError"
-	case MLinkError:
-		return "LinkError"
-	case MConnectionOpening:
-		return "ConnectionOpening"
-	case MSessionOpening:
-		return "SessionOpening"
-	case MLinkOpening:
-		return "LinkOpening"
-	case MConnectionOpened:
-		return "ConnectionOpened"
-	case MSessionOpened:
-		return "SessionOpened"
-	case MLinkOpened:
-		return "LinkOpened"
-	case MConnectionClosing:
-		return "ConnectionClosing"
-	case MSessionClosing:
-		return "SessionClosing"
-	case MLinkClosing:
-		return "LinkClosing"
-	case MConnectionClosed:
-		return "ConnectionClosed"
-	case MSessionClosed:
-		return "SessionClosed"
-	case MLinkClosed:
-		return "LinkClosed"
-	case MConnectionDisconnected:
-		return "ConnectionDisconnected"
-	case MSessionDisconnected:
-		return "MSessionDisconnected"
-	case MLinkDisconnected:
-		return "MLinkDisconnected"
-	case MSendable:
-		return "Sendable"
-	case MAccepted:
-		return "Accepted"
-	case MRejected:
-		return "Rejected"
-	case MReleased:
-		return "Released"
-	case MSettled:
-		return "Settled"
-	case MMessage:
-		return "Message"
-	default:
-		return "Unknown"
-	}
-}
-
-// ResourceHandler provides a simple way to track the creation and deletion of
-// various proton objects.
-// endpointDelegator captures common patterns for endpoints opening/closing
-type endpointDelegator struct {
-	remoteOpen, remoteClose, localOpen, localClose EventType
-	opening, opened, closing, closed, error        MessagingEventType
-	endpoint                                       func(Event) Endpoint
-	delegate                                       MessagingHandler
-}
-
-// HandleEvent handles an open/close event for an endpoint in a generic way.
-func (d endpointDelegator) HandleEvent(e Event) (err error) {
-	endpoint := d.endpoint(e)
-	state := endpoint.State()
-
-	switch e.Type() {
-
-	case d.localOpen:
-		if state.Is(SRemoteActive) {
-			err = d.delegate.HandleMessagingEvent(d.opened, e)
-		}
-
-	case d.remoteOpen:
-		switch {
-		case state.Is(SLocalActive):
-			err = d.delegate.HandleMessagingEvent(d.opened, e)
-		case state.Is(SLocalUninit):
-			err = d.delegate.HandleMessagingEvent(d.opening, e)
-			if err == nil {
-				endpoint.Open()
-			}
-		}
-
-	case d.remoteClose:
-		var err1 error
-		if endpoint.RemoteCondition().IsSet() { // Closed with error
-			err1 = d.delegate.HandleMessagingEvent(d.error, e)
-			if err1 == nil { // Don't overwrite an application error.
-				err1 = endpoint.RemoteCondition().Error()
-			}
-		} else {
-			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
-		}
-		if state.Is(SLocalClosed) {
-			err = d.delegate.HandleMessagingEvent(d.closed, e)
-		} else if state.Is(SLocalActive) {
-			endpoint.Close()
-		}
-		if err1 != nil { // Keep the first error.
-			err = err1
-		}
-
-	case d.localClose:
-		if state.Is(SRemoteClosed) {
-			err = d.delegate.HandleMessagingEvent(d.closed, e)
-		}
-
-	default:
-		// We shouldn't be called with any other event type.
-		panic(internal.Errorf("internal error, not an open/close event: %s", e))
-	}
-
-	return err
-}
-
-// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
-// You can modify the exported fields before you pass the MessagingDelegator to
-// a Pump.
-type MessagingDelegator struct {
-	delegate                   MessagingHandler
-	connection, session, link  endpointDelegator
-	handshaker, flowcontroller EventHandler
-
-	// AutoSettle (default true) automatically pre-settle outgoing messages.
-	AutoSettle bool
-	// AutoAccept (default true) automatically accept and settle incoming messages
-	// if they are not settled by the delegate.
-	AutoAccept bool
-	// Prefetch (default 10) initial credit to issue for incoming links.
-	Prefetch int
-	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
-	PeerCloseError bool
-}
-
-func NewMessagingDelegator(h MessagingHandler) EventHandler {
-	return &MessagingDelegator{
-		delegate: h,
-		connection: endpointDelegator{
-			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
-			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
-			MConnectionError,
-			func(e Event) Endpoint { return e.Connection() },
-			h,
-		},
-		session: endpointDelegator{
-			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
-			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
-			MSessionError,
-			func(e Event) Endpoint { return e.Session() },
-			h,
-		},
-		link: endpointDelegator{
-			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
-			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
-			MLinkError,
-			func(e Event) Endpoint { return e.Link() },
-			h,
-		},
-		flowcontroller: nil,
-		AutoSettle:     true,
-		AutoAccept:     true,
-		Prefetch:       10,
-		PeerCloseError: false,
-	}
-}
-
-func handleIf(h EventHandler, e Event) error {
-	if h != nil {
-		return h.HandleEvent(e)
-	}
-	return nil
-}
-
-// Handle a proton event by passing the corresponding MessagingEvent(s) to
-// the MessagingHandler.
-func (d *MessagingDelegator) HandleEvent(e Event) error {
-	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
-
-	switch e.Type() {
-
-	case EConnectionInit:
-		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
-		d.delegate.HandleMessagingEvent(MStart, e)
-
-	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
-		return d.connection.HandleEvent(e)
-
-	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
-		return d.session.HandleEvent(e)
-
-	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
-		return d.link.HandleEvent(e)
-
-	case ELinkFlow:
-		if e.Link().IsSender() && e.Link().Credit() > 0 {
-			return d.delegate.HandleMessagingEvent(MSendable, e)
-		}
-
-	case EDelivery:
-		if e.Delivery().Link().IsReceiver() {
-			d.incoming(e)
-		} else {
-			d.outgoing(e)
-		}
-
-	case ETransportTailClosed:
-		c := e.Connection()
-		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
-			e2 := e
-			e2.link = l
-			e2.session = l.Session()
-			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
-		}
-		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
-			e2 := e
-			e2.session = s
-			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
-		}
-		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
-		d.delegate.HandleMessagingEvent(MFinal, e)
-	}
-	return nil
-}
-
-func (d *MessagingDelegator) incoming(e Event) (err error) {
-	delivery := e.Delivery()
-	if delivery.Readable() && !delivery.Partial() {
-		if e.Link().State().Is(SLocalClosed) {
-			e.Link().Advance()
-			if d.AutoAccept {
-				delivery.Release(false)
-			}
-		} else {
-			err = d.delegate.HandleMessagingEvent(MMessage, e)
-			e.Link().Advance()
-			if d.AutoAccept && !delivery.Settled() {
-				if err == nil {
-					delivery.Accept()
-				} else {
-					delivery.Reject()
-				}
-			}
-		}
-	} else if delivery.Updated() && delivery.Settled() {
-		err = d.delegate.HandleMessagingEvent(MSettled, e)
-	}
-	return
-}
-
-func (d *MessagingDelegator) outgoing(e Event) (err error) {
-	delivery := e.Delivery()
-	if delivery.Updated() {
-		switch delivery.Remote().Type() {
-		case Accepted:
-			err = d.delegate.HandleMessagingEvent(MAccepted, e)
-		case Rejected:
-			err = d.delegate.HandleMessagingEvent(MRejected, e)
-		case Released, Modified:
-			err = d.delegate.HandleMessagingEvent(MReleased, e)
-		}
-		if err == nil && delivery.Settled() {
-			err = d.delegate.HandleMessagingEvent(MSettled, e)
-		}
-		if err == nil && d.AutoSettle {
-			delivery.Settle()
-		}
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go
deleted file mode 100644
index d900744..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/internal"
-)
-
-// DecodeMessage decodes the message containined in a delivery event.
-func DecodeMessage(e Event) (m amqp.Message, err error) {
-	defer internal.DoRecover(&err)
-	delivery := e.Delivery()
-	if !delivery.Readable() || delivery.Partial() {
-		return nil, internal.Errorf("attempting to get incomplete message")
-	}
-	data := make([]byte, delivery.Pending())
-	result := delivery.Link().Recv(data)
-	if result != len(data) {
-		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
-	}
-	return amqp.DecodeMessage(data)
-}
-
-// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
-var tags amqp.UidCounter
-
-// Send sends a amqp.Message over a Link.
-// Returns a Delivery that can be use to determine the outcome of the message.
-func (link Link) Send(m amqp.Message) (Delivery, error) {
-	if !link.IsSender() {
-		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
-	}
-	// FIXME aconway 2015-04-08: buffering, error handling
-	delivery := link.Delivery(tags.Next())
-	bytes, err := m.Encode(nil)
-	if err != nil {
-		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
-	}
-	result := link.SendBytes(bytes)
-	link.Advance()
-	if result != len(bytes) {
-		if result < 0 {
-			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
-		} else {
-			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
-		}
-	}
-	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
-		delivery.Settle()
-	}
-	return delivery, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
deleted file mode 100644
index 73db513..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/connection.h>
-// #include <proton/transport.h>
-// #include <proton/event.h>
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-// #include <proton/transport.h>
-// #include <proton/session.h>
-// #include <memory.h>
-// #include <stdlib.h>
-//
-// PN_HANDLE(REMOTE_ADDR)
-import "C"
-
-import (
-	"fmt"
-	"io"
-	"net"
-	"qpid.apache.org/proton/go/internal"
-	"sync"
-	"unsafe"
-)
-
-// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
-type bufferChan struct {
-	buffers    chan []byte
-	buf1, buf2 []byte
-}
-
-func newBufferChan(size int) *bufferChan {
-	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
-}
-
-func (b *bufferChan) buffer() []byte {
-	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
-	return b.buf1[:cap(b.buf1)]
-}
-
-// FIXME aconway 2015-05-04: direct sending to Inject may block user goroutines if
-// the pum stops. Make this a function that selects on running.
-
-// FIXME aconway 2015-05-05: for consistency should Pump be called Driver?
-
-/*
-Pump reads from a net.Conn, decodes AMQP events and calls the appropriate
-Handler functions. Actions taken by Handler functions (such as sending messages)
-are encoded and written to the net.Conn.
-
-The proton protocol engine is single threaded (per connection). The Pump runs
-proton in the goroutine that calls Pump.Run() and creates goroutines to feed
-data to/from a net.Conn. You can create multiple Pumps to handle multiple
-connections concurrently.
-
-Methods in this package can only be called in the goroutine that executes the
-corresponding Pump.Run(). You implement the EventHandler or MessagingHandler
-interfaces and provide those values to NewPump(). Their HandleEvent method will be
-called in the Pump goroutine, in typical event-driven style.
-
-Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
-other goroutines, store them, or use them as map indexes. Effectively they are
-just C pointers.  Other goroutines cannot call their methods directly but they
-can can create function closures that call their methods and send those closures
-to the Pump.Inject channel. They will execute safely in the pump
-goroutine. Injected functions, or your handlers, can set up channels to get
-results back to other goroutines.
-
-You are responsible for ensuring you don't use an event value after the C object
-has been deleted. The handler methods will tell you when a value is no longer
-valid. For example after a MethodHandler handles a LinkClosed event, that link
-is no longer valid. If you do Link.Close() yourself (in a handler or injected
-function) the link remains valid until the corresponing LinkClosed event is
-received by the handler.
-
-Pump.Close() will take care of cleaning up any remaining values and types when
-you are done with the Pump. All values associated with a pump become invalid
-when you call Pump.Close()
-
-The qpid.apache.org/proton/go/messaging package will do all this for you, so unless
-you are doing something fairly low-level it is probably a better choice.
-
-*/
-type Pump struct {
-	// Error is set on exit from Run() if there was an error.
-	Error error // FIXME aconway 2015-05-26: make it a function
-	// Channel to inject functions to be executed in the Pump's proton event loop.
-	Inject chan func()
-
-	conn       net.Conn
-	transport  *C.pn_transport_t
-	connection *C.pn_connection_t
-	collector  *C.pn_collector_t
-	read       *bufferChan    // Read buffers channel.
-	write      *bufferChan    // Write buffers channel.
-	handlers   []EventHandler // Handlers for proton events.
-	running    chan struct{}  // This channel will be closed when the goroutines are done.
-}
-
-const bufferSize = 4096
-
-var pumps map[*C.pn_connection_t]*Pump
-
-func init() {
-	pumps = make(map[*C.pn_connection_t]*Pump)
-}
-
-// NewPump initializes a pump with a connection and handlers. To start it running:
-//    p := NewPump(...)
-//    go run p.Run()
-// The goroutine will exit when the pump is closed or disconnected.
-// You can check for errors on Pump.Error.
-//
-func NewPump(conn net.Conn, handlers ...EventHandler) (*Pump, error) {
-	// Save the connection ID for Connection.String()
-	p := &Pump{
-		Inject:     make(chan func(), 100), // FIXME aconway 2015-05-04: blocking hack
-		conn:       conn,
-		transport:  C.pn_transport(),
-		connection: C.pn_connection(),
-		collector:  C.pn_collector(),
-		handlers:   handlers,
-		read:       newBufferChan(bufferSize),
-		write:      newBufferChan(bufferSize),
-		running:    make(chan struct{}),
-	}
-	if p.transport == nil || p.connection == nil || p.collector == nil {
-		return nil, internal.Errorf("failed to allocate pump")
-	}
-	pnErr := int(C.pn_transport_bind(p.transport, p.connection))
-	if pnErr != 0 {
-		return nil, internal.Errorf("cannot setup pump: %s", internal.PnErrorCode(pnErr))
-	}
-	C.pn_connection_collect(p.connection, p.collector)
-	C.pn_connection_open(p.connection)
-	pumps[p.connection] = p
-	return p, nil
-}
-
-func (p *Pump) String() string {
-	return fmt.Sprintf("(%s-%s)", p.conn.LocalAddr(), p.conn.RemoteAddr())
-}
-
-func (p *Pump) Id() string {
-	return fmt.Sprintf("%p", &p)
-}
-
-// setError sets error only if not already set
-func (p *Pump) setError(e error) {
-	if p.Error == nil {
-		p.Error = e
-	}
-}
-
-// Server puts the Pump in server mode, meaning it will auto-detect security settings on
-// the incoming connnection such as use of SASL and SSL.
-// Must be called before Run()
-//
-func (p *Pump) Server() {
-	C.pn_transport_set_server(p.transport)
-}
-
-func (p *Pump) free() {
-	if p.connection != nil {
-		C.pn_connection_free(p.connection)
-	}
-	if p.transport != nil {
-		C.pn_transport_free(p.transport)
-	}
-	if p.collector != nil {
-		C.pn_collector_free(p.collector)
-	}
-	for _, h := range p.handlers {
-		switch h := h.(type) {
-		case cHandler:
-			C.pn_handler_free(h.pn)
-		}
-	}
-}
-
-// Close closes the AMQP connection, the net.Conn, and stops associated goroutines.
-// It will cause Run() to return. Run() may return earlier if the network disconnects
-// but you must still call Close() to clean everything up.
-//
-// Methods on values associated with the pump (Connections, Sessions, Links) will panic
-// if called after Close()
-//
-func (p *Pump) Close() error {
-	// If the pump is still running, inject a close. Either way wait for it to finish.
-	select {
-	case p.Inject <- func() { C.pn_connection_close(p.connection) }:
-		<-p.running // Wait to finish
-	case <-p.running: // Wait for goroutines to finish
-	}
-	delete(pumps, p.connection)
-	p.free()
-	if p.Error == io.EOF {
-		return nil
-	}
-	return p.Error
-}
-
-// Run the pump. Normally called in a goroutine as: go pump.Run()
-// An error dunring Run is stored on p.Error.
-//
-func (p *Pump) Run() {
-	// Signal errors from the read/write goroutines. Don't block if we don't
-	// read all the errors, we only care about the first.
-	error := make(chan error, 2)
-	// FIXME aconway 2015-05-04: 	stop := make(chan struct{}) // Closed to signal that read/write should stop.
-
-	wait := sync.WaitGroup{}
-	wait.Add(2)
-
-	go func() { // Read goroutine
-		defer wait.Done()
-		for {
-			rbuf := p.read.buffer()
-			n, err := p.conn.Read(rbuf)
-			if n > 0 {
-				p.read.buffers <- rbuf[:n]
-			} else if err != nil {
-				close(p.read.buffers)
-				error <- err
-				return
-			}
-		}
-	}()
-
-	go func() { // Write goroutine
-		defer wait.Done()
-		for {
-			wbuf, ok := <-p.write.buffers
-			if !ok {
-				return
-			}
-			_, err := p.conn.Write(wbuf)
-			if err != nil {
-				error <- err
-				return
-			}
-		}
-	}()
-
-	wbuf := p.write.buffer()[:0]
-loop:
-	for {
-		if len(wbuf) == 0 {
-			p.pop(&wbuf)
-		}
-		// Don't set wchan unless there is something to write.
-		var wchan chan []byte
-		if len(wbuf) > 0 {
-			wchan = p.write.buffers
-		}
-
-		select {
-		case buf := <-p.read.buffers: // Read a buffer
-			p.push(buf)
-		case wchan <- wbuf: // Write a buffer
-			wbuf = p.write.buffer()[:0]
-		case f := <-p.Inject: // Function injected from another goroutine
-			f()
-		case err := <-error: // Read or write error
-			p.setError(err)
-			C.pn_transport_close_tail(p.transport)
-			C.pn_transport_close_head(p.transport)
-		}
-		if err := p.process(); err != nil {
-			p.setError(err)
-			break loop
-		}
-	}
-	close(p.write.buffers)
-	p.conn.Close()
-	wait.Wait()
-	close(p.running) // Signal goroutines have exited and Error is set.
-}
-
-func minInt(a, b int) int {
-	if a < b {
-		return a
-	} else {
-		return b
-	}
-}
-
-func (p *Pump) pop(buf *[]byte) {
-	pending := int(C.pn_transport_pending(p.transport))
-	switch {
-	case pending == int(C.PN_EOS):
-		*buf = (*buf)[:]
-		return
-	case pending < 0:
-		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
-	}
-	size := minInt(pending, cap(*buf))
-	*buf = (*buf)[:size]
-	if size == 0 {
-		return
-	}
-	C.memcpy(unsafe.Pointer(&(*buf)[0]), unsafe.Pointer(C.pn_transport_head(p.transport)), C.size_t(size))
-	C.pn_transport_pop(p.transport, C.size_t(size))
-}
-
-func (p *Pump) push(buf []byte) {
-	buf2 := buf
-	for len(buf2) > 0 {
-		n := int(C.pn_transport_push(p.transport, (*C.char)(unsafe.Pointer((&buf2[0]))), C.size_t(len(buf2))))
-		if n <= 0 {
-			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
-		}
-		buf2 = buf2[n:]
-	}
-}
-
-func (p *Pump) handle(e Event) error {
-	for _, h := range p.handlers {
-		if err := h.HandleEvent(e); err != nil {
-			return err
-		}
-	}
-	if e.Type() == ETransportClosed {
-		return io.EOF
-	}
-	return nil
-}
-
-func (p *Pump) process() error {
-	// FIXME aconway 2015-05-04: if a Handler returns error we should stop the pump
-	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
-		e := makeEvent(ce)
-		if err := p.handle(e); err != nil {
-			return err
-		}
-		C.pn_collector_pop(p.collector)
-	}
-	return nil
-}
-
-// Connectoin gets the Pump's connection value.
-func (p *Pump) Connection() Connection { return Connection{p.connection} }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go
deleted file mode 100644
index 7043b9c..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-//#include <proton/codec.h>
-//#include <proton/connection.h>
-//#include <proton/session.h>
-//#include <proton/session.h>
-//#include <proton/delivery.h>
-//#include <proton/link.h>
-//#include <proton/event.h>
-//#include <proton/transport.h>
-//#include <proton/link.h>
-//#include <stdlib.h>
-import "C"
-
-import (
-	"fmt"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-// FIXME aconway 2015-05-05: Documentation for generated types.
-
-// Event is an AMQP protocol event.
-type Event struct {
-	pn         *C.pn_event_t
-	eventType  EventType
-	connection Connection
-	session    Session
-	link       Link
-	delivery   Delivery
-}
-
-func makeEvent(pn *C.pn_event_t) Event {
-	return Event{
-		pn:         pn,
-		eventType:  EventType(C.pn_event_type(pn)),
-		connection: Connection{C.pn_event_connection(pn)},
-		session:    Session{C.pn_event_session(pn)},
-		link:       Link{C.pn_event_link(pn)},
-		delivery:   Delivery{C.pn_event_delivery(pn)},
-	}
-}
-func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
-func (e Event) Type() EventType        { return e.eventType }
-func (e Event) Connection() Connection { return e.connection }
-func (e Event) Session() Session       { return e.session }
-func (e Event) Link() Link             { return e.link }
-func (e Event) Delivery() Delivery     { return e.delivery }
-func (e Event) String() string         { return e.Type().String() }
-
-// Data holds a pointer to decoded AMQP data.
-// Use amqp.marshal/unmarshal to access it as Go data types.
-//
-type Data struct{ pn *C.pn_data_t }
-
-func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
-
-func (d Data) Free()                   { C.pn_data_free(d.pn) }
-func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
-func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
-func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
-func (d Data) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
-}
-
-// State holds the state flags for an AMQP endpoint.
-type State byte
-
-const (
-	SLocalUninit  State = C.PN_LOCAL_UNINIT
-	SLocalActive        = C.PN_LOCAL_ACTIVE
-	SLocalClosed        = C.PN_LOCAL_CLOSED
-	SRemoteUninit       = C.PN_REMOTE_UNINIT
-	SRemoteActive       = C.PN_REMOTE_ACTIVE
-	SRemoteClosed       = C.PN_REMOTE_CLOSED
-)
-
-// Is is True if bits & state is non 0.
-func (s State) Is(bits State) bool { return s&bits != 0 }
-
-// Return a State containig just the local flags
-func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
-
-// Return a State containig just the remote flags
-func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
-
-// Endpoint is the common interface for Connection, Link and Session.
-type Endpoint interface {
-	// State is the open/closed state.
-	State() State
-	// Open an endpoint.
-	Open()
-	// Close an endpoint.
-	Close()
-	// Condition holds a local error condition.
-	Condition() Condition
-	// RemoteCondition holds a remote error condition.
-	RemoteCondition() Condition
-}
-
-const (
-	Received uint64 = C.PN_RECEIVED
-	Accepted        = C.PN_ACCEPTED
-	Rejected        = C.PN_REJECTED
-	Released        = C.PN_RELEASED
-	Modified        = C.PN_MODIFIED
-)
-
-// SettleAs is equivalent to d.Update(disposition); d.Settle()
-// It is a no-op if e does not have a delivery.
-func (d Delivery) SettleAs(disposition uint64) {
-	d.Update(disposition)
-	d.Settle()
-}
-
-// Accept accepts and settles a delivery.
-func (d Delivery) Accept() { d.SettleAs(Accepted) }
-
-// Reject rejects and settles a delivery
-func (d Delivery) Reject() { d.SettleAs(Rejected) }
-
-// Release releases and settles a delivery
-// If delivered is true the delivery count for the message will be increased.
-func (d Delivery) Release(delivered bool) {
-	if delivered {
-		d.SettleAs(Modified)
-	} else {
-		d.SettleAs(Released)
-	}
-}
-
-// FIXME aconway 2015-05-05: don't expose DeliveryTag as a C pointer, just as a String?
-
-type DeliveryTag struct{ pn C.pn_delivery_tag_t }
-
-func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
-
-func (l Link) Recv(buf []byte) int {
-	if len(buf) == 0 {
-		return 0
-	}
-	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
-}
-
-func (l Link) SendBytes(bytes []byte) int {
-	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
-}
-
-func pnTag(tag string) C.pn_delivery_tag_t {
-	bytes := []byte(tag)
-	return C.pn_dtag(cPtr(bytes), cLen(bytes))
-}
-
-func (l Link) Delivery(tag string) Delivery {
-	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}
-
-func (s Session) Sender(name string) Link {
-	cname := C.CString(name)
-	defer C.free(unsafe.Pointer(cname))
-	return Link{C.pn_sender(s.pn, cname)}
-}
-
-func (s Session) Receiver(name string) Link {
-	cname := C.CString(name)
-	defer C.free(unsafe.Pointer(cname))
-	return Link{C.pn_receiver(s.pn, cname)}
-}
-
-func joinId(a, b interface{}) string {
-	return fmt.Sprintf("%s/%s", a, b)
-}
-
-// Pump associated with this connection.
-func (c Connection) Pump() *Pump { return pumps[c.pn] }
-
-// Unique (per process) string identifier for a connection, useful for debugging.
-func (c Connection) String() string { return pumps[c.pn].String() }
-
-// Head functions don't follow the normal naming conventions so missed by the generator.
-
-func (c Connection) LinkHead(s State) Link {
-	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
-}
-
-func (c Connection) SessionHead(s State) Session {
-	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
-}
-
-// Unique (per process) string identifier for a session, including connection identifier.
-func (s Session) String() string {
-	return joinId(s.Connection(), fmt.Sprintf("%p", s.pn))
-}
-
-// Unique (per process) string identifier for a link, inlcuding session identifier.
-func (l Link) String() string {
-	return joinId(l.Session(), l.Name())
-}
-
-// Error returns an error interface corresponding to Condition.
-func (c Condition) Error() error {
-	if c.IsNil() {
-		return nil
-	} else {
-		return fmt.Errorf("%s: %s", c.Name(), c.Description())
-	}
-}
-
-// SetIfUnset sets name and description on a condition if it is not already set.
-func (c Condition) SetIfUnset(name, description string) {
-	if !c.IsSet() {
-		c.SetName(name)
-		c.SetDescription(description)
-	}
-}
-
-func (c Connection) Session() (Session, error) {
-	s := Session{C.pn_session(c.pn)}
-	if s.IsNil() {
-		return s, Connection(c).Error()
-	}
-	return s, nil
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[26/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go
deleted file mode 100644
index 73f0d3b..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go
+++ /dev/null
@@ -1,732 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-//
-// NOTE: This file was generated by genwrap.go, do not edit it by hand.
-//
-
-package event
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// #include <proton/types.h>
-// #include <proton/event.h>
-// #include <stdlib.h>
-// #include <proton/session.h>
-// #include <proton/link.h>
-// #include <proton/delivery.h>
-// #include <proton/disposition.h>
-// #include <proton/condition.h>
-// #include <proton/terminus.h>
-// #include <proton/connection.h>
-import "C"
-
-type EventType int
-
-const (
-	EConnectionInit         EventType = C.PN_CONNECTION_INIT
-	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
-	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
-	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
-	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
-	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
-	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
-	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
-	ESessionInit            EventType = C.PN_SESSION_INIT
-	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
-	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
-	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
-	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
-	ESessionFinal           EventType = C.PN_SESSION_FINAL
-	ELinkInit               EventType = C.PN_LINK_INIT
-	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
-	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
-	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
-	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
-	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
-	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
-	ELinkFlow               EventType = C.PN_LINK_FLOW
-	ELinkFinal              EventType = C.PN_LINK_FINAL
-	EDelivery               EventType = C.PN_DELIVERY
-	ETransport              EventType = C.PN_TRANSPORT
-	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
-	ETransportError         EventType = C.PN_TRANSPORT_ERROR
-	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
-	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
-	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
-)
-
-func (e EventType) String() string {
-	switch e {
-
-	case C.PN_CONNECTION_INIT:
-		return "ConnectionInit"
-	case C.PN_CONNECTION_BOUND:
-		return "ConnectionBound"
-	case C.PN_CONNECTION_UNBOUND:
-		return "ConnectionUnbound"
-	case C.PN_CONNECTION_LOCAL_OPEN:
-		return "ConnectionLocalOpen"
-	case C.PN_CONNECTION_REMOTE_OPEN:
-		return "ConnectionRemoteOpen"
-	case C.PN_CONNECTION_LOCAL_CLOSE:
-		return "ConnectionLocalClose"
-	case C.PN_CONNECTION_REMOTE_CLOSE:
-		return "ConnectionRemoteClose"
-	case C.PN_CONNECTION_FINAL:
-		return "ConnectionFinal"
-	case C.PN_SESSION_INIT:
-		return "SessionInit"
-	case C.PN_SESSION_LOCAL_OPEN:
-		return "SessionLocalOpen"
-	case C.PN_SESSION_REMOTE_OPEN:
-		return "SessionRemoteOpen"
-	case C.PN_SESSION_LOCAL_CLOSE:
-		return "SessionLocalClose"
-	case C.PN_SESSION_REMOTE_CLOSE:
-		return "SessionRemoteClose"
-	case C.PN_SESSION_FINAL:
-		return "SessionFinal"
-	case C.PN_LINK_INIT:
-		return "LinkInit"
-	case C.PN_LINK_LOCAL_OPEN:
-		return "LinkLocalOpen"
-	case C.PN_LINK_REMOTE_OPEN:
-		return "LinkRemoteOpen"
-	case C.PN_LINK_LOCAL_CLOSE:
-		return "LinkLocalClose"
-	case C.PN_LINK_REMOTE_CLOSE:
-		return "LinkRemoteClose"
-	case C.PN_LINK_LOCAL_DETACH:
-		return "LinkLocalDetach"
-	case C.PN_LINK_REMOTE_DETACH:
-		return "LinkRemoteDetach"
-	case C.PN_LINK_FLOW:
-		return "LinkFlow"
-	case C.PN_LINK_FINAL:
-		return "LinkFinal"
-	case C.PN_DELIVERY:
-		return "Delivery"
-	case C.PN_TRANSPORT:
-		return "Transport"
-	case C.PN_TRANSPORT_AUTHENTICATED:
-		return "TransportAuthenticated"
-	case C.PN_TRANSPORT_ERROR:
-		return "TransportError"
-	case C.PN_TRANSPORT_HEAD_CLOSED:
-		return "TransportHeadClosed"
-	case C.PN_TRANSPORT_TAIL_CLOSED:
-		return "TransportTailClosed"
-	case C.PN_TRANSPORT_CLOSED:
-		return "TransportClosed"
-	}
-	return "Unknown"
-}
-
-// Wrappers for declarations in session.h
-
-type Session struct{ pn *C.pn_session_t }
-
-func (s Session) IsNil() bool { return s.pn == nil }
-func (s Session) Free() {
-	C.pn_session_free(s.pn)
-}
-func (s Session) State() State {
-	return State(C.pn_session_state(s.pn))
-}
-func (s Session) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
-}
-func (s Session) Condition() Condition {
-	return Condition{C.pn_session_condition(s.pn)}
-}
-func (s Session) RemoteCondition() Condition {
-	return Condition{C.pn_session_remote_condition(s.pn)}
-}
-func (s Session) Connection() Connection {
-	return Connection{C.pn_session_connection(s.pn)}
-}
-func (s Session) Open() {
-	C.pn_session_open(s.pn)
-}
-func (s Session) Close() {
-	C.pn_session_close(s.pn)
-}
-func (s Session) IncomingCapacity() uint {
-	return uint(C.pn_session_get_incoming_capacity(s.pn))
-}
-func (s Session) SetIncomingCapacity(capacity uint) {
-	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
-}
-func (s Session) OutgoingBytes() uint {
-	return uint(C.pn_session_outgoing_bytes(s.pn))
-}
-func (s Session) IncomingBytes() uint {
-	return uint(C.pn_session_incoming_bytes(s.pn))
-}
-func (s Session) Next(state State) Session {
-	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
-}
-
-// Wrappers for declarations in link.h
-
-type SndSettleMode C.pn_snd_settle_mode_t
-
-const (
-	PnSndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
-	PnSndSettled   SndSettleMode = C.PN_SND_SETTLED
-	PnSndMixed     SndSettleMode = C.PN_SND_MIXED
-)
-
-func (e SndSettleMode) String() string {
-	switch e {
-
-	case C.PN_SND_UNSETTLED:
-		return "SndUnsettled"
-	case C.PN_SND_SETTLED:
-		return "SndSettled"
-	case C.PN_SND_MIXED:
-		return "SndMixed"
-	}
-	return "unknown"
-}
-
-type RcvSettleMode C.pn_rcv_settle_mode_t
-
-const (
-	PnRcvFirst  RcvSettleMode = C.PN_RCV_FIRST
-	PnRcvSecond RcvSettleMode = C.PN_RCV_SECOND
-)
-
-func (e RcvSettleMode) String() string {
-	switch e {
-
-	case C.PN_RCV_FIRST:
-		return "RcvFirst"
-	case C.PN_RCV_SECOND:
-		return "RcvSecond"
-	}
-	return "unknown"
-}
-
-type Link struct{ pn *C.pn_link_t }
-
-func (l Link) IsNil() bool { return l.pn == nil }
-func (l Link) Free() {
-	C.pn_link_free(l.pn)
-}
-func (l Link) Name() string {
-	return C.GoString(C.pn_link_name(l.pn))
-}
-func (l Link) IsSender() bool {
-	return bool(C.pn_link_is_sender(l.pn))
-}
-func (l Link) IsReceiver() bool {
-	return bool(C.pn_link_is_receiver(l.pn))
-}
-func (l Link) State() State {
-	return State(C.pn_link_state(l.pn))
-}
-func (l Link) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
-}
-func (l Link) Condition() Condition {
-	return Condition{C.pn_link_condition(l.pn)}
-}
-func (l Link) RemoteCondition() Condition {
-	return Condition{C.pn_link_remote_condition(l.pn)}
-}
-func (l Link) Session() Session {
-	return Session{C.pn_link_session(l.pn)}
-}
-func (l Link) Next(state State) Link {
-	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
-}
-func (l Link) Open() {
-	C.pn_link_open(l.pn)
-}
-func (l Link) Close() {
-	C.pn_link_close(l.pn)
-}
-func (l Link) Detach() {
-	C.pn_link_detach(l.pn)
-}
-func (l Link) Source() Terminus {
-	return Terminus{C.pn_link_source(l.pn)}
-}
-func (l Link) Target() Terminus {
-	return Terminus{C.pn_link_target(l.pn)}
-}
-func (l Link) RemoteSource() Terminus {
-	return Terminus{C.pn_link_remote_source(l.pn)}
-}
-func (l Link) RemoteTarget() Terminus {
-	return Terminus{C.pn_link_remote_target(l.pn)}
-}
-func (l Link) Current() Delivery {
-	return Delivery{C.pn_link_current(l.pn)}
-}
-func (l Link) Advance() bool {
-	return bool(C.pn_link_advance(l.pn))
-}
-func (l Link) Credit() int {
-	return int(C.pn_link_credit(l.pn))
-}
-func (l Link) Queued() int {
-	return int(C.pn_link_queued(l.pn))
-}
-func (l Link) RemoteCredit() int {
-	return int(C.pn_link_remote_credit(l.pn))
-}
-func (l Link) IsDrain() bool {
-	return bool(C.pn_link_get_drain(l.pn))
-}
-func (l Link) Drained() int {
-	return int(C.pn_link_drained(l.pn))
-}
-func (l Link) Available() int {
-	return int(C.pn_link_available(l.pn))
-}
-func (l Link) SndSettleMode() SndSettleMode {
-	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
-}
-func (l Link) RcvSettleMode() RcvSettleMode {
-	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
-}
-func (l Link) SetSndSettleMode(mode SndSettleMode) {
-	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
-}
-func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
-	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
-}
-func (l Link) RemoteSndSettleMode() SndSettleMode {
-	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
-}
-func (l Link) RemoteRcvSettleMode() RcvSettleMode {
-	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
-}
-func (l Link) Unsettled() int {
-	return int(C.pn_link_unsettled(l.pn))
-}
-func (l Link) Offered(credit int) {
-	C.pn_link_offered(l.pn, C.int(credit))
-}
-func (l Link) Flow(credit int) {
-	C.pn_link_flow(l.pn, C.int(credit))
-}
-func (l Link) Drain(credit int) {
-	C.pn_link_drain(l.pn, C.int(credit))
-}
-func (l Link) SetDrain(drain bool) {
-	C.pn_link_set_drain(l.pn, C.bool(drain))
-}
-func (l Link) Draining() bool {
-	return bool(C.pn_link_draining(l.pn))
-}
-
-// Wrappers for declarations in delivery.h
-
-type Delivery struct{ pn *C.pn_delivery_t }
-
-func (d Delivery) IsNil() bool { return d.pn == nil }
-func (d Delivery) Tag() DeliveryTag {
-	return DeliveryTag{C.pn_delivery_tag(d.pn)}
-}
-func (d Delivery) Link() Link {
-	return Link{C.pn_delivery_link(d.pn)}
-}
-func (d Delivery) Local() Disposition {
-	return Disposition{C.pn_delivery_local(d.pn)}
-}
-func (d Delivery) LocalState() uint64 {
-	return uint64(C.pn_delivery_local_state(d.pn))
-}
-func (d Delivery) Remote() Disposition {
-	return Disposition{C.pn_delivery_remote(d.pn)}
-}
-func (d Delivery) RemoteState() uint64 {
-	return uint64(C.pn_delivery_remote_state(d.pn))
-}
-func (d Delivery) Settled() bool {
-	return bool(C.pn_delivery_settled(d.pn))
-}
-func (d Delivery) Pending() uint {
-	return uint(C.pn_delivery_pending(d.pn))
-}
-func (d Delivery) Partial() bool {
-	return bool(C.pn_delivery_partial(d.pn))
-}
-func (d Delivery) Writable() bool {
-	return bool(C.pn_delivery_writable(d.pn))
-}
-func (d Delivery) Readable() bool {
-	return bool(C.pn_delivery_readable(d.pn))
-}
-func (d Delivery) Updated() bool {
-	return bool(C.pn_delivery_updated(d.pn))
-}
-func (d Delivery) Update(state uint64) {
-	C.pn_delivery_update(d.pn, C.uint64_t(state))
-}
-func (d Delivery) Clear() {
-	C.pn_delivery_clear(d.pn)
-}
-func (d Delivery) Current() bool {
-	return bool(C.pn_delivery_current(d.pn))
-}
-func (d Delivery) Settle() {
-	C.pn_delivery_settle(d.pn)
-}
-func (d Delivery) Dump() {
-	C.pn_delivery_dump(d.pn)
-}
-func (d Delivery) Buffered() bool {
-	return bool(C.pn_delivery_buffered(d.pn))
-}
-
-// Wrappers for declarations in disposition.h
-
-type Disposition struct{ pn *C.pn_disposition_t }
-
-func (d Disposition) IsNil() bool { return d.pn == nil }
-func (d Disposition) Type() uint64 {
-	return uint64(C.pn_disposition_type(d.pn))
-}
-func (d Disposition) Condition() Condition {
-	return Condition{C.pn_disposition_condition(d.pn)}
-}
-func (d Disposition) Data() Data {
-	return Data{C.pn_disposition_data(d.pn)}
-}
-func (d Disposition) SectionNumber() uint16 {
-	return uint16(C.pn_disposition_get_section_number(d.pn))
-}
-func (d Disposition) SetSectionNumber(section_number uint16) {
-	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
-}
-func (d Disposition) SectionOffset() uint64 {
-	return uint64(C.pn_disposition_get_section_offset(d.pn))
-}
-func (d Disposition) SetSectionOffset(section_offset uint64) {
-	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
-}
-func (d Disposition) IsFailed() bool {
-	return bool(C.pn_disposition_is_failed(d.pn))
-}
-func (d Disposition) SetFailed(failed bool) {
-	C.pn_disposition_set_failed(d.pn, C.bool(failed))
-}
-func (d Disposition) IsUndeliverable() bool {
-	return bool(C.pn_disposition_is_undeliverable(d.pn))
-}
-func (d Disposition) SetUndeliverable(undeliverable bool) {
-	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
-}
-func (d Disposition) Annotations() Data {
-	return Data{C.pn_disposition_annotations(d.pn)}
-}
-
-// Wrappers for declarations in condition.h
-
-type Condition struct{ pn *C.pn_condition_t }
-
-func (c Condition) IsNil() bool { return c.pn == nil }
-func (c Condition) IsSet() bool {
-	return bool(C.pn_condition_is_set(c.pn))
-}
-func (c Condition) Clear() {
-	C.pn_condition_clear(c.pn)
-}
-func (c Condition) Name() string {
-	return C.GoString(C.pn_condition_get_name(c.pn))
-}
-func (c Condition) SetName(name string) int {
-	nameC := C.CString(name)
-	defer C.free(unsafe.Pointer(nameC))
-
-	return int(C.pn_condition_set_name(c.pn, nameC))
-}
-func (c Condition) Description() string {
-	return C.GoString(C.pn_condition_get_description(c.pn))
-}
-func (c Condition) SetDescription(description string) int {
-	descriptionC := C.CString(description)
-	defer C.free(unsafe.Pointer(descriptionC))
-
-	return int(C.pn_condition_set_description(c.pn, descriptionC))
-}
-func (c Condition) Info() Data {
-	return Data{C.pn_condition_info(c.pn)}
-}
-func (c Condition) IsRedirect() bool {
-	return bool(C.pn_condition_is_redirect(c.pn))
-}
-func (c Condition) RedirectHost() string {
-	return C.GoString(C.pn_condition_redirect_host(c.pn))
-}
-func (c Condition) RedirectPort() int {
-	return int(C.pn_condition_redirect_port(c.pn))
-}
-
-// Wrappers for declarations in terminus.h
-
-type TerminusType C.pn_terminus_type_t
-
-const (
-	PnUnspecified TerminusType = C.PN_UNSPECIFIED
-	PnSource      TerminusType = C.PN_SOURCE
-	PnTarget      TerminusType = C.PN_TARGET
-	PnCoordinator TerminusType = C.PN_COORDINATOR
-)
-
-func (e TerminusType) String() string {
-	switch e {
-
-	case C.PN_UNSPECIFIED:
-		return "Unspecified"
-	case C.PN_SOURCE:
-		return "Source"
-	case C.PN_TARGET:
-		return "Target"
-	case C.PN_COORDINATOR:
-		return "Coordinator"
-	}
-	return "unknown"
-}
-
-type Durability C.pn_durability_t
-
-const (
-	PnNondurable    Durability = C.PN_NONDURABLE
-	PnConfiguration Durability = C.PN_CONFIGURATION
-	PnDeliveries    Durability = C.PN_DELIVERIES
-)
-
-func (e Durability) String() string {
-	switch e {
-
-	case C.PN_NONDURABLE:
-		return "Nondurable"
-	case C.PN_CONFIGURATION:
-		return "Configuration"
-	case C.PN_DELIVERIES:
-		return "Deliveries"
-	}
-	return "unknown"
-}
-
-type ExpiryPolicy C.pn_expiry_policy_t
-
-const (
-	PnExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
-	PnExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
-	PnExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
-	PnExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
-)
-
-func (e ExpiryPolicy) String() string {
-	switch e {
-
-	case C.PN_EXPIRE_WITH_LINK:
-		return "ExpireWithLink"
-	case C.PN_EXPIRE_WITH_SESSION:
-		return "ExpireWithSession"
-	case C.PN_EXPIRE_WITH_CONNECTION:
-		return "ExpireWithConnection"
-	case C.PN_EXPIRE_NEVER:
-		return "ExpireNever"
-	}
-	return "unknown"
-}
-
-type DistributionMode C.pn_distribution_mode_t
-
-const (
-	PnDistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
-	PnDistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
-	PnDistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
-)
-
-func (e DistributionMode) String() string {
-	switch e {
-
-	case C.PN_DIST_MODE_UNSPECIFIED:
-		return "DistModeUnspecified"
-	case C.PN_DIST_MODE_COPY:
-		return "DistModeCopy"
-	case C.PN_DIST_MODE_MOVE:
-		return "DistModeMove"
-	}
-	return "unknown"
-}
-
-type Terminus struct{ pn *C.pn_terminus_t }
-
-func (t Terminus) IsNil() bool { return t.pn == nil }
-func (t Terminus) Type() TerminusType {
-	return TerminusType(C.pn_terminus_get_type(t.pn))
-}
-func (t Terminus) SetType(type_ TerminusType) int {
-	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
-}
-func (t Terminus) Address() string {
-	return C.GoString(C.pn_terminus_get_address(t.pn))
-}
-func (t Terminus) SetAddress(address string) int {
-	addressC := C.CString(address)
-	defer C.free(unsafe.Pointer(addressC))
-
-	return int(C.pn_terminus_set_address(t.pn, addressC))
-}
-func (t Terminus) SetDistributionMode(mode DistributionMode) int {
-	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
-}
-func (t Terminus) Durability() Durability {
-	return Durability(C.pn_terminus_get_durability(t.pn))
-}
-func (t Terminus) SetDurability(durability Durability) int {
-	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
-}
-func (t Terminus) ExpiryPolicy() ExpiryPolicy {
-	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
-}
-func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
-	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
-}
-func (t Terminus) Timeout() time.Duration {
-	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
-}
-func (t Terminus) SetTimeout(timeout time.Duration) int {
-	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
-}
-func (t Terminus) IsDynamic() bool {
-	return bool(C.pn_terminus_is_dynamic(t.pn))
-}
-func (t Terminus) SetDynamic(dynamic bool) int {
-	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
-}
-func (t Terminus) Properties() Data {
-	return Data{C.pn_terminus_properties(t.pn)}
-}
-func (t Terminus) Capabilities() Data {
-	return Data{C.pn_terminus_capabilities(t.pn)}
-}
-func (t Terminus) Outcomes() Data {
-	return Data{C.pn_terminus_outcomes(t.pn)}
-}
-func (t Terminus) Filter() Data {
-	return Data{C.pn_terminus_filter(t.pn)}
-}
-func (t Terminus) Copy(src Terminus) int {
-	return int(C.pn_terminus_copy(t.pn, src.pn))
-}
-
-// Wrappers for declarations in connection.h
-
-type Connection struct{ pn *C.pn_connection_t }
-
-func (c Connection) IsNil() bool { return c.pn == nil }
-func (c Connection) Free() {
-	C.pn_connection_free(c.pn)
-}
-func (c Connection) Release() {
-	C.pn_connection_release(c.pn)
-}
-func (c Connection) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
-}
-func (c Connection) State() State {
-	return State(C.pn_connection_state(c.pn))
-}
-func (c Connection) Open() {
-	C.pn_connection_open(c.pn)
-}
-func (c Connection) Close() {
-	C.pn_connection_close(c.pn)
-}
-func (c Connection) Reset() {
-	C.pn_connection_reset(c.pn)
-}
-func (c Connection) Condition() Condition {
-	return Condition{C.pn_connection_condition(c.pn)}
-}
-func (c Connection) RemoteCondition() Condition {
-	return Condition{C.pn_connection_remote_condition(c.pn)}
-}
-func (c Connection) Container() string {
-	return C.GoString(C.pn_connection_get_container(c.pn))
-}
-func (c Connection) SetContainer(container string) {
-	containerC := C.CString(container)
-	defer C.free(unsafe.Pointer(containerC))
-
-	C.pn_connection_set_container(c.pn, containerC)
-}
-func (c Connection) SetUser(user string) {
-	userC := C.CString(user)
-	defer C.free(unsafe.Pointer(userC))
-
-	C.pn_connection_set_user(c.pn, userC)
-}
-func (c Connection) SetPassword(password string) {
-	passwordC := C.CString(password)
-	defer C.free(unsafe.Pointer(passwordC))
-
-	C.pn_connection_set_password(c.pn, passwordC)
-}
-func (c Connection) User() string {
-	return C.GoString(C.pn_connection_get_user(c.pn))
-}
-func (c Connection) Hostname() string {
-	return C.GoString(C.pn_connection_get_hostname(c.pn))
-}
-func (c Connection) SetHostname(hostname string) {
-	hostnameC := C.CString(hostname)
-	defer C.free(unsafe.Pointer(hostnameC))
-
-	C.pn_connection_set_hostname(c.pn, hostnameC)
-}
-func (c Connection) RemoteContainer() string {
-	return C.GoString(C.pn_connection_remote_container(c.pn))
-}
-func (c Connection) RemoteHostname() string {
-	return C.GoString(C.pn_connection_remote_hostname(c.pn))
-}
-func (c Connection) OfferedCapabilities() Data {
-	return Data{C.pn_connection_offered_capabilities(c.pn)}
-}
-func (c Connection) DesiredCapabilities() Data {
-	return Data{C.pn_connection_desired_capabilities(c.pn)}
-}
-func (c Connection) Properties() Data {
-	return Data{C.pn_connection_properties(c.pn)}
-}
-func (c Connection) RemoteOfferedCapabilities() Data {
-	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
-}
-func (c Connection) RemoteDesiredCapabilities() Data {
-	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
-}
-func (c Connection) RemoteProperties() Data {
-	return Data{C.pn_connection_remote_properties(c.pn)}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
deleted file mode 100644
index f3f3307..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Internal implementation details - ignore.
-package internal
-
-// #cgo LDFLAGS: -lqpid-proton
-// #include <proton/error.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"fmt"
-	"runtime"
-	"sync"
-	"unsafe"
-)
-
-// Error type for all proton errors.
-type Error string
-
-// Error prefixes error message with proton:
-func (e Error) Error() string {
-	return "proton: " + string(e)
-}
-
-// Errorf creates an Error with a formatted message
-func Errorf(format string, a ...interface{}) Error {
-	return Error(fmt.Sprintf(format, a...))
-}
-
-type PnErrorCode int
-
-func (e PnErrorCode) String() string {
-	switch e {
-	case C.PN_EOS:
-		return "end-of-data"
-	case C.PN_ERR:
-		return "error"
-	case C.PN_OVERFLOW:
-		return "overflow"
-	case C.PN_UNDERFLOW:
-		return "underflow"
-	case C.PN_STATE_ERR:
-		return "bad-state"
-	case C.PN_ARG_ERR:
-		return "invalid-argument"
-	case C.PN_TIMEOUT:
-		return "timeout"
-	case C.PN_INTR:
-		return "interrupted"
-	case C.PN_INPROGRESS:
-		return "in-progress"
-	default:
-		return fmt.Sprintf("unknown-error(%d)", e)
-	}
-}
-
-func PnError(p unsafe.Pointer) error {
-	e := (*C.pn_error_t)(p)
-	if e == nil || C.pn_error_code(e) == 0 {
-		return nil
-	}
-	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
-}
-
-// DoRecover is called to recover from internal panics
-func DoRecover(err *error) {
-	r := recover()
-	switch r := r.(type) {
-	case nil: // We are not recovering
-		return
-	case runtime.Error: // Don't catch runtime.Error
-		panic(r)
-	case error:
-		*err = r
-	default:
-		panic(r)
-	}
-}
-
-// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
-func panicIf(condition bool, fmt string, args ...interface{}) {
-	if condition {
-		panic(Errorf(fmt, args...))
-	}
-}
-
-// FirstError is a goroutine-safe error holder that keeps the first error that is set.
-type FirstError struct {
-	err  error
-	lock sync.Mutex
-}
-
-// Set the error if not already set, return the error.
-func (e *FirstError) Set(err error) error {
-	e.lock.Lock()
-	defer e.lock.Unlock()
-	if e.err == nil {
-		e.err = err
-	}
-	return e.err
-}
-
-// Get the error.
-func (e *FirstError) Get() error {
-	e.lock.Lock()
-	defer e.lock.Unlock()
-	return e.err
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go
deleted file mode 100644
index c815f4e..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package messaging provides a procedural, concurrent Go API for exchanging AMQP messages.
-*/
-package messaging
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go
deleted file mode 100644
index 4a97b9d..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package messaging
-
-import (
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-)
-
-// FIXME aconway 2015-04-28: cleanup - exposing delivery vs. disposition.
-
-type acksMap map[event.Delivery]chan Disposition
-type receiverMap map[event.Link]chan amqp.Message
-
-type handler struct {
-	connection *Connection
-	acks       acksMap
-	receivers  receiverMap
-}
-
-func newHandler(c *Connection) *handler {
-	return &handler{c, make(acksMap), make(receiverMap)}
-}
-
-func (h *handler) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
-	switch t {
-	// FIXME aconway 2015-04-29: handle errors.
-	case event.MConnectionClosed:
-		for _, ack := range h.acks {
-			// FIXME aconway 2015-04-29: communicate error info
-			close(ack)
-		}
-
-	case event.MSettled:
-		ack := h.acks[e.Delivery()]
-		if ack != nil {
-			ack <- Disposition(e.Delivery().Remote().Type())
-			close(ack)
-			delete(h.acks, e.Delivery())
-		}
-
-	case event.MMessage:
-		r := h.receivers[e.Link()]
-		if r != nil {
-			m, _ := event.DecodeMessage(e)
-			// FIXME aconway 2015-04-29: hack, direct send, possible blocking.
-			r <- m
-		} else {
-			// FIXME aconway 2015-04-29: Message with no receiver - log? panic? deadletter? drop?
-		}
-	}
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
deleted file mode 100644
index e4b117d..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package messaging
-
-// #include <proton/disposition.h>
-import "C"
-
-import (
-	"io"
-	"net"
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-	"qpid.apache.org/proton/go/internal"
-)
-
-// Closed is an alias for io.EOF. It indicates orderly closure of an endpoint.
-var Closed = io.EOF
-
-// Connection is a connection to a remote AMQP endpoint.
-//
-// You can set exported fields to configure the connection before calling
-// Connection.Open()
-//
-type Connection struct {
-	// Server = true means a the connection will do automatic protocol detection.
-	Server bool
-
-	// FIXME aconway 2015-04-17: Other parameters to set up SSL, SASL etc.
-
-	handler *handler
-	pump    *event.Pump
-	session Session
-	err     internal.FirstError
-}
-
-// Error returns nil if the connection is open, messaging.Closed if was closed cleanly
-// or an error value if it was closed due to an error.
-func (c *Connection) Error() error { return c.err.Get() }
-
-// Make an AMQP connection over a net.Conn connection.
-// You must call c.Close() to close the connection and clean up its resources.
-func (c *Connection) Open(conn net.Conn) (err error) {
-	c.handler = newHandler(c)
-	c.pump, err = event.NewPump(conn,
-		event.NewMessagingDelegator(c.handler),
-	)
-	if err == nil {
-		if c.Server {
-			c.pump.Server()
-		}
-		go c.pump.Run()
-	}
-	return c.err.Set(err)
-}
-
-// Connect opens a default client connection. It is a shortcut for
-//    c := &Connection
-//    c.Open()
-//
-func Connect(conn net.Conn) (*Connection, error) {
-	c := &Connection{}
-	c.err.Set(c.Open(conn))
-	return c, c.Error()
-}
-
-// Close cleans up resources and closes the associated net.Conn connection.
-func (c *Connection) Close() error {
-	err := c.pump.Close()   // Will be nil on close OK
-	c.err.Set(c.pump.Error) // Will be io.EOF on close OK
-	return err
-}
-
-// DefaultSession returns a default session for the connection.
-//
-// It is created on the first call to DefaultSession() and returned from all subsequent calls.
-// Use Session() for more control over creating sessions.
-//
-func (c *Connection) DefaultSession() (s Session, err error) {
-	if c.Error() != nil {
-		return Session{}, c.Error()
-	}
-	if c.session.e.IsNil() {
-		c.session, err = c.Session()
-	}
-	return c.session, err
-}
-
-type sessionErr struct {
-	s   event.Session
-	err error
-}
-
-// Session creates a new session.
-func (c *Connection) Session() (Session, error) {
-	connection := c.pump.Connection()
-	result := make(chan sessionErr)
-	c.pump.Inject <- func() {
-		s, err := connection.Session()
-		if err == nil {
-			s.Open()
-		}
-		result <- sessionErr{s, err}
-	}
-	se := <-result
-	return Session{se.s, c.pump}, se.err
-}
-
-// FIXME aconway 2015-04-27: set sender name, options etc.
-
-// Sender creates a Sender that will send messages to the address addr.
-func (c *Connection) Sender(addr string) (s Sender, err error) {
-	session, err := c.DefaultSession()
-	if err != nil {
-		return Sender{}, err
-	}
-	result := make(chan Sender)
-	c.pump.Inject <- func() {
-		link := session.e.Sender(linkNames.Next())
-		if link.IsNil() {
-			err = session.e.Error()
-		} else {
-			link.Target().SetAddress(addr)
-			// FIXME aconway 2015-04-27: link options?
-			link.Open()
-		}
-		result <- Sender{Link{c, link}}
-	}
-	return <-result, err
-}
-
-// Receiver returns a receiver that will receive messages sent to address addr.
-func (c *Connection) Receiver(addr string) (r Receiver, err error) {
-	// FIXME aconway 2015-04-29: move code to session, in link.go?
-	session, err := c.DefaultSession()
-	if err != nil {
-		return Receiver{}, err
-	}
-	result := make(chan Receiver)
-	c.pump.Inject <- func() {
-		link := session.e.Receiver(linkNames.Next())
-		if link.IsNil() {
-			err = session.e.Error()
-		} else {
-			link.Source().SetAddress(addr)
-			// FIXME aconway 2015-04-27: link options?
-			link.Open()
-		}
-		// FIXME aconway 2015-04-29: hack to avoid blocking, need proper buffering linked to flow control
-		rchan := make(chan amqp.Message, 1000)
-		c.handler.receivers[link] = rchan
-		result <- Receiver{Link{c, link}, rchan}
-	}
-	return <-result, err
-}
-
-// FIXME aconway 2015-04-29: counter per session.
-var linkNames amqp.UidCounter
-
-// Session is an AMQP session, it contains Senders and Receivers.
-// Every Connection has a DefaultSession, you can create additional sessions
-// with Connection.Session()
-type Session struct {
-	e    event.Session
-	pump *event.Pump
-}
-
-// FIXME aconway 2015-05-05: REWORK Sender/receiver/session.
-
-// Disposition indicates the outcome of a settled message delivery.
-type Disposition uint64
-
-const (
-	// Message was accepted by the receiver
-	Accepted Disposition = C.PN_ACCEPTED
-	// Message was rejected as invalid by the receiver
-	Rejected = C.PN_REJECTED
-	// Message was not processed by the receiver but may be processed by some other receiver.
-	Released = C.PN_RELEASED
-)
-
-// String human readable name for a Disposition.
-func (d Disposition) String() string {
-	switch d {
-	case Accepted:
-		return "Accepted"
-	case Rejected:
-		return "Rejected"
-	case Released:
-		return "Released"
-	default:
-		return "Unknown"
-	}
-}
-
-// FIXME aconway 2015-04-29: How to signal errors via ack channels.
-
-// An Acknowledgement is a channel which will receive the Disposition of the message
-// when it is acknowledged. The channel is closed after the disposition is sent.
-type Acknowledgement <-chan Disposition
-
-// Link has common data and methods for Sender and Receiver links.
-type Link struct {
-	connection *Connection
-	elink      event.Link
-}
-
-// Sender sends messages.
-type Sender struct {
-	Link
-}
-
-// FIXME aconway 2015-04-28: allow user to specify delivery tag.
-// FIXME aconway 2015-04-28: should we provide a sending channel rather than a send function?
-
-// Send sends a message. If d is not nil, the disposition is retured on d.
-// If d is nil the message is sent pre-settled and no disposition is returned.
-func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
-	ackChan := make(chan Disposition, 1)
-	ack = ackChan
-	s.connection.pump.Inject <- func() {
-		// FIXME aconway 2015-04-28: flow control & credit, buffer or fail?
-		delivery, err := s.elink.Send(m)
-		if err == nil { // FIXME aconway 2015-04-28: error handling
-			s.connection.handler.acks[delivery] = ackChan
-		}
-	}
-	return ack, nil
-}
-
-// Close the sender.
-func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
-
-type Receiver struct {
-	Link
-	// Channel to receive messages. When it closes, check Receiver.Error() for an error.
-	Receive <-chan amqp.Message
-}
-
-// FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
-
-// FIXME aconway 2015-05-25:  Close must unblock Receive() calls.
-
-// Close the Receiver.
-func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
new file mode 100644
index 0000000..aa4d76b
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
@@ -0,0 +1,399 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package proton
+
+// #include <proton/handlers.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/internal"
+)
+
+// EventHandler handles core proton events.
+type EventHandler interface {
+	// HandleEvent is called with an event.
+	// Typically HandleEvent() is implemented as a switch on e.Type()
+	// Returning an error will stop the Engine.
+	HandleEvent(e Event)
+}
+
+// cHandler wraps a C pn_handler_t
+type cHandler struct {
+	pn *C.pn_handler_t
+}
+
+func (h cHandler) HandleEvent(e Event) {
+	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
+}
+
+// MessagingHandler provides an alternative interface to EventHandler.
+// it is easier to use for most applications that send and receive messages.
+//
+// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
+// MessagingHandlerDelegator implements EventHandler and can be registered with a Engine.
+//
+type MessagingHandler interface {
+	// HandleMessagingEvent is called with  MessagingEvent.
+	// Typically HandleEvent() is implemented as a switch on e.Type()
+	// Returning an error will stop the Engine.
+	HandleMessagingEvent(MessagingEvent, Event)
+}
+
+// MessagingEvent provides a set of events that are easier to work with than the
+// core events defined by EventType
+//
+// There are 3 types of "endpoint": Connection, Session and Link.  For each
+// endpoint there are 5 events: Opening, Opened, Closing, Closed and Error.
+//
+// The meaning of these events is as follows:
+//
+// Opening: The remote end opened, the local end will open automatically.
+//
+// Opened: Both ends are open, regardless of which end opened first.
+//
+// Closing: The remote end closed without error, the local end will close automatically.
+//
+// Error: The remote end closed with an error, the local end will close automatically.
+//
+// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
+// No further events will be received for the endpoint.
+//
+type MessagingEvent int
+
+const (
+	// The event loop starts.
+	MStart MessagingEvent = iota
+	// The peer closes the connection with an error condition.
+	MConnectionError
+	// The peer closes the session with an error condition.
+	MSessionError
+	// The peer closes the link with an error condition.
+	MLinkError
+	// The peer Initiates the opening of the connection.
+	MConnectionOpening
+	// The peer initiates the opening of the session.
+	MSessionOpening
+	// The peer initiates the opening of the link.
+	MLinkOpening
+	// The connection is opened.
+	MConnectionOpened
+	// The session is opened.
+	MSessionOpened
+	// The link is opened.
+	MLinkOpened
+	// The peer initiates the closing of the connection.
+	MConnectionClosing
+	// The peer initiates the closing of the session.
+	MSessionClosing
+	// The peer initiates the closing of the link.
+	MLinkClosing
+	// Both ends of the connection are closed.
+	MConnectionClosed
+	// Both ends of the session are closed.
+	MSessionClosed
+	// Both ends of the link are closed.
+	MLinkClosed
+	// The sender link has credit and messages can
+	// therefore be transferred.
+	MSendable
+	// The remote peer accepts an outgoing message.
+	MAccepted
+	// The remote peer rejects an outgoing message.
+	MRejected
+	// The peer releases an outgoing message. Note that this may be in response to
+	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
+	MReleased
+	// The peer has settled the outgoing message. This is the point at which it
+	// should never be re-transmitted.
+	MSettled
+	// A message is received. Call Event.Delivery().Message() to decode as an amqp.Message.
+	// To manage the outcome of this messages (e.g. to accept or reject the message)
+	// use Event.Delivery().
+	MMessage
+	// A network connection was disconnected.
+	MDisconnected
+)
+
+func (t MessagingEvent) String() string {
+	switch t {
+	case MStart:
+		return "Start"
+	case MConnectionError:
+		return "ConnectionError"
+	case MSessionError:
+		return "SessionError"
+	case MLinkError:
+		return "LinkError"
+	case MConnectionOpening:
+		return "ConnectionOpening"
+	case MSessionOpening:
+		return "SessionOpening"
+	case MLinkOpening:
+		return "LinkOpening"
+	case MConnectionOpened:
+		return "ConnectionOpened"
+	case MSessionOpened:
+		return "SessionOpened"
+	case MLinkOpened:
+		return "LinkOpened"
+	case MConnectionClosing:
+		return "ConnectionClosing"
+	case MSessionClosing:
+		return "SessionClosing"
+	case MLinkClosing:
+		return "LinkClosing"
+	case MConnectionClosed:
+		return "ConnectionClosed"
+	case MSessionClosed:
+		return "SessionClosed"
+	case MLinkClosed:
+		return "LinkClosed"
+	case MDisconnected:
+		return "MDisconnected"
+	case MSendable:
+		return "Sendable"
+	case MAccepted:
+		return "Accepted"
+	case MRejected:
+		return "Rejected"
+	case MReleased:
+		return "Released"
+	case MSettled:
+		return "Settled"
+	case MMessage:
+		return "Message"
+	default:
+		return "Unknown"
+	}
+}
+
+// ResourceHandler provides a simple way to track the creation and deletion of
+// various proton objects.
+// endpointDelegator captures common patterns for endpoints opening/closing
+type endpointDelegator struct {
+	remoteOpen, remoteClose, localOpen, localClose EventType
+	opening, opened, closing, closed, error        MessagingEvent
+	endpoint                                       func(Event) Endpoint
+	delegator                                      *MessagingDelegator
+}
+
+// HandleEvent handles an open/close event for an endpoint in a generic way.
+func (d endpointDelegator) HandleEvent(e Event) {
+	endpoint := d.endpoint(e)
+	state := endpoint.State()
+
+	switch e.Type() {
+
+	case d.localOpen:
+		if state.RemoteActive() {
+			d.delegator.mhandler.HandleMessagingEvent(d.opened, e)
+		}
+
+	case d.remoteOpen:
+		switch {
+		case state.LocalActive():
+			d.delegator.mhandler.HandleMessagingEvent(d.opened, e)
+		case state.LocalUninit():
+			d.delegator.mhandler.HandleMessagingEvent(d.opening, e)
+			if d.delegator.AutoOpen {
+				endpoint.Open()
+			}
+		}
+
+	case d.remoteClose:
+		if endpoint.RemoteCondition().IsSet() { // Closed with error
+			d.delegator.mhandler.HandleMessagingEvent(d.error, e)
+		} else {
+			d.delegator.mhandler.HandleMessagingEvent(d.closing, e)
+		}
+		if state.LocalClosed() {
+			d.delegator.mhandler.HandleMessagingEvent(d.closed, e)
+		} else if state.LocalActive() {
+			endpoint.Close()
+		}
+
+	case d.localClose:
+		if state.RemoteClosed() {
+			d.delegator.mhandler.HandleMessagingEvent(d.closed, e)
+		}
+
+	default:
+		// We shouldn't be called with any other event type.
+		panic(internal.Errorf("internal error, not an open/close event: %s", e))
+	}
+}
+
+// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
+// You can modify the exported fields before you pass the MessagingDelegator to
+// a Engine.
+type MessagingDelegator struct {
+	mhandler                  MessagingHandler
+	connection, session, link endpointDelegator
+	flowcontroller            EventHandler
+
+	// AutoSettle (default true) automatically pre-settle outgoing messages.
+	AutoSettle bool
+	// AutoAccept (default true) automatically accept and settle incoming messages
+	// if they are not settled by the delegate.
+	AutoAccept bool
+	// AutoOpen (default true) automatically open remotely opened endpoints.
+	AutoOpen bool
+	// Prefetch (default 10) initial credit to issue for incoming links.
+	Prefetch int
+	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
+	PeerCloseError bool
+}
+
+func NewMessagingDelegator(h MessagingHandler) *MessagingDelegator {
+	return &MessagingDelegator{
+		mhandler:       h,
+		flowcontroller: nil,
+		AutoSettle:     true,
+		AutoAccept:     true,
+		AutoOpen:       true,
+		Prefetch:       10,
+		PeerCloseError: false,
+	}
+}
+
+func handleIf(h EventHandler, e Event) {
+	if h != nil {
+		h.HandleEvent(e)
+	}
+}
+
+// Handle a proton event by passing the corresponding MessagingEvent(s) to
+// the MessagingHandler.
+func (d *MessagingDelegator) HandleEvent(e Event) {
+	handleIf(d.flowcontroller, e)
+
+	switch e.Type() {
+
+	case EConnectionInit:
+		d.connection = endpointDelegator{
+			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
+			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
+			MConnectionError,
+			func(e Event) Endpoint { return e.Connection() },
+			d,
+		}
+		d.session = endpointDelegator{
+			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
+			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
+			MSessionError,
+			func(e Event) Endpoint { return e.Session() },
+			d,
+		}
+		d.link = endpointDelegator{
+			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
+			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
+			MLinkError,
+			func(e Event) Endpoint { return e.Link() },
+			d,
+		}
+		if d.Prefetch > 0 {
+			d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
+		}
+		d.mhandler.HandleMessagingEvent(MStart, e)
+
+	case EConnectionRemoteOpen:
+
+		d.connection.HandleEvent(e)
+
+	case EConnectionRemoteClose:
+		d.connection.HandleEvent(e)
+		e.Connection().Transport().CloseTail()
+
+	case EConnectionLocalOpen, EConnectionLocalClose:
+		d.connection.HandleEvent(e)
+
+	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
+		d.session.HandleEvent(e)
+
+	case ELinkRemoteOpen:
+		e.Link().Source().Copy(e.Link().RemoteSource())
+		e.Link().Target().Copy(e.Link().RemoteTarget())
+		d.link.HandleEvent(e)
+
+	case ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
+		d.link.HandleEvent(e)
+
+	case ELinkFlow:
+		if e.Link().IsSender() && e.Link().Credit() > 0 {
+			d.mhandler.HandleMessagingEvent(MSendable, e)
+		}
+
+	case EDelivery:
+		if e.Delivery().Link().IsReceiver() {
+			d.incoming(e)
+		} else {
+			d.outgoing(e)
+		}
+
+	case ETransportClosed:
+		d.mhandler.HandleMessagingEvent(MDisconnected, e)
+	}
+}
+
+func (d *MessagingDelegator) incoming(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.HasMessage() {
+		if e.Link().State().LocalClosed() {
+			e.Link().Advance()
+			if d.AutoAccept {
+				delivery.Release(false)
+			}
+		} else {
+			d.mhandler.HandleMessagingEvent(MMessage, e)
+			if d.AutoAccept && !delivery.Settled() {
+				if err == nil {
+					delivery.Accept()
+				} else {
+					delivery.Reject()
+				}
+			}
+		}
+	} else if delivery.Updated() && delivery.Settled() {
+		d.mhandler.HandleMessagingEvent(MSettled, e)
+	}
+	return
+}
+
+func (d *MessagingDelegator) outgoing(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Updated() {
+		switch delivery.Remote().Type() {
+		case Accepted:
+			d.mhandler.HandleMessagingEvent(MAccepted, e)
+		case Rejected:
+			d.mhandler.HandleMessagingEvent(MRejected, e)
+		case Released, Modified:
+			d.mhandler.HandleMessagingEvent(MReleased, e)
+		}
+		if err == nil && delivery.Settled() {
+			// The delivery was settled remotely, inform the local end.
+			d.mhandler.HandleMessagingEvent(MSettled, e)
+		}
+		if err == nil && d.AutoSettle {
+			delivery.Settle() // Local settle, don't mhandler MSettled till the remote end settles.
+		}
+	}
+	return
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/internal/error.go b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/error.go
new file mode 100644
index 0000000..9f65e04
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/error.go
@@ -0,0 +1,121 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Internal implementation details - ignore.
+package internal
+
+// #cgo LDFLAGS: -lqpid-proton
+// #include <proton/error.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"fmt"
+	"sync"
+	"unsafe"
+)
+
+// Error type for proton runtime errors returned as error values.
+type Error string
+
+// Error prefixes error message with proton:
+func (e Error) Error() string {
+	return "proton: " + string(e)
+}
+
+// Errorf creates an Error with a formatted message
+func Errorf(format string, a ...interface{}) Error {
+	return Error(fmt.Sprintf(format, a...))
+}
+
+type PnErrorCode int
+
+func (e PnErrorCode) String() string {
+	switch e {
+	case C.PN_EOS:
+		return "end-of-data"
+	case C.PN_ERR:
+		return "error"
+	case C.PN_OVERFLOW:
+		return "overflow"
+	case C.PN_UNDERFLOW:
+		return "underflow"
+	case C.PN_STATE_ERR:
+		return "bad-state"
+	case C.PN_ARG_ERR:
+		return "invalid-argument"
+	case C.PN_TIMEOUT:
+		return "timeout"
+	case C.PN_INTR:
+		return "interrupted"
+	case C.PN_INPROGRESS:
+		return "in-progress"
+	default:
+		return fmt.Sprintf("unknown-error(%d)", e)
+	}
+}
+
+func PnError(p unsafe.Pointer) error {
+	e := (*C.pn_error_t)(p)
+	if e == nil || C.pn_error_code(e) == 0 {
+		return nil
+	}
+	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
+}
+
+// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
+func panicIf(condition bool, fmt string, args ...interface{}) {
+	if condition {
+		panic(Errorf(fmt, args...))
+	}
+}
+
+// FirstError is a goroutine-safe error holder that keeps the first error that is set.
+type FirstError struct {
+	err  error
+	lock sync.Mutex
+}
+
+// Set the error if not already set, return the error.
+func (e *FirstError) Set(err error) error {
+	e.lock.Lock()
+	defer e.lock.Unlock()
+	if e.err == nil {
+		e.err = err
+	}
+	return e.err
+}
+
+// Get the error.
+func (e *FirstError) Get() error {
+	e.lock.Lock()
+	defer e.lock.Unlock()
+	return e.err
+}
+
+// Assert panics if condition is false with optional formatted message
+func Assert(condition bool, format ...interface{}) {
+	if !condition {
+		if len(format) > 0 {
+			panic(Errorf(format[0].(string), format[1:]...))
+		} else {
+			panic(Errorf("assertion failed"))
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel.go b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel.go
new file mode 100644
index 0000000..77b524c
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel.go
@@ -0,0 +1,82 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package internal
+
+// FlexChannel acts like a channel with an automatically sized buffer, see NewFlexChannel().
+type FlexChannel struct {
+	// In channel to send to. close(In) will close the FlexChannel once buffer has drained.
+	In chan<- interface{}
+	// Out channel to receive from. Out closes when In has closed and the buffer is empty.
+	Out <-chan interface{}
+
+	in, out chan interface{}
+	buffer  []interface{}
+	limit   int
+}
+
+// NewFlexChannel creates a FlexChannel, a channel with an automatically-sized buffer.
+//
+// Initially the buffer size is 0, the buffer grows as needed up to limit. limit < 0 means
+// there is no limit.
+//
+func NewFlexChannel(limit int) *FlexChannel {
+	fc := &FlexChannel{
+		in:     make(chan interface{}),
+		out:    make(chan interface{}),
+		buffer: make([]interface{}, 0),
+		limit:  limit,
+	}
+	fc.In = fc.in
+	fc.Out = fc.out
+	go fc.run()
+	return fc
+}
+
+func (fc *FlexChannel) run() {
+	defer func() { // Flush the channel on exit
+		for _, data := range fc.buffer {
+			fc.out <- data
+		}
+		close(fc.out)
+	}()
+
+	for {
+		var usein, useout chan interface{}
+		var outvalue interface{}
+		if len(fc.buffer) > 0 {
+			useout = fc.out
+			outvalue = fc.buffer[0]
+		}
+		if len(fc.buffer) < fc.limit || fc.limit < 0 {
+			usein = fc.in
+		}
+		Assert(usein != nil || useout != nil)
+		select {
+		case useout <- outvalue:
+			fc.buffer = fc.buffer[1:]
+		case data, ok := <-usein:
+			if ok {
+				fc.buffer = append(fc.buffer, data)
+			} else {
+				return
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel_test.go
new file mode 100644
index 0000000..d0e1a44
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/flexchannel_test.go
@@ -0,0 +1,89 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package internal
+
+import (
+	"testing"
+)
+
+func recvall(ch <-chan interface{}) (result []interface{}) {
+	for {
+		select {
+		case x := <-ch:
+			result = append(result, x)
+		default:
+			return
+		}
+	}
+}
+
+func sendall(data []interface{}, ch chan<- interface{}) {
+}
+
+func TestFlex(t *testing.T) {
+	fc := NewFlexChannel(5)
+
+	// Test send/receve
+	go func() {
+		for i := 0; i < 4; i++ {
+			fc.In <- i
+		}
+	}()
+
+	for i := 0; i < 4; i++ {
+		j := <-fc.Out
+		if i != j {
+			t.Error("%v != %v", i, j)
+		}
+	}
+	select {
+	case x, ok := <-fc.Out:
+		t.Error("receive empty channel got", x, ok)
+	default:
+	}
+
+	// Test buffer limit
+	for i := 10; i < 15; i++ {
+		fc.In <- i
+	}
+	select {
+	case fc.In <- 0:
+		t.Error("send to full channel did not block")
+	default:
+	}
+	i := <-fc.Out
+	if i != 10 {
+		t.Error("%v != %v", i, 10)
+	}
+	fc.In <- 15
+	close(fc.In)
+
+	for i := 11; i < 16; i++ {
+		j := <-fc.Out
+		if i != j {
+			t.Error("%v != %v", i, j)
+		}
+	}
+
+	x, ok := <-fc.Out
+	if ok {
+		t.Error("Unexpected value on Out", x)
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/internal/safemap.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/internal/safemap.go b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/safemap.go
new file mode 100644
index 0000000..3a1fe2b
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/safemap.go
@@ -0,0 +1,57 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package internal
+
+import (
+	"sync"
+)
+
+// SafeMap is a goroutine-safe map of interface{} to interface{}.
+type SafeMap struct {
+	m    map[interface{}]interface{}
+	lock sync.Mutex
+}
+
+func MakeSafeMap() SafeMap { return SafeMap{m: make(map[interface{}]interface{})} }
+
+func (m *SafeMap) Get(key interface{}) interface{} {
+	m.lock.Lock()
+	defer m.lock.Unlock()
+	return m.m[key]
+}
+
+func (m *SafeMap) GetOk(key interface{}) (interface{}, bool) {
+	m.lock.Lock()
+	defer m.lock.Unlock()
+	v, ok := m.m[key]
+	return v, ok
+}
+
+func (m *SafeMap) Put(key, value interface{}) {
+	m.lock.Lock()
+	defer m.lock.Unlock()
+	m.m[key] = value
+}
+
+func (m *SafeMap) Delete(key interface{}) {
+	m.lock.Lock()
+	defer m.lock.Unlock()
+	delete(m.m, key)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/internal/uuid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/internal/uuid.go b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/uuid.go
new file mode 100644
index 0000000..ef941a1
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/internal/uuid.go
@@ -0,0 +1,70 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package internal
+
+import (
+	"fmt"
+	"math/rand"
+	"strconv"
+	"sync"
+	"sync/atomic"
+	"time"
+)
+
+type UUID [16]byte
+
+func (u UUID) String() string {
+	return fmt.Sprintf("%X-%X-%X-%X-%X", u[0:4], u[4:6], u[6:8], u[8:10], u[10:])
+}
+
+// Don't mess with the default random source.
+var randomSource = rand.NewSource(time.Now().UnixNano())
+var randomLock sync.Mutex
+
+func random() byte {
+	randomLock.Lock()
+	defer randomLock.Unlock()
+	return byte(randomSource.Int63())
+}
+
+func UUID4() UUID {
+	var u UUID
+	for i := 0; i < len(u); i++ {
+		u[i] = random()
+	}
+	// See /https://tools.ietf.org/html/rfc4122#section-4.4
+	u[6] = (u[6] & 0x0F) | 0x40 // Version bits to 4
+	u[8] = (u[8] & 0x3F) | 0x80 // Reserved bits (top two) set to 01
+	return u
+}
+
+// A simple atomic counter to generate unique 64 bit IDs.
+type IdCounter struct{ count uint64 }
+
+// NextInt gets the next uint64 value from the atomic counter.
+func (uc *IdCounter) NextInt() uint64 {
+	return atomic.AddUint64(&uc.count, 1)
+}
+
+// Next gets the next integer value encoded as a base32 string, safe for NUL
+// terminated C strings.
+func (uc *IdCounter) Next() string {
+	return strconv.FormatUint(uc.NextInt(), 32)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
new file mode 100644
index 0000000..a4370ff
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
@@ -0,0 +1,79 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package proton
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/amqp"
+	"qpid.apache.org/proton/internal"
+)
+
+// HasMessage is true if all message data is available.
+// Equivalent to !d.isNil && d.Readable() && !d.Partial()
+func (d Delivery) HasMessage() bool { return !d.IsNil() && d.Readable() && !d.Partial() }
+
+// Message decodes the message containined in a delivery.
+// Will return an error if delivery.HasMessage() is false.
+func (delivery Delivery) Message() (m amqp.Message, err error) {
+	if !delivery.Readable() || delivery.Partial() {
+		return nil, internal.Errorf("attempting to get incomplete message")
+	}
+	data := make([]byte, delivery.Pending())
+	result := delivery.Link().Recv(data)
+	if result != len(data) {
+		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
+	}
+	m = amqp.NewMessage()
+	err = m.Decode(data)
+	return
+}
+
+// TODO aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
+var tags internal.IdCounter
+
+// Send sends a amqp.Message over a Link.
+// Returns a Delivery that can be use to determine the outcome of the message.
+func (link Link) Send(m amqp.Message) (Delivery, error) {
+	if !link.IsSender() {
+		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
+	}
+	delivery := link.Delivery(tags.Next())
+	bytes, err := m.Encode(nil)
+	if err != nil {
+		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
+	}
+	result := link.SendBytes(bytes)
+	link.Advance()
+	if result != len(bytes) {
+		if result < 0 {
+			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
+		} else {
+			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
+		}
+	}
+	if link.RemoteSndSettleMode() == SndSettled {
+		delivery.Settle()
+	}
+	return delivery, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
new file mode 100644
index 0000000..4e208f7
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
@@ -0,0 +1,335 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// This file contains special-case wrapper functions or wrappers that don't follow
+// the pattern of genwrap.go.
+
+package proton
+
+//#include <proton/codec.h>
+//#include <proton/connection.h>
+//#include <proton/session.h>
+//#include <proton/session.h>
+//#include <proton/delivery.h>
+//#include <proton/link.h>
+//#include <proton/event.h>
+//#include <proton/transport.h>
+//#include <proton/link.h>
+//#include <stdlib.h>
+import "C"
+
+import (
+	"fmt"
+	"qpid.apache.org/proton/amqp"
+	"qpid.apache.org/proton/internal"
+	"reflect"
+	"time"
+	"unsafe"
+)
+
+// TODO aconway 2015-05-05: Documentation for generated types.
+
+// Event is an AMQP protocol event.
+type Event struct {
+	pn         *C.pn_event_t
+	eventType  EventType
+	connection Connection
+	session    Session
+	link       Link
+	delivery   Delivery
+}
+
+func makeEvent(pn *C.pn_event_t) Event {
+	return Event{
+		pn:         pn,
+		eventType:  EventType(C.pn_event_type(pn)),
+		connection: Connection{C.pn_event_connection(pn)},
+		session:    Session{C.pn_event_session(pn)},
+		link:       Link{C.pn_event_link(pn)},
+		delivery:   Delivery{C.pn_event_delivery(pn)},
+	}
+}
+func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
+func (e Event) Type() EventType        { return e.eventType }
+func (e Event) Connection() Connection { return e.connection }
+func (e Event) Session() Session       { return e.session }
+func (e Event) Link() Link             { return e.link }
+func (e Event) Delivery() Delivery     { return e.delivery }
+func (e Event) String() string         { return e.Type().String() }
+
+// Data holds a pointer to decoded AMQP data.
+// Use amqp.marshal/unmarshal to access it as Go data types.
+//
+type Data struct{ pn *C.pn_data_t }
+
+func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
+
+func (d Data) Free()                   { C.pn_data_free(d.pn) }
+func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
+func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
+func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
+func (d Data) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
+}
+
+// State holds the state flags for an AMQP endpoint.
+type State byte
+
+const (
+	SLocalUninit  State = C.PN_LOCAL_UNINIT
+	SLocalActive        = C.PN_LOCAL_ACTIVE
+	SLocalClosed        = C.PN_LOCAL_CLOSED
+	SRemoteUninit       = C.PN_REMOTE_UNINIT
+	SRemoteActive       = C.PN_REMOTE_ACTIVE
+	SRemoteClosed       = C.PN_REMOTE_CLOSED
+)
+
+// Has is True if bits & state is non 0.
+func (s State) Has(bits State) bool { return s&bits != 0 }
+
+func (s State) LocalUninit() bool  { return s.Has(SLocalUninit) }
+func (s State) LocalActive() bool  { return s.Has(SLocalActive) }
+func (s State) LocalClosed() bool  { return s.Has(SLocalClosed) }
+func (s State) RemoteUninit() bool { return s.Has(SRemoteUninit) }
+func (s State) RemoteActive() bool { return s.Has(SRemoteActive) }
+func (s State) RemoteClosed() bool { return s.Has(SRemoteClosed) }
+
+// Return a State containig just the local flags
+func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
+
+// Return a State containig just the remote flags
+func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
+
+// Endpoint is the common interface for Connection, Link and Session.
+type Endpoint interface {
+	// State is the open/closed state.
+	State() State
+	// Open an endpoint.
+	Open()
+	// Close an endpoint.
+	Close()
+	// Condition holds a local error condition.
+	Condition() Condition
+	// RemoteCondition holds a remote error condition.
+	RemoteCondition() Condition
+	// Human readable name
+	String() string
+}
+
+// CloseError sets an error condition on an endpoint and closes the endpoint.
+func CloseError(e Endpoint, err error) {
+	e.Condition().SetError(err)
+	e.Close()
+}
+
+const (
+	Received uint64 = C.PN_RECEIVED
+	Accepted        = C.PN_ACCEPTED
+	Rejected        = C.PN_REJECTED
+	Released        = C.PN_RELEASED
+	Modified        = C.PN_MODIFIED
+)
+
+// SettleAs is equivalent to d.Update(disposition); d.Settle()
+func (d Delivery) SettleAs(disposition uint64) {
+	d.Update(disposition)
+	d.Settle()
+}
+
+// Accept accepts and settles a delivery.
+func (d Delivery) Accept() { d.SettleAs(Accepted) }
+
+// Reject rejects and settles a delivery
+func (d Delivery) Reject() { d.SettleAs(Rejected) }
+
+// Release releases and settles a delivery
+// If delivered is true the delivery count for the message will be increased.
+func (d Delivery) Release(delivered bool) {
+	if delivered {
+		d.SettleAs(Modified)
+	} else {
+		d.SettleAs(Released)
+	}
+}
+
+type DeliveryTag struct{ pn C.pn_delivery_tag_t }
+
+func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
+
+func (l Link) Recv(buf []byte) int {
+	if len(buf) == 0 {
+		return 0
+	}
+	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
+}
+
+func (l Link) SendBytes(bytes []byte) int {
+	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
+}
+
+func pnTag(tag string) C.pn_delivery_tag_t {
+	bytes := []byte(tag)
+	return C.pn_dtag(cPtr(bytes), cLen(bytes))
+}
+
+func (l Link) Delivery(tag string) Delivery {
+	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}
+
+func (s Session) Sender(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_sender(s.pn, cname)}
+}
+
+func (s Session) Receiver(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_receiver(s.pn, cname)}
+}
+
+// Context information per connection.
+type connectionContext struct {
+	injecter Injecter
+	str      string
+}
+
+var connectionContexts = internal.MakeSafeMap()
+
+// Injecter for event-loop associated with this connection.
+func (c Connection) Injecter() Injecter {
+	if cc, ok := connectionContexts.Get(c).(connectionContext); ok {
+		return cc.injecter
+	}
+	return nil
+}
+
+// Unique (per process) string identifier for a connection, useful for debugging.
+func (c Connection) String() string {
+	if cc, ok := connectionContexts.Get(c).(connectionContext); ok {
+		return cc.str
+	}
+	return fmt.Sprintf("%x", c.pn)
+}
+
+// Head functions don't follow the normal naming conventions so missed by the generator.
+
+func (c Connection) LinkHead(s State) Link {
+	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
+}
+
+func (c Connection) SessionHead(s State) Session {
+	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
+}
+
+func (c Connection) Links(state State) (links []Link) {
+	for l := c.LinkHead(state); !l.IsNil(); l = l.Next(state) {
+		links = append(links, l)
+	}
+	return
+}
+
+func (c Connection) Sessions(state State) (sessions []Session) {
+	for s := c.SessionHead(state); !s.IsNil(); s = s.Next(state) {
+		sessions = append(sessions, s)
+	}
+	return
+}
+
+func (s Session) String() string {
+	return fmt.Sprintf("%s/%p", s.Connection(), s.pn)
+}
+
+func (l Link) Connection() Connection { return l.Session().Connection() }
+
+// Human-readable link description including name, source, target and direction.
+func (l Link) String() string {
+	if l.IsSender() {
+		return fmt.Sprintf("%s(%s->%s)", l.Name(), l.Source().Address(), l.Target().Address())
+	} else {
+		return fmt.Sprintf("%s(%s<-%s)", l.Name(), l.Target().Address(), l.Source().Address())
+	}
+}
+
+// Error returns an instance of amqp.Error or nil.
+func (c Condition) Error() error {
+	if c.IsNil() || !c.IsSet() {
+		return nil
+	}
+	return amqp.Error{c.Name(), c.Description()}
+}
+
+// Set a Go error into a condition.
+// If it is not an amqp.Condition use the error type as name, error string as description.
+func (c Condition) SetError(err error) {
+	if err != nil {
+		if cond, ok := err.(amqp.Error); ok {
+			c.SetName(cond.Name)
+			c.SetDescription(cond.Description)
+		} else {
+			c.SetName(reflect.TypeOf(err).Name())
+			c.SetDescription(err.Error())
+		}
+	}
+}
+
+func (c Connection) Session() (Session, error) {
+	s := Session{C.pn_session(c.pn)}
+	if s.IsNil() {
+		return s, Connection(c).Error()
+	}
+	return s, nil
+}
+
+// pnTime converts Go time.Time to Proton millisecond Unix time.
+func pnTime(t time.Time) C.pn_timestamp_t {
+	secs := t.Unix()
+	// Note: sub-second accuracy is not guaraunteed if the Unix time in
+	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
+	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
+	return C.pn_timestamp_t(secs*1000 + msecs)
+}
+
+// goTime converts a pn_timestamp_t to a Go time.Time.
+func goTime(t C.pn_timestamp_t) time.Time {
+	secs := int64(t) / 1000
+	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
+	return time.Unix(secs, nsecs)
+}
+
+// Special treatment for Transport.Head, return value is unsafe.Pointer not string
+func (t Transport) Head() unsafe.Pointer {
+	return unsafe.Pointer(C.pn_transport_head(t.pn))
+}
+
+// Special treatment for Transport.Push, takes []byte instead of char*, size
+func (t Transport) Push(bytes []byte) int {
+	return int(C.pn_transport_push(t.pn, (*C.char)(unsafe.Pointer(&bytes[0])), C.size_t(len(bytes))))
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[18/36] qpid-proton git commit: PROTON-827: Re-create go worspace, cmake support for testing.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/genwrap.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/genwrap.go b/proton-c/bindings/go/genwrap.go
new file mode 100644
index 0000000..094b196
--- /dev/null
+++ b/proton-c/bindings/go/genwrap.go
@@ -0,0 +1,427 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Code generator to generate a thin Go wrapper API around the C proton API.
+//
+
+package main
+
+import (
+	"flag"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"os/exec"
+	"path"
+	"regexp"
+	"strings"
+	"text/template"
+)
+
+func mixedCase(s string) string {
+	result := ""
+	for _, w := range strings.Split(s, "_") {
+		if w != "" {
+			result = result + strings.ToUpper(w[0:1]) + strings.ToLower(w[1:])
+		}
+	}
+	return result
+}
+
+func mixedCaseTrim(s, prefix string) string {
+	return mixedCase(strings.TrimPrefix(s, prefix))
+}
+
+var templateFuncs = template.FuncMap{"mixedCase": mixedCase, "mixedCaseTrim": mixedCaseTrim}
+
+func doTemplate(out io.Writer, data interface{}, tmpl string) {
+	panicIf(template.Must(template.New("").Funcs(templateFuncs).Parse(tmpl)).Execute(out, data))
+}
+
+type enumType struct {
+	Name   string
+	Values []string
+}
+
+// Find enums in a header file return map of enum name to values.
+func findEnums(header string) (enums []enumType) {
+	for _, enum := range enumDefRe.FindAllStringSubmatch(header, -1) {
+		enums = append(enums, enumType{enum[2], enumValRe.FindAllString(enum[1], -1)})
+	}
+	return enums
+}
+
+func genEnum(out io.Writer, name string, values []string) {
+	doTemplate(out, []interface{}{name, values}, `{{$enumName := index . 0}}{{$values := index . 1}}
+type {{mixedCase $enumName}} C.pn_{{$enumName}}_t
+const ({{range $values}}
+	{{mixedCase .}} {{mixedCase $enumName}} = C.{{.}} {{end}}
+)
+
+func (e {{mixedCase $enumName}}) String() string {
+	switch e {
+{{range $values}}
+	case C.{{.}}: return "{{mixedCaseTrim . "PN_"}}" {{end}}
+	}
+	return "unknown"
+}
+`)
+}
+
+var (
+	reSpace = regexp.MustCompile("\\s+")
+)
+
+func panicIf(err error) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+func readHeader(name string) string {
+	file, err := os.Open(path.Join(*includeProton, name+".h"))
+	panicIf(err)
+	defer file.Close()
+	s, err := ioutil.ReadAll(file)
+	panicIf(err)
+	return string(s)
+}
+
+var copyright string = `/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// NOTE: This file was generated by genwrap.go, do not edit it by hand.
+//
+`
+
+type eventType struct {
+	// C, function and interface names for the event
+	Name, Cname, Fname, Iname string
+}
+
+func newEventType(cName string) eventType {
+	var etype eventType
+	etype.Cname = cName
+	etype.Name = mixedCaseTrim(cName, "PN_")
+	etype.Fname = "On" + etype.Name
+	etype.Iname = etype.Fname + "Interface"
+	return etype
+}
+
+var (
+	enumDefRe   = regexp.MustCompile("typedef enum {([^}]*)} pn_([a-z_]+)_t;")
+	enumValRe   = regexp.MustCompile("PN_[A-Z_]+")
+	skipEventRe = regexp.MustCompile("EVENT_NONE|REACTOR|SELECTABLE|TIMER")
+	skipFnRe    = regexp.MustCompile("attach|context|class|collect|^recv$|^send$|transport")
+)
+
+// Generate event wrappers.
+func event(out io.Writer) {
+	event_h := readHeader("event")
+
+	// Event is implented by hand in wrappers.go
+
+	// Get all the pn_event_type_t enum values
+	var etypes []eventType
+	enums := findEnums(event_h)
+	for _, e := range enums[0].Values {
+		if skipEventRe.FindStringSubmatch(e) == nil {
+			etypes = append(etypes, newEventType(e))
+		}
+	}
+
+	doTemplate(out, etypes, `
+type EventType int
+const ({{range .}}
+	 E{{.Name}} EventType = C.{{.Cname}}{{end}}
+)
+`)
+
+	doTemplate(out, etypes, `
+func (e EventType) String() string {
+	switch e {
+{{range .}}
+	case C.{{.Cname}}: return "{{.Name}}"{{end}}
+	}
+	return "Unknown"
+}
+`)
+}
+
+type genType struct {
+	Ctype, Gotype string
+	ToGo          func(value string) string
+	ToC           func(value string) string
+	Assign        func(value string) string
+}
+
+func (g genType) printBody(out io.Writer, value string) {
+	if g.Gotype != "" {
+		fmt.Fprintf(out, "return %s", g.ToGo(value))
+	} else {
+		fmt.Fprintf(out, "%s", value)
+	}
+}
+
+func (g genType) goLiteral(value string) string {
+	return fmt.Sprintf("%s{%s}", g.Gotype, value)
+}
+
+func (g genType) goConvert(value string) string {
+	switch g.Gotype {
+	case "string":
+		return fmt.Sprintf("C.GoString(%s)", value)
+	case "Event":
+		return fmt.Sprintf("makeEvent(%s)", value)
+	default:
+		return fmt.Sprintf("%s(%s)", g.Gotype, value)
+	}
+}
+
+var notStruct = map[string]bool{
+	"EventType":        true,
+	"SndSettleMode":    true,
+	"RcvSettleMode":    true,
+	"TerminusType":     true,
+	"State":            true,
+	"Durability":       true,
+	"ExpiryPolicy":     true,
+	"DistributionMode": true,
+}
+
+func mapType(ctype string) (g genType) {
+	g.Ctype = "C." + strings.Trim(ctype, " \n")
+
+	switch g.Ctype {
+	case "C.void":
+		g.Gotype = ""
+	case "C.size_t":
+		g.Gotype = "uint"
+	case "C.int":
+		g.Gotype = "int"
+	case "C.void *":
+		g.Gotype = "unsafe.Pointer"
+		g.Ctype = "unsafe.Pointer"
+	case "C.bool":
+		g.Gotype = "bool"
+	case "C.ssize_t":
+		g.Gotype = "int"
+	case "C.uint64_t":
+		g.Gotype = "uint64"
+	case "C.uint32_t":
+		g.Gotype = "uint16"
+	case "C.uint16_t":
+		g.Gotype = "uint32"
+	case "C.const char *":
+		fallthrough
+	case "C.char *":
+		g.Gotype = "string"
+		g.Ctype = "C.CString"
+		g.ToC = func(v string) string { return fmt.Sprintf("%sC", v) }
+		g.Assign = func(v string) string {
+			return fmt.Sprintf("%sC := C.CString(%s)\n defer C.free(unsafe.Pointer(%sC))\n", v, v, v)
+		}
+	case "C.pn_seconds_t":
+		g.Gotype = "time.Duration"
+		g.ToGo = func(v string) string { return fmt.Sprintf("(time.Duration(%s) * time.Second)", v) }
+	case "C.pn_error_t *":
+		g.Gotype = "error"
+		g.ToGo = func(v string) string { return fmt.Sprintf("internal.PnError(unsafe.Pointer(%s))", v) }
+	default:
+		pnId := regexp.MustCompile(" *pn_([a-z_]+)_t *\\*? *")
+		match := pnId.FindStringSubmatch(g.Ctype)
+		if match == nil {
+			panic(fmt.Errorf("unknown C type %#v", g.Ctype))
+		}
+		g.Gotype = mixedCase(match[1])
+		if !notStruct[g.Gotype] {
+			g.ToGo = g.goLiteral
+			g.ToC = func(v string) string { return v + ".pn" }
+		}
+	}
+	if g.ToGo == nil {
+		g.ToGo = g.goConvert // Use conversion by default.
+	}
+	if g.ToC == nil {
+		g.ToC = func(v string) string { return fmt.Sprintf("%s(%s)", g.Ctype, v) }
+	}
+	return
+}
+
+type genArg struct {
+	Name string
+	genType
+}
+
+var typeNameRe = regexp.MustCompile("^(.*( |\\*))([^ *]+)$")
+
+func splitArgs(argstr string) []genArg {
+	argstr = strings.Trim(argstr, " \n")
+	if argstr == "" {
+		return []genArg{}
+	}
+	args := make([]genArg, 0)
+	for _, item := range strings.Split(argstr, ",") {
+		item = strings.Trim(item, " \n")
+		typeName := typeNameRe.FindStringSubmatch(item)
+		if typeName == nil {
+			panic(fmt.Errorf("Can't split argument type/name %#v", item))
+		}
+		cType := strings.Trim(typeName[1], " \n")
+		name := strings.Trim(typeName[3], " \n")
+		if name == "type" {
+			name = "type_"
+		}
+		args = append(args, genArg{name, mapType(cType)})
+	}
+	return args
+}
+
+func goArgs(args []genArg) string {
+	l := ""
+	for i, arg := range args {
+		if i != 0 {
+			l += ", "
+		}
+		l += arg.Name + " " + arg.Gotype
+	}
+	return l
+}
+
+func cArgs(args []genArg) string {
+	l := ""
+	for _, arg := range args {
+		l += fmt.Sprintf(", %s", arg.ToC(arg.Name))
+	}
+	return l
+}
+
+func cAssigns(args []genArg) string {
+	l := "\n"
+	for _, arg := range args {
+		if arg.Assign != nil {
+			l += fmt.Sprintf("%s\n", arg.Assign(arg.Name))
+		}
+	}
+	return l
+}
+
+// Return the go name of the function or "" to skip the function.
+func goFnName(api, fname string) string {
+	// Skip class, context and attachment functions.
+	if skipFnRe.FindStringSubmatch(fname) != nil {
+		return ""
+	}
+	switch api + "." + fname {
+	case "link.get_drain":
+		return "IsDrain"
+	default:
+		return mixedCaseTrim(fname, "get_")
+	}
+}
+
+func apiWrapFns(api, header string, out io.Writer) {
+	fmt.Fprintf(out, "type %s struct{pn *C.pn_%s_t}\n", mixedCase(api), api)
+	fmt.Fprintf(out, "func (%c %s) IsNil() bool { return %c.pn == nil }\n", api[0], mixedCase(api), api[0])
+	fn := regexp.MustCompile(fmt.Sprintf(`PN_EXTERN ([a-z0-9_ ]+ *\*?) *pn_%s_([a-z_]+)\(pn_%s_t *\*[a-z_]+ *,? *([^)]*)\)`, api, api))
+	for _, m := range fn.FindAllStringSubmatch(header, -1) {
+		rtype, fname, argstr := mapType(m[1]), m[2], m[3]
+		gname := goFnName(api, fname)
+		if gname == "" { // Skip
+			continue
+		}
+		args := splitArgs(argstr)
+		fmt.Fprintf(out, "func (%c %s) %s", api[0], mixedCase(api), gname)
+		fmt.Fprintf(out, "(%s) %s { ", goArgs(args), rtype.Gotype)
+		fmt.Fprint(out, cAssigns(args))
+		rtype.printBody(out, fmt.Sprintf("C.pn_%s_%s(%c.pn%s)", api, fname, api[0], cArgs(args)))
+		fmt.Fprintf(out, "}\n")
+	}
+}
+
+var includeProton = flag.String("include", "", "path to proton include files, including /proton")
+
+func main() {
+	flag.Parse()
+	outpath := "wrappers_gen.go"
+	out, err := os.Create(outpath)
+	panicIf(err)
+	defer out.Close()
+
+	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
+	fmt.Fprintln(out, copyright)
+	fmt.Fprint(out, `
+package event
+
+import (
+	"time"
+  "unsafe"
+  "qpid.apache.org/proton/go/internal"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+`)
+	for _, api := range apis {
+		fmt.Fprintf(out, "// #include <proton/%s.h>\n", api)
+	}
+	fmt.Fprintln(out, `import "C"`)
+
+	event(out)
+
+	for _, api := range apis {
+		fmt.Fprintf(out, "// Wrappers for declarations in %s.h\n\n", api)
+		header := readHeader(api)
+		enums := findEnums(header)
+		for _, e := range enums {
+			genEnum(out, e.Name, e.Values)
+		}
+		apiWrapFns(api, header, out)
+	}
+	out.Close()
+
+	// Run gofmt.
+	cmd := exec.Command("gofmt", "-w", outpath)
+	cmd.Stdout = os.Stdout
+	cmd.Stderr = os.Stderr
+	err = cmd.Run()
+	if err != nil {
+		fmt.Fprintf(os.Stderr, "gofmt: %s", err)
+		os.Exit(1)
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go
new file mode 100644
index 0000000..7c00aa0
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package amqp encodes and decodes AMQP messages and data as Go types.
+
+It follows the standard 'encoding' libraries pattern. The mapping between AMQP
+and Go types is described in the documentation of the Marshal and Unmarshal
+functions.
+
+The sub-packages 'event' and 'messaging' provide two alternative ways to write
+AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
+gives complete low-level control of the underlying proton C engine.
+
+AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
+*/
+package amqp
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.
+
+// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop
new file mode 120000
index 0000000..cc3641d
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop
@@ -0,0 +1 @@
+../../../../../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go
new file mode 100644
index 0000000..11049f7
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go
@@ -0,0 +1,308 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Test that conversion of Go type to/from AMQP is compatible with other
+// bindings.
+//
+package amqp
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"reflect"
+	"strings"
+	"testing"
+)
+
+func assertEqual(want interface{}, got interface{}) {
+	if !reflect.DeepEqual(want, got) {
+		panic(fmt.Errorf("%#v != %#v", want, got))
+	}
+}
+
+func assertNil(err interface{}) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+func getReader(name string) (r io.Reader) {
+	r, err := os.Open("interop/" + name + ".amqp")
+	if err != nil {
+		panic(fmt.Errorf("Can't open %#v: %v", name, err))
+	}
+	return
+}
+
+func remaining(d *Decoder) string {
+	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
+	return string(remainder)
+}
+
+// assertDecode: want is the expected value, gotPtr is a pointer to a
+// instance of the same type for Decode.
+func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
+
+	assertNil(d.Decode(gotPtr))
+
+	got := reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(want, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, gotPtr)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	got = reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+}
+
+func TestUnmarshal(t *testing.T) {
+	bytes, err := ioutil.ReadAll(getReader("strings"))
+	if err != nil {
+		t.Error(err)
+	}
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		n, err := Unmarshal(bytes, &got)
+		if err != nil {
+			t.Error(err)
+		}
+		if want != got {
+			t.Errorf("%#v != %#v", want, got)
+		}
+		bytes = bytes[n:]
+	}
+}
+
+func TestPrimitivesExact(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into exact types
+	var b bool
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	var u8 uint8
+	assertDecode(d, uint8(42), &u8)
+	var u16 uint16
+	assertDecode(d, uint16(42), &u16)
+	var i16 int16
+	assertDecode(d, int16(-42), &i16)
+	var u32 uint32
+	assertDecode(d, uint32(12345), &u32)
+	var i32 int32
+	assertDecode(d, int32(-12345), &i32)
+	var u64 uint64
+	assertDecode(d, uint64(12345), &u64)
+	var i64 int64
+	assertDecode(d, int64(-12345), &i64)
+	var f32 float32
+	assertDecode(d, float32(0.125), &f32)
+	var f64 float64
+	assertDecode(d, float64(0.125), &f64)
+}
+
+func TestPrimitivesCompatible(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into compatible types
+	var b bool
+	var i int
+	var u uint
+	var f float64
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, -42, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, 0.125, &f)
+	assertDecode(d, 0.125, &f)
+}
+
+// assertDecodeValue: want is the expected value, decode into a reflect.Value
+func assertDecodeInterface(d *Decoder, want interface{}) {
+
+	var got, got2 interface{}
+	assertNil(d.Decode(&got))
+
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(got, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, &got2)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	assertEqual(want, got2)
+}
+
+func TestPrimitivesInterface(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	assertDecodeInterface(d, true)
+	assertDecodeInterface(d, false)
+	assertDecodeInterface(d, uint8(42))
+	assertDecodeInterface(d, uint16(42))
+	assertDecodeInterface(d, int16(-42))
+	assertDecodeInterface(d, uint32(12345))
+	assertDecodeInterface(d, int32(-12345))
+	assertDecodeInterface(d, uint64(12345))
+	assertDecodeInterface(d, int64(-12345))
+	assertDecodeInterface(d, float32(0.125))
+	assertDecodeInterface(d, float64(0.125))
+}
+
+func TestStrings(t *testing.T) {
+	d := NewDecoder(getReader("strings"))
+	// Test decoding as plain Go strings
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		assertDecode(d, want, &got)
+	}
+	remains := remaining(d)
+	if remains != "" {
+		t.Errorf("leftover: %s", remains)
+	}
+
+	// Test decoding as specific string types
+	d = NewDecoder(getReader("strings"))
+	var bytes []byte
+	var str, sym string
+	assertDecode(d, []byte("abc\000defg"), &bytes)
+	assertDecode(d, "abcdefg", &str)
+	assertDecode(d, "abcdefg", &sym)
+	assertDecode(d, make([]byte, 0), &bytes)
+	assertDecode(d, "", &str)
+	assertDecode(d, "", &sym)
+	remains = remaining(d)
+	if remains != "" {
+		t.Fatalf("leftover: %s", remains)
+	}
+
+	// Test some error handling
+	d = NewDecoder(getReader("strings"))
+	var s string
+	err := d.Decode(s)
+	if err == nil {
+		t.Fatal("Expected error")
+	}
+	if !strings.Contains(err.Error(), "not a pointer") {
+		t.Error(err)
+	}
+	var i int
+	err = d.Decode(&i)
+	if !strings.Contains(err.Error(), "cannot unmarshal") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte{}, nil)
+	if !strings.Contains(err.Error(), "not enough data") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte("foobar"), nil)
+	if !strings.Contains(err.Error(), "invalid-argument") {
+		t.Error(err)
+	}
+}
+
+func TestEncodeDecode(t *testing.T) {
+	type data struct {
+		s  string
+		i  int
+		u8 uint8
+		b  bool
+		f  float32
+		v  interface{}
+	}
+
+	in := data{"foo", 42, 9, true, 1.234, "thing"}
+
+	buf := bytes.Buffer{}
+	e := NewEncoder(&buf)
+	assertNil(e.Encode(in.s))
+	assertNil(e.Encode(in.i))
+	assertNil(e.Encode(in.u8))
+	assertNil(e.Encode(in.b))
+	assertNil(e.Encode(in.f))
+	assertNil(e.Encode(in.v))
+
+	var out data
+	d := NewDecoder(&buf)
+	assertNil(d.Decode(&out.s))
+	assertNil(d.Decode(&out.i))
+	assertNil(d.Decode(&out.u8))
+	assertNil(d.Decode(&out.b))
+	assertNil(d.Decode(&out.f))
+	assertNil(d.Decode(&out.v))
+
+	assertEqual(in, out)
+}
+
+func TestMap(t *testing.T) {
+	d := NewDecoder(getReader("maps"))
+
+	// Generic map
+	var m Map
+	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
+
+	// Interface as map
+	var i interface{}
+	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
+
+	d = NewDecoder(getReader("maps"))
+	// Specific typed map
+	var m2 map[string]int
+	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
+
+	// Round trip a nested map
+	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
+	bytes, err := Marshal(m, nil)
+	assertNil(err)
+	_, err = Unmarshal(bytes, &i)
+	assertNil(err)
+	assertEqual(m, i)
+}
+
+func TestList(t *testing.T) {
+	d := NewDecoder(getReader("lists"))
+	var l List
+	assertDecode(d, List{int32(32), "foo", true}, &l)
+	assertDecode(d, List{}, &l)
+}
+
+func FIXMETestMessage(t *testing.T) {
+	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
+	bytes, err := ioutil.ReadAll(getReader("message"))
+	assertNil(err)
+	m, err := DecodeMessage(bytes)
+	assertNil(err)
+	fmt.Printf("%+v\n", m)
+	assertEqual(m.Body(), "hello")
+
+	bytes2 := make([]byte, len(bytes))
+	bytes2, err = m.Encode(bytes2)
+	assertNil(err)
+	assertEqual(bytes, bytes2)
+}
+
+// FIXME aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go
new file mode 100644
index 0000000..e5c2945
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go
@@ -0,0 +1,238 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+func dataError(prefix string, data *C.pn_data_t) error {
+	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
+	if err != nil {
+		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
+	}
+	return err
+}
+
+/*
+Marshal encodes a Go value as AMQP data in buffer.
+If buffer is nil, or is not large enough, a new buffer  is created.
+
+Returns the buffer used for encoding with len() adjusted to the actual size of data.
+
+Go types are encoded as follows
+
+ +-------------------------------------+--------------------------------------------+
+ |Go type                              |AMQP type                                   |
+ +-------------------------------------+--------------------------------------------+
+ |bool                                 |bool                                        |
+ +-------------------------------------+--------------------------------------------+
+ |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
+ +-------------------------------------+--------------------------------------------+
+ |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
+ +-------------------------------------+--------------------------------------------+
+ |float32, float64                     |float, double.                              |
+ +-------------------------------------+--------------------------------------------+
+ |string                               |string                                      |
+ +-------------------------------------+--------------------------------------------+
+ |[]byte, Binary                       |binary                                      |
+ +-------------------------------------+--------------------------------------------+
+ |Symbol                               |symbol                                      |
+ +-------------------------------------+--------------------------------------------+
+ |interface{}                          |the contained type                          |
+ +-------------------------------------+--------------------------------------------+
+ |nil                                  |null                                        |
+ +-------------------------------------+--------------------------------------------+
+ |map[K]T                              |map with K and T converted as above         |
+ +-------------------------------------+--------------------------------------------+
+ |Map                                  |map, may have mixed types for keys, values  |
+ +-------------------------------------+--------------------------------------------+
+ |[]T                                  |list with T converted as above              |
+ +-------------------------------------+--------------------------------------------+
+ |List                                 |list, may have mixed types  values          |
+ +-------------------------------------+--------------------------------------------+
+
+TODO Go types: array, slice, struct
+
+Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
+*/
+func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	put(data, v)
+	encode := func(buf []byte) ([]byte, error) {
+		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
+		switch {
+		case n == int(C.PN_OVERFLOW):
+			return buf, overflow
+		case n < 0:
+			return buf, dataError("marshal error", data)
+		default:
+			return buf[:n], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
+
+const minEncode = 256
+
+// overflow is returned when an encoding function can't fit data in the buffer.
+var overflow = internal.Errorf("buffer too small")
+
+// encodeFn encodes into buffer[0:len(buffer)].
+// Returns buffer with length adjusted for data encoded.
+// If buffer too small, returns overflow as error.
+type encodeFn func(buffer []byte) ([]byte, error)
+
+// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
+// Returns the final buffer.
+func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
+	if buffer == nil || len(buffer) == 0 {
+		buffer = make([]byte, minEncode)
+	}
+	var err error
+	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
+		buffer = make([]byte, 2*len(buffer))
+	}
+	return buffer, err
+}
+
+func put(data *C.pn_data_t, v interface{}) {
+	switch v := v.(type) {
+	case nil:
+		C.pn_data_put_null(data)
+	case bool:
+		C.pn_data_put_bool(data, C.bool(v))
+	case int8:
+		C.pn_data_put_byte(data, C.int8_t(v))
+	case int16:
+		C.pn_data_put_short(data, C.int16_t(v))
+	case int32:
+		C.pn_data_put_int(data, C.int32_t(v))
+	case int64:
+		C.pn_data_put_long(data, C.int64_t(v))
+	case int:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_long(data, C.int64_t(v))
+		} else {
+			C.pn_data_put_int(data, C.int32_t(v))
+		}
+	case uint8:
+		C.pn_data_put_ubyte(data, C.uint8_t(v))
+	case uint16:
+		C.pn_data_put_ushort(data, C.uint16_t(v))
+	case uint32:
+		C.pn_data_put_uint(data, C.uint32_t(v))
+	case uint64:
+		C.pn_data_put_ulong(data, C.uint64_t(v))
+	case uint:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_ulong(data, C.uint64_t(v))
+		} else {
+			C.pn_data_put_uint(data, C.uint32_t(v))
+		}
+	case float32:
+		C.pn_data_put_float(data, C.float(v))
+	case float64:
+		C.pn_data_put_double(data, C.double(v))
+	case string:
+		C.pn_data_put_string(data, pnBytes([]byte(v)))
+	case []byte:
+		C.pn_data_put_binary(data, pnBytes(v))
+	case Binary:
+		C.pn_data_put_binary(data, pnBytes([]byte(v)))
+	case Symbol:
+		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
+	case Map: // Special map type
+		C.pn_data_put_map(data)
+		C.pn_data_enter(data)
+		for key, val := range v {
+			put(data, key)
+			put(data, val)
+		}
+		C.pn_data_exit(data)
+	default:
+		switch reflect.TypeOf(v).Kind() {
+		case reflect.Map:
+			putMap(data, v)
+		case reflect.Slice:
+			putList(data, v)
+		default:
+			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
+		}
+	}
+	err := dataError("marshal", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+func putMap(data *C.pn_data_t, v interface{}) {
+	mapValue := reflect.ValueOf(v)
+	C.pn_data_put_map(data)
+	C.pn_data_enter(data)
+	for _, key := range mapValue.MapKeys() {
+		put(data, key.Interface())
+		put(data, mapValue.MapIndex(key).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+func putList(data *C.pn_data_t, v interface{}) {
+	listValue := reflect.ValueOf(v)
+	C.pn_data_put_list(data)
+	C.pn_data_enter(data)
+	for i := 0; i < listValue.Len(); i++ {
+		put(data, listValue.Index(i).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+// Encoder encodes AMQP values to an io.Writer
+type Encoder struct {
+	writer io.Writer
+	buffer []byte
+}
+
+// New encoder returns a new encoder that writes to w.
+func NewEncoder(w io.Writer) *Encoder {
+	return &Encoder{w, make([]byte, minEncode)}
+}
+
+func (e *Encoder) Encode(v interface{}) (err error) {
+	e.buffer, err = Marshal(v, e.buffer)
+	if err == nil {
+		e.writer.Write(e.buffer)
+	}
+	return err
+}
+
+func replace(data *C.pn_data_t, v interface{}) {
+	C.pn_data_clear(data)
+	put(data, v)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go
new file mode 100644
index 0000000..87093f5
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go
@@ -0,0 +1,342 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
+
+// Message is the interface to an AMQP message.
+// Instances of this interface contain a pointer to the underlying struct.
+type Message interface {
+	/**
+	 * Inferred indicates how the message content
+	 * is encoded into AMQP sections. If inferred is true then binary and
+	 * list values in the body of the message will be encoded as AMQP DATA
+	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
+	 * then all values in the body of the message will be encoded as AMQP
+	 * VALUE sections regardless of their type.
+	 */
+	Inferred() bool
+	SetInferred(bool)
+
+	/**
+	 * Durable indicates that any parties taking responsibility
+	 * for the message must durably store the content.
+	 */
+	Durable() bool
+	SetDurable(bool)
+
+	/**
+	 * Priority impacts ordering guarantees. Within a
+	 * given ordered context, higher priority messages may jump ahead of
+	 * lower priority messages.
+	 */
+	Priority() uint8
+	SetPriority(uint8)
+
+	/**
+	 * TTL or Time To Live, a message it may be dropped after this duration
+	 */
+	TTL() time.Duration
+	SetTTL(time.Duration)
+
+	/**
+	 * FirstAcquirer indicates
+	 * that the recipient of the message is the first recipient to acquire
+	 * the message, i.e. there have been no failed delivery attempts to
+	 * other acquirers. Note that this does not mean the message has not
+	 * been delivered to, but not acquired, by other recipients.
+	 */
+	FirstAcquirer() bool
+	SetFirstAcquirer(bool)
+
+	/**
+	 * DeliveryCount tracks how many attempts have been made to
+	 * delivery a message.
+	 */
+	DeliveryCount() uint32
+	SetDeliveryCount(uint32)
+
+	/**
+	 * MessageId provides a unique identifier for a message.
+	 * it can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	MessageId() interface{}
+	SetMessageId(interface{})
+
+	UserId() string
+	SetUserId(string)
+
+	Address() string
+	SetAddress(string)
+
+	Subject() string
+	SetSubject(string)
+
+	ReplyTo() string
+	SetReplyTo(string)
+
+	/**
+	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	CorrelationId() interface{}
+	SetCorrelationId(interface{})
+
+	ContentType() string
+	SetContentType(string)
+
+	ContentEncoding() string
+	SetContentEncoding(string)
+
+	// ExpiryTime indicates an absoulte time when the message may be dropped.
+	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
+	ExpiryTime() time.Time
+	SetExpiryTime(time.Time)
+
+	CreationTime() time.Time
+	SetCreationTime(time.Time)
+
+	GroupId() string
+	SetGroupId(string)
+
+	GroupSequence() int32
+	SetGroupSequence(int32)
+
+	ReplyToGroupId() string
+	SetReplyToGroupId(string)
+
+	/**
+	 * Instructions can be used to access or modify AMQP delivery instructions.
+	 */
+	Instructions() *map[string]interface{}
+
+	/**
+	 * Annotations  can be used to access or modify AMQP annotations.
+	 */
+	Annotations() *map[string]interface{}
+
+	/**
+	 * Properties  can be used to access or modify the application properties of a message.
+	 */
+	Properties() *map[string]interface{}
+
+	/**
+	 * Body of the message can be any AMQP encodable type.
+	 */
+	Body() interface{}
+	SetBody(interface{})
+
+	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
+	// the message is encoded into it, otherwise a new buffer is created.
+	// Returns the buffer containing the message.
+	Encode(buffer []byte) ([]byte, error)
+}
+
+// NewMessage creates a new message instance. The returned interface contains a pointer.
+func NewMessage() Message {
+	pn := C.pn_message() // Pick up default setting from C message.
+	defer C.pn_message_free(pn)
+	return goMessage(pn)
+}
+
+// Message implementation copies all message data into Go space so it can be proprely
+// memory managed.
+//
+type message struct {
+	inferred, durable, firstAcquirer      bool
+	priority                              uint8
+	ttl                                   time.Duration
+	deliveryCount                         uint32
+	messageId                             interface{}
+	userId, address, subject, replyTo     string
+	contentType, contentEncoding          string
+	groupId, replyToGroupId               string
+	creationTime, expiryTime              time.Time
+	groupSequence                         int32
+	correlationId                         interface{}
+	instructions, annotations, properties map[string]interface{}
+	body                                  interface{}
+}
+
+func (m *message) Inferred() bool                        { return m.inferred }
+func (m *message) SetInferred(b bool)                    { m.inferred = b }
+func (m *message) Durable() bool                         { return m.durable }
+func (m *message) SetDurable(b bool)                     { m.durable = b }
+func (m *message) Priority() uint8                       { return m.priority }
+func (m *message) SetPriority(b uint8)                   { m.priority = b }
+func (m *message) TTL() time.Duration                    { return m.ttl }
+func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
+func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
+func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
+func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
+func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
+func (m *message) MessageId() interface{}                { return m.messageId }
+func (m *message) SetMessageId(id interface{})           { m.messageId = id }
+func (m *message) UserId() string                        { return m.userId }
+func (m *message) SetUserId(s string)                    { m.userId = s }
+func (m *message) Address() string                       { return m.address }
+func (m *message) SetAddress(s string)                   { m.address = s }
+func (m *message) Subject() string                       { return m.subject }
+func (m *message) SetSubject(s string)                   { m.subject = s }
+func (m *message) ReplyTo() string                       { return m.replyTo }
+func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
+func (m *message) CorrelationId() interface{}            { return m.correlationId }
+func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
+func (m *message) ContentType() string                   { return m.contentType }
+func (m *message) SetContentType(s string)               { m.contentType = s }
+func (m *message) ContentEncoding() string               { return m.contentEncoding }
+func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
+func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
+func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
+func (m *message) CreationTime() time.Time               { return m.creationTime }
+func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
+func (m *message) GroupId() string                       { return m.groupId }
+func (m *message) SetGroupId(s string)                   { m.groupId = s }
+func (m *message) GroupSequence() int32                  { return m.groupSequence }
+func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
+func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
+func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
+func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
+func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
+func (m *message) Properties() *map[string]interface{}   { return &m.properties }
+func (m *message) Body() interface{}                     { return m.body }
+func (m *message) SetBody(b interface{})                 { m.body = b }
+
+// rewindGet rewinds and then gets the value from a data object.
+func rewindGet(data *C.pn_data_t, v interface{}) {
+	if data != nil && C.pn_data_size(data) > 0 {
+		C.pn_data_rewind(data)
+		C.pn_data_next(data)
+		get(data, v)
+	}
+}
+
+// goMessage populates a Go message from a pn_message_t
+func goMessage(pn *C.pn_message_t) *message {
+	m := &message{
+		inferred:        bool(C.pn_message_is_inferred(pn)),
+		durable:         bool(C.pn_message_is_durable(pn)),
+		priority:        uint8(C.pn_message_get_priority(pn)),
+		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
+		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
+		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
+		userId:          goString(C.pn_message_get_user_id(pn)),
+		address:         C.GoString(C.pn_message_get_address(pn)),
+		subject:         C.GoString(C.pn_message_get_subject(pn)),
+		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
+		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
+		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
+		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
+		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
+		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
+		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
+		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
+		messageId:       nil,
+		correlationId:   nil,
+		instructions:    make(map[string]interface{}),
+		annotations:     make(map[string]interface{}),
+		properties:      make(map[string]interface{}),
+	}
+	rewindGet(C.pn_message_id(pn), &m.messageId)
+	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
+	rewindGet(C.pn_message_instructions(pn), &m.instructions)
+	rewindGet(C.pn_message_annotations(pn), &m.annotations)
+	rewindGet(C.pn_message_properties(pn), &m.properties)
+	rewindGet(C.pn_message_body(pn), &m.body)
+	return m
+}
+
+// pnMessage populates a pn_message_t from a Go message.
+func (m *message) pnMessage() *C.pn_message_t {
+	pn := C.pn_message()
+	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
+	C.pn_message_set_durable(pn, C.bool(m.Durable()))
+	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
+	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
+	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
+	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
+	replace(C.pn_message_id(pn), m.MessageId())
+	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
+	C.pn_message_set_address(pn, C.CString(m.Address()))
+	C.pn_message_set_subject(pn, C.CString(m.Subject()))
+	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
+	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
+	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
+	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
+	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
+	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
+	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
+	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
+	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
+	replace(C.pn_message_instructions(pn), *m.Instructions())
+	replace(C.pn_message_annotations(pn), *m.Annotations())
+	replace(C.pn_message_properties(pn), *m.Properties())
+	replace(C.pn_message_body(pn), m.Body())
+	return pn
+}
+
+// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
+
+// DecodeMessage decodes bytes as a message
+func DecodeMessage(data []byte) (Message, error) {
+	pnMsg := C.pn_message()
+	defer C.pn_message_free(pnMsg)
+	if len(data) == 0 {
+		return nil, internal.Errorf("empty buffer for decode")
+	}
+	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
+		return nil, internal.Errorf("decoding message: %s",
+			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
+	}
+	return goMessage(pnMsg), nil
+}
+
+// Encode the message into bufffer.
+// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
+// buffer will be returned.
+func (m *message) Encode(buffer []byte) ([]byte, error) {
+	pn := m.pnMessage()
+	defer C.pn_message_free(pn)
+	encode := func(buf []byte) ([]byte, error) {
+		len := cLen(buf)
+		result := C.pn_message_encode(pn, cPtr(buf), &len)
+		switch {
+		case result == C.PN_OVERFLOW:
+			return buf, overflow
+		case result < 0:
+			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
+		default:
+			return buf[:len], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go
new file mode 100644
index 0000000..46e26de
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go
@@ -0,0 +1,90 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"reflect"
+	"testing"
+	"time"
+)
+
+func roundTrip(t *testing.T, m Message) {
+	buffer, err := m.Encode(nil)
+	if err != nil {
+		t.Fatalf("Encode failed: %v", err)
+	}
+	m2, err := DecodeMessage(buffer)
+	if err != nil {
+		t.Fatalf("Decode failed: %v", err)
+	}
+	if !reflect.DeepEqual(m, m2) {
+		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
+	}
+}
+
+func TestDefaultMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	// Check defaults
+	assertEqual(m.Inferred(), false)
+	assertEqual(m.Durable(), false)
+	assertEqual(m.Priority(), uint8(4))
+	assertEqual(m.TTL(), time.Duration(0))
+	assertEqual(m.UserId(), "")
+	assertEqual(m.Address(), "")
+	assertEqual(m.Subject(), "")
+	assertEqual(m.ReplyTo(), "")
+	assertEqual(m.ContentType(), "")
+	assertEqual(m.ContentEncoding(), "")
+	assertEqual(m.GroupId(), "")
+	assertEqual(m.GroupSequence(), int32(0))
+	assertEqual(m.ReplyToGroupId(), "")
+	assertEqual(m.MessageId(), nil)
+	assertEqual(m.CorrelationId(), nil)
+	assertEqual(*m.Instructions(), map[string]interface{}{})
+	assertEqual(*m.Annotations(), map[string]interface{}{})
+	assertEqual(*m.Properties(), map[string]interface{}{})
+	assertEqual(m.Body(), nil)
+
+	roundTrip(t, m)
+}
+
+func TestMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	m.SetInferred(false)
+	m.SetDurable(true)
+	m.SetPriority(42)
+	m.SetTTL(0)
+	m.SetUserId("user")
+	m.SetAddress("address")
+	m.SetSubject("subject")
+	m.SetReplyTo("replyto")
+	m.SetContentType("content")
+	m.SetContentEncoding("encoding")
+	m.SetGroupId("group")
+	m.SetGroupSequence(42)
+	m.SetReplyToGroupId("replytogroup")
+	m.SetMessageId("id")
+	m.SetCorrelationId("correlation")
+	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
+	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
+	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
+	m.SetBody("hello")
+	roundTrip(t, m)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go
new file mode 100644
index 0000000..8713520
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/types.go
@@ -0,0 +1,193 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"reflect"
+	"time"
+	"unsafe"
+)
+
+func pnTypeString(pt C.pn_type_t) string {
+	switch pt {
+	case C.PN_NULL:
+		return "null"
+	case C.PN_BOOL:
+		return "bool"
+	case C.PN_UBYTE:
+		return "ubyte"
+	case C.PN_BYTE:
+		return "byte"
+	case C.PN_USHORT:
+		return "ushort"
+	case C.PN_SHORT:
+		return "short"
+	case C.PN_CHAR:
+		return "char"
+	case C.PN_UINT:
+		return "uint"
+	case C.PN_INT:
+		return "int"
+	case C.PN_ULONG:
+		return "ulong"
+	case C.PN_LONG:
+		return "long"
+	case C.PN_TIMESTAMP:
+		return "timestamp"
+	case C.PN_FLOAT:
+		return "float"
+	case C.PN_DOUBLE:
+		return "double"
+	case C.PN_DECIMAL32:
+		return "decimal32"
+	case C.PN_DECIMAL64:
+		return "decimal64"
+	case C.PN_DECIMAL128:
+		return "decimal128"
+	case C.PN_UUID:
+		return "uuid"
+	case C.PN_BINARY:
+		return "binary"
+	case C.PN_STRING:
+		return "string"
+	case C.PN_SYMBOL:
+		return "symbol"
+	case C.PN_DESCRIBED:
+		return "described"
+	case C.PN_ARRAY:
+		return "array"
+	case C.PN_LIST:
+		return "list"
+	case C.PN_MAP:
+		return "map"
+	case C.PN_DATA_TYPE_ERROR:
+		return "no-data"
+	default:
+		return fmt.Sprintf("unknown-type(%d)", pt)
+	}
+}
+
+// Go types
+var (
+	bytesType = reflect.TypeOf([]byte{})
+	valueType = reflect.TypeOf(reflect.Value{})
+)
+
+// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
+
+// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
+type Map map[interface{}]interface{}
+
+// List is a generic list that can hold mixed values and can represent any AMQP list.
+//
+type List []interface{}
+
+// Symbol is a string that is encoded as an AMQP symbol
+type Symbol string
+
+// Binary is a string that is encoded as an AMQP binary.
+// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
+// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
+type Binary string
+
+// GoString for Map prints values with their types, useful for debugging.
+func (m Map) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", m)
+	i := len(m)
+	for k, v := range m {
+		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
+		i--
+		if i > 0 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// GoString for List prints values with their types, useful for debugging.
+func (l List) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", l)
+	for i := 0; i < len(l); i++ {
+		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
+		if i == len(l)-1 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// pnTime converts Go time.Time to Proton millisecond Unix time.
+func pnTime(t time.Time) C.pn_timestamp_t {
+	secs := t.Unix()
+	// Note: sub-second accuracy is not guaraunteed if the Unix time in
+	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
+	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
+	return C.pn_timestamp_t(secs*1000 + msecs)
+}
+
+// goTime converts a pn_timestamp_t to a Go time.Time.
+func goTime(t C.pn_timestamp_t) time.Time {
+	secs := int64(t) / 1000
+	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
+	return time.Unix(secs, nsecs)
+}
+
+func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
+	if cBytes.start != nil {
+		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
+	}
+	return
+}
+
+func goString(cBytes C.pn_bytes_t) (str string) {
+	if cBytes.start != nil {
+		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
+	}
+	return
+}
+
+func pnBytes(b []byte) C.pn_bytes_t {
+	if len(b) == 0 {
+		return C.pn_bytes_t{0, nil}
+	} else {
+		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
+	}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go
new file mode 100644
index 0000000..944bf6f
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Generating unique IDs for various things.
+
+package amqp
+
+import (
+	"strconv"
+	"sync/atomic"
+)
+
+// A simple atomic counter to generate unique 64 bit IDs.
+type UidCounter struct{ count uint64 }
+
+// NextInt gets the next uint64 value from the atomic counter.
+func (uc *UidCounter) NextInt() uint64 {
+	return atomic.AddUint64(&uc.count, 1)
+}
+
+// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
+func (uc *UidCounter) Next() string {
+	return strconv.FormatUint(uc.NextInt(), 32)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go
new file mode 100644
index 0000000..89ab64a
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/unmarshal.go
@@ -0,0 +1,552 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+oor more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+const minDecode = 1024
+
+// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
+type BadUnmarshal struct {
+	// The name of the AMQP type.
+	AMQPType string
+	// The Go type.
+	GoType reflect.Type
+}
+
+func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
+	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
+}
+
+func (e BadUnmarshal) Error() string {
+	if e.GoType.Kind() != reflect.Ptr {
+		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
+	} else {
+		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
+	}
+}
+
+//
+// Decoding from a pn_data_t
+//
+// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
+// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
+//
+
+// Decoder decodes AMQP values from an io.Reader.
+//
+type Decoder struct {
+	reader io.Reader
+	buffer bytes.Buffer
+}
+
+// NewDecoder returns a new decoder that reads from r.
+//
+// The decoder has it's own buffer and may read more data than required for the
+// AMQP values requested.  Use Buffered to see if there is data left in the
+// buffer.
+//
+func NewDecoder(r io.Reader) *Decoder {
+	return &Decoder{r, bytes.Buffer{}}
+}
+
+// Buffered returns a reader of the data remaining in the Decoder's buffer. The
+// reader is valid until the next call to Decode.
+//
+func (d *Decoder) Buffered() io.Reader {
+	return bytes.NewReader(d.buffer.Bytes())
+}
+
+// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
+//
+// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
+//
+func (d *Decoder) Decode(v interface{}) (err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	var n int
+	for n == 0 && err == nil {
+		n = unmarshal(data, d.buffer.Bytes(), v)
+		if n == 0 { // n == 0 means not enough data, read more
+			err = d.more()
+			if err != nil {
+				return
+			}
+		}
+	}
+	d.buffer.Next(n)
+	return
+}
+
+/*
+Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
+Types are converted as follows:
+
+ +---------------------------+----------------------------------------------------------------------+
+ |To Go types                |From AMQP types                                                       |
+ +===========================+======================================================================+
+ |bool                       |bool                                                                  |
+ +---------------------------+----------------------------------------------------------------------+
+ |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
+ |int32, int64               |long.                                                                 |
+ +---------------------------+----------------------------------------------------------------------+
+ |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
+ |uint32, uint64 types       |uint, ulong                                                           |
+ +---------------------------+----------------------------------------------------------------------+
+ |float32, float64           |Equivalent or smaller float or double.                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |string, []byte             |string, symbol or binary.                                             |
+ +---------------------------+----------------------------------------------------------------------+
+ |Symbol                     |symbol                                                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
+ +---------------------------+----------------------------------------------------------------------+
+ |Map                        |map, any AMQP map                                                     |
+ +---------------------------+----------------------------------------------------------------------+
+ |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |AMQP Type               |Go Type in interface{}                       |
+ |                           +========================+=============================================+
+ |                           |bool                    |bool                                         |
+ |                           +------------------------+---------------------------------------------+
+ |                           |char                    |unint8                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |byte,short,int,long     |int8,int16,int32,int64                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
+ |                           +------------------------+---------------------------------------------+
+ |                           |float, double           |float32, float64                             |
+ |                           +------------------------+---------------------------------------------+
+ |                           |string                  |string                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |symbol                  |Symbol                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |binary                  |Binary                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |nulll                   |nil                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |map                     |Map                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |list                    |List                                         |
+ +---------------------------+------------------------+---------------------------------------------+
+
+The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
+
+TODO types
+
+AMQP: timestamp, decimal32/64/128, uuid, described, array.
+
+Go: array, struct.
+
+Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
+representation for those.
+*/
+func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	n = unmarshal(data, bytes, v)
+	if n == 0 {
+		err = internal.Errorf("not enough data")
+	}
+	return
+}
+
+// more reads more data when we can't parse a complete AMQP type
+func (d *Decoder) more() error {
+	var readSize int64 = minDecode
+	if int64(d.buffer.Len()) > readSize { // Grow by doubling
+		readSize = int64(d.buffer.Len())
+	}
+	var n int64
+	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
+	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
+		err = io.EOF
+	}
+	return err
+}
+
+// unmarshal decodes from bytes and converts into the value pointed to by v.
+// Used by Unmarshal and Decode
+//
+// Returns the number of bytes decoded or 0 if not enough data.
+//
+func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
+	n = decode(data, bytes)
+	if n == 0 {
+		return 0
+	}
+	get(data, v)
+	return
+}
+
+// get value from data into value pointed at by v.
+func get(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+
+	switch v := v.(type) {
+	case *bool:
+		switch pnType {
+		case C.PN_BOOL:
+			*v = bool(C.pn_data_get_bool(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int8(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int8(C.pn_data_get_byte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint8(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint8(C.pn_data_get_ubyte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int16(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int16(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int16(C.pn_data_get_short(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint16(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint16(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint16(C.pn_data_get_ushort(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int32(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int32(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int32(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int32(C.pn_data_get_int(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint32(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint32(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint32(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint32(C.pn_data_get_uint(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int64(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int64(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int64(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int64(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			*v = int64(C.pn_data_get_long(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint64(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint64(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint64(C.pn_data_get_ushort(data))
+		case C.PN_ULONG:
+			*v = uint64(C.pn_data_get_ulong(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = int(C.pn_data_get_long(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint(C.pn_data_get_uint(data))
+		case C.PN_ULONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = uint(C.pn_data_get_ulong(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float32:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float32(C.pn_data_get_float(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float64:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float64(C.pn_data_get_float(data))
+		case C.PN_DOUBLE:
+			*v = float64(C.pn_data_get_double(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *string:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goString(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goString(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goString(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *[]byte:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goBytes(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goBytes(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goBytes(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Binary:
+		switch pnType {
+		case C.PN_BINARY:
+			*v = Binary(goBytes(C.pn_data_get_binary(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Symbol:
+		switch pnType {
+		case C.PN_SYMBOL:
+			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *interface{}:
+		getInterface(data, v)
+
+	default:
+		if reflect.TypeOf(v).Kind() != reflect.Ptr {
+			panic(newBadUnmarshal(pnType, v))
+		}
+		switch reflect.TypeOf(v).Elem().Kind() {
+		case reflect.Map:
+			getMap(data, v)
+		case reflect.Slice:
+			getList(data, v)
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	}
+	err := dataError("unmarshaling", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+// Getting into an interface is driven completely by the AMQP type, since the interface{}
+// target is type-neutral.
+func getInterface(data *C.pn_data_t, v *interface{}) {
+	pnType := C.pn_data_type(data)
+	switch pnType {
+	case C.PN_NULL:
+		*v = nil
+	case C.PN_BOOL:
+		*v = bool(C.pn_data_get_bool(data))
+	case C.PN_UBYTE:
+		*v = uint8(C.pn_data_get_ubyte(data))
+	case C.PN_BYTE:
+		*v = int8(C.pn_data_get_byte(data))
+	case C.PN_USHORT:
+		*v = uint16(C.pn_data_get_ushort(data))
+	case C.PN_SHORT:
+		*v = int16(C.pn_data_get_short(data))
+	case C.PN_UINT:
+		*v = uint32(C.pn_data_get_uint(data))
+	case C.PN_INT:
+		*v = int32(C.pn_data_get_int(data))
+	case C.PN_CHAR:
+		*v = uint8(C.pn_data_get_char(data))
+	case C.PN_ULONG:
+		*v = uint64(C.pn_data_get_ulong(data))
+	case C.PN_LONG:
+		*v = int64(C.pn_data_get_long(data))
+	case C.PN_FLOAT:
+		*v = float32(C.pn_data_get_float(data))
+	case C.PN_DOUBLE:
+		*v = float64(C.pn_data_get_double(data))
+	case C.PN_BINARY:
+		*v = Binary(goBytes(C.pn_data_get_binary(data)))
+	case C.PN_STRING:
+		*v = goString(C.pn_data_get_string(data))
+	case C.PN_SYMBOL:
+		*v = Symbol(goString(C.pn_data_get_symbol(data)))
+	case C.PN_MAP:
+		m := make(Map)
+		get(data, &m)
+		*v = m // FIXME aconway 2015-03-13: avoid the copy?
+	case C.PN_LIST:
+		l := make(List, 0)
+		get(data, &l)
+		*v = l // FIXME aconway 2015-03-13: avoid the copy?
+	default:
+		panic(newBadUnmarshal(pnType, v))
+	}
+}
+
+// get into map pointed at by v
+func getMap(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_MAP {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	mapValue := reflect.ValueOf(v).Elem()
+	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
+	count := int(C.pn_data_get_map(data))
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count/2; i++ {
+			if bool(C.pn_data_next(data)) {
+				key := reflect.New(mapValue.Type().Key())
+				get(data, key.Interface())
+				if bool(C.pn_data_next(data)) {
+					val := reflect.New(mapValue.Type().Elem())
+					get(data, val.Interface())
+					mapValue.SetMapIndex(key.Elem(), val.Elem())
+				}
+			}
+		}
+		C.pn_data_exit(data)
+	}
+}
+
+func getList(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_LIST {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	count := int(C.pn_data_get_list(data))
+	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count; i++ {
+			if bool(C.pn_data_next(data)) {
+				val := reflect.New(listValue.Type().Elem())
+				get(data, val.Interface())
+				listValue.Index(i).Set(val.Elem())
+			}
+		}
+		C.pn_data_exit(data)
+	}
+	// FIXME aconway 2015-04-09: avoid the copy?
+	reflect.ValueOf(v).Elem().Set(listValue)
+}
+
+// decode from bytes.
+// Return bytes decoded or 0 if we could not decode a complete object.
+//
+func decode(data *C.pn_data_t, bytes []byte) int {
+	if len(bytes) == 0 {
+		return 0
+	}
+	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
+	if n == int(C.PN_UNDERFLOW) {
+		C.pn_error_clear(C.pn_data_error(data))
+		return 0
+	} else if n <= 0 {
+		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
+	}
+	return n
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go
new file mode 100644
index 0000000..58711c7
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url.go
@@ -0,0 +1,96 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+/*
+#include <stdlib.h>
+#include <string.h>
+#include <proton/url.h>
+
+// Helper function for setting URL fields.
+typedef void (*setter_fn)(pn_url_t* url, const char* value);
+inline void	set(pn_url_t *url, setter_fn s, const char* value) {
+  s(url, value);
+}
+*/
+import "C"
+
+import (
+	"net"
+	"net/url"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+const (
+	amqp  string = "amqp"
+	amqps        = "amqps"
+)
+
+// ParseUrl parses an AMQP URL string and returns a net/url.Url.
+//
+// It is more forgiving than net/url.Parse and allows most of the parts of the
+// URL to be missing, assuming AMQP defaults.
+//
+func ParseURL(s string) (u *url.URL, err error) {
+	cstr := C.CString(s)
+	defer C.free(unsafe.Pointer(cstr))
+	pnUrl := C.pn_url_parse(cstr)
+	if pnUrl == nil {
+		return nil, internal.Errorf("bad URL %#v", s)
+	}
+	defer C.pn_url_free(pnUrl)
+
+	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
+	username := C.GoString(C.pn_url_get_username(pnUrl))
+	password := C.GoString(C.pn_url_get_password(pnUrl))
+	host := C.GoString(C.pn_url_get_host(pnUrl))
+	port := C.GoString(C.pn_url_get_port(pnUrl))
+	path := C.GoString(C.pn_url_get_path(pnUrl))
+
+	if err != nil {
+		return nil, internal.Errorf("bad URL %#v: %s", s, err)
+	}
+	if scheme == "" {
+		scheme = amqp
+	}
+	if port == "" {
+		if scheme == amqps {
+			port = amqps
+		} else {
+			port = amqp
+		}
+	}
+	var user *url.Userinfo
+	if password != "" {
+		user = url.UserPassword(username, password)
+	} else if username != "" {
+		user = url.User(username)
+	}
+
+	u = &url.URL{
+		Scheme: scheme,
+		User:   user,
+		Host:   net.JoinHostPort(host, port),
+		Path:   path,
+	}
+
+	return u, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go
new file mode 100644
index 0000000..f80f1c4
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/url_test.go
@@ -0,0 +1,51 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"fmt"
+)
+
+func ExampleParseURL() {
+	for _, s := range []string{
+		"amqp://username:password@host:1234/path",
+		"host:1234",
+		"host",
+		":1234",
+		"host/path",
+		"amqps://host",
+		"",
+	} {
+		u, err := ParseURL(s)
+		if err != nil {
+			fmt.Println(err)
+		} else {
+			fmt.Println(u)
+		}
+	}
+	// Output:
+	// amqp://username:password@host:1234/path
+	// amqp://host:1234
+	// amqp://host:amqp
+	// amqp://:1234
+	// amqp://host:amqp/path
+	// amqps://host:amqps
+	// proton: bad URL ""
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go
new file mode 100644
index 0000000..7a9ec12
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/doc.go
@@ -0,0 +1,38 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package event provides a low-level API to the proton AMQP engine.
+
+For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
+It provides a higher-level, concurrent API that is easier to use.
+
+The API is event based. There are two alternative styles of handler. EventHandler
+provides the core proton events. MessagingHandler provides a slighly simplified
+view of the event stream and automates some common tasks.
+
+See type Pump documentation for more details of the interaction between proton
+events and goroutines.
+*/
+package event
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[20/36] qpid-proton git commit: PROTON-827: Re-create go worspace, cmake support for testing.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/README.md
----------------------------------------------------------------------
diff --git a/go/README.md b/go/README.md
deleted file mode 100644
index 2b73583..0000000
--- a/go/README.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# *EXPERIMENTAL* Go binding for proton
-
-    NOTE: The go directory is in the proton repository root with a symlink at
-    proton-c/bindings/go to facilitate use of go tools: go get, godep and godoc.
-    There may be a cleaner solution to this in future.
-
-This is the beginning of a [Go](http://golang.org) binding for proton.
-
-This work is in early *experimental* stages, *everything* may change in future.
-Comments and contributions are strongly encouraged, this experiment is public so
-early feedback can guide development.
-
-- Email <pr...@qpid.apache.org>
-- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
-
-There are working [examples](../examples/go/README.md) and the examples README file
-explains how to install the packages in your go workspace and read the documentation.
-
-## Goals
-
-The API should
-
-- be idiomatic, unsurprising, and easy to use for Go developers.
-- support client and server development.
-- make simple tasks simple.
-- provide deep access to AMQP protocol when that is required.
-
-There are two types of developer we want to support
-
-1. Go developers using AMQP as a message transport:
-   - Straightforward conversions between Go built-in types and AMQP types.
-   - Easy message exchange via Go channels to support use in goroutines.
-
-2. AMQP-aware developers using Go as an implementation language:
-   - Go types to exactly represent all AMQP types and encoding details.
-   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
-
-## Status
-
-There are 3 go packages for proton:
-
-- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
-- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
-- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
-
-Most applications should use the `messaging` package. The `event` package is for
-applications that need low-level access to the proton engine.
-
-The `event` package is fairly complete, with the exception of the proton
-reactor. It's unclear if the reactor is important for go.
-
-The `messaging` package can run the examples but probably not much else. There
-is work to do on error handling and the API may change.
-
-There are working [examples](../../../examples/go/README.md) of a broker using `event` and
-a sender and receiver using `messaging`.
-
-## The event driven API
-
-See the package documentation for details.
-
-## The Go API
-
-The goal: A procedural API that allows any user goroutine to send and receive
-AMQP messages and other information (acknowledgments, flow control instructions
-etc.) using channels. There will be no user-visible locks and no need to run
-user code in special goroutines, e.g. as handlers in a proton event loop.
-
-See the package documentation for emerging details.
-
-Currently using a channel to receive messages, a function to send them (channels
-internally) and a channel as a "future" for acknowledgements to senders. This
-may change.
-
-## Why a separate API for Go?
-
-Go is a concurrent language and encourages applications to be divided into
-concurrent *goroutines*. It provides traditional locking but it encourages the
-use *channels* to communicate between goroutines without explicit locks:
-
-  "Share memory by communicating, don't communicate by sharing memory"
-
-The idea is that a given value is only operated on by one goroutine at a time,
-but values can easily be passed from one goroutine to another. This removes much
-of the need for locking.
-
-Go literature distinguishes between:
-
-- *concurrency*: "keeping track of things that could be done in parallel"
-- *parallelism*: "actually doing things in parallel"
-
-The application expresses concurrency by starting goroutines for potentially
-concurrent tasks. The Go run-times schedule the activity of goroutines onto a
-small number (possibly one) of actual parallel executions.
-
-Even with *no* parallelism, concurrency lets the Go run-times *order* work with
-respect to events like file descriptors being readable/writable, channels having
-data, timers firing etc. Go automatically takes care of switching out goroutines
-that block or sleep so it is normal to write code in terms of blocking calls.
-
-Event-driven API (like poll, epoll, select or the proton event API) also
-channel unpredictably ordered events to actions in one or a small pool of
-execution threads. However this requires a different style of programming:
-"event-driven" or "reactive" programming. Go developers call it "inside-out"
-programming. In an event-driven architecture blocking is a big problem as it
-consumes a scarce thread of execution, so actions that take time to complete
-have to be re-structured in terms of future event delivery.
-
-The promise of Go is that you can express your application in concurrent,
-procedural terms with simple blocking calls and the Go run-times will turn it
-inside-out for you. Write as many goroutines as you want, and let Go interleave
-and schedule them efficiently.
-
-For example: the Go equivalent of listening for connections is a goroutine with
-a simple endless loop that calls a blocking Listen() function and starts a
-goroutine for each new connection. Each connection has its own goroutine that
-deals with just that connection till it closes.
-
-The benefit is that the variables and logic live closer together. Once you're in
-a goroutine, you have everything you need in local variables, and they are
-preserved across blocking calls. There's no need to store details in context
-objects that you have to look up when handling a later event to figure out how
-to continue where you left off.
-
-So a Go-like proton API does not force the users code to run in an event-loop
-goroutine. Instead user goroutines communicate with the event loop(s) via
-channels.  There's no need to funnel connections into one event loop, in fact it
-makes no sense.  Connections can be processed concurrently so they should be
-processed in separate goroutines and left to Go to schedule. User goroutines can
-have simple loops that block channels till messages are available, the user can
-start as many or as few such goroutines as they wish to implement concurrency as
-simple or as complex as they wish. For example blocking request-response
-vs. asynchronous flows of messages and acknowledgments.
-
-## New to Go?
-
-If you are new to Go then these are a good place to start:
-
-- [A Tour of Go](http://tour.golang.org)
-- [Effective Go](http://golang.org/doc/effective_go.html)
-
-Then look at the tools and library docs at <http://golang.org> as you need them.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/doc.go
----------------------------------------------------------------------
diff --git a/go/amqp/doc.go b/go/amqp/doc.go
deleted file mode 100644
index 7c00aa0..0000000
--- a/go/amqp/doc.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package amqp encodes and decodes AMQP messages and data as Go types.
-
-It follows the standard 'encoding' libraries pattern. The mapping between AMQP
-and Go types is described in the documentation of the Marshal and Unmarshal
-functions.
-
-The sub-packages 'event' and 'messaging' provide two alternative ways to write
-AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
-gives complete low-level control of the underlying proton C engine.
-
-AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
-*/
-package amqp
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.
-
-// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/interop
----------------------------------------------------------------------
diff --git a/go/amqp/interop b/go/amqp/interop
deleted file mode 120000
index 8f50d0e..0000000
--- a/go/amqp/interop
+++ /dev/null
@@ -1 +0,0 @@
-../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/go/amqp/interop_test.go b/go/amqp/interop_test.go
deleted file mode 100644
index 11049f7..0000000
--- a/go/amqp/interop_test.go
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Test that conversion of Go type to/from AMQP is compatible with other
-// bindings.
-//
-package amqp
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"reflect"
-	"strings"
-	"testing"
-)
-
-func assertEqual(want interface{}, got interface{}) {
-	if !reflect.DeepEqual(want, got) {
-		panic(fmt.Errorf("%#v != %#v", want, got))
-	}
-}
-
-func assertNil(err interface{}) {
-	if err != nil {
-		panic(err)
-	}
-}
-
-func getReader(name string) (r io.Reader) {
-	r, err := os.Open("interop/" + name + ".amqp")
-	if err != nil {
-		panic(fmt.Errorf("Can't open %#v: %v", name, err))
-	}
-	return
-}
-
-func remaining(d *Decoder) string {
-	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
-	return string(remainder)
-}
-
-// assertDecode: want is the expected value, gotPtr is a pointer to a
-// instance of the same type for Decode.
-func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
-
-	assertNil(d.Decode(gotPtr))
-
-	got := reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(want, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, gotPtr)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	got = reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-}
-
-func TestUnmarshal(t *testing.T) {
-	bytes, err := ioutil.ReadAll(getReader("strings"))
-	if err != nil {
-		t.Error(err)
-	}
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		n, err := Unmarshal(bytes, &got)
-		if err != nil {
-			t.Error(err)
-		}
-		if want != got {
-			t.Errorf("%#v != %#v", want, got)
-		}
-		bytes = bytes[n:]
-	}
-}
-
-func TestPrimitivesExact(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into exact types
-	var b bool
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	var u8 uint8
-	assertDecode(d, uint8(42), &u8)
-	var u16 uint16
-	assertDecode(d, uint16(42), &u16)
-	var i16 int16
-	assertDecode(d, int16(-42), &i16)
-	var u32 uint32
-	assertDecode(d, uint32(12345), &u32)
-	var i32 int32
-	assertDecode(d, int32(-12345), &i32)
-	var u64 uint64
-	assertDecode(d, uint64(12345), &u64)
-	var i64 int64
-	assertDecode(d, int64(-12345), &i64)
-	var f32 float32
-	assertDecode(d, float32(0.125), &f32)
-	var f64 float64
-	assertDecode(d, float64(0.125), &f64)
-}
-
-func TestPrimitivesCompatible(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into compatible types
-	var b bool
-	var i int
-	var u uint
-	var f float64
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, -42, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, 0.125, &f)
-	assertDecode(d, 0.125, &f)
-}
-
-// assertDecodeValue: want is the expected value, decode into a reflect.Value
-func assertDecodeInterface(d *Decoder, want interface{}) {
-
-	var got, got2 interface{}
-	assertNil(d.Decode(&got))
-
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(got, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, &got2)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	assertEqual(want, got2)
-}
-
-func TestPrimitivesInterface(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	assertDecodeInterface(d, true)
-	assertDecodeInterface(d, false)
-	assertDecodeInterface(d, uint8(42))
-	assertDecodeInterface(d, uint16(42))
-	assertDecodeInterface(d, int16(-42))
-	assertDecodeInterface(d, uint32(12345))
-	assertDecodeInterface(d, int32(-12345))
-	assertDecodeInterface(d, uint64(12345))
-	assertDecodeInterface(d, int64(-12345))
-	assertDecodeInterface(d, float32(0.125))
-	assertDecodeInterface(d, float64(0.125))
-}
-
-func TestStrings(t *testing.T) {
-	d := NewDecoder(getReader("strings"))
-	// Test decoding as plain Go strings
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		assertDecode(d, want, &got)
-	}
-	remains := remaining(d)
-	if remains != "" {
-		t.Errorf("leftover: %s", remains)
-	}
-
-	// Test decoding as specific string types
-	d = NewDecoder(getReader("strings"))
-	var bytes []byte
-	var str, sym string
-	assertDecode(d, []byte("abc\000defg"), &bytes)
-	assertDecode(d, "abcdefg", &str)
-	assertDecode(d, "abcdefg", &sym)
-	assertDecode(d, make([]byte, 0), &bytes)
-	assertDecode(d, "", &str)
-	assertDecode(d, "", &sym)
-	remains = remaining(d)
-	if remains != "" {
-		t.Fatalf("leftover: %s", remains)
-	}
-
-	// Test some error handling
-	d = NewDecoder(getReader("strings"))
-	var s string
-	err := d.Decode(s)
-	if err == nil {
-		t.Fatal("Expected error")
-	}
-	if !strings.Contains(err.Error(), "not a pointer") {
-		t.Error(err)
-	}
-	var i int
-	err = d.Decode(&i)
-	if !strings.Contains(err.Error(), "cannot unmarshal") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte{}, nil)
-	if !strings.Contains(err.Error(), "not enough data") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte("foobar"), nil)
-	if !strings.Contains(err.Error(), "invalid-argument") {
-		t.Error(err)
-	}
-}
-
-func TestEncodeDecode(t *testing.T) {
-	type data struct {
-		s  string
-		i  int
-		u8 uint8
-		b  bool
-		f  float32
-		v  interface{}
-	}
-
-	in := data{"foo", 42, 9, true, 1.234, "thing"}
-
-	buf := bytes.Buffer{}
-	e := NewEncoder(&buf)
-	assertNil(e.Encode(in.s))
-	assertNil(e.Encode(in.i))
-	assertNil(e.Encode(in.u8))
-	assertNil(e.Encode(in.b))
-	assertNil(e.Encode(in.f))
-	assertNil(e.Encode(in.v))
-
-	var out data
-	d := NewDecoder(&buf)
-	assertNil(d.Decode(&out.s))
-	assertNil(d.Decode(&out.i))
-	assertNil(d.Decode(&out.u8))
-	assertNil(d.Decode(&out.b))
-	assertNil(d.Decode(&out.f))
-	assertNil(d.Decode(&out.v))
-
-	assertEqual(in, out)
-}
-
-func TestMap(t *testing.T) {
-	d := NewDecoder(getReader("maps"))
-
-	// Generic map
-	var m Map
-	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
-
-	// Interface as map
-	var i interface{}
-	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
-
-	d = NewDecoder(getReader("maps"))
-	// Specific typed map
-	var m2 map[string]int
-	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
-
-	// Round trip a nested map
-	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
-	bytes, err := Marshal(m, nil)
-	assertNil(err)
-	_, err = Unmarshal(bytes, &i)
-	assertNil(err)
-	assertEqual(m, i)
-}
-
-func TestList(t *testing.T) {
-	d := NewDecoder(getReader("lists"))
-	var l List
-	assertDecode(d, List{int32(32), "foo", true}, &l)
-	assertDecode(d, List{}, &l)
-}
-
-func FIXMETestMessage(t *testing.T) {
-	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
-	bytes, err := ioutil.ReadAll(getReader("message"))
-	assertNil(err)
-	m, err := DecodeMessage(bytes)
-	assertNil(err)
-	fmt.Printf("%+v\n", m)
-	assertEqual(m.Body(), "hello")
-
-	bytes2 := make([]byte, len(bytes))
-	bytes2, err = m.Encode(bytes2)
-	assertNil(err)
-	assertEqual(bytes, bytes2)
-}
-
-// FIXME aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/go/amqp/marshal.go b/go/amqp/marshal.go
deleted file mode 100644
index e5c2945..0000000
--- a/go/amqp/marshal.go
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-func dataError(prefix string, data *C.pn_data_t) error {
-	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
-	if err != nil {
-		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
-	}
-	return err
-}
-
-/*
-Marshal encodes a Go value as AMQP data in buffer.
-If buffer is nil, or is not large enough, a new buffer  is created.
-
-Returns the buffer used for encoding with len() adjusted to the actual size of data.
-
-Go types are encoded as follows
-
- +-------------------------------------+--------------------------------------------+
- |Go type                              |AMQP type                                   |
- +-------------------------------------+--------------------------------------------+
- |bool                                 |bool                                        |
- +-------------------------------------+--------------------------------------------+
- |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
- +-------------------------------------+--------------------------------------------+
- |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
- +-------------------------------------+--------------------------------------------+
- |float32, float64                     |float, double.                              |
- +-------------------------------------+--------------------------------------------+
- |string                               |string                                      |
- +-------------------------------------+--------------------------------------------+
- |[]byte, Binary                       |binary                                      |
- +-------------------------------------+--------------------------------------------+
- |Symbol                               |symbol                                      |
- +-------------------------------------+--------------------------------------------+
- |interface{}                          |the contained type                          |
- +-------------------------------------+--------------------------------------------+
- |nil                                  |null                                        |
- +-------------------------------------+--------------------------------------------+
- |map[K]T                              |map with K and T converted as above         |
- +-------------------------------------+--------------------------------------------+
- |Map                                  |map, may have mixed types for keys, values  |
- +-------------------------------------+--------------------------------------------+
- |[]T                                  |list with T converted as above              |
- +-------------------------------------+--------------------------------------------+
- |List                                 |list, may have mixed types  values          |
- +-------------------------------------+--------------------------------------------+
-
-TODO Go types: array, slice, struct
-
-Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
-*/
-func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	put(data, v)
-	encode := func(buf []byte) ([]byte, error) {
-		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
-		switch {
-		case n == int(C.PN_OVERFLOW):
-			return buf, overflow
-		case n < 0:
-			return buf, dataError("marshal error", data)
-		default:
-			return buf[:n], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}
-
-const minEncode = 256
-
-// overflow is returned when an encoding function can't fit data in the buffer.
-var overflow = internal.Errorf("buffer too small")
-
-// encodeFn encodes into buffer[0:len(buffer)].
-// Returns buffer with length adjusted for data encoded.
-// If buffer too small, returns overflow as error.
-type encodeFn func(buffer []byte) ([]byte, error)
-
-// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
-// Returns the final buffer.
-func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
-	if buffer == nil || len(buffer) == 0 {
-		buffer = make([]byte, minEncode)
-	}
-	var err error
-	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
-		buffer = make([]byte, 2*len(buffer))
-	}
-	return buffer, err
-}
-
-func put(data *C.pn_data_t, v interface{}) {
-	switch v := v.(type) {
-	case nil:
-		C.pn_data_put_null(data)
-	case bool:
-		C.pn_data_put_bool(data, C.bool(v))
-	case int8:
-		C.pn_data_put_byte(data, C.int8_t(v))
-	case int16:
-		C.pn_data_put_short(data, C.int16_t(v))
-	case int32:
-		C.pn_data_put_int(data, C.int32_t(v))
-	case int64:
-		C.pn_data_put_long(data, C.int64_t(v))
-	case int:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_long(data, C.int64_t(v))
-		} else {
-			C.pn_data_put_int(data, C.int32_t(v))
-		}
-	case uint8:
-		C.pn_data_put_ubyte(data, C.uint8_t(v))
-	case uint16:
-		C.pn_data_put_ushort(data, C.uint16_t(v))
-	case uint32:
-		C.pn_data_put_uint(data, C.uint32_t(v))
-	case uint64:
-		C.pn_data_put_ulong(data, C.uint64_t(v))
-	case uint:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_ulong(data, C.uint64_t(v))
-		} else {
-			C.pn_data_put_uint(data, C.uint32_t(v))
-		}
-	case float32:
-		C.pn_data_put_float(data, C.float(v))
-	case float64:
-		C.pn_data_put_double(data, C.double(v))
-	case string:
-		C.pn_data_put_string(data, pnBytes([]byte(v)))
-	case []byte:
-		C.pn_data_put_binary(data, pnBytes(v))
-	case Binary:
-		C.pn_data_put_binary(data, pnBytes([]byte(v)))
-	case Symbol:
-		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
-	case Map: // Special map type
-		C.pn_data_put_map(data)
-		C.pn_data_enter(data)
-		for key, val := range v {
-			put(data, key)
-			put(data, val)
-		}
-		C.pn_data_exit(data)
-	default:
-		switch reflect.TypeOf(v).Kind() {
-		case reflect.Map:
-			putMap(data, v)
-		case reflect.Slice:
-			putList(data, v)
-		default:
-			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
-		}
-	}
-	err := dataError("marshal", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-func putMap(data *C.pn_data_t, v interface{}) {
-	mapValue := reflect.ValueOf(v)
-	C.pn_data_put_map(data)
-	C.pn_data_enter(data)
-	for _, key := range mapValue.MapKeys() {
-		put(data, key.Interface())
-		put(data, mapValue.MapIndex(key).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-func putList(data *C.pn_data_t, v interface{}) {
-	listValue := reflect.ValueOf(v)
-	C.pn_data_put_list(data)
-	C.pn_data_enter(data)
-	for i := 0; i < listValue.Len(); i++ {
-		put(data, listValue.Index(i).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-// Encoder encodes AMQP values to an io.Writer
-type Encoder struct {
-	writer io.Writer
-	buffer []byte
-}
-
-// New encoder returns a new encoder that writes to w.
-func NewEncoder(w io.Writer) *Encoder {
-	return &Encoder{w, make([]byte, minEncode)}
-}
-
-func (e *Encoder) Encode(v interface{}) (err error) {
-	e.buffer, err = Marshal(v, e.buffer)
-	if err == nil {
-		e.writer.Write(e.buffer)
-	}
-	return err
-}
-
-func replace(data *C.pn_data_t, v interface{}) {
-	C.pn_data_clear(data)
-	put(data, v)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/message.go
----------------------------------------------------------------------
diff --git a/go/amqp/message.go b/go/amqp/message.go
deleted file mode 100644
index 87093f5..0000000
--- a/go/amqp/message.go
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
-
-// Message is the interface to an AMQP message.
-// Instances of this interface contain a pointer to the underlying struct.
-type Message interface {
-	/**
-	 * Inferred indicates how the message content
-	 * is encoded into AMQP sections. If inferred is true then binary and
-	 * list values in the body of the message will be encoded as AMQP DATA
-	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
-	 * then all values in the body of the message will be encoded as AMQP
-	 * VALUE sections regardless of their type.
-	 */
-	Inferred() bool
-	SetInferred(bool)
-
-	/**
-	 * Durable indicates that any parties taking responsibility
-	 * for the message must durably store the content.
-	 */
-	Durable() bool
-	SetDurable(bool)
-
-	/**
-	 * Priority impacts ordering guarantees. Within a
-	 * given ordered context, higher priority messages may jump ahead of
-	 * lower priority messages.
-	 */
-	Priority() uint8
-	SetPriority(uint8)
-
-	/**
-	 * TTL or Time To Live, a message it may be dropped after this duration
-	 */
-	TTL() time.Duration
-	SetTTL(time.Duration)
-
-	/**
-	 * FirstAcquirer indicates
-	 * that the recipient of the message is the first recipient to acquire
-	 * the message, i.e. there have been no failed delivery attempts to
-	 * other acquirers. Note that this does not mean the message has not
-	 * been delivered to, but not acquired, by other recipients.
-	 */
-	FirstAcquirer() bool
-	SetFirstAcquirer(bool)
-
-	/**
-	 * DeliveryCount tracks how many attempts have been made to
-	 * delivery a message.
-	 */
-	DeliveryCount() uint32
-	SetDeliveryCount(uint32)
-
-	/**
-	 * MessageId provides a unique identifier for a message.
-	 * it can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	MessageId() interface{}
-	SetMessageId(interface{})
-
-	UserId() string
-	SetUserId(string)
-
-	Address() string
-	SetAddress(string)
-
-	Subject() string
-	SetSubject(string)
-
-	ReplyTo() string
-	SetReplyTo(string)
-
-	/**
-	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	CorrelationId() interface{}
-	SetCorrelationId(interface{})
-
-	ContentType() string
-	SetContentType(string)
-
-	ContentEncoding() string
-	SetContentEncoding(string)
-
-	// ExpiryTime indicates an absoulte time when the message may be dropped.
-	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
-	ExpiryTime() time.Time
-	SetExpiryTime(time.Time)
-
-	CreationTime() time.Time
-	SetCreationTime(time.Time)
-
-	GroupId() string
-	SetGroupId(string)
-
-	GroupSequence() int32
-	SetGroupSequence(int32)
-
-	ReplyToGroupId() string
-	SetReplyToGroupId(string)
-
-	/**
-	 * Instructions can be used to access or modify AMQP delivery instructions.
-	 */
-	Instructions() *map[string]interface{}
-
-	/**
-	 * Annotations  can be used to access or modify AMQP annotations.
-	 */
-	Annotations() *map[string]interface{}
-
-	/**
-	 * Properties  can be used to access or modify the application properties of a message.
-	 */
-	Properties() *map[string]interface{}
-
-	/**
-	 * Body of the message can be any AMQP encodable type.
-	 */
-	Body() interface{}
-	SetBody(interface{})
-
-	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
-	// the message is encoded into it, otherwise a new buffer is created.
-	// Returns the buffer containing the message.
-	Encode(buffer []byte) ([]byte, error)
-}
-
-// NewMessage creates a new message instance. The returned interface contains a pointer.
-func NewMessage() Message {
-	pn := C.pn_message() // Pick up default setting from C message.
-	defer C.pn_message_free(pn)
-	return goMessage(pn)
-}
-
-// Message implementation copies all message data into Go space so it can be proprely
-// memory managed.
-//
-type message struct {
-	inferred, durable, firstAcquirer      bool
-	priority                              uint8
-	ttl                                   time.Duration
-	deliveryCount                         uint32
-	messageId                             interface{}
-	userId, address, subject, replyTo     string
-	contentType, contentEncoding          string
-	groupId, replyToGroupId               string
-	creationTime, expiryTime              time.Time
-	groupSequence                         int32
-	correlationId                         interface{}
-	instructions, annotations, properties map[string]interface{}
-	body                                  interface{}
-}
-
-func (m *message) Inferred() bool                        { return m.inferred }
-func (m *message) SetInferred(b bool)                    { m.inferred = b }
-func (m *message) Durable() bool                         { return m.durable }
-func (m *message) SetDurable(b bool)                     { m.durable = b }
-func (m *message) Priority() uint8                       { return m.priority }
-func (m *message) SetPriority(b uint8)                   { m.priority = b }
-func (m *message) TTL() time.Duration                    { return m.ttl }
-func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
-func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
-func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
-func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
-func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
-func (m *message) MessageId() interface{}                { return m.messageId }
-func (m *message) SetMessageId(id interface{})           { m.messageId = id }
-func (m *message) UserId() string                        { return m.userId }
-func (m *message) SetUserId(s string)                    { m.userId = s }
-func (m *message) Address() string                       { return m.address }
-func (m *message) SetAddress(s string)                   { m.address = s }
-func (m *message) Subject() string                       { return m.subject }
-func (m *message) SetSubject(s string)                   { m.subject = s }
-func (m *message) ReplyTo() string                       { return m.replyTo }
-func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
-func (m *message) CorrelationId() interface{}            { return m.correlationId }
-func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
-func (m *message) ContentType() string                   { return m.contentType }
-func (m *message) SetContentType(s string)               { m.contentType = s }
-func (m *message) ContentEncoding() string               { return m.contentEncoding }
-func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
-func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
-func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
-func (m *message) CreationTime() time.Time               { return m.creationTime }
-func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
-func (m *message) GroupId() string                       { return m.groupId }
-func (m *message) SetGroupId(s string)                   { m.groupId = s }
-func (m *message) GroupSequence() int32                  { return m.groupSequence }
-func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
-func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
-func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
-func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
-func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
-func (m *message) Properties() *map[string]interface{}   { return &m.properties }
-func (m *message) Body() interface{}                     { return m.body }
-func (m *message) SetBody(b interface{})                 { m.body = b }
-
-// rewindGet rewinds and then gets the value from a data object.
-func rewindGet(data *C.pn_data_t, v interface{}) {
-	if data != nil && C.pn_data_size(data) > 0 {
-		C.pn_data_rewind(data)
-		C.pn_data_next(data)
-		get(data, v)
-	}
-}
-
-// goMessage populates a Go message from a pn_message_t
-func goMessage(pn *C.pn_message_t) *message {
-	m := &message{
-		inferred:        bool(C.pn_message_is_inferred(pn)),
-		durable:         bool(C.pn_message_is_durable(pn)),
-		priority:        uint8(C.pn_message_get_priority(pn)),
-		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
-		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
-		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
-		userId:          goString(C.pn_message_get_user_id(pn)),
-		address:         C.GoString(C.pn_message_get_address(pn)),
-		subject:         C.GoString(C.pn_message_get_subject(pn)),
-		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
-		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
-		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
-		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
-		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
-		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
-		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
-		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
-		messageId:       nil,
-		correlationId:   nil,
-		instructions:    make(map[string]interface{}),
-		annotations:     make(map[string]interface{}),
-		properties:      make(map[string]interface{}),
-	}
-	rewindGet(C.pn_message_id(pn), &m.messageId)
-	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
-	rewindGet(C.pn_message_instructions(pn), &m.instructions)
-	rewindGet(C.pn_message_annotations(pn), &m.annotations)
-	rewindGet(C.pn_message_properties(pn), &m.properties)
-	rewindGet(C.pn_message_body(pn), &m.body)
-	return m
-}
-
-// pnMessage populates a pn_message_t from a Go message.
-func (m *message) pnMessage() *C.pn_message_t {
-	pn := C.pn_message()
-	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
-	C.pn_message_set_durable(pn, C.bool(m.Durable()))
-	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
-	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
-	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
-	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
-	replace(C.pn_message_id(pn), m.MessageId())
-	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
-	C.pn_message_set_address(pn, C.CString(m.Address()))
-	C.pn_message_set_subject(pn, C.CString(m.Subject()))
-	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
-	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
-	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
-	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
-	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
-	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
-	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
-	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
-	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
-	replace(C.pn_message_instructions(pn), *m.Instructions())
-	replace(C.pn_message_annotations(pn), *m.Annotations())
-	replace(C.pn_message_properties(pn), *m.Properties())
-	replace(C.pn_message_body(pn), m.Body())
-	return pn
-}
-
-// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
-
-// DecodeMessage decodes bytes as a message
-func DecodeMessage(data []byte) (Message, error) {
-	pnMsg := C.pn_message()
-	defer C.pn_message_free(pnMsg)
-	if len(data) == 0 {
-		return nil, internal.Errorf("empty buffer for decode")
-	}
-	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
-		return nil, internal.Errorf("decoding message: %s",
-			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
-	}
-	return goMessage(pnMsg), nil
-}
-
-// Encode the message into bufffer.
-// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
-// buffer will be returned.
-func (m *message) Encode(buffer []byte) ([]byte, error) {
-	pn := m.pnMessage()
-	defer C.pn_message_free(pn)
-	encode := func(buf []byte) ([]byte, error) {
-		len := cLen(buf)
-		result := C.pn_message_encode(pn, cPtr(buf), &len)
-		switch {
-		case result == C.PN_OVERFLOW:
-			return buf, overflow
-		case result < 0:
-			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
-		default:
-			return buf[:len], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/go/amqp/message_test.go b/go/amqp/message_test.go
deleted file mode 100644
index 46e26de..0000000
--- a/go/amqp/message_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"reflect"
-	"testing"
-	"time"
-)
-
-func roundTrip(t *testing.T, m Message) {
-	buffer, err := m.Encode(nil)
-	if err != nil {
-		t.Fatalf("Encode failed: %v", err)
-	}
-	m2, err := DecodeMessage(buffer)
-	if err != nil {
-		t.Fatalf("Decode failed: %v", err)
-	}
-	if !reflect.DeepEqual(m, m2) {
-		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
-	}
-}
-
-func TestDefaultMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	// Check defaults
-	assertEqual(m.Inferred(), false)
-	assertEqual(m.Durable(), false)
-	assertEqual(m.Priority(), uint8(4))
-	assertEqual(m.TTL(), time.Duration(0))
-	assertEqual(m.UserId(), "")
-	assertEqual(m.Address(), "")
-	assertEqual(m.Subject(), "")
-	assertEqual(m.ReplyTo(), "")
-	assertEqual(m.ContentType(), "")
-	assertEqual(m.ContentEncoding(), "")
-	assertEqual(m.GroupId(), "")
-	assertEqual(m.GroupSequence(), int32(0))
-	assertEqual(m.ReplyToGroupId(), "")
-	assertEqual(m.MessageId(), nil)
-	assertEqual(m.CorrelationId(), nil)
-	assertEqual(*m.Instructions(), map[string]interface{}{})
-	assertEqual(*m.Annotations(), map[string]interface{}{})
-	assertEqual(*m.Properties(), map[string]interface{}{})
-	assertEqual(m.Body(), nil)
-
-	roundTrip(t, m)
-}
-
-func TestMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	m.SetInferred(false)
-	m.SetDurable(true)
-	m.SetPriority(42)
-	m.SetTTL(0)
-	m.SetUserId("user")
-	m.SetAddress("address")
-	m.SetSubject("subject")
-	m.SetReplyTo("replyto")
-	m.SetContentType("content")
-	m.SetContentEncoding("encoding")
-	m.SetGroupId("group")
-	m.SetGroupSequence(42)
-	m.SetReplyToGroupId("replytogroup")
-	m.SetMessageId("id")
-	m.SetCorrelationId("correlation")
-	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
-	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
-	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
-	m.SetBody("hello")
-	roundTrip(t, m)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/types.go
----------------------------------------------------------------------
diff --git a/go/amqp/types.go b/go/amqp/types.go
deleted file mode 100644
index 8713520..0000000
--- a/go/amqp/types.go
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"reflect"
-	"time"
-	"unsafe"
-)
-
-func pnTypeString(pt C.pn_type_t) string {
-	switch pt {
-	case C.PN_NULL:
-		return "null"
-	case C.PN_BOOL:
-		return "bool"
-	case C.PN_UBYTE:
-		return "ubyte"
-	case C.PN_BYTE:
-		return "byte"
-	case C.PN_USHORT:
-		return "ushort"
-	case C.PN_SHORT:
-		return "short"
-	case C.PN_CHAR:
-		return "char"
-	case C.PN_UINT:
-		return "uint"
-	case C.PN_INT:
-		return "int"
-	case C.PN_ULONG:
-		return "ulong"
-	case C.PN_LONG:
-		return "long"
-	case C.PN_TIMESTAMP:
-		return "timestamp"
-	case C.PN_FLOAT:
-		return "float"
-	case C.PN_DOUBLE:
-		return "double"
-	case C.PN_DECIMAL32:
-		return "decimal32"
-	case C.PN_DECIMAL64:
-		return "decimal64"
-	case C.PN_DECIMAL128:
-		return "decimal128"
-	case C.PN_UUID:
-		return "uuid"
-	case C.PN_BINARY:
-		return "binary"
-	case C.PN_STRING:
-		return "string"
-	case C.PN_SYMBOL:
-		return "symbol"
-	case C.PN_DESCRIBED:
-		return "described"
-	case C.PN_ARRAY:
-		return "array"
-	case C.PN_LIST:
-		return "list"
-	case C.PN_MAP:
-		return "map"
-	case C.PN_DATA_TYPE_ERROR:
-		return "no-data"
-	default:
-		return fmt.Sprintf("unknown-type(%d)", pt)
-	}
-}
-
-// Go types
-var (
-	bytesType = reflect.TypeOf([]byte{})
-	valueType = reflect.TypeOf(reflect.Value{})
-)
-
-// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
-
-// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
-type Map map[interface{}]interface{}
-
-// List is a generic list that can hold mixed values and can represent any AMQP list.
-//
-type List []interface{}
-
-// Symbol is a string that is encoded as an AMQP symbol
-type Symbol string
-
-// Binary is a string that is encoded as an AMQP binary.
-// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
-// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
-type Binary string
-
-// GoString for Map prints values with their types, useful for debugging.
-func (m Map) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", m)
-	i := len(m)
-	for k, v := range m {
-		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
-		i--
-		if i > 0 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// GoString for List prints values with their types, useful for debugging.
-func (l List) GoString() string {
-	out := &bytes.Buffer{}
-	fmt.Fprintf(out, "%T{", l)
-	for i := 0; i < len(l); i++ {
-		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
-		if i == len(l)-1 {
-			fmt.Fprint(out, ", ")
-		}
-	}
-	fmt.Fprint(out, "}")
-	return out.String()
-}
-
-// pnTime converts Go time.Time to Proton millisecond Unix time.
-func pnTime(t time.Time) C.pn_timestamp_t {
-	secs := t.Unix()
-	// Note: sub-second accuracy is not guaraunteed if the Unix time in
-	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
-	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
-	return C.pn_timestamp_t(secs*1000 + msecs)
-}
-
-// goTime converts a pn_timestamp_t to a Go time.Time.
-func goTime(t C.pn_timestamp_t) time.Time {
-	secs := int64(t) / 1000
-	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
-	return time.Unix(secs, nsecs)
-}
-
-func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
-	if cBytes.start != nil {
-		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
-	}
-	return
-}
-
-func goString(cBytes C.pn_bytes_t) (str string) {
-	if cBytes.start != nil {
-		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
-	}
-	return
-}
-
-func pnBytes(b []byte) C.pn_bytes_t {
-	if len(b) == 0 {
-		return C.pn_bytes_t{0, nil}
-	} else {
-		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
-	}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/uid.go
----------------------------------------------------------------------
diff --git a/go/amqp/uid.go b/go/amqp/uid.go
deleted file mode 100644
index 944bf6f..0000000
--- a/go/amqp/uid.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Generating unique IDs for various things.
-
-package amqp
-
-import (
-	"strconv"
-	"sync/atomic"
-)
-
-// A simple atomic counter to generate unique 64 bit IDs.
-type UidCounter struct{ count uint64 }
-
-// NextInt gets the next uint64 value from the atomic counter.
-func (uc *UidCounter) NextInt() uint64 {
-	return atomic.AddUint64(&uc.count, 1)
-}
-
-// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
-func (uc *UidCounter) Next() string {
-	return strconv.FormatUint(uc.NextInt(), 32)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/go/amqp/unmarshal.go b/go/amqp/unmarshal.go
deleted file mode 100644
index 89ab64a..0000000
--- a/go/amqp/unmarshal.go
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-oor more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-const minDecode = 1024
-
-// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
-type BadUnmarshal struct {
-	// The name of the AMQP type.
-	AMQPType string
-	// The Go type.
-	GoType reflect.Type
-}
-
-func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
-	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
-}
-
-func (e BadUnmarshal) Error() string {
-	if e.GoType.Kind() != reflect.Ptr {
-		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
-	} else {
-		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
-	}
-}
-
-//
-// Decoding from a pn_data_t
-//
-// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
-// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
-//
-
-// Decoder decodes AMQP values from an io.Reader.
-//
-type Decoder struct {
-	reader io.Reader
-	buffer bytes.Buffer
-}
-
-// NewDecoder returns a new decoder that reads from r.
-//
-// The decoder has it's own buffer and may read more data than required for the
-// AMQP values requested.  Use Buffered to see if there is data left in the
-// buffer.
-//
-func NewDecoder(r io.Reader) *Decoder {
-	return &Decoder{r, bytes.Buffer{}}
-}
-
-// Buffered returns a reader of the data remaining in the Decoder's buffer. The
-// reader is valid until the next call to Decode.
-//
-func (d *Decoder) Buffered() io.Reader {
-	return bytes.NewReader(d.buffer.Bytes())
-}
-
-// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
-//
-// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
-//
-func (d *Decoder) Decode(v interface{}) (err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	var n int
-	for n == 0 && err == nil {
-		n = unmarshal(data, d.buffer.Bytes(), v)
-		if n == 0 { // n == 0 means not enough data, read more
-			err = d.more()
-			if err != nil {
-				return
-			}
-		}
-	}
-	d.buffer.Next(n)
-	return
-}
-
-/*
-Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
-Types are converted as follows:
-
- +---------------------------+----------------------------------------------------------------------+
- |To Go types                |From AMQP types                                                       |
- +===========================+======================================================================+
- |bool                       |bool                                                                  |
- +---------------------------+----------------------------------------------------------------------+
- |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
- |int32, int64               |long.                                                                 |
- +---------------------------+----------------------------------------------------------------------+
- |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
- |uint32, uint64 types       |uint, ulong                                                           |
- +---------------------------+----------------------------------------------------------------------+
- |float32, float64           |Equivalent or smaller float or double.                                |
- +---------------------------+----------------------------------------------------------------------+
- |string, []byte             |string, symbol or binary.                                             |
- +---------------------------+----------------------------------------------------------------------+
- |Symbol                     |symbol                                                                |
- +---------------------------+----------------------------------------------------------------------+
- |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
- +---------------------------+----------------------------------------------------------------------+
- |Map                        |map, any AMQP map                                                     |
- +---------------------------+----------------------------------------------------------------------+
- |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
- |                           +------------------------+---------------------------------------------+
- |                           |AMQP Type               |Go Type in interface{}                       |
- |                           +========================+=============================================+
- |                           |bool                    |bool                                         |
- |                           +------------------------+---------------------------------------------+
- |                           |char                    |unint8                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |byte,short,int,long     |int8,int16,int32,int64                       |
- |                           +------------------------+---------------------------------------------+
- |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
- |                           +------------------------+---------------------------------------------+
- |                           |float, double           |float32, float64                             |
- |                           +------------------------+---------------------------------------------+
- |                           |string                  |string                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |symbol                  |Symbol                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |binary                  |Binary                                       |
- |                           +------------------------+---------------------------------------------+
- |                           |nulll                   |nil                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |map                     |Map                                          |
- |                           +------------------------+---------------------------------------------+
- |                           |list                    |List                                         |
- +---------------------------+------------------------+---------------------------------------------+
-
-The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
-
-TODO types
-
-AMQP: timestamp, decimal32/64/128, uuid, described, array.
-
-Go: array, struct.
-
-Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
-representation for those.
-*/
-func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	n = unmarshal(data, bytes, v)
-	if n == 0 {
-		err = internal.Errorf("not enough data")
-	}
-	return
-}
-
-// more reads more data when we can't parse a complete AMQP type
-func (d *Decoder) more() error {
-	var readSize int64 = minDecode
-	if int64(d.buffer.Len()) > readSize { // Grow by doubling
-		readSize = int64(d.buffer.Len())
-	}
-	var n int64
-	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
-	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
-		err = io.EOF
-	}
-	return err
-}
-
-// unmarshal decodes from bytes and converts into the value pointed to by v.
-// Used by Unmarshal and Decode
-//
-// Returns the number of bytes decoded or 0 if not enough data.
-//
-func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
-	n = decode(data, bytes)
-	if n == 0 {
-		return 0
-	}
-	get(data, v)
-	return
-}
-
-// get value from data into value pointed at by v.
-func get(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-
-	switch v := v.(type) {
-	case *bool:
-		switch pnType {
-		case C.PN_BOOL:
-			*v = bool(C.pn_data_get_bool(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int8(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int8(C.pn_data_get_byte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint8:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint8(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint8(C.pn_data_get_ubyte(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int16(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int16(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int16(C.pn_data_get_short(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint16:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint16(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint16(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint16(C.pn_data_get_ushort(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *int32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int32(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int32(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int32(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int32(C.pn_data_get_int(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	case *uint32:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint32(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint32(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint32(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint32(C.pn_data_get_uint(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int64(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int64(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int64(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int64(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			*v = int64(C.pn_data_get_long(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint64:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint64(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint64(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint64(C.pn_data_get_ushort(data))
-		case C.PN_ULONG:
-			*v = uint64(C.pn_data_get_ulong(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *int:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = int(C.pn_data_get_char(data))
-		case C.PN_BYTE:
-			*v = int(C.pn_data_get_byte(data))
-		case C.PN_SHORT:
-			*v = int(C.pn_data_get_short(data))
-		case C.PN_INT:
-			*v = int(C.pn_data_get_int(data))
-		case C.PN_LONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = int(C.pn_data_get_long(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *uint:
-		switch pnType {
-		case C.PN_CHAR:
-			*v = uint(C.pn_data_get_char(data))
-		case C.PN_UBYTE:
-			*v = uint(C.pn_data_get_ubyte(data))
-		case C.PN_USHORT:
-			*v = uint(C.pn_data_get_ushort(data))
-		case C.PN_UINT:
-			*v = uint(C.pn_data_get_uint(data))
-		case C.PN_ULONG:
-			if unsafe.Sizeof(0) == 8 {
-				*v = uint(C.pn_data_get_ulong(data))
-			} else {
-				panic(newBadUnmarshal(pnType, v))
-			}
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float32:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float32(C.pn_data_get_float(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *float64:
-		switch pnType {
-		case C.PN_FLOAT:
-			*v = float64(C.pn_data_get_float(data))
-		case C.PN_DOUBLE:
-			*v = float64(C.pn_data_get_double(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *string:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goString(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goString(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goString(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *[]byte:
-		switch pnType {
-		case C.PN_STRING:
-			*v = goBytes(C.pn_data_get_string(data))
-		case C.PN_SYMBOL:
-			*v = goBytes(C.pn_data_get_symbol(data))
-		case C.PN_BINARY:
-			*v = goBytes(C.pn_data_get_binary(data))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Binary:
-		switch pnType {
-		case C.PN_BINARY:
-			*v = Binary(goBytes(C.pn_data_get_binary(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *Symbol:
-		switch pnType {
-		case C.PN_SYMBOL:
-			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-
-	case *interface{}:
-		getInterface(data, v)
-
-	default:
-		if reflect.TypeOf(v).Kind() != reflect.Ptr {
-			panic(newBadUnmarshal(pnType, v))
-		}
-		switch reflect.TypeOf(v).Elem().Kind() {
-		case reflect.Map:
-			getMap(data, v)
-		case reflect.Slice:
-			getList(data, v)
-		default:
-			panic(newBadUnmarshal(pnType, v))
-		}
-	}
-	err := dataError("unmarshaling", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-// Getting into an interface is driven completely by the AMQP type, since the interface{}
-// target is type-neutral.
-func getInterface(data *C.pn_data_t, v *interface{}) {
-	pnType := C.pn_data_type(data)
-	switch pnType {
-	case C.PN_NULL:
-		*v = nil
-	case C.PN_BOOL:
-		*v = bool(C.pn_data_get_bool(data))
-	case C.PN_UBYTE:
-		*v = uint8(C.pn_data_get_ubyte(data))
-	case C.PN_BYTE:
-		*v = int8(C.pn_data_get_byte(data))
-	case C.PN_USHORT:
-		*v = uint16(C.pn_data_get_ushort(data))
-	case C.PN_SHORT:
-		*v = int16(C.pn_data_get_short(data))
-	case C.PN_UINT:
-		*v = uint32(C.pn_data_get_uint(data))
-	case C.PN_INT:
-		*v = int32(C.pn_data_get_int(data))
-	case C.PN_CHAR:
-		*v = uint8(C.pn_data_get_char(data))
-	case C.PN_ULONG:
-		*v = uint64(C.pn_data_get_ulong(data))
-	case C.PN_LONG:
-		*v = int64(C.pn_data_get_long(data))
-	case C.PN_FLOAT:
-		*v = float32(C.pn_data_get_float(data))
-	case C.PN_DOUBLE:
-		*v = float64(C.pn_data_get_double(data))
-	case C.PN_BINARY:
-		*v = Binary(goBytes(C.pn_data_get_binary(data)))
-	case C.PN_STRING:
-		*v = goString(C.pn_data_get_string(data))
-	case C.PN_SYMBOL:
-		*v = Symbol(goString(C.pn_data_get_symbol(data)))
-	case C.PN_MAP:
-		m := make(Map)
-		get(data, &m)
-		*v = m // FIXME aconway 2015-03-13: avoid the copy?
-	case C.PN_LIST:
-		l := make(List, 0)
-		get(data, &l)
-		*v = l // FIXME aconway 2015-03-13: avoid the copy?
-	default:
-		panic(newBadUnmarshal(pnType, v))
-	}
-}
-
-// get into map pointed at by v
-func getMap(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_MAP {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	mapValue := reflect.ValueOf(v).Elem()
-	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
-	count := int(C.pn_data_get_map(data))
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count/2; i++ {
-			if bool(C.pn_data_next(data)) {
-				key := reflect.New(mapValue.Type().Key())
-				get(data, key.Interface())
-				if bool(C.pn_data_next(data)) {
-					val := reflect.New(mapValue.Type().Elem())
-					get(data, val.Interface())
-					mapValue.SetMapIndex(key.Elem(), val.Elem())
-				}
-			}
-		}
-		C.pn_data_exit(data)
-	}
-}
-
-func getList(data *C.pn_data_t, v interface{}) {
-	pnType := C.pn_data_type(data)
-	if pnType != C.PN_LIST {
-		panic(newBadUnmarshal(pnType, v))
-	}
-	count := int(C.pn_data_get_list(data))
-	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
-	if bool(C.pn_data_enter(data)) {
-		for i := 0; i < count; i++ {
-			if bool(C.pn_data_next(data)) {
-				val := reflect.New(listValue.Type().Elem())
-				get(data, val.Interface())
-				listValue.Index(i).Set(val.Elem())
-			}
-		}
-		C.pn_data_exit(data)
-	}
-	// FIXME aconway 2015-04-09: avoid the copy?
-	reflect.ValueOf(v).Elem().Set(listValue)
-}
-
-// decode from bytes.
-// Return bytes decoded or 0 if we could not decode a complete object.
-//
-func decode(data *C.pn_data_t, bytes []byte) int {
-	if len(bytes) == 0 {
-		return 0
-	}
-	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
-	if n == int(C.PN_UNDERFLOW) {
-		C.pn_error_clear(C.pn_data_error(data))
-		return 0
-	} else if n <= 0 {
-		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
-	}
-	return n
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/url.go
----------------------------------------------------------------------
diff --git a/go/amqp/url.go b/go/amqp/url.go
deleted file mode 100644
index 58711c7..0000000
--- a/go/amqp/url.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-/*
-#include <stdlib.h>
-#include <string.h>
-#include <proton/url.h>
-
-// Helper function for setting URL fields.
-typedef void (*setter_fn)(pn_url_t* url, const char* value);
-inline void	set(pn_url_t *url, setter_fn s, const char* value) {
-  s(url, value);
-}
-*/
-import "C"
-
-import (
-	"net"
-	"net/url"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-const (
-	amqp  string = "amqp"
-	amqps        = "amqps"
-)
-
-// ParseUrl parses an AMQP URL string and returns a net/url.Url.
-//
-// It is more forgiving than net/url.Parse and allows most of the parts of the
-// URL to be missing, assuming AMQP defaults.
-//
-func ParseURL(s string) (u *url.URL, err error) {
-	cstr := C.CString(s)
-	defer C.free(unsafe.Pointer(cstr))
-	pnUrl := C.pn_url_parse(cstr)
-	if pnUrl == nil {
-		return nil, internal.Errorf("bad URL %#v", s)
-	}
-	defer C.pn_url_free(pnUrl)
-
-	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
-	username := C.GoString(C.pn_url_get_username(pnUrl))
-	password := C.GoString(C.pn_url_get_password(pnUrl))
-	host := C.GoString(C.pn_url_get_host(pnUrl))
-	port := C.GoString(C.pn_url_get_port(pnUrl))
-	path := C.GoString(C.pn_url_get_path(pnUrl))
-
-	if err != nil {
-		return nil, internal.Errorf("bad URL %#v: %s", s, err)
-	}
-	if scheme == "" {
-		scheme = amqp
-	}
-	if port == "" {
-		if scheme == amqps {
-			port = amqps
-		} else {
-			port = amqp
-		}
-	}
-	var user *url.Userinfo
-	if password != "" {
-		user = url.UserPassword(username, password)
-	} else if username != "" {
-		user = url.User(username)
-	}
-
-	u = &url.URL{
-		Scheme: scheme,
-		User:   user,
-		Host:   net.JoinHostPort(host, port),
-		Path:   path,
-	}
-
-	return u, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/go/amqp/url_test.go b/go/amqp/url_test.go
deleted file mode 100644
index f80f1c4..0000000
--- a/go/amqp/url_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"fmt"
-)
-
-func ExampleParseURL() {
-	for _, s := range []string{
-		"amqp://username:password@host:1234/path",
-		"host:1234",
-		"host",
-		":1234",
-		"host/path",
-		"amqps://host",
-		"",
-	} {
-		u, err := ParseURL(s)
-		if err != nil {
-			fmt.Println(err)
-		} else {
-			fmt.Println(u)
-		}
-	}
-	// Output:
-	// amqp://username:password@host:1234/path
-	// amqp://host:1234
-	// amqp://host:amqp
-	// amqp://:1234
-	// amqp://host:amqp/path
-	// amqps://host:amqps
-	// proton: bad URL ""
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/doc.go
----------------------------------------------------------------------
diff --git a/go/event/doc.go b/go/event/doc.go
deleted file mode 100644
index 7a9ec12..0000000
--- a/go/event/doc.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package event provides a low-level API to the proton AMQP engine.
-
-For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
-It provides a higher-level, concurrent API that is easier to use.
-
-The API is event based. There are two alternative styles of handler. EventHandler
-provides the core proton events. MessagingHandler provides a slighly simplified
-view of the event stream and automates some common tasks.
-
-See type Pump documentation for more details of the interaction between proton
-events and goroutines.
-*/
-package event
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/genwrap.go
----------------------------------------------------------------------
diff --git a/go/event/genwrap.go b/go/event/genwrap.go
deleted file mode 100644
index 094b196..0000000
--- a/go/event/genwrap.go
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Code generator to generate a thin Go wrapper API around the C proton API.
-//
-
-package main
-
-import (
-	"flag"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path"
-	"regexp"
-	"strings"
-	"text/template"
-)
-
-func mixedCase(s string) string {
-	result := ""
-	for _, w := range strings.Split(s, "_") {
-		if w != "" {
-			result = result + strings.ToUpper(w[0:1]) + strings.ToLower(w[1:])
-		}
-	}
-	return result
-}
-
-func mixedCaseTrim(s, prefix string) string {
-	return mixedCase(strings.TrimPrefix(s, prefix))
-}
-
-var templateFuncs = template.FuncMap{"mixedCase": mixedCase, "mixedCaseTrim": mixedCaseTrim}
-
-func doTemplate(out io.Writer, data interface{}, tmpl string) {
-	panicIf(template.Must(template.New("").Funcs(templateFuncs).Parse(tmpl)).Execute(out, data))
-}
-
-type enumType struct {
-	Name   string
-	Values []string
-}
-
-// Find enums in a header file return map of enum name to values.
-func findEnums(header string) (enums []enumType) {
-	for _, enum := range enumDefRe.FindAllStringSubmatch(header, -1) {
-		enums = append(enums, enumType{enum[2], enumValRe.FindAllString(enum[1], -1)})
-	}
-	return enums
-}
-
-func genEnum(out io.Writer, name string, values []string) {
-	doTemplate(out, []interface{}{name, values}, `{{$enumName := index . 0}}{{$values := index . 1}}
-type {{mixedCase $enumName}} C.pn_{{$enumName}}_t
-const ({{range $values}}
-	{{mixedCase .}} {{mixedCase $enumName}} = C.{{.}} {{end}}
-)
-
-func (e {{mixedCase $enumName}}) String() string {
-	switch e {
-{{range $values}}
-	case C.{{.}}: return "{{mixedCaseTrim . "PN_"}}" {{end}}
-	}
-	return "unknown"
-}
-`)
-}
-
-var (
-	reSpace = regexp.MustCompile("\\s+")
-)
-
-func panicIf(err error) {
-	if err != nil {
-		panic(err)
-	}
-}
-
-func readHeader(name string) string {
-	file, err := os.Open(path.Join(*includeProton, name+".h"))
-	panicIf(err)
-	defer file.Close()
-	s, err := ioutil.ReadAll(file)
-	panicIf(err)
-	return string(s)
-}
-
-var copyright string = `/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-//
-// NOTE: This file was generated by genwrap.go, do not edit it by hand.
-//
-`
-
-type eventType struct {
-	// C, function and interface names for the event
-	Name, Cname, Fname, Iname string
-}
-
-func newEventType(cName string) eventType {
-	var etype eventType
-	etype.Cname = cName
-	etype.Name = mixedCaseTrim(cName, "PN_")
-	etype.Fname = "On" + etype.Name
-	etype.Iname = etype.Fname + "Interface"
-	return etype
-}
-
-var (
-	enumDefRe   = regexp.MustCompile("typedef enum {([^}]*)} pn_([a-z_]+)_t;")
-	enumValRe   = regexp.MustCompile("PN_[A-Z_]+")
-	skipEventRe = regexp.MustCompile("EVENT_NONE|REACTOR|SELECTABLE|TIMER")
-	skipFnRe    = regexp.MustCompile("attach|context|class|collect|^recv$|^send$|transport")
-)
-
-// Generate event wrappers.
-func event(out io.Writer) {
-	event_h := readHeader("event")
-
-	// Event is implented by hand in wrappers.go
-
-	// Get all the pn_event_type_t enum values
-	var etypes []eventType
-	enums := findEnums(event_h)
-	for _, e := range enums[0].Values {
-		if skipEventRe.FindStringSubmatch(e) == nil {
-			etypes = append(etypes, newEventType(e))
-		}
-	}
-
-	doTemplate(out, etypes, `
-type EventType int
-const ({{range .}}
-	 E{{.Name}} EventType = C.{{.Cname}}{{end}}
-)
-`)
-
-	doTemplate(out, etypes, `
-func (e EventType) String() string {
-	switch e {
-{{range .}}
-	case C.{{.Cname}}: return "{{.Name}}"{{end}}
-	}
-	return "Unknown"
-}
-`)
-}
-
-type genType struct {
-	Ctype, Gotype string
-	ToGo          func(value string) string
-	ToC           func(value string) string
-	Assign        func(value string) string
-}
-
-func (g genType) printBody(out io.Writer, value string) {
-	if g.Gotype != "" {
-		fmt.Fprintf(out, "return %s", g.ToGo(value))
-	} else {
-		fmt.Fprintf(out, "%s", value)
-	}
-}
-
-func (g genType) goLiteral(value string) string {
-	return fmt.Sprintf("%s{%s}", g.Gotype, value)
-}
-
-func (g genType) goConvert(value string) string {
-	switch g.Gotype {
-	case "string":
-		return fmt.Sprintf("C.GoString(%s)", value)
-	case "Event":
-		return fmt.Sprintf("makeEvent(%s)", value)
-	default:
-		return fmt.Sprintf("%s(%s)", g.Gotype, value)
-	}
-}
-
-var notStruct = map[string]bool{
-	"EventType":        true,
-	"SndSettleMode":    true,
-	"RcvSettleMode":    true,
-	"TerminusType":     true,
-	"State":            true,
-	"Durability":       true,
-	"ExpiryPolicy":     true,
-	"DistributionMode": true,
-}
-
-func mapType(ctype string) (g genType) {
-	g.Ctype = "C." + strings.Trim(ctype, " \n")
-
-	switch g.Ctype {
-	case "C.void":
-		g.Gotype = ""
-	case "C.size_t":
-		g.Gotype = "uint"
-	case "C.int":
-		g.Gotype = "int"
-	case "C.void *":
-		g.Gotype = "unsafe.Pointer"
-		g.Ctype = "unsafe.Pointer"
-	case "C.bool":
-		g.Gotype = "bool"
-	case "C.ssize_t":
-		g.Gotype = "int"
-	case "C.uint64_t":
-		g.Gotype = "uint64"
-	case "C.uint32_t":
-		g.Gotype = "uint16"
-	case "C.uint16_t":
-		g.Gotype = "uint32"
-	case "C.const char *":
-		fallthrough
-	case "C.char *":
-		g.Gotype = "string"
-		g.Ctype = "C.CString"
-		g.ToC = func(v string) string { return fmt.Sprintf("%sC", v) }
-		g.Assign = func(v string) string {
-			return fmt.Sprintf("%sC := C.CString(%s)\n defer C.free(unsafe.Pointer(%sC))\n", v, v, v)
-		}
-	case "C.pn_seconds_t":
-		g.Gotype = "time.Duration"
-		g.ToGo = func(v string) string { return fmt.Sprintf("(time.Duration(%s) * time.Second)", v) }
-	case "C.pn_error_t *":
-		g.Gotype = "error"
-		g.ToGo = func(v string) string { return fmt.Sprintf("internal.PnError(unsafe.Pointer(%s))", v) }
-	default:
-		pnId := regexp.MustCompile(" *pn_([a-z_]+)_t *\\*? *")
-		match := pnId.FindStringSubmatch(g.Ctype)
-		if match == nil {
-			panic(fmt.Errorf("unknown C type %#v", g.Ctype))
-		}
-		g.Gotype = mixedCase(match[1])
-		if !notStruct[g.Gotype] {
-			g.ToGo = g.goLiteral
-			g.ToC = func(v string) string { return v + ".pn" }
-		}
-	}
-	if g.ToGo == nil {
-		g.ToGo = g.goConvert // Use conversion by default.
-	}
-	if g.ToC == nil {
-		g.ToC = func(v string) string { return fmt.Sprintf("%s(%s)", g.Ctype, v) }
-	}
-	return
-}
-
-type genArg struct {
-	Name string
-	genType
-}
-
-var typeNameRe = regexp.MustCompile("^(.*( |\\*))([^ *]+)$")
-
-func splitArgs(argstr string) []genArg {
-	argstr = strings.Trim(argstr, " \n")
-	if argstr == "" {
-		return []genArg{}
-	}
-	args := make([]genArg, 0)
-	for _, item := range strings.Split(argstr, ",") {
-		item = strings.Trim(item, " \n")
-		typeName := typeNameRe.FindStringSubmatch(item)
-		if typeName == nil {
-			panic(fmt.Errorf("Can't split argument type/name %#v", item))
-		}
-		cType := strings.Trim(typeName[1], " \n")
-		name := strings.Trim(typeName[3], " \n")
-		if name == "type" {
-			name = "type_"
-		}
-		args = append(args, genArg{name, mapType(cType)})
-	}
-	return args
-}
-
-func goArgs(args []genArg) string {
-	l := ""
-	for i, arg := range args {
-		if i != 0 {
-			l += ", "
-		}
-		l += arg.Name + " " + arg.Gotype
-	}
-	return l
-}
-
-func cArgs(args []genArg) string {
-	l := ""
-	for _, arg := range args {
-		l += fmt.Sprintf(", %s", arg.ToC(arg.Name))
-	}
-	return l
-}
-
-func cAssigns(args []genArg) string {
-	l := "\n"
-	for _, arg := range args {
-		if arg.Assign != nil {
-			l += fmt.Sprintf("%s\n", arg.Assign(arg.Name))
-		}
-	}
-	return l
-}
-
-// Return the go name of the function or "" to skip the function.
-func goFnName(api, fname string) string {
-	// Skip class, context and attachment functions.
-	if skipFnRe.FindStringSubmatch(fname) != nil {
-		return ""
-	}
-	switch api + "." + fname {
-	case "link.get_drain":
-		return "IsDrain"
-	default:
-		return mixedCaseTrim(fname, "get_")
-	}
-}
-
-func apiWrapFns(api, header string, out io.Writer) {
-	fmt.Fprintf(out, "type %s struct{pn *C.pn_%s_t}\n", mixedCase(api), api)
-	fmt.Fprintf(out, "func (%c %s) IsNil() bool { return %c.pn == nil }\n", api[0], mixedCase(api), api[0])
-	fn := regexp.MustCompile(fmt.Sprintf(`PN_EXTERN ([a-z0-9_ ]+ *\*?) *pn_%s_([a-z_]+)\(pn_%s_t *\*[a-z_]+ *,? *([^)]*)\)`, api, api))
-	for _, m := range fn.FindAllStringSubmatch(header, -1) {
-		rtype, fname, argstr := mapType(m[1]), m[2], m[3]
-		gname := goFnName(api, fname)
-		if gname == "" { // Skip
-			continue
-		}
-		args := splitArgs(argstr)
-		fmt.Fprintf(out, "func (%c %s) %s", api[0], mixedCase(api), gname)
-		fmt.Fprintf(out, "(%s) %s { ", goArgs(args), rtype.Gotype)
-		fmt.Fprint(out, cAssigns(args))
-		rtype.printBody(out, fmt.Sprintf("C.pn_%s_%s(%c.pn%s)", api, fname, api[0], cArgs(args)))
-		fmt.Fprintf(out, "}\n")
-	}
-}
-
-var includeProton = flag.String("include", "", "path to proton include files, including /proton")
-
-func main() {
-	flag.Parse()
-	outpath := "wrappers_gen.go"
-	out, err := os.Create(outpath)
-	panicIf(err)
-	defer out.Close()
-
-	apis := []string{"session", "link", "delivery", "disposition", "condition", "terminus", "connection"}
-	fmt.Fprintln(out, copyright)
-	fmt.Fprint(out, `
-package event
-
-import (
-	"time"
-  "unsafe"
-  "qpid.apache.org/proton/go/internal"
-)
-
-// #include <proton/types.h>
-// #include <proton/event.h>
-// #include <stdlib.h>
-`)
-	for _, api := range apis {
-		fmt.Fprintf(out, "// #include <proton/%s.h>\n", api)
-	}
-	fmt.Fprintln(out, `import "C"`)
-
-	event(out)
-
-	for _, api := range apis {
-		fmt.Fprintf(out, "// Wrappers for declarations in %s.h\n\n", api)
-		header := readHeader(api)
-		enums := findEnums(header)
-		for _, e := range enums {
-			genEnum(out, e.Name, e.Values)
-		}
-		apiWrapFns(api, header, out)
-	}
-	out.Close()
-
-	// Run gofmt.
-	cmd := exec.Command("gofmt", "-w", outpath)
-	cmd.Stdout = os.Stdout
-	cmd.Stderr = os.Stderr
-	err = cmd.Run()
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "gofmt: %s", err)
-		os.Exit(1)
-	}
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[15/36] qpid-proton git commit: PROTON-827: go binding: enable use of 'go get', reorganize packages names and layout.

Posted by ac...@apache.org.
PROTON-827: go binding: enable use of 'go get', reorganize packages names and layout.

Based on better understanding of Go workspaces and go get.

- bindings/go directory holds source, NOT the workspace.
- added go-import <meta> tags and stubs on qpid site to enable `go get qpid.apache.org/proton/go/...`
- added go symlink in root of proton repo for shorter package names
- renamed package imports qpid.apache.org/proton/go/...
- updated README.md files
- renamed branch "go" to "go1", go get will pick up this branch.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/7bc3e0e5
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/7bc3e0e5
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/7bc3e0e5

Branch: refs/heads/master
Commit: 7bc3e0e5c05ee868bdf303c5a431cea9340c6dbf
Parents: d8129ac
Author: Alan Conway <ac...@redhat.com>
Authored: Wed May 13 13:26:43 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 28 17:14:37 2015 -0400

----------------------------------------------------------------------
 examples/go/README.md                       |  92 +++
 examples/go/event/broker.go                 | 255 ++++++++
 examples/go/example_test.go                 | 272 +++++++++
 examples/go/receive.go                      |  16 +-
 examples/go/send.go                         |  10 +-
 go                                          |   1 +
 proton-c/bindings/go/README.md              | 138 +++++
 proton-c/bindings/go/amqp/doc.go            |  40 ++
 proton-c/bindings/go/amqp/interop           |   1 +
 proton-c/bindings/go/amqp/interop_test.go   | 308 ++++++++++
 proton-c/bindings/go/amqp/marshal.go        | 238 ++++++++
 proton-c/bindings/go/amqp/message.go        | 342 +++++++++++
 proton-c/bindings/go/amqp/message_test.go   |  90 +++
 proton-c/bindings/go/amqp/types.go          | 193 ++++++
 proton-c/bindings/go/amqp/uid.go            |  40 ++
 proton-c/bindings/go/amqp/unmarshal.go      | 552 +++++++++++++++++
 proton-c/bindings/go/amqp/url.go            |  96 +++
 proton-c/bindings/go/amqp/url_test.go       |  51 ++
 proton-c/bindings/go/event/doc.go           |  38 ++
 proton-c/bindings/go/event/handlers.go      | 411 +++++++++++++
 proton-c/bindings/go/event/message.go       |  75 +++
 proton-c/bindings/go/event/pump.go          | 357 +++++++++++
 proton-c/bindings/go/event/wrappers.go      | 253 ++++++++
 proton-c/bindings/go/event/wrappers_gen.go  | 732 +++++++++++++++++++++++
 proton-c/bindings/go/internal/error.go      | 125 ++++
 proton-c/bindings/go/messaging/doc.go       |  28 +
 proton-c/bindings/go/messaging/handler.go   |  70 +++
 proton-c/bindings/go/messaging/messaging.go | 250 ++++++++
 28 files changed, 5061 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/examples/go/README.md
----------------------------------------------------------------------
diff --git a/examples/go/README.md b/examples/go/README.md
new file mode 100644
index 0000000..8acef36
--- /dev/null
+++ b/examples/go/README.md
@@ -0,0 +1,92 @@
+# Go examples for proton
+
+There are 3 go packages for proton:
+
+- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
+- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+
+Most applications should use the `messaging` package. The `event` package is for
+applications that need low-level access to the proton engine.
+
+## messaging examples
+
+- [receive.go](receive.go) receive from many connections concurrently.
+- [send.go](send.go) send to many connections concurrently.
+
+## event examples
+
+- [broker.go](event/broker.go) simple mini-broker, queues are created automatically.
+
+## Installing the proton Go packages
+
+You need to install proton in a standard place such as `/usr` or `/usr/local` so go
+can find the proton C headers and libraries to build the C parts of the packages.
+
+You should create a go workspace and set GOPATH as described in https://golang.org/doc/code.html
+
+To get the proton packages into your workspace you can clone the proton repository like this:
+
+    git clone https://git.apache.org/qpid-proton.git $GOPATH/src/qpid.apache.org/proton
+
+If you prefer to keep your proton clone elsewhere you can create a symlink to it in your workspace.
+
+You can also use `go get` as follows:
+
+    go get qpid.apache.org/proton/go/messaging
+
+Once installed you can use godoc to look at docmentation on the commane line or start a
+godoc web server like this:
+
+	godoc -http=:6060
+
+And look at the docs in your browser.
+
+Right now the layout of the documentation is a bit messed up, showing the long
+path for imports, i.e.
+
+    qpid.apache.org/proton/proton-c/bindings/go/amqp
+
+In your code you should use:
+
+    qpid.apache.org/proton/go/amqp
+
+
+## Running the examples
+
+You can run the examples directly from source like this:
+
+    go run <program>.go
+
+This is a little slow (a couple of seconds) as it compiles the program and runs it in one step.
+You can compile the program first and then run the executable to avoid the delay:
+
+    go build <program>.go
+    ./<program>
+
+All the examples take a `-h` flag to show usage information, and the comments in
+the example source have more details.
+
+First start the broker:
+
+    go run event/broker.go
+
+Send messages concurrently to queues "foo" and "bar", 10 messages to each queue:
+
+    go run go/send.go -count 10 localhost:/foo localhost:/bar
+
+Receive messages concurrently from "foo" and "bar". Note -count 20 for 10 messages each on 2 queues:
+
+    go run go/receive.go -count 20 localhost:/foo localhost:/bar
+
+The broker and clients use the amqp port on the local host by default, to use a
+different address use the `-addr host:port` flag.
+
+You can mix it up by running the Go clients with the python broker:
+
+    python ../python/broker.py
+
+Or use the Go broker and the python clients:
+
+    python ../python/simple_send.py
+    python ../python/simple_recv.py`.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/examples/go/event/broker.go
----------------------------------------------------------------------
diff --git a/examples/go/event/broker.go b/examples/go/event/broker.go
new file mode 100644
index 0000000..0cb4bfa
--- /dev/null
+++ b/examples/go/event/broker.go
@@ -0,0 +1,255 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// This is a simple AMQP broker implemented using the event-handler interface.
+//
+// It maintains a set of named in-memory queues of messages. Clients can send
+// messages to queues or subscribe to receive messages from them.
+//
+//
+
+package main
+
+import (
+	"container/list"
+	"flag"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"log"
+	"net"
+	"os"
+	"path"
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+	"sync"
+)
+
+// Command-line flags
+var addr = flag.String("addr", ":amqp", "Listening address")
+var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
+var full = flag.Bool("full", false, "Print full message not just body.")
+
+func main() {
+	flag.Usage = func() {
+		fmt.Fprintf(os.Stderr, `
+Usage: %s
+A simple broker-like demo. Queues are created automatically for sender or receiver addrsses.
+`, os.Args[0])
+		flag.PrintDefaults()
+	}
+	flag.Parse()
+	b := newBroker()
+	err := b.listen(*addr)
+	fatalIf(err)
+}
+
+// queue is a structure representing a queue.
+type queue struct {
+	name      string              // Name of queue
+	messages  *list.List          // List of event.Message
+	consumers map[event.Link]bool // Set of consumer links
+}
+
+type logLink event.Link // Wrapper to print links in format for logging
+
+func (ll logLink) String() string {
+	l := event.Link(ll)
+	return fmt.Sprintf("%s[%p]", l.Name(), l.Session().Connection().Pump())
+}
+
+func (q *queue) subscribe(link event.Link) {
+	debug.Printf("link %s subscribed to queue %s", logLink(link), q.name)
+	q.consumers[link] = true
+}
+
+func (q *queue) unsubscribe(link event.Link) {
+	debug.Printf("link %s unsubscribed from queue %s", logLink(link), q.name)
+	delete(q.consumers, link)
+}
+
+func (q *queue) empty() bool {
+	return len(q.consumers) == 0 && q.messages.Len() == 0
+}
+
+func (q *queue) push(context *event.Pump, message amqp.Message) {
+	q.messages.PushBack(message)
+	q.pop(context)
+}
+
+func (q *queue) popTo(context *event.Pump, link event.Link) bool {
+	if q.messages.Len() != 0 && link.Credit() > 0 {
+		message := q.messages.Remove(q.messages.Front()).(amqp.Message)
+		debug.Printf("link %s <- queue %s: %s", logLink(link), q.name, formatMessage{message})
+		// The first return parameter is an event.Delivery.
+		// The Deliver can be used to track message status, e.g. so we can re-delver on failure.
+		// This demo broker doesn't do that.
+		linkPump := link.Session().Connection().Pump()
+		if context == linkPump {
+			if context == nil {
+				log.Fatal("pop in nil context")
+			}
+			link.Send(message) // link is in the current pump, safe to call Send() direct
+		} else {
+			linkPump.Inject <- func() { // Inject to link's pump
+				link.Send(message) // FIXME aconway 2015-05-04: error handlig
+			}
+		}
+		return true
+	}
+	return false
+}
+
+func (q *queue) pop(context *event.Pump) (popped bool) {
+	for c, _ := range q.consumers {
+		popped = popped || q.popTo(context, c)
+	}
+	return
+}
+
+// broker implements event.MessagingHandler and reacts to events by moving messages on or off queues.
+type broker struct {
+	queues map[string]*queue
+	lock   sync.Mutex // FIXME aconway 2015-05-04: un-golike, better broker coming...
+}
+
+func newBroker() *broker {
+	return &broker{queues: make(map[string]*queue)}
+}
+
+func (b *broker) getQueue(name string) *queue {
+	q := b.queues[name]
+	if q == nil {
+		debug.Printf("Create queue %s", name)
+		q = &queue{name, list.New(), make(map[event.Link]bool)}
+		b.queues[name] = q
+	}
+	return q
+}
+
+func (b *broker) unsubscribe(l event.Link) {
+	if l.IsSender() {
+		q := b.queues[l.RemoteSource().Address()]
+		if q != nil {
+			q.unsubscribe(l)
+			if q.empty() {
+				debug.Printf("Delete queue %s", q.name)
+				delete(b.queues, q.name)
+			}
+		}
+	}
+}
+
+func (b *broker) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
+	// FIXME aconway 2015-05-04: locking is un-golike, better example coming soon.
+	// Needed because the same handler is used for multiple connections concurrently
+	// and the queue data structures are not thread safe.
+	b.lock.Lock()
+	defer b.lock.Unlock()
+
+	switch t {
+
+	case event.MLinkOpening:
+		if e.Link().IsSender() {
+			q := b.getQueue(e.Link().RemoteSource().Address())
+			q.subscribe(e.Link())
+		}
+
+	case event.MLinkDisconnected, event.MLinkClosing:
+		b.unsubscribe(e.Link())
+
+	case event.MSendable:
+		q := b.getQueue(e.Link().RemoteSource().Address())
+		q.popTo(e.Connection().Pump(), e.Link())
+
+	case event.MMessage:
+		m, err := event.DecodeMessage(e)
+		fatalIf(err)
+		qname := e.Link().RemoteTarget().Address()
+		debug.Printf("link %s -> queue %s: %s", logLink(e.Link()), qname, formatMessage{m})
+		b.getQueue(qname).push(e.Connection().Pump(), m)
+	}
+	return nil
+}
+
+func (b *broker) listen(addr string) (err error) {
+	// Use the standard Go "net" package to listen for connections.
+	listener, err := net.Listen("tcp", addr)
+	if err != nil {
+		return err
+	}
+	info.Printf("Listening on %s", listener.Addr())
+	defer listener.Close()
+	for {
+		conn, err := listener.Accept()
+		if err != nil {
+			info.Printf("Accept error: %s", err)
+			continue
+		}
+		pump, err := event.NewPump(conn, event.NewMessagingDelegator(b))
+		fatalIf(err)
+		info.Printf("Accepted %s[%p]", pump, pump)
+		pump.Server()
+		go func() {
+			pump.Run()
+			if pump.Error == nil {
+				info.Printf("Closed %s", pump)
+			} else {
+				info.Printf("Closed %s: %s", pump, pump.Error)
+			}
+		}()
+	}
+}
+
+// Logging
+func logger(prefix string, level int, w io.Writer) *log.Logger {
+	if *verbose >= level {
+		return log.New(w, prefix, 0)
+	}
+	return log.New(ioutil.Discard, "", 0)
+}
+
+var info, debug *log.Logger
+
+func init() {
+	flag.Parse()
+	name := path.Base(os.Args[0])
+	log.SetFlags(0)
+	log.SetPrefix(fmt.Sprintf("%s: ", name))                      // Log errors on stderr.
+	info = logger(fmt.Sprintf("%s: ", name), 1, os.Stdout)        // Log info on stdout.
+	debug = logger(fmt.Sprintf("%s debug: ", name), 2, os.Stderr) // Log debug on stderr.
+}
+
+// Simple error handling for demo.
+func fatalIf(err error) {
+	if err != nil {
+		log.Fatal(err)
+	}
+}
+
+type formatMessage struct{ m amqp.Message }
+
+func (fm formatMessage) String() string {
+	if *full {
+		return fmt.Sprintf("%#v", fm.m)
+	} else {
+		return fmt.Sprintf("%#v", fm.m.Body())
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/examples/go/example_test.go
----------------------------------------------------------------------
diff --git a/examples/go/example_test.go b/examples/go/example_test.go
new file mode 100644
index 0000000..e059c28
--- /dev/null
+++ b/examples/go/example_test.go
@@ -0,0 +1,272 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Tests to verify that example code behaves as expected.
+// Run in this directory with `go test example_test.go`
+//
+package main
+
+import (
+	"bufio"
+	"bytes"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"math/rand"
+	"net"
+	"os"
+	"os/exec"
+	"path"
+	"path/filepath"
+	"reflect"
+	"testing"
+	"time"
+)
+
+func panicIf(err error) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+// A demo broker process
+type broker struct {
+	cmd    *exec.Cmd
+	addr   string
+	runerr chan error
+	err    error
+}
+
+// Try to connect to the broker to verify it is ready, give up after a timeout
+func (b *broker) check() error {
+	dialer := net.Dialer{Deadline: time.Now().Add(time.Second * 10)}
+	for {
+		c, err := dialer.Dial("tcp", b.addr)
+		if err == nil { // Success
+			c.Close()
+			return nil
+		}
+		select {
+		case runerr := <-b.runerr: // Broker exited.
+			return runerr
+		default:
+		}
+		if neterr, ok := err.(net.Error); ok && neterr.Timeout() { // Running but timed out
+			b.stop()
+			return fmt.Errorf("timed out waiting for broker")
+		}
+		time.Sleep(time.Second / 10)
+	}
+}
+
+// Start the demo broker, wait till it is listening on *addr. No-op if already started.
+func (b *broker) start() error {
+	build("event/broker.go")
+	if b.cmd == nil { // Not already started
+		// FIXME aconway 2015-04-30: better way to pick/configure a broker port.
+		b.addr = fmt.Sprintf("127.0.0.1:%d", rand.Intn(10000)+10000)
+		b.cmd = exec.Command(exepath("broker"), "-addr", b.addr, "-verbose", "0")
+		b.runerr = make(chan error)
+		// Change the -verbose setting above to see broker output on stdout/stderr.
+		b.cmd.Stderr, b.cmd.Stdout = os.Stderr, os.Stdout
+		go func() {
+			b.runerr <- b.cmd.Run()
+		}()
+		b.err = b.check()
+	}
+	return b.err
+}
+
+func (b *broker) stop() {
+	if b != nil && b.cmd != nil {
+		b.cmd.Process.Kill()
+		b.cmd.Wait()
+	}
+}
+
+func checkEqual(want interface{}, got interface{}) error {
+	if reflect.DeepEqual(want, got) {
+		return nil
+	}
+	return fmt.Errorf("%#v != %#v", want, got)
+}
+
+// runCommand returns an exec.Cmd to run an example.
+func exampleCommand(prog string, arg ...string) *exec.Cmd {
+	build(prog + ".go")
+	cmd := exec.Command(exepath(prog), arg...)
+	cmd.Stderr = os.Stderr
+	return cmd
+}
+
+// Run an example Go program, return the combined output as a string.
+func runExample(prog string, arg ...string) (string, error) {
+	cmd := exampleCommand(prog, arg...)
+	out, err := cmd.Output()
+	return string(out), err
+}
+
+func prefix(prefix string, err error) error {
+	if err != nil {
+		return fmt.Errorf("%s: %s", prefix, err)
+	}
+	return nil
+}
+
+func runExampleWant(want string, prog string, args ...string) error {
+	out, err := runExample(prog, args...)
+	if err != nil {
+		return fmt.Errorf("%s failed: %s: %s", prog, err, out)
+	}
+	return prefix(prog, checkEqual(want, out))
+}
+
+func exampleArgs(args ...string) []string {
+	return append(args, testBroker.addr+"/foo", testBroker.addr+"/bar", testBroker.addr+"/baz")
+}
+
+// Send then receive
+func TestExampleSendReceive(t *testing.T) {
+	if testing.Short() {
+		t.Skip("Skip demo tests in short mode")
+	}
+	testBroker.start()
+	err := runExampleWant(
+		"send: Received all 15 acknowledgements\n",
+		"send",
+		exampleArgs("-count", "5", "-verbose", "1")...)
+	if err != nil {
+		t.Fatal(err)
+	}
+	err = runExampleWant(
+		"receive: Listening\nreceive: Received 15 messages\n",
+		"receive",
+		exampleArgs("-verbose", "1", "-count", "15")...)
+	if err != nil {
+		t.Fatal(err)
+	}
+}
+
+var ready error
+
+func init() { ready = fmt.Errorf("Ready") }
+
+// Run receive in a goroutine.
+// Send ready on errchan when it is listening.
+// Send final error when it is done.
+// Returns the Cmd, caller must Wait()
+func goReceiveWant(errchan chan<- error, want string, arg ...string) *exec.Cmd {
+	cmd := exampleCommand("receive", arg...)
+	go func() {
+		pipe, err := cmd.StdoutPipe()
+		if err != nil {
+			errchan <- err
+			return
+		}
+		out := bufio.NewReader(pipe)
+		cmd.Start()
+		line, err := out.ReadString('\n')
+		if err != nil && err != io.EOF {
+			errchan <- err
+			return
+		}
+		listening := "receive: Listening\n"
+		if line != listening {
+			errchan <- checkEqual(listening, line)
+			return
+		}
+		errchan <- ready
+		buf := bytes.Buffer{}
+		io.Copy(&buf, out) // Collect the rest of the output
+		errchan <- checkEqual(want, buf.String())
+		close(errchan)
+	}()
+	return cmd
+}
+
+// Start receiver first, wait till it is running, then send.
+func TestExampleReceiveSend(t *testing.T) {
+	if testing.Short() {
+		t.Skip("Skip demo tests in short mode")
+	}
+	testBroker.start()
+	recvErr := make(chan error)
+	recvCmd := goReceiveWant(recvErr,
+		"receive: Received 15 messages\n",
+		exampleArgs("-count", "15", "-verbose", "1")...)
+	defer func() {
+		recvCmd.Process.Kill()
+		recvCmd.Wait()
+	}()
+	if err := <-recvErr; err != ready { // Wait for receiver ready
+		t.Fatal(err)
+	}
+	err := runExampleWant(
+		"send: Received all 15 acknowledgements\n",
+		"send",
+		exampleArgs("-count", "5", "-verbose", "1")...)
+	if err != nil {
+		t.Fatal(err)
+	}
+	if err := <-recvErr; err != nil {
+		t.Fatal(err)
+	}
+}
+
+func exepath(relative string) string {
+	if binDir == "" {
+		panic("bindir not set, cannot run example binaries")
+	}
+	return path.Join(binDir, relative)
+}
+
+var testBroker *broker
+var binDir, exampleDir string
+var built map[string]bool
+
+func init() {
+	built = make(map[string]bool)
+}
+
+func build(prog string) {
+	if !built[prog] {
+		build := exec.Command("go", "build", path.Join(exampleDir, prog))
+		build.Dir = binDir
+		out, err := build.CombinedOutput()
+		if err != nil {
+			panic(fmt.Errorf("%v: %s", err, out))
+		}
+		built[prog] = true
+	}
+}
+
+func TestMain(m *testing.M) {
+	rand.Seed(time.Now().UTC().UnixNano())
+	var err error
+	exampleDir, err = filepath.Abs(".")
+	panicIf(err)
+	binDir, err = ioutil.TempDir("", "example_test.go")
+	panicIf(err)
+	defer os.Remove(binDir) // Clean up binaries
+	testBroker = &broker{}  // Broker is started on-demand by tests.
+	testBroker.stop()
+	status := m.Run()
+	testBroker.stop()
+	os.Exit(status)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/examples/go/receive.go
----------------------------------------------------------------------
diff --git a/examples/go/receive.go b/examples/go/receive.go
index 2545eab..e31862b 100644
--- a/examples/go/receive.go
+++ b/examples/go/receive.go
@@ -29,8 +29,8 @@ import (
 	"net"
 	"os"
 	"path"
-	"qpid.apache.org/proton"
-	"qpid.apache.org/proton/messaging"
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/messaging"
 	"sync"
 	"time"
 )
@@ -68,8 +68,8 @@ Receive messages from all the listed URLs concurrently and print them.
 	// Create a goroutine for each URL that receives messages and sends them to
 	// the messages channel. main() receives and prints them.
 
-	messages := make(chan proton.Message) // Channel for messages from goroutines to main()
-	stop := make(chan struct{})           // Closing this channel means the program is stopping.
+	messages := make(chan amqp.Message) // Channel for messages from goroutines to main()
+	stop := make(chan struct{})         // Closing this channel means the program is stopping.
 
 	var wait sync.WaitGroup // Used by main() to wait for all goroutines to end.
 
@@ -88,8 +88,8 @@ Receive messages from all the listed URLs concurrently and print them.
 	for i, urlStr := range urls {
 		debug.Printf("Connecting to %s", urlStr)
 		go func(urlStr string) {
-			defer wait.Done()                   // Notify main() that this goroutine is done.
-			url, err := proton.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
+			defer wait.Done()                 // Notify main() that this goroutine is done.
+			url, err := amqp.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
 			fatalIf(err)
 
 			// Open a standard Go net.Conn and and AMQP connection using it.
@@ -104,7 +104,7 @@ Receive messages from all the listed URLs concurrently and print them.
 			fatalIf(err)
 
 			for {
-				var m proton.Message
+				var m amqp.Message
 				select { // Receive a message or stop.
 				case m = <-r.Receive:
 				case <-stop: // The program is stopping.
@@ -163,7 +163,7 @@ func fatalIf(err error) {
 	}
 }
 
-type formatMessage struct{ m proton.Message }
+type formatMessage struct{ m amqp.Message }
 
 func (fm formatMessage) String() string {
 	if *full {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/examples/go/send.go
----------------------------------------------------------------------
diff --git a/examples/go/send.go b/examples/go/send.go
index c4db7cd..4aaeb43 100644
--- a/examples/go/send.go
+++ b/examples/go/send.go
@@ -29,8 +29,8 @@ import (
 	"net"
 	"os"
 	"path"
-	"qpid.apache.org/proton"
-	"qpid.apache.org/proton/messaging"
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/messaging"
 	"sync"
 )
 
@@ -85,8 +85,8 @@ To each URL, send the string "path-n" where n is the message number.
 	for i, urlStr := range urls {
 		debug.Printf("Connecting to %v", urlStr)
 		go func(urlStr string) {
-			defer wait.Done()                   // Notify main() that this goroutine is done.
-			url, err := proton.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
+			defer wait.Done()                 // Notify main() that this goroutine is done.
+			url, err := amqp.ParseURL(urlStr) // Like net/url.Parse() but with AMQP defaults.
 			fatalIf(err)
 
 			// Open a standard Go net.Conn and and AMQP connection using it.
@@ -101,7 +101,7 @@ To each URL, send the string "path-n" where n is the message number.
 			fatalIf(err)
 
 			for i := int64(0); i < *count; i++ {
-				m := proton.NewMessage()
+				m := amqp.NewMessage()
 				body := fmt.Sprintf("%v-%v", url.Path, i)
 				m.SetBody(body)
 				ack, err := s.Send(m)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/go
----------------------------------------------------------------------
diff --git a/go b/go
new file mode 120000
index 0000000..a4b737d
--- /dev/null
+++ b/go
@@ -0,0 +1 @@
+proton-c/bindings/go
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
new file mode 100644
index 0000000..0449d68
--- /dev/null
+++ b/proton-c/bindings/go/README.md
@@ -0,0 +1,138 @@
+# *EXPERIMENTAL* Go binding for proton
+
+This is the beginning of a [Go](http://golang.org) binding for proton.
+
+This work is in early *experimental* stages, *everything* may change in future.
+Comments and contributions are strongly encouraged, this experiment is public so
+early feedback can guide development.
+
+- Email <pr...@qpid.apache.org>
+- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
+
+There are working [examples](../../../examples/go/README.md) and the examples README file
+explains how to install the packages in your go workspace and read the documentation.
+
+## Goals
+
+The API should
+
+- be idiomatic, unsurprising, and easy to use for Go developers.
+- support client and server development.
+- make simple tasks simple.
+- provide deep access to AMQP protocol when that is required.
+
+There are two types of developer we want to support
+
+1. Go developers using AMQP as a message transport:
+   - Straightforward conversions between Go built-in types and AMQP types.
+   - Easy message exchange via Go channels to support use in goroutines.
+
+2. AMQP-aware developers using Go as an implementation language:
+   - Go types to exactly represent all AMQP types and encoding details.
+   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
+
+## Status
+
+There are 3 go packages for proton:
+
+- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
+- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+
+Most applications should use the `messaging` package. The `event` package is for
+applications that need low-level access to the proton engine.
+
+The `event` package is fairly complete, with the exception of the proton
+reactor. It's unclear if the reactor is important for go.
+
+The `messaging` package can run the examples but probably not much else. There
+is work to do on error handling and the API may change.
+
+There are working [examples](../../../examples/go/README.md) of a broker using `event` and
+a sender and receiver using `messaging`.
+
+## The event driven API
+
+See the package documentation for details.
+
+## The Go API
+
+The goal: A procedural API that allows any user goroutine to send and receive
+AMQP messages and other information (acknowledgments, flow control instructions
+etc.) using channels. There will be no user-visible locks and no need to run
+user code in special goroutines, e.g. as handlers in a proton event loop.
+
+See the package documentation for emerging details.
+
+Currently using a channel to receive messages, a function to send them (channels
+internally) and a channel as a "future" for acknowledgements to senders. This
+may change.
+
+## Why a separate API for Go?
+
+Go is a concurrent language and encourages applications to be divided into
+concurrent *goroutines*. It provides traditional locking but it encourages the
+use *channels* to communicate between goroutines without explicit locks:
+
+  "Share memory by communicating, don't communicate by sharing memory"
+
+The idea is that a given value is only operated on by one goroutine at a time,
+but values can easily be passed from one goroutine to another. This removes much
+of the need for locking.
+
+Go literature distinguishes between:
+
+- *concurrency*: "keeping track of things that could be done in parallel"
+- *parallelism*: "actually doing things in parallel"
+
+The application expresses concurrency by starting goroutines for potentially
+concurrent tasks. The Go run-times schedule the activity of goroutines onto a
+small number (possibly one) of actual parallel executions.
+
+Even with *no* parallelism, concurrency lets the Go run-times *order* work with
+respect to events like file descriptors being readable/writable, channels having
+data, timers firing etc. Go automatically takes care of switching out goroutines
+that block or sleep so it is normal to write code in terms of blocking calls.
+
+Event-driven API (like poll, epoll, select or the proton event API) also
+channel unpredictably ordered events to actions in one or a small pool of
+execution threads. However this requires a different style of programming:
+"event-driven" or "reactive" programming. Go developers call it "inside-out"
+programming. In an event-driven architecture blocking is a big problem as it
+consumes a scarce thread of execution, so actions that take time to complete
+have to be re-structured in terms of future event delivery.
+
+The promise of Go is that you can express your application in concurrent,
+procedural terms with simple blocking calls and the Go run-times will turn it
+inside-out for you. Write as many goroutines as you want, and let Go interleave
+and schedule them efficiently.
+
+For example: the Go equivalent of listening for connections is a goroutine with
+a simple endless loop that calls a blocking Listen() function and starts a
+goroutine for each new connection. Each connection has its own goroutine that
+deals with just that connection till it closes.
+
+The benefit is that the variables and logic live closer together. Once you're in
+a goroutine, you have everything you need in local variables, and they are
+preserved across blocking calls. There's no need to store details in context
+objects that you have to look up when handling a later event to figure out how
+to continue where you left off.
+
+So a Go-like proton API does not force the users code to run in an event-loop
+goroutine. Instead user goroutines communicate with the event loop(s) via
+channels.  There's no need to funnel connections into one event loop, in fact it
+makes no sense.  Connections can be processed concurrently so they should be
+processed in separate goroutines and left to Go to schedule. User goroutines can
+have simple loops that block channels till messages are available, the user can
+start as many or as few such goroutines as they wish to implement concurrency as
+simple or as complex as they wish. For example blocking request-response
+vs. asynchronous flows of messages and acknowledgments.
+
+## New to Go?
+
+If you are new to Go then these are a good place to start:
+
+- [A Tour of Go](http://tour.golang.org)
+- [Effective Go](http://golang.org/doc/effective_go.html)
+
+Then look at the tools and library docs at <http://golang.org> as you need them.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/doc.go b/proton-c/bindings/go/amqp/doc.go
new file mode 100644
index 0000000..7c00aa0
--- /dev/null
+++ b/proton-c/bindings/go/amqp/doc.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package amqp encodes and decodes AMQP messages and data as Go types.
+
+It follows the standard 'encoding' libraries pattern. The mapping between AMQP
+and Go types is described in the documentation of the Marshal and Unmarshal
+functions.
+
+The sub-packages 'event' and 'messaging' provide two alternative ways to write
+AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
+gives complete low-level control of the underlying proton C engine.
+
+AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
+*/
+package amqp
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.
+
+// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/interop
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/interop b/proton-c/bindings/go/amqp/interop
new file mode 120000
index 0000000..8f50d0e
--- /dev/null
+++ b/proton-c/bindings/go/amqp/interop
@@ -0,0 +1 @@
+../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/interop_test.go b/proton-c/bindings/go/amqp/interop_test.go
new file mode 100644
index 0000000..11049f7
--- /dev/null
+++ b/proton-c/bindings/go/amqp/interop_test.go
@@ -0,0 +1,308 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Test that conversion of Go type to/from AMQP is compatible with other
+// bindings.
+//
+package amqp
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"reflect"
+	"strings"
+	"testing"
+)
+
+func assertEqual(want interface{}, got interface{}) {
+	if !reflect.DeepEqual(want, got) {
+		panic(fmt.Errorf("%#v != %#v", want, got))
+	}
+}
+
+func assertNil(err interface{}) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+func getReader(name string) (r io.Reader) {
+	r, err := os.Open("interop/" + name + ".amqp")
+	if err != nil {
+		panic(fmt.Errorf("Can't open %#v: %v", name, err))
+	}
+	return
+}
+
+func remaining(d *Decoder) string {
+	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
+	return string(remainder)
+}
+
+// assertDecode: want is the expected value, gotPtr is a pointer to a
+// instance of the same type for Decode.
+func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
+
+	assertNil(d.Decode(gotPtr))
+
+	got := reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(want, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, gotPtr)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	got = reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+}
+
+func TestUnmarshal(t *testing.T) {
+	bytes, err := ioutil.ReadAll(getReader("strings"))
+	if err != nil {
+		t.Error(err)
+	}
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		n, err := Unmarshal(bytes, &got)
+		if err != nil {
+			t.Error(err)
+		}
+		if want != got {
+			t.Errorf("%#v != %#v", want, got)
+		}
+		bytes = bytes[n:]
+	}
+}
+
+func TestPrimitivesExact(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into exact types
+	var b bool
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	var u8 uint8
+	assertDecode(d, uint8(42), &u8)
+	var u16 uint16
+	assertDecode(d, uint16(42), &u16)
+	var i16 int16
+	assertDecode(d, int16(-42), &i16)
+	var u32 uint32
+	assertDecode(d, uint32(12345), &u32)
+	var i32 int32
+	assertDecode(d, int32(-12345), &i32)
+	var u64 uint64
+	assertDecode(d, uint64(12345), &u64)
+	var i64 int64
+	assertDecode(d, int64(-12345), &i64)
+	var f32 float32
+	assertDecode(d, float32(0.125), &f32)
+	var f64 float64
+	assertDecode(d, float64(0.125), &f64)
+}
+
+func TestPrimitivesCompatible(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into compatible types
+	var b bool
+	var i int
+	var u uint
+	var f float64
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, -42, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, 0.125, &f)
+	assertDecode(d, 0.125, &f)
+}
+
+// assertDecodeValue: want is the expected value, decode into a reflect.Value
+func assertDecodeInterface(d *Decoder, want interface{}) {
+
+	var got, got2 interface{}
+	assertNil(d.Decode(&got))
+
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(got, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, &got2)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	assertEqual(want, got2)
+}
+
+func TestPrimitivesInterface(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	assertDecodeInterface(d, true)
+	assertDecodeInterface(d, false)
+	assertDecodeInterface(d, uint8(42))
+	assertDecodeInterface(d, uint16(42))
+	assertDecodeInterface(d, int16(-42))
+	assertDecodeInterface(d, uint32(12345))
+	assertDecodeInterface(d, int32(-12345))
+	assertDecodeInterface(d, uint64(12345))
+	assertDecodeInterface(d, int64(-12345))
+	assertDecodeInterface(d, float32(0.125))
+	assertDecodeInterface(d, float64(0.125))
+}
+
+func TestStrings(t *testing.T) {
+	d := NewDecoder(getReader("strings"))
+	// Test decoding as plain Go strings
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		assertDecode(d, want, &got)
+	}
+	remains := remaining(d)
+	if remains != "" {
+		t.Errorf("leftover: %s", remains)
+	}
+
+	// Test decoding as specific string types
+	d = NewDecoder(getReader("strings"))
+	var bytes []byte
+	var str, sym string
+	assertDecode(d, []byte("abc\000defg"), &bytes)
+	assertDecode(d, "abcdefg", &str)
+	assertDecode(d, "abcdefg", &sym)
+	assertDecode(d, make([]byte, 0), &bytes)
+	assertDecode(d, "", &str)
+	assertDecode(d, "", &sym)
+	remains = remaining(d)
+	if remains != "" {
+		t.Fatalf("leftover: %s", remains)
+	}
+
+	// Test some error handling
+	d = NewDecoder(getReader("strings"))
+	var s string
+	err := d.Decode(s)
+	if err == nil {
+		t.Fatal("Expected error")
+	}
+	if !strings.Contains(err.Error(), "not a pointer") {
+		t.Error(err)
+	}
+	var i int
+	err = d.Decode(&i)
+	if !strings.Contains(err.Error(), "cannot unmarshal") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte{}, nil)
+	if !strings.Contains(err.Error(), "not enough data") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte("foobar"), nil)
+	if !strings.Contains(err.Error(), "invalid-argument") {
+		t.Error(err)
+	}
+}
+
+func TestEncodeDecode(t *testing.T) {
+	type data struct {
+		s  string
+		i  int
+		u8 uint8
+		b  bool
+		f  float32
+		v  interface{}
+	}
+
+	in := data{"foo", 42, 9, true, 1.234, "thing"}
+
+	buf := bytes.Buffer{}
+	e := NewEncoder(&buf)
+	assertNil(e.Encode(in.s))
+	assertNil(e.Encode(in.i))
+	assertNil(e.Encode(in.u8))
+	assertNil(e.Encode(in.b))
+	assertNil(e.Encode(in.f))
+	assertNil(e.Encode(in.v))
+
+	var out data
+	d := NewDecoder(&buf)
+	assertNil(d.Decode(&out.s))
+	assertNil(d.Decode(&out.i))
+	assertNil(d.Decode(&out.u8))
+	assertNil(d.Decode(&out.b))
+	assertNil(d.Decode(&out.f))
+	assertNil(d.Decode(&out.v))
+
+	assertEqual(in, out)
+}
+
+func TestMap(t *testing.T) {
+	d := NewDecoder(getReader("maps"))
+
+	// Generic map
+	var m Map
+	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
+
+	// Interface as map
+	var i interface{}
+	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
+
+	d = NewDecoder(getReader("maps"))
+	// Specific typed map
+	var m2 map[string]int
+	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
+
+	// Round trip a nested map
+	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
+	bytes, err := Marshal(m, nil)
+	assertNil(err)
+	_, err = Unmarshal(bytes, &i)
+	assertNil(err)
+	assertEqual(m, i)
+}
+
+func TestList(t *testing.T) {
+	d := NewDecoder(getReader("lists"))
+	var l List
+	assertDecode(d, List{int32(32), "foo", true}, &l)
+	assertDecode(d, List{}, &l)
+}
+
+func FIXMETestMessage(t *testing.T) {
+	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
+	bytes, err := ioutil.ReadAll(getReader("message"))
+	assertNil(err)
+	m, err := DecodeMessage(bytes)
+	assertNil(err)
+	fmt.Printf("%+v\n", m)
+	assertEqual(m.Body(), "hello")
+
+	bytes2 := make([]byte, len(bytes))
+	bytes2, err = m.Encode(bytes2)
+	assertNil(err)
+	assertEqual(bytes, bytes2)
+}
+
+// FIXME aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/marshal.go b/proton-c/bindings/go/amqp/marshal.go
new file mode 100644
index 0000000..e5c2945
--- /dev/null
+++ b/proton-c/bindings/go/amqp/marshal.go
@@ -0,0 +1,238 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+func dataError(prefix string, data *C.pn_data_t) error {
+	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
+	if err != nil {
+		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
+	}
+	return err
+}
+
+/*
+Marshal encodes a Go value as AMQP data in buffer.
+If buffer is nil, or is not large enough, a new buffer  is created.
+
+Returns the buffer used for encoding with len() adjusted to the actual size of data.
+
+Go types are encoded as follows
+
+ +-------------------------------------+--------------------------------------------+
+ |Go type                              |AMQP type                                   |
+ +-------------------------------------+--------------------------------------------+
+ |bool                                 |bool                                        |
+ +-------------------------------------+--------------------------------------------+
+ |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
+ +-------------------------------------+--------------------------------------------+
+ |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
+ +-------------------------------------+--------------------------------------------+
+ |float32, float64                     |float, double.                              |
+ +-------------------------------------+--------------------------------------------+
+ |string                               |string                                      |
+ +-------------------------------------+--------------------------------------------+
+ |[]byte, Binary                       |binary                                      |
+ +-------------------------------------+--------------------------------------------+
+ |Symbol                               |symbol                                      |
+ +-------------------------------------+--------------------------------------------+
+ |interface{}                          |the contained type                          |
+ +-------------------------------------+--------------------------------------------+
+ |nil                                  |null                                        |
+ +-------------------------------------+--------------------------------------------+
+ |map[K]T                              |map with K and T converted as above         |
+ +-------------------------------------+--------------------------------------------+
+ |Map                                  |map, may have mixed types for keys, values  |
+ +-------------------------------------+--------------------------------------------+
+ |[]T                                  |list with T converted as above              |
+ +-------------------------------------+--------------------------------------------+
+ |List                                 |list, may have mixed types  values          |
+ +-------------------------------------+--------------------------------------------+
+
+TODO Go types: array, slice, struct
+
+Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
+*/
+func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	put(data, v)
+	encode := func(buf []byte) ([]byte, error) {
+		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
+		switch {
+		case n == int(C.PN_OVERFLOW):
+			return buf, overflow
+		case n < 0:
+			return buf, dataError("marshal error", data)
+		default:
+			return buf[:n], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
+
+const minEncode = 256
+
+// overflow is returned when an encoding function can't fit data in the buffer.
+var overflow = internal.Errorf("buffer too small")
+
+// encodeFn encodes into buffer[0:len(buffer)].
+// Returns buffer with length adjusted for data encoded.
+// If buffer too small, returns overflow as error.
+type encodeFn func(buffer []byte) ([]byte, error)
+
+// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
+// Returns the final buffer.
+func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
+	if buffer == nil || len(buffer) == 0 {
+		buffer = make([]byte, minEncode)
+	}
+	var err error
+	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
+		buffer = make([]byte, 2*len(buffer))
+	}
+	return buffer, err
+}
+
+func put(data *C.pn_data_t, v interface{}) {
+	switch v := v.(type) {
+	case nil:
+		C.pn_data_put_null(data)
+	case bool:
+		C.pn_data_put_bool(data, C.bool(v))
+	case int8:
+		C.pn_data_put_byte(data, C.int8_t(v))
+	case int16:
+		C.pn_data_put_short(data, C.int16_t(v))
+	case int32:
+		C.pn_data_put_int(data, C.int32_t(v))
+	case int64:
+		C.pn_data_put_long(data, C.int64_t(v))
+	case int:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_long(data, C.int64_t(v))
+		} else {
+			C.pn_data_put_int(data, C.int32_t(v))
+		}
+	case uint8:
+		C.pn_data_put_ubyte(data, C.uint8_t(v))
+	case uint16:
+		C.pn_data_put_ushort(data, C.uint16_t(v))
+	case uint32:
+		C.pn_data_put_uint(data, C.uint32_t(v))
+	case uint64:
+		C.pn_data_put_ulong(data, C.uint64_t(v))
+	case uint:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_ulong(data, C.uint64_t(v))
+		} else {
+			C.pn_data_put_uint(data, C.uint32_t(v))
+		}
+	case float32:
+		C.pn_data_put_float(data, C.float(v))
+	case float64:
+		C.pn_data_put_double(data, C.double(v))
+	case string:
+		C.pn_data_put_string(data, pnBytes([]byte(v)))
+	case []byte:
+		C.pn_data_put_binary(data, pnBytes(v))
+	case Binary:
+		C.pn_data_put_binary(data, pnBytes([]byte(v)))
+	case Symbol:
+		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
+	case Map: // Special map type
+		C.pn_data_put_map(data)
+		C.pn_data_enter(data)
+		for key, val := range v {
+			put(data, key)
+			put(data, val)
+		}
+		C.pn_data_exit(data)
+	default:
+		switch reflect.TypeOf(v).Kind() {
+		case reflect.Map:
+			putMap(data, v)
+		case reflect.Slice:
+			putList(data, v)
+		default:
+			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
+		}
+	}
+	err := dataError("marshal", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+func putMap(data *C.pn_data_t, v interface{}) {
+	mapValue := reflect.ValueOf(v)
+	C.pn_data_put_map(data)
+	C.pn_data_enter(data)
+	for _, key := range mapValue.MapKeys() {
+		put(data, key.Interface())
+		put(data, mapValue.MapIndex(key).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+func putList(data *C.pn_data_t, v interface{}) {
+	listValue := reflect.ValueOf(v)
+	C.pn_data_put_list(data)
+	C.pn_data_enter(data)
+	for i := 0; i < listValue.Len(); i++ {
+		put(data, listValue.Index(i).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+// Encoder encodes AMQP values to an io.Writer
+type Encoder struct {
+	writer io.Writer
+	buffer []byte
+}
+
+// New encoder returns a new encoder that writes to w.
+func NewEncoder(w io.Writer) *Encoder {
+	return &Encoder{w, make([]byte, minEncode)}
+}
+
+func (e *Encoder) Encode(v interface{}) (err error) {
+	e.buffer, err = Marshal(v, e.buffer)
+	if err == nil {
+		e.writer.Write(e.buffer)
+	}
+	return err
+}
+
+func replace(data *C.pn_data_t, v interface{}) {
+	C.pn_data_clear(data)
+	put(data, v)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/message.go b/proton-c/bindings/go/amqp/message.go
new file mode 100644
index 0000000..87093f5
--- /dev/null
+++ b/proton-c/bindings/go/amqp/message.go
@@ -0,0 +1,342 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
+
+// Message is the interface to an AMQP message.
+// Instances of this interface contain a pointer to the underlying struct.
+type Message interface {
+	/**
+	 * Inferred indicates how the message content
+	 * is encoded into AMQP sections. If inferred is true then binary and
+	 * list values in the body of the message will be encoded as AMQP DATA
+	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
+	 * then all values in the body of the message will be encoded as AMQP
+	 * VALUE sections regardless of their type.
+	 */
+	Inferred() bool
+	SetInferred(bool)
+
+	/**
+	 * Durable indicates that any parties taking responsibility
+	 * for the message must durably store the content.
+	 */
+	Durable() bool
+	SetDurable(bool)
+
+	/**
+	 * Priority impacts ordering guarantees. Within a
+	 * given ordered context, higher priority messages may jump ahead of
+	 * lower priority messages.
+	 */
+	Priority() uint8
+	SetPriority(uint8)
+
+	/**
+	 * TTL or Time To Live, a message it may be dropped after this duration
+	 */
+	TTL() time.Duration
+	SetTTL(time.Duration)
+
+	/**
+	 * FirstAcquirer indicates
+	 * that the recipient of the message is the first recipient to acquire
+	 * the message, i.e. there have been no failed delivery attempts to
+	 * other acquirers. Note that this does not mean the message has not
+	 * been delivered to, but not acquired, by other recipients.
+	 */
+	FirstAcquirer() bool
+	SetFirstAcquirer(bool)
+
+	/**
+	 * DeliveryCount tracks how many attempts have been made to
+	 * delivery a message.
+	 */
+	DeliveryCount() uint32
+	SetDeliveryCount(uint32)
+
+	/**
+	 * MessageId provides a unique identifier for a message.
+	 * it can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	MessageId() interface{}
+	SetMessageId(interface{})
+
+	UserId() string
+	SetUserId(string)
+
+	Address() string
+	SetAddress(string)
+
+	Subject() string
+	SetSubject(string)
+
+	ReplyTo() string
+	SetReplyTo(string)
+
+	/**
+	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	CorrelationId() interface{}
+	SetCorrelationId(interface{})
+
+	ContentType() string
+	SetContentType(string)
+
+	ContentEncoding() string
+	SetContentEncoding(string)
+
+	// ExpiryTime indicates an absoulte time when the message may be dropped.
+	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
+	ExpiryTime() time.Time
+	SetExpiryTime(time.Time)
+
+	CreationTime() time.Time
+	SetCreationTime(time.Time)
+
+	GroupId() string
+	SetGroupId(string)
+
+	GroupSequence() int32
+	SetGroupSequence(int32)
+
+	ReplyToGroupId() string
+	SetReplyToGroupId(string)
+
+	/**
+	 * Instructions can be used to access or modify AMQP delivery instructions.
+	 */
+	Instructions() *map[string]interface{}
+
+	/**
+	 * Annotations  can be used to access or modify AMQP annotations.
+	 */
+	Annotations() *map[string]interface{}
+
+	/**
+	 * Properties  can be used to access or modify the application properties of a message.
+	 */
+	Properties() *map[string]interface{}
+
+	/**
+	 * Body of the message can be any AMQP encodable type.
+	 */
+	Body() interface{}
+	SetBody(interface{})
+
+	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
+	// the message is encoded into it, otherwise a new buffer is created.
+	// Returns the buffer containing the message.
+	Encode(buffer []byte) ([]byte, error)
+}
+
+// NewMessage creates a new message instance. The returned interface contains a pointer.
+func NewMessage() Message {
+	pn := C.pn_message() // Pick up default setting from C message.
+	defer C.pn_message_free(pn)
+	return goMessage(pn)
+}
+
+// Message implementation copies all message data into Go space so it can be proprely
+// memory managed.
+//
+type message struct {
+	inferred, durable, firstAcquirer      bool
+	priority                              uint8
+	ttl                                   time.Duration
+	deliveryCount                         uint32
+	messageId                             interface{}
+	userId, address, subject, replyTo     string
+	contentType, contentEncoding          string
+	groupId, replyToGroupId               string
+	creationTime, expiryTime              time.Time
+	groupSequence                         int32
+	correlationId                         interface{}
+	instructions, annotations, properties map[string]interface{}
+	body                                  interface{}
+}
+
+func (m *message) Inferred() bool                        { return m.inferred }
+func (m *message) SetInferred(b bool)                    { m.inferred = b }
+func (m *message) Durable() bool                         { return m.durable }
+func (m *message) SetDurable(b bool)                     { m.durable = b }
+func (m *message) Priority() uint8                       { return m.priority }
+func (m *message) SetPriority(b uint8)                   { m.priority = b }
+func (m *message) TTL() time.Duration                    { return m.ttl }
+func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
+func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
+func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
+func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
+func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
+func (m *message) MessageId() interface{}                { return m.messageId }
+func (m *message) SetMessageId(id interface{})           { m.messageId = id }
+func (m *message) UserId() string                        { return m.userId }
+func (m *message) SetUserId(s string)                    { m.userId = s }
+func (m *message) Address() string                       { return m.address }
+func (m *message) SetAddress(s string)                   { m.address = s }
+func (m *message) Subject() string                       { return m.subject }
+func (m *message) SetSubject(s string)                   { m.subject = s }
+func (m *message) ReplyTo() string                       { return m.replyTo }
+func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
+func (m *message) CorrelationId() interface{}            { return m.correlationId }
+func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
+func (m *message) ContentType() string                   { return m.contentType }
+func (m *message) SetContentType(s string)               { m.contentType = s }
+func (m *message) ContentEncoding() string               { return m.contentEncoding }
+func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
+func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
+func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
+func (m *message) CreationTime() time.Time               { return m.creationTime }
+func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
+func (m *message) GroupId() string                       { return m.groupId }
+func (m *message) SetGroupId(s string)                   { m.groupId = s }
+func (m *message) GroupSequence() int32                  { return m.groupSequence }
+func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
+func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
+func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
+func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
+func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
+func (m *message) Properties() *map[string]interface{}   { return &m.properties }
+func (m *message) Body() interface{}                     { return m.body }
+func (m *message) SetBody(b interface{})                 { m.body = b }
+
+// rewindGet rewinds and then gets the value from a data object.
+func rewindGet(data *C.pn_data_t, v interface{}) {
+	if data != nil && C.pn_data_size(data) > 0 {
+		C.pn_data_rewind(data)
+		C.pn_data_next(data)
+		get(data, v)
+	}
+}
+
+// goMessage populates a Go message from a pn_message_t
+func goMessage(pn *C.pn_message_t) *message {
+	m := &message{
+		inferred:        bool(C.pn_message_is_inferred(pn)),
+		durable:         bool(C.pn_message_is_durable(pn)),
+		priority:        uint8(C.pn_message_get_priority(pn)),
+		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
+		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
+		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
+		userId:          goString(C.pn_message_get_user_id(pn)),
+		address:         C.GoString(C.pn_message_get_address(pn)),
+		subject:         C.GoString(C.pn_message_get_subject(pn)),
+		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
+		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
+		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
+		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
+		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
+		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
+		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
+		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
+		messageId:       nil,
+		correlationId:   nil,
+		instructions:    make(map[string]interface{}),
+		annotations:     make(map[string]interface{}),
+		properties:      make(map[string]interface{}),
+	}
+	rewindGet(C.pn_message_id(pn), &m.messageId)
+	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
+	rewindGet(C.pn_message_instructions(pn), &m.instructions)
+	rewindGet(C.pn_message_annotations(pn), &m.annotations)
+	rewindGet(C.pn_message_properties(pn), &m.properties)
+	rewindGet(C.pn_message_body(pn), &m.body)
+	return m
+}
+
+// pnMessage populates a pn_message_t from a Go message.
+func (m *message) pnMessage() *C.pn_message_t {
+	pn := C.pn_message()
+	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
+	C.pn_message_set_durable(pn, C.bool(m.Durable()))
+	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
+	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
+	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
+	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
+	replace(C.pn_message_id(pn), m.MessageId())
+	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
+	C.pn_message_set_address(pn, C.CString(m.Address()))
+	C.pn_message_set_subject(pn, C.CString(m.Subject()))
+	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
+	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
+	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
+	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
+	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
+	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
+	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
+	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
+	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
+	replace(C.pn_message_instructions(pn), *m.Instructions())
+	replace(C.pn_message_annotations(pn), *m.Annotations())
+	replace(C.pn_message_properties(pn), *m.Properties())
+	replace(C.pn_message_body(pn), m.Body())
+	return pn
+}
+
+// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
+
+// DecodeMessage decodes bytes as a message
+func DecodeMessage(data []byte) (Message, error) {
+	pnMsg := C.pn_message()
+	defer C.pn_message_free(pnMsg)
+	if len(data) == 0 {
+		return nil, internal.Errorf("empty buffer for decode")
+	}
+	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
+		return nil, internal.Errorf("decoding message: %s",
+			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
+	}
+	return goMessage(pnMsg), nil
+}
+
+// Encode the message into bufffer.
+// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
+// buffer will be returned.
+func (m *message) Encode(buffer []byte) ([]byte, error) {
+	pn := m.pnMessage()
+	defer C.pn_message_free(pn)
+	encode := func(buf []byte) ([]byte, error) {
+		len := cLen(buf)
+		result := C.pn_message_encode(pn, cPtr(buf), &len)
+		switch {
+		case result == C.PN_OVERFLOW:
+			return buf, overflow
+		case result < 0:
+			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
+		default:
+			return buf[:len], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/message_test.go b/proton-c/bindings/go/amqp/message_test.go
new file mode 100644
index 0000000..46e26de
--- /dev/null
+++ b/proton-c/bindings/go/amqp/message_test.go
@@ -0,0 +1,90 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"reflect"
+	"testing"
+	"time"
+)
+
+func roundTrip(t *testing.T, m Message) {
+	buffer, err := m.Encode(nil)
+	if err != nil {
+		t.Fatalf("Encode failed: %v", err)
+	}
+	m2, err := DecodeMessage(buffer)
+	if err != nil {
+		t.Fatalf("Decode failed: %v", err)
+	}
+	if !reflect.DeepEqual(m, m2) {
+		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
+	}
+}
+
+func TestDefaultMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	// Check defaults
+	assertEqual(m.Inferred(), false)
+	assertEqual(m.Durable(), false)
+	assertEqual(m.Priority(), uint8(4))
+	assertEqual(m.TTL(), time.Duration(0))
+	assertEqual(m.UserId(), "")
+	assertEqual(m.Address(), "")
+	assertEqual(m.Subject(), "")
+	assertEqual(m.ReplyTo(), "")
+	assertEqual(m.ContentType(), "")
+	assertEqual(m.ContentEncoding(), "")
+	assertEqual(m.GroupId(), "")
+	assertEqual(m.GroupSequence(), int32(0))
+	assertEqual(m.ReplyToGroupId(), "")
+	assertEqual(m.MessageId(), nil)
+	assertEqual(m.CorrelationId(), nil)
+	assertEqual(*m.Instructions(), map[string]interface{}{})
+	assertEqual(*m.Annotations(), map[string]interface{}{})
+	assertEqual(*m.Properties(), map[string]interface{}{})
+	assertEqual(m.Body(), nil)
+
+	roundTrip(t, m)
+}
+
+func TestMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	m.SetInferred(false)
+	m.SetDurable(true)
+	m.SetPriority(42)
+	m.SetTTL(0)
+	m.SetUserId("user")
+	m.SetAddress("address")
+	m.SetSubject("subject")
+	m.SetReplyTo("replyto")
+	m.SetContentType("content")
+	m.SetContentEncoding("encoding")
+	m.SetGroupId("group")
+	m.SetGroupSequence(42)
+	m.SetReplyToGroupId("replytogroup")
+	m.SetMessageId("id")
+	m.SetCorrelationId("correlation")
+	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
+	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
+	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
+	m.SetBody("hello")
+	roundTrip(t, m)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/types.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/types.go b/proton-c/bindings/go/amqp/types.go
new file mode 100644
index 0000000..8713520
--- /dev/null
+++ b/proton-c/bindings/go/amqp/types.go
@@ -0,0 +1,193 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"reflect"
+	"time"
+	"unsafe"
+)
+
+func pnTypeString(pt C.pn_type_t) string {
+	switch pt {
+	case C.PN_NULL:
+		return "null"
+	case C.PN_BOOL:
+		return "bool"
+	case C.PN_UBYTE:
+		return "ubyte"
+	case C.PN_BYTE:
+		return "byte"
+	case C.PN_USHORT:
+		return "ushort"
+	case C.PN_SHORT:
+		return "short"
+	case C.PN_CHAR:
+		return "char"
+	case C.PN_UINT:
+		return "uint"
+	case C.PN_INT:
+		return "int"
+	case C.PN_ULONG:
+		return "ulong"
+	case C.PN_LONG:
+		return "long"
+	case C.PN_TIMESTAMP:
+		return "timestamp"
+	case C.PN_FLOAT:
+		return "float"
+	case C.PN_DOUBLE:
+		return "double"
+	case C.PN_DECIMAL32:
+		return "decimal32"
+	case C.PN_DECIMAL64:
+		return "decimal64"
+	case C.PN_DECIMAL128:
+		return "decimal128"
+	case C.PN_UUID:
+		return "uuid"
+	case C.PN_BINARY:
+		return "binary"
+	case C.PN_STRING:
+		return "string"
+	case C.PN_SYMBOL:
+		return "symbol"
+	case C.PN_DESCRIBED:
+		return "described"
+	case C.PN_ARRAY:
+		return "array"
+	case C.PN_LIST:
+		return "list"
+	case C.PN_MAP:
+		return "map"
+	case C.PN_DATA_TYPE_ERROR:
+		return "no-data"
+	default:
+		return fmt.Sprintf("unknown-type(%d)", pt)
+	}
+}
+
+// Go types
+var (
+	bytesType = reflect.TypeOf([]byte{})
+	valueType = reflect.TypeOf(reflect.Value{})
+)
+
+// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
+
+// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
+type Map map[interface{}]interface{}
+
+// List is a generic list that can hold mixed values and can represent any AMQP list.
+//
+type List []interface{}
+
+// Symbol is a string that is encoded as an AMQP symbol
+type Symbol string
+
+// Binary is a string that is encoded as an AMQP binary.
+// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
+// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
+type Binary string
+
+// GoString for Map prints values with their types, useful for debugging.
+func (m Map) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", m)
+	i := len(m)
+	for k, v := range m {
+		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
+		i--
+		if i > 0 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// GoString for List prints values with their types, useful for debugging.
+func (l List) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", l)
+	for i := 0; i < len(l); i++ {
+		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
+		if i == len(l)-1 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// pnTime converts Go time.Time to Proton millisecond Unix time.
+func pnTime(t time.Time) C.pn_timestamp_t {
+	secs := t.Unix()
+	// Note: sub-second accuracy is not guaraunteed if the Unix time in
+	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
+	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
+	return C.pn_timestamp_t(secs*1000 + msecs)
+}
+
+// goTime converts a pn_timestamp_t to a Go time.Time.
+func goTime(t C.pn_timestamp_t) time.Time {
+	secs := int64(t) / 1000
+	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
+	return time.Unix(secs, nsecs)
+}
+
+func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
+	if cBytes.start != nil {
+		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
+	}
+	return
+}
+
+func goString(cBytes C.pn_bytes_t) (str string) {
+	if cBytes.start != nil {
+		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
+	}
+	return
+}
+
+func pnBytes(b []byte) C.pn_bytes_t {
+	if len(b) == 0 {
+		return C.pn_bytes_t{0, nil}
+	} else {
+		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
+	}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7bc3e0e5/proton-c/bindings/go/amqp/uid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/amqp/uid.go b/proton-c/bindings/go/amqp/uid.go
new file mode 100644
index 0000000..944bf6f
--- /dev/null
+++ b/proton-c/bindings/go/amqp/uid.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Generating unique IDs for various things.
+
+package amqp
+
+import (
+	"strconv"
+	"sync/atomic"
+)
+
+// A simple atomic counter to generate unique 64 bit IDs.
+type UidCounter struct{ count uint64 }
+
+// NextInt gets the next uint64 value from the atomic counter.
+func (uc *UidCounter) NextInt() uint64 {
+	return atomic.AddUint64(&uc.count, 1)
+}
+
+// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
+func (uc *UidCounter) Next() string {
+	return strconv.FormatUint(uc.NextInt(), 32)
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[17/36] qpid-proton git commit: PROTON-827: Re-create go worspace, cmake support for testing.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go
new file mode 100644
index 0000000..d76fac9
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/handlers.go
@@ -0,0 +1,411 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+)
+
+// EventHandler handles core proton events.
+type EventHandler interface {
+	// HandleEvent is called with an event.
+	// Typically HandleEvent() is implemented as a switch on e.Type()
+	HandleEvent(e Event) error
+}
+
+// cHandler wraps a C pn_handler_t
+type cHandler struct {
+	pn *C.pn_handler_t
+}
+
+func (h cHandler) HandleEvent(e Event) error {
+	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
+	return nil // FIXME aconway 2015-03-31: error handling
+}
+
+// MessagingHandler provides an alternative interface to EventHandler.
+// it is easier to use for most applications that send and receive messages.
+//
+// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
+// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
+//
+type MessagingHandler interface {
+	HandleMessagingEvent(MessagingEventType, Event) error
+}
+
+// MessagingEventType provides a set of events that are easier to work with than the
+// core events defined by EventType
+//
+// There are 3 types of "endpoint": Connection, Session and Link.
+// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
+// The meaning of these events is as follows:
+//
+// Opening: The remote end opened, the local end will open automatically.
+//
+// Opened: Both ends are open, regardless of which end opened first.
+//
+// Closing: The remote end closed without error, the local end will close automatically.
+//
+// Error: The remote end closed with an error, the local end will close automatically.
+//
+// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
+//
+type MessagingEventType int
+
+const (
+	// The event loop starts.
+	MStart MessagingEventType = iota
+	// The peer closes the connection with an error condition.
+	MConnectionError
+	// The peer closes the session with an error condition.
+	MSessionError
+	// The peer closes the link with an error condition.
+	MLinkError
+	// The peer Initiates the opening of the connection.
+	MConnectionOpening
+	// The peer initiates the opening of the session.
+	MSessionOpening
+	// The peer initiates the opening of the link.
+	MLinkOpening
+	// The connection is opened.
+	MConnectionOpened
+	// The session is opened.
+	MSessionOpened
+	// The link is opened.
+	MLinkOpened
+	// The peer initiates the closing of the connection.
+	MConnectionClosing
+	// The peer initiates the closing of the session.
+	MSessionClosing
+	// The peer initiates the closing of the link.
+	MLinkClosing
+	// Both ends of the connection are closed.
+	MConnectionClosed
+	// Both ends of the session are closed.
+	MSessionClosed
+	// Both ends of the link are closed.
+	MLinkClosed
+	// The connection is disconnected.
+	MConnectionDisconnected
+	// The session's connection was disconnected
+	MSessionDisconnected
+	// The session's connection was disconnected
+	MLinkDisconnected
+	// The sender link has credit and messages can
+	// therefore be transferred.
+	MSendable
+	// The remote peer accepts an outgoing message.
+	MAccepted
+	// The remote peer rejects an outgoing message.
+	MRejected
+	// The peer releases an outgoing message. Note that this may be in response to
+	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
+	MReleased
+	// The peer has settled the outgoing message. This is the point at which it
+	// shouod never be retransmitted.
+	MSettled
+	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
+	// To manage the outcome of this messages (e.g. to accept or reject the message)
+	// use Event.Delivery().
+	MMessage
+	// The event loop terminates, there are no more events to process.
+	MFinal
+)
+
+func (t MessagingEventType) String() string {
+	switch t {
+	case MStart:
+		return "Start"
+	case MConnectionError:
+		return "ConnectionError"
+	case MSessionError:
+		return "SessionError"
+	case MLinkError:
+		return "LinkError"
+	case MConnectionOpening:
+		return "ConnectionOpening"
+	case MSessionOpening:
+		return "SessionOpening"
+	case MLinkOpening:
+		return "LinkOpening"
+	case MConnectionOpened:
+		return "ConnectionOpened"
+	case MSessionOpened:
+		return "SessionOpened"
+	case MLinkOpened:
+		return "LinkOpened"
+	case MConnectionClosing:
+		return "ConnectionClosing"
+	case MSessionClosing:
+		return "SessionClosing"
+	case MLinkClosing:
+		return "LinkClosing"
+	case MConnectionClosed:
+		return "ConnectionClosed"
+	case MSessionClosed:
+		return "SessionClosed"
+	case MLinkClosed:
+		return "LinkClosed"
+	case MConnectionDisconnected:
+		return "ConnectionDisconnected"
+	case MSessionDisconnected:
+		return "MSessionDisconnected"
+	case MLinkDisconnected:
+		return "MLinkDisconnected"
+	case MSendable:
+		return "Sendable"
+	case MAccepted:
+		return "Accepted"
+	case MRejected:
+		return "Rejected"
+	case MReleased:
+		return "Released"
+	case MSettled:
+		return "Settled"
+	case MMessage:
+		return "Message"
+	default:
+		return "Unknown"
+	}
+}
+
+// ResourceHandler provides a simple way to track the creation and deletion of
+// various proton objects.
+// endpointDelegator captures common patterns for endpoints opening/closing
+type endpointDelegator struct {
+	remoteOpen, remoteClose, localOpen, localClose EventType
+	opening, opened, closing, closed, error        MessagingEventType
+	endpoint                                       func(Event) Endpoint
+	delegate                                       MessagingHandler
+}
+
+// HandleEvent handles an open/close event for an endpoint in a generic way.
+func (d endpointDelegator) HandleEvent(e Event) (err error) {
+	endpoint := d.endpoint(e)
+	state := endpoint.State()
+
+	switch e.Type() {
+
+	case d.localOpen:
+		if state.Is(SRemoteActive) {
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		}
+
+	case d.remoteOpen:
+		switch {
+		case state.Is(SLocalActive):
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		case state.Is(SLocalUninit):
+			err = d.delegate.HandleMessagingEvent(d.opening, e)
+			if err == nil {
+				endpoint.Open()
+			}
+		}
+
+	case d.remoteClose:
+		var err1 error
+		if endpoint.RemoteCondition().IsSet() { // Closed with error
+			err1 = d.delegate.HandleMessagingEvent(d.error, e)
+			if err1 == nil { // Don't overwrite an application error.
+				err1 = endpoint.RemoteCondition().Error()
+			}
+		} else {
+			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
+		}
+		if state.Is(SLocalClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		} else if state.Is(SLocalActive) {
+			endpoint.Close()
+		}
+		if err1 != nil { // Keep the first error.
+			err = err1
+		}
+
+	case d.localClose:
+		if state.Is(SRemoteClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		}
+
+	default:
+		// We shouldn't be called with any other event type.
+		panic(internal.Errorf("internal error, not an open/close event: %s", e))
+	}
+
+	return err
+}
+
+// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
+// You can modify the exported fields before you pass the MessagingDelegator to
+// a Pump.
+type MessagingDelegator struct {
+	delegate                   MessagingHandler
+	connection, session, link  endpointDelegator
+	handshaker, flowcontroller EventHandler
+
+	// AutoSettle (default true) automatically pre-settle outgoing messages.
+	AutoSettle bool
+	// AutoAccept (default true) automatically accept and settle incoming messages
+	// if they are not settled by the delegate.
+	AutoAccept bool
+	// Prefetch (default 10) initial credit to issue for incoming links.
+	Prefetch int
+	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
+	PeerCloseError bool
+}
+
+func NewMessagingDelegator(h MessagingHandler) EventHandler {
+	return &MessagingDelegator{
+		delegate: h,
+		connection: endpointDelegator{
+			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
+			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
+			MConnectionError,
+			func(e Event) Endpoint { return e.Connection() },
+			h,
+		},
+		session: endpointDelegator{
+			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
+			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
+			MSessionError,
+			func(e Event) Endpoint { return e.Session() },
+			h,
+		},
+		link: endpointDelegator{
+			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
+			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
+			MLinkError,
+			func(e Event) Endpoint { return e.Link() },
+			h,
+		},
+		flowcontroller: nil,
+		AutoSettle:     true,
+		AutoAccept:     true,
+		Prefetch:       10,
+		PeerCloseError: false,
+	}
+}
+
+func handleIf(h EventHandler, e Event) error {
+	if h != nil {
+		return h.HandleEvent(e)
+	}
+	return nil
+}
+
+// Handle a proton event by passing the corresponding MessagingEvent(s) to
+// the MessagingHandler.
+func (d *MessagingDelegator) HandleEvent(e Event) error {
+	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
+
+	switch e.Type() {
+
+	case EConnectionInit:
+		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
+		d.delegate.HandleMessagingEvent(MStart, e)
+
+	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
+		return d.connection.HandleEvent(e)
+
+	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
+		return d.session.HandleEvent(e)
+
+	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
+		return d.link.HandleEvent(e)
+
+	case ELinkFlow:
+		if e.Link().IsSender() && e.Link().Credit() > 0 {
+			return d.delegate.HandleMessagingEvent(MSendable, e)
+		}
+
+	case EDelivery:
+		if e.Delivery().Link().IsReceiver() {
+			d.incoming(e)
+		} else {
+			d.outgoing(e)
+		}
+
+	case ETransportTailClosed:
+		c := e.Connection()
+		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
+			e2 := e
+			e2.link = l
+			e2.session = l.Session()
+			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
+		}
+		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
+			e2 := e
+			e2.session = s
+			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
+		}
+		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
+		d.delegate.HandleMessagingEvent(MFinal, e)
+	}
+	return nil
+}
+
+func (d *MessagingDelegator) incoming(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Readable() && !delivery.Partial() {
+		if e.Link().State().Is(SLocalClosed) {
+			e.Link().Advance()
+			if d.AutoAccept {
+				delivery.Release(false)
+			}
+		} else {
+			err = d.delegate.HandleMessagingEvent(MMessage, e)
+			e.Link().Advance()
+			if d.AutoAccept && !delivery.Settled() {
+				if err == nil {
+					delivery.Accept()
+				} else {
+					delivery.Reject()
+				}
+			}
+		}
+	} else if delivery.Updated() && delivery.Settled() {
+		err = d.delegate.HandleMessagingEvent(MSettled, e)
+	}
+	return
+}
+
+func (d *MessagingDelegator) outgoing(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Updated() {
+		switch delivery.Remote().Type() {
+		case Accepted:
+			err = d.delegate.HandleMessagingEvent(MAccepted, e)
+		case Rejected:
+			err = d.delegate.HandleMessagingEvent(MRejected, e)
+		case Released, Modified:
+			err = d.delegate.HandleMessagingEvent(MReleased, e)
+		}
+		if err == nil && delivery.Settled() {
+			err = d.delegate.HandleMessagingEvent(MSettled, e)
+		}
+		if err == nil && d.AutoSettle {
+			delivery.Settle()
+		}
+	}
+	return
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go
new file mode 100644
index 0000000..d900744
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/message.go
@@ -0,0 +1,75 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/internal"
+)
+
+// DecodeMessage decodes the message containined in a delivery event.
+func DecodeMessage(e Event) (m amqp.Message, err error) {
+	defer internal.DoRecover(&err)
+	delivery := e.Delivery()
+	if !delivery.Readable() || delivery.Partial() {
+		return nil, internal.Errorf("attempting to get incomplete message")
+	}
+	data := make([]byte, delivery.Pending())
+	result := delivery.Link().Recv(data)
+	if result != len(data) {
+		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
+	}
+	return amqp.DecodeMessage(data)
+}
+
+// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
+var tags amqp.UidCounter
+
+// Send sends a amqp.Message over a Link.
+// Returns a Delivery that can be use to determine the outcome of the message.
+func (link Link) Send(m amqp.Message) (Delivery, error) {
+	if !link.IsSender() {
+		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
+	}
+	// FIXME aconway 2015-04-08: buffering, error handling
+	delivery := link.Delivery(tags.Next())
+	bytes, err := m.Encode(nil)
+	if err != nil {
+		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
+	}
+	result := link.SendBytes(bytes)
+	link.Advance()
+	if result != len(bytes) {
+		if result < 0 {
+			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
+		} else {
+			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
+		}
+	}
+	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
+		delivery.Settle()
+	}
+	return delivery, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
new file mode 100644
index 0000000..db022ff
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/pump.go
@@ -0,0 +1,357 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/connection.h>
+// #include <proton/transport.h>
+// #include <proton/event.h>
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+// #include <proton/transport.h>
+// #include <proton/session.h>
+// #include <memory.h>
+// #include <stdlib.h>
+//
+// PN_HANDLE(REMOTE_ADDR)
+import "C"
+
+import (
+	"fmt"
+	"io"
+	"net"
+	"qpid.apache.org/proton/go/internal"
+	"sync"
+	"unsafe"
+)
+
+// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
+type bufferChan struct {
+	buffers    chan []byte
+	buf1, buf2 []byte
+}
+
+func newBufferChan(size int) *bufferChan {
+	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
+}
+
+func (b *bufferChan) buffer() []byte {
+	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
+	return b.buf1[:cap(b.buf1)]
+}
+
+// FIXME aconway 2015-05-04: direct sending to Inject may block user goroutines if
+// the pum stops. Make this a function that selects on running.
+
+// FIXME aconway 2015-05-05: for consistency should Pump be called Driver?
+
+/*
+Pump reads from a net.Conn, decodes AMQP events and calls the appropriate
+Handler functions. Actions taken by Handler functions (such as sending messages)
+are encoded and written to the net.Conn.
+
+The proton protocol engine is single threaded (per connection). The Pump runs
+proton in the goroutine that calls Pump.Run() and creates goroutines to feed
+data to/from a net.Conn. You can create multiple Pumps to handle multiple
+connections concurrently.
+
+Methods in this package can only be called in the goroutine that executes the
+corresponding Pump.Run(). You implement the EventHandler or MessagingHandler
+interfaces and provide those values to NewPump(). Their HandleEvent method will be
+called in the Pump goroutine, in typical event-driven style.
+
+Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
+other goroutines, store them, or use them as map indexes. Effectively they are
+just C pointers.  Other goroutines cannot call their methods directly but they
+can can create function closures that call their methods and send those closures
+to the Pump.Inject channel. They will execute safely in the pump
+goroutine. Injected functions, or your handlers, can set up channels to get
+results back to other goroutines.
+
+You are responsible for ensuring you don't use an event value after the C object
+has been deleted. The handler methods will tell you when a value is no longer
+valid. For example after a MethodHandler handles a LinkClosed event, that link
+is no longer valid. If you do Link.Close() yourself (in a handler or injected
+function) the link remains valid until the corresponing LinkClosed event is
+received by the handler.
+
+Pump.Close() will take care of cleaning up any remaining values and types when
+you are done with the Pump. All values associated with a pump become invalid
+when you call Pump.Close()
+
+The qpid.apache.org/proton/go/messaging package will do all this for you, so unless
+you are doing something fairly low-level it is probably a better choice.
+
+*/
+type Pump struct {
+	// Error is set on exit from Run() if there was an error.
+	Error error
+	// Channel to inject functions to be executed in the Pump's proton event loop.
+	Inject chan func()
+
+	conn       net.Conn
+	transport  *C.pn_transport_t
+	connection *C.pn_connection_t
+	collector  *C.pn_collector_t
+	read       *bufferChan    // Read buffers channel.
+	write      *bufferChan    // Write buffers channel.
+	handlers   []EventHandler // Handlers for proton events.
+	running    chan struct{}  // This channel will be closed when the goroutines are done.
+}
+
+const bufferSize = 4096
+
+var pumps map[*C.pn_connection_t]*Pump
+
+func init() {
+	pumps = make(map[*C.pn_connection_t]*Pump)
+}
+
+// NewPump initializes a pump with a connection and handlers. To start it running:
+//    p := NewPump(...)
+//    go run p.Run()
+// The goroutine will exit when the pump is closed or disconnected.
+// You can check for errors on Pump.Error.
+//
+func NewPump(conn net.Conn, handlers ...EventHandler) (*Pump, error) {
+	// Save the connection ID for Connection.String()
+	p := &Pump{
+		Inject:     make(chan func(), 100), // FIXME aconway 2015-05-04: blocking hack
+		conn:       conn,
+		transport:  C.pn_transport(),
+		connection: C.pn_connection(),
+		collector:  C.pn_collector(),
+		handlers:   handlers,
+		read:       newBufferChan(bufferSize),
+		write:      newBufferChan(bufferSize),
+		running:    make(chan struct{}),
+	}
+	if p.transport == nil || p.connection == nil || p.collector == nil {
+		return nil, internal.Errorf("failed to allocate pump")
+	}
+	pnErr := int(C.pn_transport_bind(p.transport, p.connection))
+	if pnErr != 0 {
+		return nil, internal.Errorf("cannot setup pump: %s", internal.PnErrorCode(pnErr))
+	}
+	C.pn_connection_collect(p.connection, p.collector)
+	C.pn_connection_open(p.connection)
+	pumps[p.connection] = p
+	return p, nil
+}
+
+func (p *Pump) String() string {
+	return fmt.Sprintf("(%s-%s)", p.conn.LocalAddr(), p.conn.RemoteAddr())
+}
+
+func (p *Pump) Id() string {
+	return fmt.Sprintf("%p", &p)
+}
+
+// setError sets error only if not already set
+func (p *Pump) setError(e error) {
+	if p.Error == nil {
+		p.Error = e
+	}
+}
+
+// Server puts the Pump in server mode, meaning it will auto-detect security settings on
+// the incoming connnection such as use of SASL and SSL.
+// Must be called before Run()
+//
+func (p *Pump) Server() {
+	C.pn_transport_set_server(p.transport)
+}
+
+func (p *Pump) free() {
+	if p.connection != nil {
+		C.pn_connection_free(p.connection)
+	}
+	if p.transport != nil {
+		C.pn_transport_free(p.transport)
+	}
+	if p.collector != nil {
+		C.pn_collector_free(p.collector)
+	}
+	for _, h := range p.handlers {
+		switch h := h.(type) {
+		case cHandler:
+			C.pn_handler_free(h.pn)
+		}
+	}
+}
+
+// Close closes the AMQP connection, the net.Conn, and stops associated goroutines.
+// It will cause Run() to return. Run() may return earlier if the network disconnects
+// but you must still call Close() to clean everything up.
+//
+// Methods on values associated with the pump (Connections, Sessions, Links) will panic
+// if called after Close()
+//
+func (p *Pump) Close() error {
+	// If the pump is still running, inject a close. Either way wait for it to finish.
+	select {
+	case p.Inject <- func() { C.pn_connection_close(p.connection) }:
+		<-p.running // Wait to finish
+	case <-p.running: // Wait for goroutines to finish
+	}
+	delete(pumps, p.connection)
+	p.free()
+	return p.Error
+}
+
+// Run the pump. Normally called in a goroutine as: go pump.Run()
+// An error dunring Run is stored on p.Error.
+//
+func (p *Pump) Run() {
+	// Signal errors from the read/write goroutines. Don't block if we don't
+	// read all the errors, we only care about the first.
+	error := make(chan error, 2)
+	// FIXME aconway 2015-05-04: 	stop := make(chan struct{}) // Closed to signal that read/write should stop.
+
+	wait := sync.WaitGroup{}
+	wait.Add(2)
+
+	go func() { // Read goroutine
+		defer wait.Done()
+		for {
+			rbuf := p.read.buffer()
+			n, err := p.conn.Read(rbuf)
+			if n > 0 {
+				p.read.buffers <- rbuf[:n]
+			} else if err != nil {
+				close(p.read.buffers)
+				error <- err
+				return
+			}
+		}
+	}()
+
+	go func() { // Write goroutine
+		defer wait.Done()
+		for {
+			wbuf, ok := <-p.write.buffers
+			if !ok {
+				return
+			}
+			_, err := p.conn.Write(wbuf)
+			if err != nil {
+				error <- err
+				return
+			}
+		}
+	}()
+
+	wbuf := p.write.buffer()[:0]
+loop:
+	for {
+		if len(wbuf) == 0 {
+			p.pop(&wbuf)
+		}
+		// Don't set wchan unless there is something to write.
+		var wchan chan []byte
+		if len(wbuf) > 0 {
+			wchan = p.write.buffers
+		}
+
+		select {
+		case buf := <-p.read.buffers: // Read a buffer
+			p.push(buf)
+		case wchan <- wbuf: // Write a buffer
+			wbuf = p.write.buffer()[:0]
+		case f := <-p.Inject: // Function injected from another goroutine
+			f()
+		case err := <-error: // Read or write error
+			p.setError(err)
+			C.pn_transport_close_tail(p.transport)
+			C.pn_transport_close_head(p.transport)
+		}
+		if err := p.process(); err != nil {
+			p.setError(err)
+			break loop
+		}
+	}
+	close(p.write.buffers)
+	p.conn.Close()
+	wait.Wait()
+	close(p.running) // Signal goroutines have exited and Error is set.
+}
+
+func minInt(a, b int) int {
+	if a < b {
+		return a
+	} else {
+		return b
+	}
+}
+
+func (p *Pump) pop(buf *[]byte) {
+	pending := int(C.pn_transport_pending(p.transport))
+	switch {
+	case pending == int(C.PN_EOS):
+		*buf = (*buf)[:]
+		return
+	case pending < 0:
+		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
+	}
+	size := minInt(pending, cap(*buf))
+	*buf = (*buf)[:size]
+	if size == 0 {
+		return
+	}
+	C.memcpy(unsafe.Pointer(&(*buf)[0]), unsafe.Pointer(C.pn_transport_head(p.transport)), C.size_t(size))
+	C.pn_transport_pop(p.transport, C.size_t(size))
+}
+
+func (p *Pump) push(buf []byte) {
+	buf2 := buf
+	for len(buf2) > 0 {
+		n := int(C.pn_transport_push(p.transport, (*C.char)(unsafe.Pointer((&buf2[0]))), C.size_t(len(buf2))))
+		if n <= 0 {
+			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
+		}
+		buf2 = buf2[n:]
+	}
+}
+
+func (p *Pump) handle(e Event) error {
+	for _, h := range p.handlers {
+		if err := h.HandleEvent(e); err != nil {
+			return err
+		}
+	}
+	if e.Type() == ETransportClosed {
+		return io.EOF
+	}
+	return nil
+}
+
+func (p *Pump) process() error {
+	// FIXME aconway 2015-05-04: if a Handler returns error we should stop the pump
+	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
+		e := makeEvent(ce)
+		if err := p.handle(e); err != nil {
+			return err
+		}
+		C.pn_collector_pop(p.collector)
+	}
+	return nil
+}
+
+// Connectoin gets the Pump's connection value.
+func (p *Pump) Connection() Connection { return Connection{p.connection} }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go
new file mode 100644
index 0000000..7043b9c
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers.go
@@ -0,0 +1,253 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+//#include <proton/codec.h>
+//#include <proton/connection.h>
+//#include <proton/session.h>
+//#include <proton/session.h>
+//#include <proton/delivery.h>
+//#include <proton/link.h>
+//#include <proton/event.h>
+//#include <proton/transport.h>
+//#include <proton/link.h>
+//#include <stdlib.h>
+import "C"
+
+import (
+	"fmt"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+// FIXME aconway 2015-05-05: Documentation for generated types.
+
+// Event is an AMQP protocol event.
+type Event struct {
+	pn         *C.pn_event_t
+	eventType  EventType
+	connection Connection
+	session    Session
+	link       Link
+	delivery   Delivery
+}
+
+func makeEvent(pn *C.pn_event_t) Event {
+	return Event{
+		pn:         pn,
+		eventType:  EventType(C.pn_event_type(pn)),
+		connection: Connection{C.pn_event_connection(pn)},
+		session:    Session{C.pn_event_session(pn)},
+		link:       Link{C.pn_event_link(pn)},
+		delivery:   Delivery{C.pn_event_delivery(pn)},
+	}
+}
+func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
+func (e Event) Type() EventType        { return e.eventType }
+func (e Event) Connection() Connection { return e.connection }
+func (e Event) Session() Session       { return e.session }
+func (e Event) Link() Link             { return e.link }
+func (e Event) Delivery() Delivery     { return e.delivery }
+func (e Event) String() string         { return e.Type().String() }
+
+// Data holds a pointer to decoded AMQP data.
+// Use amqp.marshal/unmarshal to access it as Go data types.
+//
+type Data struct{ pn *C.pn_data_t }
+
+func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
+
+func (d Data) Free()                   { C.pn_data_free(d.pn) }
+func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
+func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
+func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
+func (d Data) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
+}
+
+// State holds the state flags for an AMQP endpoint.
+type State byte
+
+const (
+	SLocalUninit  State = C.PN_LOCAL_UNINIT
+	SLocalActive        = C.PN_LOCAL_ACTIVE
+	SLocalClosed        = C.PN_LOCAL_CLOSED
+	SRemoteUninit       = C.PN_REMOTE_UNINIT
+	SRemoteActive       = C.PN_REMOTE_ACTIVE
+	SRemoteClosed       = C.PN_REMOTE_CLOSED
+)
+
+// Is is True if bits & state is non 0.
+func (s State) Is(bits State) bool { return s&bits != 0 }
+
+// Return a State containig just the local flags
+func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
+
+// Return a State containig just the remote flags
+func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
+
+// Endpoint is the common interface for Connection, Link and Session.
+type Endpoint interface {
+	// State is the open/closed state.
+	State() State
+	// Open an endpoint.
+	Open()
+	// Close an endpoint.
+	Close()
+	// Condition holds a local error condition.
+	Condition() Condition
+	// RemoteCondition holds a remote error condition.
+	RemoteCondition() Condition
+}
+
+const (
+	Received uint64 = C.PN_RECEIVED
+	Accepted        = C.PN_ACCEPTED
+	Rejected        = C.PN_REJECTED
+	Released        = C.PN_RELEASED
+	Modified        = C.PN_MODIFIED
+)
+
+// SettleAs is equivalent to d.Update(disposition); d.Settle()
+// It is a no-op if e does not have a delivery.
+func (d Delivery) SettleAs(disposition uint64) {
+	d.Update(disposition)
+	d.Settle()
+}
+
+// Accept accepts and settles a delivery.
+func (d Delivery) Accept() { d.SettleAs(Accepted) }
+
+// Reject rejects and settles a delivery
+func (d Delivery) Reject() { d.SettleAs(Rejected) }
+
+// Release releases and settles a delivery
+// If delivered is true the delivery count for the message will be increased.
+func (d Delivery) Release(delivered bool) {
+	if delivered {
+		d.SettleAs(Modified)
+	} else {
+		d.SettleAs(Released)
+	}
+}
+
+// FIXME aconway 2015-05-05: don't expose DeliveryTag as a C pointer, just as a String?
+
+type DeliveryTag struct{ pn C.pn_delivery_tag_t }
+
+func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
+
+func (l Link) Recv(buf []byte) int {
+	if len(buf) == 0 {
+		return 0
+	}
+	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
+}
+
+func (l Link) SendBytes(bytes []byte) int {
+	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
+}
+
+func pnTag(tag string) C.pn_delivery_tag_t {
+	bytes := []byte(tag)
+	return C.pn_dtag(cPtr(bytes), cLen(bytes))
+}
+
+func (l Link) Delivery(tag string) Delivery {
+	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}
+
+func (s Session) Sender(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_sender(s.pn, cname)}
+}
+
+func (s Session) Receiver(name string) Link {
+	cname := C.CString(name)
+	defer C.free(unsafe.Pointer(cname))
+	return Link{C.pn_receiver(s.pn, cname)}
+}
+
+func joinId(a, b interface{}) string {
+	return fmt.Sprintf("%s/%s", a, b)
+}
+
+// Pump associated with this connection.
+func (c Connection) Pump() *Pump { return pumps[c.pn] }
+
+// Unique (per process) string identifier for a connection, useful for debugging.
+func (c Connection) String() string { return pumps[c.pn].String() }
+
+// Head functions don't follow the normal naming conventions so missed by the generator.
+
+func (c Connection) LinkHead(s State) Link {
+	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
+}
+
+func (c Connection) SessionHead(s State) Session {
+	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
+}
+
+// Unique (per process) string identifier for a session, including connection identifier.
+func (s Session) String() string {
+	return joinId(s.Connection(), fmt.Sprintf("%p", s.pn))
+}
+
+// Unique (per process) string identifier for a link, inlcuding session identifier.
+func (l Link) String() string {
+	return joinId(l.Session(), l.Name())
+}
+
+// Error returns an error interface corresponding to Condition.
+func (c Condition) Error() error {
+	if c.IsNil() {
+		return nil
+	} else {
+		return fmt.Errorf("%s: %s", c.Name(), c.Description())
+	}
+}
+
+// SetIfUnset sets name and description on a condition if it is not already set.
+func (c Condition) SetIfUnset(name, description string) {
+	if !c.IsSet() {
+		c.SetName(name)
+		c.SetDescription(description)
+	}
+}
+
+func (c Connection) Session() (Session, error) {
+	s := Session{C.pn_session(c.pn)}
+	if s.IsNil() {
+		return s, Connection(c).Error()
+	}
+	return s, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go
new file mode 100644
index 0000000..73f0d3b
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/event/wrappers_gen.go
@@ -0,0 +1,732 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// NOTE: This file was generated by genwrap.go, do not edit it by hand.
+//
+
+package event
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+// #include <proton/session.h>
+// #include <proton/link.h>
+// #include <proton/delivery.h>
+// #include <proton/disposition.h>
+// #include <proton/condition.h>
+// #include <proton/terminus.h>
+// #include <proton/connection.h>
+import "C"
+
+type EventType int
+
+const (
+	EConnectionInit         EventType = C.PN_CONNECTION_INIT
+	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
+	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
+	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
+	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
+	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
+	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
+	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
+	ESessionInit            EventType = C.PN_SESSION_INIT
+	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
+	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
+	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
+	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
+	ESessionFinal           EventType = C.PN_SESSION_FINAL
+	ELinkInit               EventType = C.PN_LINK_INIT
+	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
+	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
+	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
+	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
+	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
+	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
+	ELinkFlow               EventType = C.PN_LINK_FLOW
+	ELinkFinal              EventType = C.PN_LINK_FINAL
+	EDelivery               EventType = C.PN_DELIVERY
+	ETransport              EventType = C.PN_TRANSPORT
+	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
+	ETransportError         EventType = C.PN_TRANSPORT_ERROR
+	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
+	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
+	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
+)
+
+func (e EventType) String() string {
+	switch e {
+
+	case C.PN_CONNECTION_INIT:
+		return "ConnectionInit"
+	case C.PN_CONNECTION_BOUND:
+		return "ConnectionBound"
+	case C.PN_CONNECTION_UNBOUND:
+		return "ConnectionUnbound"
+	case C.PN_CONNECTION_LOCAL_OPEN:
+		return "ConnectionLocalOpen"
+	case C.PN_CONNECTION_REMOTE_OPEN:
+		return "ConnectionRemoteOpen"
+	case C.PN_CONNECTION_LOCAL_CLOSE:
+		return "ConnectionLocalClose"
+	case C.PN_CONNECTION_REMOTE_CLOSE:
+		return "ConnectionRemoteClose"
+	case C.PN_CONNECTION_FINAL:
+		return "ConnectionFinal"
+	case C.PN_SESSION_INIT:
+		return "SessionInit"
+	case C.PN_SESSION_LOCAL_OPEN:
+		return "SessionLocalOpen"
+	case C.PN_SESSION_REMOTE_OPEN:
+		return "SessionRemoteOpen"
+	case C.PN_SESSION_LOCAL_CLOSE:
+		return "SessionLocalClose"
+	case C.PN_SESSION_REMOTE_CLOSE:
+		return "SessionRemoteClose"
+	case C.PN_SESSION_FINAL:
+		return "SessionFinal"
+	case C.PN_LINK_INIT:
+		return "LinkInit"
+	case C.PN_LINK_LOCAL_OPEN:
+		return "LinkLocalOpen"
+	case C.PN_LINK_REMOTE_OPEN:
+		return "LinkRemoteOpen"
+	case C.PN_LINK_LOCAL_CLOSE:
+		return "LinkLocalClose"
+	case C.PN_LINK_REMOTE_CLOSE:
+		return "LinkRemoteClose"
+	case C.PN_LINK_LOCAL_DETACH:
+		return "LinkLocalDetach"
+	case C.PN_LINK_REMOTE_DETACH:
+		return "LinkRemoteDetach"
+	case C.PN_LINK_FLOW:
+		return "LinkFlow"
+	case C.PN_LINK_FINAL:
+		return "LinkFinal"
+	case C.PN_DELIVERY:
+		return "Delivery"
+	case C.PN_TRANSPORT:
+		return "Transport"
+	case C.PN_TRANSPORT_AUTHENTICATED:
+		return "TransportAuthenticated"
+	case C.PN_TRANSPORT_ERROR:
+		return "TransportError"
+	case C.PN_TRANSPORT_HEAD_CLOSED:
+		return "TransportHeadClosed"
+	case C.PN_TRANSPORT_TAIL_CLOSED:
+		return "TransportTailClosed"
+	case C.PN_TRANSPORT_CLOSED:
+		return "TransportClosed"
+	}
+	return "Unknown"
+}
+
+// Wrappers for declarations in session.h
+
+type Session struct{ pn *C.pn_session_t }
+
+func (s Session) IsNil() bool { return s.pn == nil }
+func (s Session) Free() {
+	C.pn_session_free(s.pn)
+}
+func (s Session) State() State {
+	return State(C.pn_session_state(s.pn))
+}
+func (s Session) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
+}
+func (s Session) Condition() Condition {
+	return Condition{C.pn_session_condition(s.pn)}
+}
+func (s Session) RemoteCondition() Condition {
+	return Condition{C.pn_session_remote_condition(s.pn)}
+}
+func (s Session) Connection() Connection {
+	return Connection{C.pn_session_connection(s.pn)}
+}
+func (s Session) Open() {
+	C.pn_session_open(s.pn)
+}
+func (s Session) Close() {
+	C.pn_session_close(s.pn)
+}
+func (s Session) IncomingCapacity() uint {
+	return uint(C.pn_session_get_incoming_capacity(s.pn))
+}
+func (s Session) SetIncomingCapacity(capacity uint) {
+	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
+}
+func (s Session) OutgoingBytes() uint {
+	return uint(C.pn_session_outgoing_bytes(s.pn))
+}
+func (s Session) IncomingBytes() uint {
+	return uint(C.pn_session_incoming_bytes(s.pn))
+}
+func (s Session) Next(state State) Session {
+	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
+}
+
+// Wrappers for declarations in link.h
+
+type SndSettleMode C.pn_snd_settle_mode_t
+
+const (
+	PnSndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
+	PnSndSettled   SndSettleMode = C.PN_SND_SETTLED
+	PnSndMixed     SndSettleMode = C.PN_SND_MIXED
+)
+
+func (e SndSettleMode) String() string {
+	switch e {
+
+	case C.PN_SND_UNSETTLED:
+		return "SndUnsettled"
+	case C.PN_SND_SETTLED:
+		return "SndSettled"
+	case C.PN_SND_MIXED:
+		return "SndMixed"
+	}
+	return "unknown"
+}
+
+type RcvSettleMode C.pn_rcv_settle_mode_t
+
+const (
+	PnRcvFirst  RcvSettleMode = C.PN_RCV_FIRST
+	PnRcvSecond RcvSettleMode = C.PN_RCV_SECOND
+)
+
+func (e RcvSettleMode) String() string {
+	switch e {
+
+	case C.PN_RCV_FIRST:
+		return "RcvFirst"
+	case C.PN_RCV_SECOND:
+		return "RcvSecond"
+	}
+	return "unknown"
+}
+
+type Link struct{ pn *C.pn_link_t }
+
+func (l Link) IsNil() bool { return l.pn == nil }
+func (l Link) Free() {
+	C.pn_link_free(l.pn)
+}
+func (l Link) Name() string {
+	return C.GoString(C.pn_link_name(l.pn))
+}
+func (l Link) IsSender() bool {
+	return bool(C.pn_link_is_sender(l.pn))
+}
+func (l Link) IsReceiver() bool {
+	return bool(C.pn_link_is_receiver(l.pn))
+}
+func (l Link) State() State {
+	return State(C.pn_link_state(l.pn))
+}
+func (l Link) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
+}
+func (l Link) Condition() Condition {
+	return Condition{C.pn_link_condition(l.pn)}
+}
+func (l Link) RemoteCondition() Condition {
+	return Condition{C.pn_link_remote_condition(l.pn)}
+}
+func (l Link) Session() Session {
+	return Session{C.pn_link_session(l.pn)}
+}
+func (l Link) Next(state State) Link {
+	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
+}
+func (l Link) Open() {
+	C.pn_link_open(l.pn)
+}
+func (l Link) Close() {
+	C.pn_link_close(l.pn)
+}
+func (l Link) Detach() {
+	C.pn_link_detach(l.pn)
+}
+func (l Link) Source() Terminus {
+	return Terminus{C.pn_link_source(l.pn)}
+}
+func (l Link) Target() Terminus {
+	return Terminus{C.pn_link_target(l.pn)}
+}
+func (l Link) RemoteSource() Terminus {
+	return Terminus{C.pn_link_remote_source(l.pn)}
+}
+func (l Link) RemoteTarget() Terminus {
+	return Terminus{C.pn_link_remote_target(l.pn)}
+}
+func (l Link) Current() Delivery {
+	return Delivery{C.pn_link_current(l.pn)}
+}
+func (l Link) Advance() bool {
+	return bool(C.pn_link_advance(l.pn))
+}
+func (l Link) Credit() int {
+	return int(C.pn_link_credit(l.pn))
+}
+func (l Link) Queued() int {
+	return int(C.pn_link_queued(l.pn))
+}
+func (l Link) RemoteCredit() int {
+	return int(C.pn_link_remote_credit(l.pn))
+}
+func (l Link) IsDrain() bool {
+	return bool(C.pn_link_get_drain(l.pn))
+}
+func (l Link) Drained() int {
+	return int(C.pn_link_drained(l.pn))
+}
+func (l Link) Available() int {
+	return int(C.pn_link_available(l.pn))
+}
+func (l Link) SndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
+}
+func (l Link) RcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
+}
+func (l Link) SetSndSettleMode(mode SndSettleMode) {
+	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
+}
+func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
+	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
+}
+func (l Link) RemoteSndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
+}
+func (l Link) RemoteRcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
+}
+func (l Link) Unsettled() int {
+	return int(C.pn_link_unsettled(l.pn))
+}
+func (l Link) Offered(credit int) {
+	C.pn_link_offered(l.pn, C.int(credit))
+}
+func (l Link) Flow(credit int) {
+	C.pn_link_flow(l.pn, C.int(credit))
+}
+func (l Link) Drain(credit int) {
+	C.pn_link_drain(l.pn, C.int(credit))
+}
+func (l Link) SetDrain(drain bool) {
+	C.pn_link_set_drain(l.pn, C.bool(drain))
+}
+func (l Link) Draining() bool {
+	return bool(C.pn_link_draining(l.pn))
+}
+
+// Wrappers for declarations in delivery.h
+
+type Delivery struct{ pn *C.pn_delivery_t }
+
+func (d Delivery) IsNil() bool { return d.pn == nil }
+func (d Delivery) Tag() DeliveryTag {
+	return DeliveryTag{C.pn_delivery_tag(d.pn)}
+}
+func (d Delivery) Link() Link {
+	return Link{C.pn_delivery_link(d.pn)}
+}
+func (d Delivery) Local() Disposition {
+	return Disposition{C.pn_delivery_local(d.pn)}
+}
+func (d Delivery) LocalState() uint64 {
+	return uint64(C.pn_delivery_local_state(d.pn))
+}
+func (d Delivery) Remote() Disposition {
+	return Disposition{C.pn_delivery_remote(d.pn)}
+}
+func (d Delivery) RemoteState() uint64 {
+	return uint64(C.pn_delivery_remote_state(d.pn))
+}
+func (d Delivery) Settled() bool {
+	return bool(C.pn_delivery_settled(d.pn))
+}
+func (d Delivery) Pending() uint {
+	return uint(C.pn_delivery_pending(d.pn))
+}
+func (d Delivery) Partial() bool {
+	return bool(C.pn_delivery_partial(d.pn))
+}
+func (d Delivery) Writable() bool {
+	return bool(C.pn_delivery_writable(d.pn))
+}
+func (d Delivery) Readable() bool {
+	return bool(C.pn_delivery_readable(d.pn))
+}
+func (d Delivery) Updated() bool {
+	return bool(C.pn_delivery_updated(d.pn))
+}
+func (d Delivery) Update(state uint64) {
+	C.pn_delivery_update(d.pn, C.uint64_t(state))
+}
+func (d Delivery) Clear() {
+	C.pn_delivery_clear(d.pn)
+}
+func (d Delivery) Current() bool {
+	return bool(C.pn_delivery_current(d.pn))
+}
+func (d Delivery) Settle() {
+	C.pn_delivery_settle(d.pn)
+}
+func (d Delivery) Dump() {
+	C.pn_delivery_dump(d.pn)
+}
+func (d Delivery) Buffered() bool {
+	return bool(C.pn_delivery_buffered(d.pn))
+}
+
+// Wrappers for declarations in disposition.h
+
+type Disposition struct{ pn *C.pn_disposition_t }
+
+func (d Disposition) IsNil() bool { return d.pn == nil }
+func (d Disposition) Type() uint64 {
+	return uint64(C.pn_disposition_type(d.pn))
+}
+func (d Disposition) Condition() Condition {
+	return Condition{C.pn_disposition_condition(d.pn)}
+}
+func (d Disposition) Data() Data {
+	return Data{C.pn_disposition_data(d.pn)}
+}
+func (d Disposition) SectionNumber() uint16 {
+	return uint16(C.pn_disposition_get_section_number(d.pn))
+}
+func (d Disposition) SetSectionNumber(section_number uint16) {
+	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
+}
+func (d Disposition) SectionOffset() uint64 {
+	return uint64(C.pn_disposition_get_section_offset(d.pn))
+}
+func (d Disposition) SetSectionOffset(section_offset uint64) {
+	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
+}
+func (d Disposition) IsFailed() bool {
+	return bool(C.pn_disposition_is_failed(d.pn))
+}
+func (d Disposition) SetFailed(failed bool) {
+	C.pn_disposition_set_failed(d.pn, C.bool(failed))
+}
+func (d Disposition) IsUndeliverable() bool {
+	return bool(C.pn_disposition_is_undeliverable(d.pn))
+}
+func (d Disposition) SetUndeliverable(undeliverable bool) {
+	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
+}
+func (d Disposition) Annotations() Data {
+	return Data{C.pn_disposition_annotations(d.pn)}
+}
+
+// Wrappers for declarations in condition.h
+
+type Condition struct{ pn *C.pn_condition_t }
+
+func (c Condition) IsNil() bool { return c.pn == nil }
+func (c Condition) IsSet() bool {
+	return bool(C.pn_condition_is_set(c.pn))
+}
+func (c Condition) Clear() {
+	C.pn_condition_clear(c.pn)
+}
+func (c Condition) Name() string {
+	return C.GoString(C.pn_condition_get_name(c.pn))
+}
+func (c Condition) SetName(name string) int {
+	nameC := C.CString(name)
+	defer C.free(unsafe.Pointer(nameC))
+
+	return int(C.pn_condition_set_name(c.pn, nameC))
+}
+func (c Condition) Description() string {
+	return C.GoString(C.pn_condition_get_description(c.pn))
+}
+func (c Condition) SetDescription(description string) int {
+	descriptionC := C.CString(description)
+	defer C.free(unsafe.Pointer(descriptionC))
+
+	return int(C.pn_condition_set_description(c.pn, descriptionC))
+}
+func (c Condition) Info() Data {
+	return Data{C.pn_condition_info(c.pn)}
+}
+func (c Condition) IsRedirect() bool {
+	return bool(C.pn_condition_is_redirect(c.pn))
+}
+func (c Condition) RedirectHost() string {
+	return C.GoString(C.pn_condition_redirect_host(c.pn))
+}
+func (c Condition) RedirectPort() int {
+	return int(C.pn_condition_redirect_port(c.pn))
+}
+
+// Wrappers for declarations in terminus.h
+
+type TerminusType C.pn_terminus_type_t
+
+const (
+	PnUnspecified TerminusType = C.PN_UNSPECIFIED
+	PnSource      TerminusType = C.PN_SOURCE
+	PnTarget      TerminusType = C.PN_TARGET
+	PnCoordinator TerminusType = C.PN_COORDINATOR
+)
+
+func (e TerminusType) String() string {
+	switch e {
+
+	case C.PN_UNSPECIFIED:
+		return "Unspecified"
+	case C.PN_SOURCE:
+		return "Source"
+	case C.PN_TARGET:
+		return "Target"
+	case C.PN_COORDINATOR:
+		return "Coordinator"
+	}
+	return "unknown"
+}
+
+type Durability C.pn_durability_t
+
+const (
+	PnNondurable    Durability = C.PN_NONDURABLE
+	PnConfiguration Durability = C.PN_CONFIGURATION
+	PnDeliveries    Durability = C.PN_DELIVERIES
+)
+
+func (e Durability) String() string {
+	switch e {
+
+	case C.PN_NONDURABLE:
+		return "Nondurable"
+	case C.PN_CONFIGURATION:
+		return "Configuration"
+	case C.PN_DELIVERIES:
+		return "Deliveries"
+	}
+	return "unknown"
+}
+
+type ExpiryPolicy C.pn_expiry_policy_t
+
+const (
+	PnExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
+	PnExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
+	PnExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
+	PnExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
+)
+
+func (e ExpiryPolicy) String() string {
+	switch e {
+
+	case C.PN_EXPIRE_WITH_LINK:
+		return "ExpireWithLink"
+	case C.PN_EXPIRE_WITH_SESSION:
+		return "ExpireWithSession"
+	case C.PN_EXPIRE_WITH_CONNECTION:
+		return "ExpireWithConnection"
+	case C.PN_EXPIRE_NEVER:
+		return "ExpireNever"
+	}
+	return "unknown"
+}
+
+type DistributionMode C.pn_distribution_mode_t
+
+const (
+	PnDistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
+	PnDistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
+	PnDistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
+)
+
+func (e DistributionMode) String() string {
+	switch e {
+
+	case C.PN_DIST_MODE_UNSPECIFIED:
+		return "DistModeUnspecified"
+	case C.PN_DIST_MODE_COPY:
+		return "DistModeCopy"
+	case C.PN_DIST_MODE_MOVE:
+		return "DistModeMove"
+	}
+	return "unknown"
+}
+
+type Terminus struct{ pn *C.pn_terminus_t }
+
+func (t Terminus) IsNil() bool { return t.pn == nil }
+func (t Terminus) Type() TerminusType {
+	return TerminusType(C.pn_terminus_get_type(t.pn))
+}
+func (t Terminus) SetType(type_ TerminusType) int {
+	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
+}
+func (t Terminus) Address() string {
+	return C.GoString(C.pn_terminus_get_address(t.pn))
+}
+func (t Terminus) SetAddress(address string) int {
+	addressC := C.CString(address)
+	defer C.free(unsafe.Pointer(addressC))
+
+	return int(C.pn_terminus_set_address(t.pn, addressC))
+}
+func (t Terminus) SetDistributionMode(mode DistributionMode) int {
+	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
+}
+func (t Terminus) Durability() Durability {
+	return Durability(C.pn_terminus_get_durability(t.pn))
+}
+func (t Terminus) SetDurability(durability Durability) int {
+	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
+}
+func (t Terminus) ExpiryPolicy() ExpiryPolicy {
+	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
+}
+func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
+	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
+}
+func (t Terminus) Timeout() time.Duration {
+	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
+}
+func (t Terminus) SetTimeout(timeout time.Duration) int {
+	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
+}
+func (t Terminus) IsDynamic() bool {
+	return bool(C.pn_terminus_is_dynamic(t.pn))
+}
+func (t Terminus) SetDynamic(dynamic bool) int {
+	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
+}
+func (t Terminus) Properties() Data {
+	return Data{C.pn_terminus_properties(t.pn)}
+}
+func (t Terminus) Capabilities() Data {
+	return Data{C.pn_terminus_capabilities(t.pn)}
+}
+func (t Terminus) Outcomes() Data {
+	return Data{C.pn_terminus_outcomes(t.pn)}
+}
+func (t Terminus) Filter() Data {
+	return Data{C.pn_terminus_filter(t.pn)}
+}
+func (t Terminus) Copy(src Terminus) int {
+	return int(C.pn_terminus_copy(t.pn, src.pn))
+}
+
+// Wrappers for declarations in connection.h
+
+type Connection struct{ pn *C.pn_connection_t }
+
+func (c Connection) IsNil() bool { return c.pn == nil }
+func (c Connection) Free() {
+	C.pn_connection_free(c.pn)
+}
+func (c Connection) Release() {
+	C.pn_connection_release(c.pn)
+}
+func (c Connection) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
+}
+func (c Connection) State() State {
+	return State(C.pn_connection_state(c.pn))
+}
+func (c Connection) Open() {
+	C.pn_connection_open(c.pn)
+}
+func (c Connection) Close() {
+	C.pn_connection_close(c.pn)
+}
+func (c Connection) Reset() {
+	C.pn_connection_reset(c.pn)
+}
+func (c Connection) Condition() Condition {
+	return Condition{C.pn_connection_condition(c.pn)}
+}
+func (c Connection) RemoteCondition() Condition {
+	return Condition{C.pn_connection_remote_condition(c.pn)}
+}
+func (c Connection) Container() string {
+	return C.GoString(C.pn_connection_get_container(c.pn))
+}
+func (c Connection) SetContainer(container string) {
+	containerC := C.CString(container)
+	defer C.free(unsafe.Pointer(containerC))
+
+	C.pn_connection_set_container(c.pn, containerC)
+}
+func (c Connection) SetUser(user string) {
+	userC := C.CString(user)
+	defer C.free(unsafe.Pointer(userC))
+
+	C.pn_connection_set_user(c.pn, userC)
+}
+func (c Connection) SetPassword(password string) {
+	passwordC := C.CString(password)
+	defer C.free(unsafe.Pointer(passwordC))
+
+	C.pn_connection_set_password(c.pn, passwordC)
+}
+func (c Connection) User() string {
+	return C.GoString(C.pn_connection_get_user(c.pn))
+}
+func (c Connection) Hostname() string {
+	return C.GoString(C.pn_connection_get_hostname(c.pn))
+}
+func (c Connection) SetHostname(hostname string) {
+	hostnameC := C.CString(hostname)
+	defer C.free(unsafe.Pointer(hostnameC))
+
+	C.pn_connection_set_hostname(c.pn, hostnameC)
+}
+func (c Connection) RemoteContainer() string {
+	return C.GoString(C.pn_connection_remote_container(c.pn))
+}
+func (c Connection) RemoteHostname() string {
+	return C.GoString(C.pn_connection_remote_hostname(c.pn))
+}
+func (c Connection) OfferedCapabilities() Data {
+	return Data{C.pn_connection_offered_capabilities(c.pn)}
+}
+func (c Connection) DesiredCapabilities() Data {
+	return Data{C.pn_connection_desired_capabilities(c.pn)}
+}
+func (c Connection) Properties() Data {
+	return Data{C.pn_connection_properties(c.pn)}
+}
+func (c Connection) RemoteOfferedCapabilities() Data {
+	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
+}
+func (c Connection) RemoteDesiredCapabilities() Data {
+	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
+}
+func (c Connection) RemoteProperties() Data {
+	return Data{C.pn_connection_remote_properties(c.pn)}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
new file mode 100644
index 0000000..01ba890
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/internal/error.go
@@ -0,0 +1,125 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Internal implementation details - ignore.
+package internal
+
+// #cgo LDFLAGS: -lqpid-proton
+// #include <proton/error.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"fmt"
+	"runtime"
+	"sync"
+	"sync/atomic"
+	"unsafe"
+)
+
+// Error type for all proton errors.
+type Error string
+
+// Error prefixes error message with proton:
+func (e Error) Error() string {
+	return "proton: " + string(e)
+}
+
+// Errorf creates an Error with a formatted message
+func Errorf(format string, a ...interface{}) Error {
+	return Error(fmt.Sprintf(format, a...))
+}
+
+type PnErrorCode int
+
+func (e PnErrorCode) String() string {
+	switch e {
+	case C.PN_EOS:
+		return "end-of-data"
+	case C.PN_ERR:
+		return "error"
+	case C.PN_OVERFLOW:
+		return "overflow"
+	case C.PN_UNDERFLOW:
+		return "underflow"
+	case C.PN_STATE_ERR:
+		return "bad-state"
+	case C.PN_ARG_ERR:
+		return "invalid-argument"
+	case C.PN_TIMEOUT:
+		return "timeout"
+	case C.PN_INTR:
+		return "interrupted"
+	case C.PN_INPROGRESS:
+		return "in-progress"
+	default:
+		return fmt.Sprintf("unknown-error(%d)", e)
+	}
+}
+
+func PnError(p unsafe.Pointer) error {
+	e := (*C.pn_error_t)(p)
+	if e == nil || C.pn_error_code(e) == 0 {
+		return nil
+	}
+	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
+}
+
+// DoRecover is called to recover from internal panics
+func DoRecover(err *error) {
+	r := recover()
+	switch r := r.(type) {
+	case nil: // We are not recovering
+		return
+	case runtime.Error: // Don't catch runtime.Error
+		panic(r)
+	case error:
+		*err = r
+	default:
+		panic(r)
+	}
+}
+
+// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
+func panicIf(condition bool, fmt string, args ...interface{}) {
+	if condition {
+		panic(Errorf(fmt, args...))
+	}
+}
+
+// FirstError is a goroutine-safe error holder that keeps the first error that is set.
+type FirstError struct {
+	err  atomic.Value
+	once sync.Once
+}
+
+// Set the error if not allread set.
+func (e *FirstError) Set(err error) {
+	e.once.Do(func() { e.err.Store(err) })
+}
+
+// Get the error.
+func (e *FirstError) Get() error {
+	v := e.err.Load()
+	if v != nil {
+		return v.(error)
+	} else {
+		return nil
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go
new file mode 100644
index 0000000..c815f4e
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/doc.go
@@ -0,0 +1,28 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package messaging provides a procedural, concurrent Go API for exchanging AMQP messages.
+*/
+package messaging
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go
new file mode 100644
index 0000000..4a97b9d
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go
@@ -0,0 +1,70 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package messaging
+
+import (
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+)
+
+// FIXME aconway 2015-04-28: cleanup - exposing delivery vs. disposition.
+
+type acksMap map[event.Delivery]chan Disposition
+type receiverMap map[event.Link]chan amqp.Message
+
+type handler struct {
+	connection *Connection
+	acks       acksMap
+	receivers  receiverMap
+}
+
+func newHandler(c *Connection) *handler {
+	return &handler{c, make(acksMap), make(receiverMap)}
+}
+
+func (h *handler) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
+	switch t {
+	// FIXME aconway 2015-04-29: handle errors.
+	case event.MConnectionClosed:
+		for _, ack := range h.acks {
+			// FIXME aconway 2015-04-29: communicate error info
+			close(ack)
+		}
+
+	case event.MSettled:
+		ack := h.acks[e.Delivery()]
+		if ack != nil {
+			ack <- Disposition(e.Delivery().Remote().Type())
+			close(ack)
+			delete(h.acks, e.Delivery())
+		}
+
+	case event.MMessage:
+		r := h.receivers[e.Link()]
+		if r != nil {
+			m, _ := event.DecodeMessage(e)
+			// FIXME aconway 2015-04-29: hack, direct send, possible blocking.
+			r <- m
+		} else {
+			// FIXME aconway 2015-04-29: Message with no receiver - log? panic? deadletter? drop?
+		}
+	}
+	return nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
new file mode 100644
index 0000000..e653de2
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/messaging.go
@@ -0,0 +1,250 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package messaging
+
+// #include <proton/disposition.h>
+import "C"
+
+import (
+	"net"
+	"qpid.apache.org/proton/go/amqp"
+	"qpid.apache.org/proton/go/event"
+)
+
+// Connection is a connection to a remote AMQP endpoint.
+//
+// You can set exported fields to configure the connection before calling
+// Connection.Open()
+//
+type Connection struct {
+	// Server = true means a the connection will do automatic protocol detection.
+	Server bool
+
+	// FIXME aconway 2015-04-17: Other parameters to set up SSL, SASL etc.
+
+	handler *handler
+	pump    *event.Pump
+	session Session
+}
+
+// Make an AMQP connection over a net.Conn connection.
+//
+// Use Connection.Close() to close the Connection, this will also close conn.
+// Using conn.Close() directly will cause an abrupt disconnect rather than an
+// orderly AMQP close.
+//
+func (c *Connection) Open(conn net.Conn) (err error) {
+	c.handler = newHandler(c)
+	c.pump, err = event.NewPump(conn,
+		event.NewMessagingDelegator(c.handler),
+	)
+	if err != nil {
+		return err
+	}
+	if c.Server {
+		c.pump.Server()
+	}
+	go c.pump.Run()
+	return nil
+}
+
+// Connect opens a default client connection. It is a shortcut for
+//    c := &Connection
+//    c.Open()
+//
+func Connect(conn net.Conn) (*Connection, error) {
+	c := &Connection{}
+	err := c.Open(conn)
+	return c, err
+}
+
+// Close the connection.
+//
+// Connections must be closed to clean up resources and stop associated goroutines.
+func (c *Connection) Close() error { return c.pump.Close() }
+
+// DefaultSession returns a default session for the connection.
+//
+// It is created on the first call to DefaultSession() and returned from all subsequent calls.
+// Use Session() for more control over creating sessions.
+//
+func (c *Connection) DefaultSession() (s Session, err error) {
+	if c.session.e.IsNil() {
+		c.session, err = c.Session()
+	}
+	return c.session, err
+}
+
+type sessionErr struct {
+	s   event.Session
+	err error
+}
+
+// Session creates a new session.
+func (c *Connection) Session() (Session, error) {
+	connection := c.pump.Connection()
+	result := make(chan sessionErr)
+	c.pump.Inject <- func() {
+		s, err := connection.Session()
+		if err == nil {
+			s.Open()
+		}
+		result <- sessionErr{s, err}
+	}
+	se := <-result
+	return Session{se.s, c.pump}, se.err
+}
+
+// FIXME aconway 2015-04-27: set sender name, options etc.
+
+// Sender creates a Sender that will send messages to the address addr.
+func (c *Connection) Sender(addr string) (s Sender, err error) {
+	session, err := c.DefaultSession()
+	if err != nil {
+		return Sender{}, err
+	}
+	result := make(chan Sender)
+	c.pump.Inject <- func() {
+		link := session.e.Sender(linkNames.Next())
+		if link.IsNil() {
+			err = session.e.Error()
+		} else {
+			link.Target().SetAddress(addr)
+			// FIXME aconway 2015-04-27: link options?
+			link.Open()
+		}
+		result <- Sender{Link{c, link}}
+	}
+	return <-result, err
+}
+
+// Receiver returns a receiver that will receive messages sent to address addr.
+func (c *Connection) Receiver(addr string) (r Receiver, err error) {
+	// FIXME aconway 2015-04-29: move code to session, in link.go?
+	session, err := c.DefaultSession()
+	if err != nil {
+		return Receiver{}, err
+	}
+	result := make(chan Receiver)
+	c.pump.Inject <- func() {
+		link := session.e.Receiver(linkNames.Next())
+		if link.IsNil() {
+			err = session.e.Error()
+		} else {
+			link.Source().SetAddress(addr)
+			// FIXME aconway 2015-04-27: link options?
+			link.Open()
+		}
+		// FIXME aconway 2015-04-29: hack to avoid blocking, need proper buffering linked to flow control
+		rchan := make(chan amqp.Message, 1000)
+		c.handler.receivers[link] = rchan
+		result <- Receiver{Link{c, link}, rchan}
+	}
+	return <-result, err
+}
+
+// FIXME aconway 2015-04-29: counter per session.
+var linkNames amqp.UidCounter
+
+// Session is an AMQP session, it contains Senders and Receivers.
+// Every Connection has a DefaultSession, you can create additional sessions
+// with Connection.Session()
+type Session struct {
+	e    event.Session
+	pump *event.Pump
+}
+
+// FIXME aconway 2015-05-05: REWORK Sender/receiver/session.
+
+// Disposition indicates the outcome of a settled message delivery.
+type Disposition uint64
+
+const (
+	// Message was accepted by the receiver
+	Accepted Disposition = C.PN_ACCEPTED
+	// Message was rejected as invalid by the receiver
+	Rejected = C.PN_REJECTED
+	// Message was not processed by the receiver but may be processed by some other receiver.
+	Released = C.PN_RELEASED
+)
+
+// String human readable name for a Disposition.
+func (d Disposition) String() string {
+	switch d {
+	case Accepted:
+		return "Accepted"
+	case Rejected:
+		return "Rejected"
+	case Released:
+		return "Released"
+	default:
+		return "Unknown"
+	}
+}
+
+// FIXME aconway 2015-04-29: How to signal errors via ack channels.
+
+// An Acknowledgement is a channel which will receive the Disposition of the message
+// when it is acknowledged. The channel is closed after the disposition is sent.
+type Acknowledgement <-chan Disposition
+
+// Link has common data and methods for Sender and Receiver links.
+type Link struct {
+	connection *Connection
+	elink      event.Link
+}
+
+// Sender sends messages.
+type Sender struct {
+	Link
+}
+
+// FIXME aconway 2015-04-28: allow user to specify delivery tag.
+// FIXME aconway 2015-04-28: should we provide a sending channel rather than a send function?
+
+// Send sends a message. If d is not nil, the disposition is retured on d.
+// If d is nil the message is sent pre-settled and no disposition is returned.
+func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
+	ackChan := make(chan Disposition, 1)
+	ack = ackChan
+	s.connection.pump.Inject <- func() {
+		// FIXME aconway 2015-04-28: flow control & credit, buffer or fail?
+		delivery, err := s.elink.Send(m)
+		if err == nil { // FIXME aconway 2015-04-28: error handling
+			s.connection.handler.acks[delivery] = ackChan
+		}
+	}
+	return ack, nil
+}
+
+// Close the sender.
+func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
+
+// Receiver receives messages via the channel Receive.
+type Receiver struct {
+	Link
+	// Channel of messag
+	Receive <-chan amqp.Message
+}
+
+// FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
+
+// Close the Receiver.
+func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[32/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a
deleted file mode 100644
index 6731803..0000000
Binary files a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/internal.a and /dev/null differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[30/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a
deleted file mode 100644
index 866a862..0000000
--- a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a
+++ /dev/null
@@ -1,3319 +0,0 @@
-!<arch>
-__.PKGDEF       0           0     0     644     33136     `
-go object linux amd64 go1.4.2 X:precisestack
-
-$$
-package reactor
-	import net "net"
-	import sync "sync"
-	import runtime "runtime"
-	import time "time"
-	import io "io"
-	import cgo "runtime/cgo"
-	import amqp "qpid.apache.org/proton/go/amqp"
-	import os "os"
-	import syscall "syscall"
-	import fmt "fmt"
-	import internal "qpid.apache.org/proton/go/internal"
-	import reflect "reflect"
-	import path "path"
-	import unsafe "unsafe"
-	type @""._Ctype_struct_pn_event_t struct {}
-	type @"".EventType int
-	func (@"".e·2 @"".EventType) String () (? string)
-	type @""._Ctype_struct_pn_connection_t struct {}
-	type @"sync".Mutex struct { @"sync".state int32; @"sync".sema uint32 }
-	func (@"sync".m·1 *@"sync".Mutex) Lock ()
-	func (@"sync".m·1 *@"sync".Mutex) Unlock ()
-	type @"qpid.apache.org/proton/go/internal".FirstError struct { @"qpid.apache.org/proton/go/internal".err error; @"qpid.apache.org/proton/go/internal".lock @"sync".Mutex }
-	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Get () (? error)
-	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Set (@"qpid.apache.org/proton/go/internal".err·3 error) (? error)
-	type @"net".Addr interface { Network() (? string); String() (? string) }
-	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
-	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
-	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
-	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
-	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
-	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
-	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
-	type @"time".Duration int64
-	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
-	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
-	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
-	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
-	func (@"time".d·2 @"time".Duration) String () (? string)
-	type @"time".Month int
-	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
-	type @"time".Weekday int
-	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
-	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
-	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
-	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
-	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
-	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
-	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
-	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
-	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
-	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
-	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
-	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
-	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
-	type @"net".Conn interface { Close() (? error); LocalAddr() (? @"net".Addr); Read(@"net".b []byte) (@"net".n int, @"net".err error); RemoteAddr() (? @"net".Addr); SetDeadline(@"net".t @"time".Time) (? error); SetReadDeadline(@"net".t @"time".Time) (? error); SetWriteDeadline(@"net".t @"time".Time) (? error); Write(@"net".b []byte) (@"net".n int, @"net".err error) }
-	type @""._Ctype_struct_pn_transport_t struct {}
-	type @""._Ctype_struct_pn_collector_t struct {}
-	type @"".bufferChan struct { @"".buffers chan []byte; @"".buf1 []byte; @"".buf2 []byte }
-	func (@"".b·2 *@"".bufferChan) @"".buffer () (? []byte) { @"".b·2.@"".buf1, @"".b·2.@"".buf2 = @"".b·2.@"".buf2, @"".b·2.@"".buf1; return @"".b·2.@"".buf1[:cap(@"".b·2.@"".buf1)] }
-	type @"sync".Once struct { @"sync".m @"sync".Mutex; @"sync".done uint32 }
-	func (@"sync".o·1 *@"sync".Once) Do (@"sync".f·2 func() "esc:0x0")
-	type @"".Pump struct { @"".err @"qpid.apache.org/proton/go/internal".FirstError; @"".inject chan func(); @"".conn @"net".Conn; @"".connection @"".Connection; @"".transport *@""._Ctype_struct_pn_transport_t; @"".collector *@""._Ctype_struct_pn_collector_t; @"".read *@"".bufferChan; @"".write *@"".bufferChan; @"".handlers []@"".EventHandler; @"".running chan struct {}; @"".closeOnce @"sync".Once }
-	func (@"".p·1 *@"".Pump) Close (@"".err·2 error)
-	func (@"".p·2 *@"".Pump "esc:0x1") Connection () (? @"".Connection) { return @"".p·2.@"".connection }
-	func (@"".p·2 *@"".Pump) Error () (? error)
-	func (@"".p·2 *@"".Pump) Id () (? string)
-	func (@"".p·2 *@"".Pump) Inject (@"".f·3 func()) (? error)
-	func (@"".p·2 *@"".Pump) InjectWait (@"".f·3 func()) (@"".err·1 error)
-	func (@"".p·1 *@"".Pump) Run ()
-	func (@"".p·1 *@"".Pump "esc:0x0") Server ()
-	func (@"".p·2 *@"".Pump) String () (? string)
-	func (@"".p·2 *@"".Pump "esc:0x0") @"".handle (@"".e·3 @"".Event) (? error)
-	func (@"".p·1 *@"".Pump "esc:0x0") @"".pop (@"".buf·2 *[]byte)
-	func (@"".p·2 *@"".Pump "esc:0x0") @"".process () (? error)
-	func (@"".p·1 *@"".Pump "esc:0x0") @"".push (@"".buf·2 []byte "esc:0x0")
-	type @""._Ctype_struct_pn_link_t struct {}
-	type @""._Ctype_struct_pn_delivery_t struct {}
-	type @"qpid.apache.org/proton/go/amqp".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"qpid.apache.org/proton/go/amqp".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGr
 oupId(? string); SetGroupSequence(? int32); SetInferred(? bool); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
-	type @""._Ctype_size_t uint64
-	type @""._Ctype_char int8
-	type @""._Ctype_struct___0 struct { @"".size @""._Ctype_size_t; @"".start *@""._Ctype_char }
-	type @"".DeliveryTag struct { @"".pn @""._Ctype_struct___0 }
-	func (@"".t·2 @"".DeliveryTag) String () (? string)
-	type @""._Ctype_struct_pn_disposition_t struct {}
-	type @""._Ctype_struct_pn_condition_t struct {}
-	type @""._Ctype_struct_pn_data_t struct {}
-	type @"".Data struct { @"".pn *@""._Ctype_struct_pn_data_t }
-	func (@"".d·1 @"".Data "esc:0x0") Clear ()
-	func (@"".d·2 @"".Data "esc:0x0") Error () (? error)
-	func (@"".d·1 @"".Data "esc:0x0") Free ()
-	func (@"".d·2 @"".Data "esc:0x2") Pointer () (? @"unsafe".Pointer) { return @"unsafe".Pointer(@"".d·2.@"".pn) }
-	func (@"".d·1 @"".Data "esc:0x0") Rewind ()
-	type @"".Condition struct { @"".pn *@""._Ctype_struct_pn_condition_t }
-	func (@"".c·1 @"".Condition "esc:0x0") Clear ()
-	func (@"".c·2 @"".Condition "esc:0x0") Description () (? string)
-	func (@"".c·2 @"".Condition "esc:0x0") Error () (? error)
-	func (@"".c·2 @"".Condition "esc:0x0") Info () (? @"".Data)
-	func (@"".c·2 @"".Condition "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
-	func (@"".c·2 @"".Condition "esc:0x0") IsRedirect () (? bool)
-	func (@"".c·2 @"".Condition "esc:0x0") IsSet () (? bool)
-	func (@"".c·2 @"".Condition "esc:0x0") Name () (? string)
-	func (@"".c·2 @"".Condition "esc:0x0") RedirectHost () (? string)
-	func (@"".c·2 @"".Condition "esc:0x0") RedirectPort () (? int)
-	func (@"".c·2 @"".Condition "esc:0x0") SetDescription (@"".description·3 string "esc:0x0") (? int)
-	func (@"".c·1 @"".Condition "esc:0x0") SetError (@"".err·2 error)
-	func (@"".c·2 @"".Condition "esc:0x0") SetName (@"".name·3 string "esc:0x0") (? int)
-	type @"".Disposition struct { @"".pn *@""._Ctype_struct_pn_disposition_t }
-	func (@"".d·2 @"".Disposition "esc:0x0") Annotations () (? @"".Data)
-	func (@"".d·2 @"".Disposition "esc:0x0") Condition () (? @"".Condition)
-	func (@"".d·2 @"".Disposition "esc:0x0") Data () (? @"".Data)
-	func (@"".d·2 @"".Disposition "esc:0x0") IsFailed () (? bool)
-	func (@"".d·2 @"".Disposition "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
-	func (@"".d·2 @"".Disposition "esc:0x0") IsUndeliverable () (? bool)
-	func (@"".d·2 @"".Disposition "esc:0x0") SectionNumber () (? uint16)
-	func (@"".d·2 @"".Disposition "esc:0x0") SectionOffset () (? uint64)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetFailed (@"".failed·2 bool)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionNumber (@"".section_number·2 uint16)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionOffset (@"".section_offset·2 uint64)
-	func (@"".d·1 @"".Disposition "esc:0x0") SetUndeliverable (@"".undeliverable·2 bool)
-	func (@"".d·2 @"".Disposition "esc:0x0") Type () (? uint64)
-	type @"".Delivery struct { @"".pn *@""._Ctype_struct_pn_delivery_t }
-	func (@"".d·1 @"".Delivery "esc:0x0") Accept ()
-	func (@"".d·2 @"".Delivery "esc:0x0") Buffered () (? bool)
-	func (@"".d·1 @"".Delivery "esc:0x0") Clear ()
-	func (@"".d·2 @"".Delivery "esc:0x0") Current () (? bool)
-	func (@"".d·1 @"".Delivery "esc:0x0") Dump ()
-	func (@"".d·2 @"".Delivery "esc:0x0") HasMessage () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
-	func (@"".d·2 @"".Delivery "esc:0x0") Link () (? @"".Link)
-	func (@"".d·2 @"".Delivery "esc:0x0") Local () (? @"".Disposition)
-	func (@"".d·2 @"".Delivery "esc:0x0") LocalState () (? uint64)
-	func (@"".delivery·3 @"".Delivery "esc:0x0") Message () (@"".m·1 @"qpid.apache.org/proton/go/amqp".Message, @"".err·2 error)
-	func (@"".d·2 @"".Delivery "esc:0x0") Partial () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Pending () (? uint)
-	func (@"".d·2 @"".Delivery "esc:0x0") Readable () (? bool)
-	func (@"".d·1 @"".Delivery "esc:0x0") Reject ()
-	func (@"".d·1 @"".Delivery "esc:0x0") Release (@"".delivered·2 bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Remote () (? @"".Disposition)
-	func (@"".d·2 @"".Delivery "esc:0x0") RemoteState () (? uint64)
-	func (@"".d·1 @"".Delivery "esc:0x0") Settle ()
-	func (@"".d·1 @"".Delivery "esc:0x0") SettleAs (@"".disposition·2 uint64)
-	func (@"".d·2 @"".Delivery "esc:0x0") Settled () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Tag () (? @"".DeliveryTag)
-	func (@"".d·1 @"".Delivery "esc:0x0") Update (@"".state·2 uint64)
-	func (@"".d·2 @"".Delivery "esc:0x0") Updated () (? bool)
-	func (@"".d·2 @"".Delivery "esc:0x0") Writable () (? bool)
-	type @"".State uint8
-	func (@"".s·2 @"".State) Is (@"".bits·3 @"".State) (? bool) { return @"".s·2 & @"".bits·3 != @"".State(0x0) }
-	func (@"".s·2 @"".State) Local () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x7)) }
-	func (@"".s·2 @"".State) Remote () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x38)) }
-	type @""._Ctype_struct_pn_session_t struct {}
-	type @"".Session struct { @"".pn *@""._Ctype_struct_pn_session_t }
-	func (@"".s·1 @"".Session "esc:0x0") Close ()
-	func (@"".s·2 @"".Session "esc:0x0") Condition () (? @"".Condition)
-	func (@"".s·2 @"".Session "esc:0x0") Connection () (? @"".Connection)
-	func (@"".s·2 @"".Session "esc:0x0") Error () (? error)
-	func (@"".s·1 @"".Session "esc:0x0") Free ()
-	func (@"".s·2 @"".Session "esc:0x0") IncomingBytes () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") IncomingCapacity () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") IsNil () (? bool) { return @"".s·2.@"".pn == nil }
-	func (@"".s·2 @"".Session "esc:0x0") Next (@"".state·3 @"".State) (? @"".Session)
-	func (@"".s·1 @"".Session "esc:0x0") Open ()
-	func (@"".s·2 @"".Session "esc:0x0") OutgoingBytes () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") OutgoingWindow () (? uint)
-	func (@"".s·2 @"".Session "esc:0x0") Receiver (@"".name·3 string "esc:0x0") (? @"".Link)
-	func (@"".s·2 @"".Session "esc:0x0") RemoteCondition () (? @"".Condition)
-	func (@"".s·2 @"".Session "esc:0x0") Sender (@"".name·3 string "esc:0x0") (? @"".Link)
-	func (@"".s·1 @"".Session "esc:0x0") SetIncomingCapacity (@"".capacity·2 uint)
-	func (@"".s·1 @"".Session "esc:0x0") SetOutgoingWindow (@"".window·2 uint)
-	func (@"".s·2 @"".Session "esc:0x0") State () (? @"".State)
-	func (@"".s·2 @"".Session) String () (? string)
-	type @""._Ctype_struct_pn_terminus_t struct {}
-	type @"".TerminusType uint32
-	func (@"".e·2 @"".TerminusType) String () (? string)
-	type @"".DistributionMode uint32
-	func (@"".e·2 @"".DistributionMode) String () (? string)
-	type @"".Durability uint32
-	func (@"".e·2 @"".Durability) String () (? string)
-	type @"".ExpiryPolicy uint32
-	func (@"".e·2 @"".ExpiryPolicy) String () (? string)
-	type @"".Terminus struct { @"".pn *@""._Ctype_struct_pn_terminus_t }
-	func (@"".t·2 @"".Terminus "esc:0x0") Address () (? string)
-	func (@"".t·2 @"".Terminus "esc:0x0") Capabilities () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") Copy (@"".src·3 @"".Terminus "esc:0x0") (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") Durability () (? @"".Durability)
-	func (@"".t·2 @"".Terminus "esc:0x0") ExpiryPolicy () (? @"".ExpiryPolicy)
-	func (@"".t·2 @"".Terminus "esc:0x0") Filter () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") IsDynamic () (? bool)
-	func (@"".t·2 @"".Terminus "esc:0x0") IsNil () (? bool) { return @"".t·2.@"".pn == nil }
-	func (@"".t·2 @"".Terminus "esc:0x0") Outcomes () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") Properties () (? @"".Data)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetAddress (@"".address·3 string "esc:0x0") (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetDistributionMode (@"".mode·3 @"".DistributionMode) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetDurability (@"".durability·3 @"".Durability) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetDynamic (@"".dynamic·3 bool) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetExpiryPolicy (@"".policy·3 @"".ExpiryPolicy) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetTimeout (@"".timeout·3 @"time".Duration) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") SetType (@"".type_·3 @"".TerminusType) (? int)
-	func (@"".t·2 @"".Terminus "esc:0x0") Timeout () (? @"time".Duration)
-	func (@"".t·2 @"".Terminus "esc:0x0") Type () (? @"".TerminusType)
-	type @"".SndSettleMode uint32
-	func (@"".e·2 @"".SndSettleMode) String () (? string)
-	type @"".RcvSettleMode uint32
-	func (@"".e·2 @"".RcvSettleMode) String () (? string)
-	type @"".Link struct { @"".pn *@""._Ctype_struct_pn_link_t }
-	func (@"".l·2 @"".Link "esc:0x0") Advance () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") Available () (? int)
-	func (@"".l·1 @"".Link "esc:0x0") Close ()
-	func (@"".l·2 @"".Link "esc:0x0") Condition () (? @"".Condition)
-	func (@"".l·2 @"".Link "esc:0x0") Credit () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") Current () (? @"".Delivery)
-	func (@"".l·2 @"".Link "esc:0x0") Delivery (@"".tag·3 string "esc:0x0") (? @"".Delivery)
-	func (@"".l·1 @"".Link "esc:0x0") Detach ()
-	func (@"".l·1 @"".Link "esc:0x0") Drain (@"".credit·2 int)
-	func (@"".l·2 @"".Link "esc:0x0") Drained () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") Draining () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") Error () (? error)
-	func (@"".l·1 @"".Link "esc:0x0") Flow (@"".credit·2 int)
-	func (@"".l·1 @"".Link "esc:0x0") Free ()
-	func (@"".l·2 @"".Link "esc:0x0") IsDrain () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") IsNil () (? bool) { return @"".l·2.@"".pn == nil }
-	func (@"".l·2 @"".Link "esc:0x0") IsReceiver () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") IsSender () (? bool)
-	func (@"".l·2 @"".Link "esc:0x0") Name () (? string)
-	func (@"".l·2 @"".Link "esc:0x0") Next (@"".state·3 @"".State) (? @"".Link)
-	func (@"".l·1 @"".Link "esc:0x0") Offered (@"".credit·2 int)
-	func (@"".l·1 @"".Link "esc:0x0") Open ()
-	func (@"".l·2 @"".Link "esc:0x0") Queued () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") RcvSettleMode () (? @"".RcvSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") Recv (@"".buf·3 []byte "esc:0x0") (? int)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteCondition () (? @"".Condition)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteCredit () (? int)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteRcvSettleMode () (? @"".RcvSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteSndSettleMode () (? @"".SndSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteSource () (? @"".Terminus)
-	func (@"".l·2 @"".Link "esc:0x0") RemoteTarget () (? @"".Terminus)
-	func (@"".link·3 @"".Link "esc:0x0") Send (@"".m·4 @"qpid.apache.org/proton/go/amqp".Message) (? @"".Delivery, ? error)
-	func (@"".l·2 @"".Link "esc:0x0") SendBytes (@"".bytes·3 []byte "esc:0x0") (? int)
-	func (@"".l·2 @"".Link "esc:0x0") Session () (? @"".Session)
-	func (@"".l·1 @"".Link "esc:0x0") SetDrain (@"".drain·2 bool)
-	func (@"".l·1 @"".Link "esc:0x0") SetRcvSettleMode (@"".mode·2 @"".RcvSettleMode)
-	func (@"".l·1 @"".Link "esc:0x0") SetSndSettleMode (@"".mode·2 @"".SndSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") SndSettleMode () (? @"".SndSettleMode)
-	func (@"".l·2 @"".Link "esc:0x0") Source () (? @"".Terminus)
-	func (@"".l·2 @"".Link "esc:0x0") State () (? @"".State)
-	func (@"".l·2 @"".Link "esc:0x0") String () (? string)
-	func (@"".l·2 @"".Link "esc:0x0") Target () (? @"".Terminus)
-	func (@"".l·2 @"".Link "esc:0x0") Unsettled () (? int)
-	type @"".Connection struct { @"".pn *@""._Ctype_struct_pn_connection_t }
-	func (@"".c·1 @"".Connection "esc:0x0") Close ()
-	func (@"".c·2 @"".Connection "esc:0x0") Condition () (? @"".Condition)
-	func (@"".c·2 @"".Connection "esc:0x0") Container () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") DesiredCapabilities () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") Error () (? error)
-	func (@"".c·1 @"".Connection "esc:0x0") Free ()
-	func (@"".c·2 @"".Connection "esc:0x0") Hostname () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
-	func (@"".c·2 @"".Connection "esc:0x0") LinkHead (@"".s·3 @"".State) (? @"".Link)
-	func (@"".c·2 @"".Connection "esc:0x0") Links (@"".state·3 @"".State) (@"".links·1 []@"".Link)
-	func (@"".c·2 @"".Connection "esc:0x0") OfferedCapabilities () (? @"".Data)
-	func (@"".c·1 @"".Connection "esc:0x0") Open ()
-	func (@"".c·2 @"".Connection "esc:0x0") Properties () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") Pump () (? *@"".Pump)
-	func (@"".c·1 @"".Connection "esc:0x0") Release ()
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteCondition () (? @"".Condition)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteContainer () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteDesiredCapabilities () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteHostname () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteOfferedCapabilities () (? @"".Data)
-	func (@"".c·2 @"".Connection "esc:0x0") RemoteProperties () (? @"".Data)
-	func (@"".c·1 @"".Connection "esc:0x0") Reset ()
-	func (@"".c·3 @"".Connection "esc:0x0") Session () (? @"".Session, ? error)
-	func (@"".c·2 @"".Connection "esc:0x0") SessionHead (@"".s·3 @"".State) (? @"".Session)
-	func (@"".c·2 @"".Connection "esc:0x0") Sessions (@"".state·3 @"".State) (@"".sessions·1 []@"".Session)
-	func (@"".c·1 @"".Connection "esc:0x0") SetContainer (@"".container·2 string "esc:0x0")
-	func (@"".c·1 @"".Connection "esc:0x0") SetHostname (@"".hostname·2 string "esc:0x0")
-	func (@"".c·1 @"".Connection "esc:0x0") SetPassword (@"".password·2 string "esc:0x0")
-	func (@"".c·1 @"".Connection "esc:0x0") SetUser (@"".user·2 string "esc:0x0")
-	func (@"".c·2 @"".Connection "esc:0x0") State () (? @"".State)
-	func (@"".c·2 @"".Connection "esc:0x0") String () (? string)
-	func (@"".c·2 @"".Connection "esc:0x0") User () (? string)
-	type @"".Event struct { @"".pn *@""._Ctype_struct_pn_event_t; @"".eventType @"".EventType; @"".connection @"".Connection; @"".session @"".Session; @"".link @"".Link; @"".delivery @"".Delivery }
-	func (@"".e·2 @"".Event "esc:0x2") Connection () (? @"".Connection) { return @"".e·2.@"".connection }
-	func (@"".e·2 @"".Event "esc:0x2") Delivery () (? @"".Delivery) { return @"".e·2.@"".delivery }
-	func (@"".e·2 @"".Event "esc:0x0") IsNil () (? bool) { return @"".e·2.@"".eventType == @"".EventType(0x0) }
-	func (@"".e·2 @"".Event "esc:0x2") Link () (? @"".Link) { return @"".e·2.@"".link }
-	func (@"".e·2 @"".Event "esc:0x2") Session () (? @"".Session) { return @"".e·2.@"".session }
-	func (@"".e·2 @"".Event "esc:0x0") String () (? string)
-	func (@"".e·2 @"".Event "esc:0x0") Type () (? @"".EventType) { return @"".e·2.@"".eventType }
-	type @"".EventHandler interface { HandleEvent(@"".e @"".Event) (? error) }
-	type @"".MessagingEventType int
-	func (@"".t·2 @"".MessagingEventType) String () (? string)
-	type @"".MessagingHandler interface { HandleMessagingEvent(? @"".MessagingEventType, ? @"".Event) (? error) }
-	const @"".MStart @"".MessagingEventType = 0x0
-	const @"".MConnectionError @"".MessagingEventType = 0x1
-	const @"".MSessionError @"".MessagingEventType = 0x2
-	const @"".MLinkError @"".MessagingEventType = 0x3
-	const @"".MConnectionOpening @"".MessagingEventType = 0x4
-	const @"".MSessionOpening @"".MessagingEventType = 0x5
-	const @"".MLinkOpening @"".MessagingEventType = 0x6
-	const @"".MConnectionOpened @"".MessagingEventType = 0x7
-	const @"".MSessionOpened @"".MessagingEventType = 0x8
-	const @"".MLinkOpened @"".MessagingEventType = 0x9
-	const @"".MConnectionClosing @"".MessagingEventType = 0xA
-	const @"".MSessionClosing @"".MessagingEventType = 0xB
-	const @"".MLinkClosing @"".MessagingEventType = 0xC
-	const @"".MConnectionClosed @"".MessagingEventType = 0xD
-	const @"".MSessionClosed @"".MessagingEventType = 0xE
-	const @"".MLinkClosed @"".MessagingEventType = 0xF
-	const @"".MConnectionDisconnected @"".MessagingEventType = 0x10
-	const @"".MSessionDisconnected @"".MessagingEventType = 0x11
-	const @"".MLinkDisconnected @"".MessagingEventType = 0x12
-	const @"".MSendable @"".MessagingEventType = 0x13
-	const @"".MAccepted @"".MessagingEventType = 0x14
-	const @"".MRejected @"".MessagingEventType = 0x15
-	const @"".MReleased @"".MessagingEventType = 0x16
-	const @"".MSettled @"".MessagingEventType = 0x17
-	const @"".MMessage @"".MessagingEventType = 0x18
-	const @"".MFinal @"".MessagingEventType = 0x19
-	type @"".Endpoint interface { Close(); Condition() (? @"".Condition); Open(); RemoteCondition() (? @"".Condition); State() (? @"".State); String() (? string) }
-	type @"".endpointDelegator struct { @"".remoteOpen @"".EventType; @"".remoteClose @"".EventType; @"".localOpen @"".EventType; @"".localClose @"".EventType; @"".opening @"".MessagingEventType; @"".opened @"".MessagingEventType; @"".closing @"".MessagingEventType; @"".closed @"".MessagingEventType; @"".error @"".MessagingEventType; @"".endpoint func(? @"".Event) (? @"".Endpoint); @"".delegate @"".MessagingHandler }
-	func (@"".d·2 @"".endpointDelegator) HandleEvent (@"".e·3 @"".Event) (@"".err·1 error)
-	type @"".MessagingDelegator struct { @"".delegate @"".MessagingHandler; @"".connection @"".endpointDelegator; @"".session @"".endpointDelegator; @"".link @"".endpointDelegator; @"".handshaker @"".EventHandler; @"".flowcontroller @"".EventHandler; AutoSettle bool; AutoAccept bool; Prefetch int; PeerCloseError bool }
-	func (@"".d·2 *@"".MessagingDelegator) HandleEvent (@"".e·3 @"".Event) (? error)
-	func (@"".d·2 *@"".MessagingDelegator) @"".incoming (@"".e·3 @"".Event) (@"".err·1 error)
-	func (@"".d·2 *@"".MessagingDelegator) @"".outgoing (@"".e·3 @"".Event) (@"".err·1 error)
-	func @"".NewMessagingDelegator (@"".h·2 @"".MessagingHandler) (? *@"".MessagingDelegator)
-	func @"".NewPump (@"".conn·3 @"net".Conn, @"".handlers·4 ...@"".EventHandler) (? *@"".Pump, ? error)
-	func @"".NewData (@"".p·2 @"unsafe".Pointer "esc:0x2") (? @"".Data) { return (@"".Data{ @"".pn:(*@""._Ctype_struct_pn_data_t)(@"".p·2) }) }
-	const @"".SLocalUninit @"".State = 0x1
-	const @"".SLocalActive = 0x2
-	const @"".SLocalClosed = 0x4
-	const @"".SRemoteUninit = 0x8
-	const @"".SRemoteActive = 0x10
-	const @"".SRemoteClosed = 0x20
-	func @"".CloseError (@"".e·1 @"".Endpoint, @"".err·2 error)
-	const @"".Received uint64 = 0x23
-	const @"".Accepted = 0x24
-	const @"".Rejected = 0x25
-	const @"".Released = 0x26
-	const @"".Modified = 0x27
-	const @"".EConnectionInit @"".EventType = 0x5
-	const @"".EConnectionBound @"".EventType = 0x6
-	const @"".EConnectionUnbound @"".EventType = 0x7
-	const @"".EConnectionLocalOpen @"".EventType = 0x8
-	const @"".EConnectionRemoteOpen @"".EventType = 0x9
-	const @"".EConnectionLocalClose @"".EventType = 0xA
-	const @"".EConnectionRemoteClose @"".EventType = 0xB
-	const @"".EConnectionFinal @"".EventType = 0xC
-	const @"".ESessionInit @"".EventType = 0xD
-	const @"".ESessionLocalOpen @"".EventType = 0xE
-	const @"".ESessionRemoteOpen @"".EventType = 0xF
-	const @"".ESessionLocalClose @"".EventType = 0x10
-	const @"".ESessionRemoteClose @"".EventType = 0x11
-	const @"".ESessionFinal @"".EventType = 0x12
-	const @"".ELinkInit @"".EventType = 0x13
-	const @"".ELinkLocalOpen @"".EventType = 0x14
-	const @"".ELinkRemoteOpen @"".EventType = 0x15
-	const @"".ELinkLocalClose @"".EventType = 0x16
-	const @"".ELinkRemoteClose @"".EventType = 0x17
-	const @"".ELinkLocalDetach @"".EventType = 0x18
-	const @"".ELinkRemoteDetach @"".EventType = 0x19
-	const @"".ELinkFlow @"".EventType = 0x1A
-	const @"".ELinkFinal @"".EventType = 0x1B
-	const @"".EDelivery @"".EventType = 0x1C
-	const @"".ETransport @"".EventType = 0x1D
-	const @"".ETransportAuthenticated @"".EventType = 0x1E
-	const @"".ETransportError @"".EventType = 0x1F
-	const @"".ETransportHeadClosed @"".EventType = 0x20
-	const @"".ETransportTailClosed @"".EventType = 0x21
-	const @"".ETransportClosed @"".EventType = 0x22
-	const @"".PnSndUnsettled @"".SndSettleMode = 0x0
-	const @"".PnSndSettled @"".SndSettleMode = 0x1
-	const @"".PnSndMixed @"".SndSettleMode = 0x2
-	const @"".PnRcvFirst @"".RcvSettleMode = 0x0
-	const @"".PnRcvSecond @"".RcvSettleMode = 0x1
-	const @"".PnUnspecified @"".TerminusType = 0x0
-	const @"".PnSource @"".TerminusType = 0x1
-	const @"".PnTarget @"".TerminusType = 0x2
-	const @"".PnCoordinator @"".TerminusType = 0x3
-	const @"".PnNondurable @"".Durability = 0x0
-	const @"".PnConfiguration @"".Durability = 0x1
-	const @"".PnDeliveries @"".Durability = 0x2
-	const @"".PnExpireWithLink @"".ExpiryPolicy = 0x0
-	const @"".PnExpireWithSession @"".ExpiryPolicy = 0x1
-	const @"".PnExpireWithConnection @"".ExpiryPolicy = 0x2
-	const @"".PnExpireNever @"".ExpiryPolicy = 0x3
-	const @"".PnDistModeUnspecified @"".DistributionMode = 0x0
-	const @"".PnDistModeCopy @"".DistributionMode = 0x1
-	const @"".PnDistModeMove @"".DistributionMode = 0x2
-	func @"".init ()
-	var @"time".months [12]string
-	var @"time".days [7]string
-	var @"time".Local *@"time".Location
-	var @"time".UTC *@"time".Location
-	const @""._Cconst_PN_LOCAL_MASK = 0x7
-	const @""._Cconst_PN_REMOTE_MASK = 0x38
-
-$$
-_go_.6          0           0     0     644     987291    `
-go object linux amd64 go1.4.2 X:precisestack
-
-!
-go13ldruntime/cgo.asyscall.aHqpid.apache.org/proton/go/internal.a@qpid.apache.org/proton/go/amqp.a
-fmt.aio.a
-net.aos.apath.async.areflect.atime.a�""._Cgo_ptr H�\$H�\$� "".~r1&type.unsafe.Pointer"".ptr&type.unsafe.PointerTgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9flqpid.apache.org/proton/go/reactor/_obj/_cgo_gotypes.go�"""._Cfunc_CString��dH�%H;aw���H��PH�\$`H��H�$H�H���H�t$H�t$ H�t$H����H��@H��@H�L$HH�T$XH�L$`H�D$@H�L$0H9�}H��H�t$8H�4$H�T$(H�T$H�D$�H�D$`H�\$H��t%H=@sH��H�\$ H�\$hH��P����׉�t���
- 0runtime.morestack_noctxtR.""._cgo_runtime_cmalloc`
-�runtime.memmove�$runtime.panicindex0�"".autotmp_0015type.uintptr"".autotmp_0014type.int"".autotmp_0013Otype.string"".autotmp_0012/type.[]uint8"".autotmp_0011type.int
-"".ppo.type.*[1073741824]uint8"".p_&type.unsafe.Pointer"".~r1 (type.*""._Ctype_char"".stype.string�����$�[0b3Tgclocals·d7e8a62d22b1cde6d92b17a55c33fe8fTgclocals·283619d6755c7337ece602447ba790ff�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�$""._Cfunc_GoString��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�H���H�L$H�D$H�L$(H�D$0H���
- 0runtime.morestack_noctxtp0""._cgo_runtime_gostring~
-00"".~r1type.string"".p(type.*""._Ctype_char0?/`�,4
-?!Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�&""._Cfunc_GoStringN��dH�%H;aw���H�� H�D$8H�D$@H�\$(H�$Hc\$0H�\$H�H���H�L$H�D$H�L$8H�D$@H�� �
- 0runtime.morestack_noctxt�2""._cgo_runtime_gostringn�
-@@"".~r2 type.string"".l$type.""._Ctype_int"".p(type.*""._Ctype_char@I?
p�,D
-I'Tgclocals·6a2e5ab2d393a1bfd331903fbd0fd425Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�""._Cfunc_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN>""._cgo_307d13c7f705_Cfunc_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0&type.unsafe.Pointer0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/� ""._Cfunc_memcpy��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLB""._cgo_307d13c7f705_Cfunc_memcpyv:""._cgo_runtime_cgocall_errno�
-@0
-"".r10&type.unsafe.Pointer
-"".p2 *type.""._Ctype_size_t
-"".p1&type.unsafe.Pointer
-"".p0&type.unsafe.Pointer0./P�#!
-BTgclocals·a05343871e6f69ae44bc4db2bd3d1078Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�,""._Cfunc_pn_collector��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^N""._cgo_307d13c7f705_Cfunc_pn_collector�:""._cgo_runtime_cgocall_errno�
-0
-"".r1Jtype.*""._Ctype_struct_pn_collector_t07/`�,!
-KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_collector_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNX""._cgo_307d13c7f705_Cfunc_pn_collector_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Jtype.*""._Ctype_struct_pn_collector_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_collector_peek��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_collector_peekv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_event_t
-"".p0Jtype.*""._Ctype_struct_pn_collector_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_collector_pop��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDV""._cgo_307d13c7f705_Cfunc_pn_collector_popn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Jtype.*""._Ctype_struct_pn_collector_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_condition_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_condition_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�L""._Cfunc_pn_condition_get_description��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLn""._cgo_307d13c7f705_Cfunc_pn_condition_get_descriptionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_condition_get_name��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL`""._cgo_307d13c7f705_Cfunc_pn_condition_get_namev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_condition_info��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_condition_infov:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_condition_is_redirect��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDf""._cgo_307d13c7f705_Cfunc_pn_condition_is_redirectn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_condition_is_set��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_condition_is_setn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_condition_redirect_host��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_307d13c7f705_Cfunc_pn_condition_redirect_hostv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_condition_redirect_port��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJj""._cgo_307d13c7f705_Cfunc_pn_condition_redirect_portt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�L""._Cfunc_pn_condition_set_description��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJn""._cgo_307d13c7f705_Cfunc_pn_condition_set_descriptiont:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_condition_set_name��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJ`""._cgo_307d13c7f705_Cfunc_pn_condition_set_namet:""._cgo_runtime_cgocall_errno�
-00
-"".r1 $type.""._Ctype_int
-"".p1(type.*""._Ctype_char
-"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

-ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_connection��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^P""._cgo_307d13c7f705_Cfunc_pn_connection�:""._cgo_runtime_cgocall_errno�
-0
-"".r1Ltype.*""._Ctype_struct_pn_connection_t07/`�,!
-KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN\""._cgo_307d13c7f705_Cfunc_pn_connection_closex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_connection_collect��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN`""._cgo_307d13c7f705_Cfunc_pn_connection_collectx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1Jtype.*""._Ctype_struct_pn_collector_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�B""._Cfunc_pn_connection_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_307d13c7f705_Cfunc_pn_connection_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�X""._Cfunc_pn_connection_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLz""._cgo_307d13c7f705_Cfunc_pn_connection_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_connection_errorv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_error_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_connection_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_connection_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�J""._Cfunc_pn_connection_get_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLl""._cgo_307d13c7f705_Cfunc_pn_connection_get_containerv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_connection_get_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_307d13c7f705_Cfunc_pn_connection_get_hostnamev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�@""._Cfunc_pn_connection_get_user��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLb""._cgo_307d13c7f705_Cfunc_pn_connection_get_userv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�X""._Cfunc_pn_connection_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLz""._cgo_307d13c7f705_Cfunc_pn_connection_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_connection_open��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_connection_openx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_connection_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLf""._cgo_307d13c7f705_Cfunc_pn_connection_propertiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_connection_release��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN`""._cgo_307d13c7f705_Cfunc_pn_connection_releasex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�P""._Cfunc_pn_connection_remote_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLr""._cgo_307d13c7f705_Cfunc_pn_connection_remote_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�P""._Cfunc_pn_connection_remote_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLr""._cgo_307d13c7f705_Cfunc_pn_connection_remote_containerv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�f""._Cfunc_pn_connection_remote_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL�""._cgo_307d13c7f705_Cfunc_pn_connection_remote_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�N""._Cfunc_pn_connection_remote_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLp""._cgo_307d13c7f705_Cfunc_pn_connection_remote_hostnamev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�f""._Cfunc_pn_connection_remote_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL�""._cgo_307d13c7f705_Cfunc_pn_connection_remote_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�R""._Cfunc_pn_connection_remote_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLt""._cgo_307d13c7f705_Cfunc_pn_connection_remote_propertiesv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_reset��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN\""._cgo_307d13c7f705_Cfunc_pn_connection_resetx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�J""._Cfunc_pn_connection_set_container��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNl""._cgo_307d13c7f705_Cfunc_pn_connection_set_containerx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_connection_set_hostname��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNj""._cgo_307d13c7f705_Cfunc_pn_connection_set_hostnamex:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_connection_set_password��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNj""._cgo_307d13c7f705_Cfunc_pn_connection_set_passwordx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�@""._Cfunc_pn_connection_set_user��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNb""._cgo_307d13c7f705_Cfunc_pn_connection_set_userx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.*""._Ctype_char
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
-C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_state��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJ\""._cgo_307d13c7f705_Cfunc_pn_connection_statet:""._cgo_runtime_cgocall_errno�
- 0
-"".r12type.""._Ctype_pn_state_t
-"".p0Ltype.*""._Ctype_struct_pn_connection_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_data_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_307d13c7f705_Cfunc_pn_data_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_data_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLP""._cgo_307d13c7f705_Cfunc_pn_data_errorv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Btype.*""._Ctype_struct_pn_error_t
-"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�,""._Cfunc_pn_data_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNN""._cgo_307d13c7f705_Cfunc_pn_data_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�0""._Cfunc_pn_data_rewind��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNR""._cgo_307d13c7f705_Cfunc_pn_data_rewindx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�*""._Cfunc_pn_delivery��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLL""._cgo_307d13c7f705_Cfunc_pn_deliveryv:""._cgo_runtime_cgocall_errno�
-@0
-"".r10Htype.*""._Ctype_struct_pn_delivery_t
-"".p12type.""._Ctype_struct___0
-"".p0@type.*""._Ctype_struct_pn_link_t0./P�#!
-BTgclocals·9d50c2650bd14b076465d970d8016122Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�<""._Cfunc_pn_delivery_buffered��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD^""._cgo_307d13c7f705_Cfunc_pn_delivery_bufferedn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_delivery_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNX""._cgo_307d13c7f705_Cfunc_pn_delivery_clearx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_current��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_currentn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_delivery_dump��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNV""._cgo_307d13c7f705_Cfunc_pn_delivery_dumpx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_delivery_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_307d13c7f705_Cfunc_pn_delivery_linkv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_link_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_delivery_local��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_delivery_localv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ntype.*""._Ctype_struct_pn_disposition_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�B""._Cfunc_pn_delivery_local_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLd""._cgo_307d13c7f705_Cfunc_pn_delivery_local_statev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_partial��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_partialn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_pending��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_delivery_pendingv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1*type.""._Ctype_size_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�<""._Cfunc_pn_delivery_readable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD^""._cgo_307d13c7f705_Cfunc_pn_delivery_readablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_delivery_remote��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLZ""._cgo_307d13c7f705_Cfunc_pn_delivery_remotev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ntype.*""._Ctype_struct_pn_disposition_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_delivery_remote_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLf""._cgo_307d13c7f705_Cfunc_pn_delivery_remote_statev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_delivery_settle��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_delivery_settlex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_settled��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_settledn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_delivery_tag��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^T""._cgo_307d13c7f705_Cfunc_pn_delivery_tag�:""._cgo_runtime_cgocall_errno�
-00
-"".r12type.""._Ctype_struct___0
-"".p0Htype.*""._Ctype_struct_pn_delivery_t07/`�,!
-KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_delivery_update��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_delivery_updatex:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1.type.""._Ctype_uint64_t
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_updated��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_updatedn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�<""._Cfunc_pn_delivery_writable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtD^""._cgo_307d13c7f705_Cfunc_pn_delivery_writablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_disposition_annotations��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLj""._cgo_307d13c7f705_Cfunc_pn_disposition_annotationsv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_disposition_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLf""._cgo_307d13c7f705_Cfunc_pn_disposition_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_disposition_data��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_disposition_datav:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_data_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_get_section_number��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJx""._cgo_307d13c7f705_Cfunc_pn_disposition_get_section_numbert:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint32_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0-/	P�"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_get_section_offset��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLx""._cgo_307d13c7f705_Cfunc_pn_disposition_get_section_offsetv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_disposition_is_failed��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDf""._cgo_307d13c7f705_Cfunc_pn_disposition_is_failedn:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�R""._Cfunc_pn_disposition_is_undeliverable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDt""._cgo_307d13c7f705_Cfunc_pn_disposition_is_undeliverablen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�F""._Cfunc_pn_disposition_set_failed��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNh""._cgo_307d13c7f705_Cfunc_pn_disposition_set_failedx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_set_section_number��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNx""._cgo_307d13c7f705_Cfunc_pn_disposition_set_section_numberx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1.type.""._Ctype_uint32_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_set_section_offset��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNx""._cgo_307d13c7f705_Cfunc_pn_disposition_set_section_offsetx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1.type.""._Ctype_uint64_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�T""._Cfunc_pn_disposition_set_undeliverable��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNv""._cgo_307d13c7f705_Cfunc_pn_disposition_set_undeliverablex:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1(type.""._Ctype__Bool
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�	$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_disposition_type��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_disposition_typev:""._cgo_runtime_cgocall_errno�
- 0
-"".r1.type.""._Ctype_uint64_t
-"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�	#!
-BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�"""._Cfunc_pn_dtag��dH�%H;aw���H��H�D$0H�D$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxt^D""._cgo_307d13c7f705_Cfunc_pn_dtag�:""._cgo_runtime_cgocall_errno�
-@0
-"".r1 2type.""._Ctype_struct___0
-"".p1*type.""._Ctype_size_t
-"".p0(type.*""._Ctype_char07/`�	,!
-KTgclocals·2ab34f76b7fe498424f2c49491d7ce91Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_event_connection��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_event_connectionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ltype.*""._Ctype_struct_pn_connection_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_event_delivery��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_event_deliveryv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Htype.*""._Ctype_struct_pn_delivery_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_event_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLP""._cgo_307d13c7f705_Cfunc_pn_event_linkv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1@type.*""._Ctype_struct_pn_link_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_event_session��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLV""._cgo_307d13c7f705_Cfunc_pn_event_sessionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ftype.*""._Ctype_struct_pn_session_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_event_type��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJP""._cgo_307d13c7f705_Cfunc_pn_event_typet:""._cgo_runtime_cgocall_errno�
- 0
-"".r1<type.""._Ctype_pn_event_type_t
-"".p0Btype.*""._Ctype_struct_pn_event_t0-/	P�	"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_flowcontroller��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_flowcontrollerv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Ftype.*""._Ctype_struct_pn_handler_t
-"".p0$type.""._Ctype_int0./P�	#!
-BTgclocals·8512b64a8c2de1386e17b894ea692148Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_handler_dispatch��dH�%H;aw���H��H�\$8H�\$8H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtN\""._cgo_307d13c7f705_Cfunc_pn_handler_dispatchx:""._cgo_runtime_cgocall_errno�
-00
-"".r10&type.""._Ctype_void
-"".p2 <type.""._Ctype_pn_event_type_t
-"".p1Btype.*""._Ctype_struct_pn_event_t
-"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
-C
Tgclocals·72c306c66d827d7caa50958774c351b5Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_handler_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNT""._cgo_307d13c7f705_Cfunc_pn_handler_freex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_link_advance��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtDT""._cgo_307d13c7f705_Cfunc_pn_link_advancen:""._cgo_runtime_cgocall_errno|
- 0
-"".r1(type.""._Ctype__Bool
-"".p0@type.*""._Ctype_struct_pn_link_t0*/P�
-!
->Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_link_available��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJX""._cgo_307d13c7f705_Cfunc_pn_link_availablet:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
-"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_link_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_307d13c7f705_Cfunc_pn_link_closex:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_link_t0//P�
-$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_link_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_link_conditionv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Jtype.*""._Ctype_struct_pn_condition_t
-"".p0@type.*""._Ctype_struct_pn_link_t0./P�
-#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�0""._Cfunc_pn_link_credit��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJR""._cgo_307d13c7f705_Cfunc_pn_link_creditt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
-"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_link_current��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtLT""._cgo_307d13c7f705_Cfunc_pn_link_currentv:""._cgo_runtime_cgocall_errno�
- 0
-"".r1Htype.*""._Ctype_struct_pn_delivery_t
-"".p0@type.*""._Ctype_struct_pn_link_t0./P�
-#!
-BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�0""._Cfunc_pn_link_detach��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNR""._cgo_307d13c7f705_Cfunc_pn_link_detachx:""._cgo_runtime_cgocall_errno�
-0
-"".r1&type.""._Ctype_void
-"".p0@type.*""._Ctype_struct_pn_link_t0//P�
-$!
-C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_link_drain��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtNP""._cgo_307d13c7f705_Cfunc_pn_link_drainx:""._cgo_runtime_cgocall_errno�
- 0
-"".r1 &type.""._Ctype_void
-"".p1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0//P�
-$!
-C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_link_drained��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
-
- 0runtime.morestack_noctxtJT""._cgo_307d13c7f705_Cfunc_pn_link_drainedt:""._cgo_runtime_cgocall_errno�
- 0
-"".r1$type.""._Ctype_int
-"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
-"!

-ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[28/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/link.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/link.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/link.go
new file mode 100644
index 0000000..cf4b8aa
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/link.go
@@ -0,0 +1,232 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/internal"
+)
+
+type LinkSettings struct {
+	// Source address that messages come from.
+	Source string
+	// Target address that messages are going to.
+	Target string
+
+	// Unique (per container) name of the link.
+	// Leave blank to have the container generate a unique name automatically.
+	Name string
+
+	// SndSettleMode defines when the sending end of the link settles message delivery.
+	// Can set via AtMostOnce or AtLeastOnce.
+	SndSettleMode SndSettleMode
+
+	// RcvSettleMode defines when the receiving end of the link settles message delivery.
+	RcvSettleMode RcvSettleMode
+}
+
+// AtMostOnce sets "fire and forget" mode, messages are sent but no
+// acknowledgment is received, messages can be lost if there is a network
+// failure. Sets SndSettleMode=SendSettled and RcvSettleMode=RcvFirst
+func (s *LinkSettings) AtMostOnce() {
+	s.SndSettleMode = SndSettled
+	s.RcvSettleMode = RcvFirst
+}
+
+// AtLeastOnce requests acknowledgment for every message, acknowledgment
+// indicates the message was definitely received. In the event of a
+// failure, unacknowledged messages can be re-sent but there is a chance
+// that the message will be received twice in this case.
+// Sets SndSettleMode=SndUnsettled and RcvSettleMode=RcvFirst
+func (s *LinkSettings) AtLeastOnce() {
+	s.SndSettleMode = SndUnsettled
+	s.RcvSettleMode = RcvFirst
+}
+
+// Link is the common interface for Sender and Receiver links.
+type Link interface {
+	Endpoint
+
+	// Settings for this link.
+	Settings() LinkSettings
+
+	IsSender() bool
+	IsReceiver() bool
+
+	IsOpen() bool
+
+	// Credit indicates how many messages the receiving end of the link can accept.
+	//
+	// A Receiver adds credit automatically when it can accept more messages.
+	//
+	// On a Sender credit can be negative, meaning that messages in excess of the
+	// receiver's credit limit have been buffered locally till credit is available.
+	Credit() (int, error)
+
+	// Called in event loop on closed event.
+	closed(err error)
+}
+
+// SndSettleMode defines when the sending end of the link settles message delivery.
+// Can set via AtMostOnce or AtLeastOnce.
+type SndSettleMode proton.SndSettleMode
+
+const (
+	// Messages are sent unsettled
+	SndUnsettled = SndSettleMode(proton.SndUnsettled)
+	// Messages are sent already settled
+	SndSettled = SndSettleMode(proton.SndSettled)
+	// Sender can send either unsettled or settled messages.
+	SendMixed = SndSettleMode(proton.SndMixed)
+)
+
+// RcvSettleMode defines when the receiving end of the link settles message delivery.
+type RcvSettleMode proton.RcvSettleMode
+
+const (
+	// Receiver settles first.
+	RcvFirst = RcvSettleMode(proton.RcvFirst)
+	// Receiver waits for sender to settle before settling.
+	RcvSecond = RcvSettleMode(proton.RcvSecond)
+)
+
+// Implement Link interface, for embedding in sender and receiver.
+//
+// Link creation: there are two ways to create a link.
+//
+// Session.NewSender() and Session.NewReceiver() create a "local" link which has
+// the session and isSender fields set. The user can set properties like Name,
+// Target and Source. On Open() the eLink is created and the properties are set
+// on the eLink.
+//
+// An "incoming" is created by the connection. with session, isSender, name,
+// source, target all set from the incoming eLink, these properties cannot be
+// changed by the user. There may be other properties (e.g. Receiver.SetCapacity())
+// that can be set by the user before Open().
+//
+type link struct {
+	endpoint
+
+	settings LinkSettings
+	session  *session
+	eLink    proton.Link
+	isOpen   bool
+	isSender bool
+}
+
+func (l *link) Settings() LinkSettings { return l.settings }
+func (l *link) IsSender() bool         { return l.isSender }
+func (l *link) IsReceiver() bool       { return !l.isSender }
+func (l *link) IsOpen() bool           { return l.isOpen }
+func (l *link) Session() Session       { return l.session }
+func (l *link) Connection() Connection { return l.session.Connection() }
+
+func (l *link) engine() *proton.Engine { return l.session.connection.engine }
+func (l *link) handler() *handler      { return l.session.connection.handler }
+
+// initLocal initializes a local link associated with a session.
+// Call in proton goroutine
+func makeLocalLink(sn *session, isSender bool, settings LinkSettings) (link, error) {
+	var l link
+	l.session = sn
+	l.settings = settings
+	l.isSender = isSender
+	if l.settings.Name == "" {
+		l.settings.Name = l.session.connection.container.nextLinkName()
+	}
+	if l.IsSender() {
+		l.eLink = l.session.eSession.Sender(l.settings.Name)
+	} else {
+		l.eLink = l.session.eSession.Receiver(l.settings.Name)
+	}
+	if l.eLink.IsNil() {
+		return l, l.setError(internal.Errorf("cannot create link %s", l))
+	}
+	l.setSettings()
+	return l, nil
+}
+
+// Set local end of the link to match LinkSettings.
+func (l *link) setSettings() {
+	l.eLink.Source().SetAddress(l.settings.Source)
+	l.eLink.Target().SetAddress(l.settings.Target)
+	l.eLink.SetSndSettleMode(proton.SndSettleMode(l.settings.SndSettleMode))
+	l.eLink.SetRcvSettleMode(proton.RcvSettleMode(l.settings.RcvSettleMode))
+	l.str = l.eLink.String()
+}
+
+// initIncoming sets link settings from an incoming proton.Link.
+// Call in proton goroutine
+func makeIncomingLink(sn *session, eLink proton.Link) link {
+	l := link{
+		session:  sn,
+		isSender: eLink.IsSender(),
+		eLink:    eLink,
+		settings: LinkSettings{
+			Source:        eLink.RemoteSource().Address(),
+			Target:        eLink.RemoteTarget().Address(),
+			Name:          eLink.Name(),
+			SndSettleMode: SndSettleMode(eLink.RemoteSndSettleMode()),
+			RcvSettleMode: RcvSettleMode(eLink.RemoteRcvSettleMode()),
+		},
+	}
+	l.setSettings()
+	return l
+}
+
+func (l *link) setPanicIfOpen() {
+	if l.IsOpen() {
+		panic(internal.Errorf("link is already open %s", l))
+	}
+}
+
+// open a link, local or incoming. Call in proton goroutine
+func (l *link) open() error {
+	if l.Error() != nil {
+		return l.Error()
+	}
+	l.eLink.Open()
+	l.isOpen = true
+	return nil
+}
+
+// Called in proton goroutine
+func (l *link) closed(err error) {
+	l.setError(err)
+	if l.eLink.State().RemoteActive() {
+		if l.Error() != nil {
+			l.eLink.Condition().SetError(l.Error())
+		}
+		l.eLink.Close()
+	}
+	l.setError(Closed) // If no error set, mark as closed.
+}
+
+func (l *link) Credit() (credit int, err error) {
+	err = l.engine().InjectWait(func() error {
+		credit = l.eLink.Credit()
+		return nil
+	})
+	return
+}
+
+func (l *link) Close(err error) {
+	l.engine().Inject(func() { localClose(l.eLink, err) })
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/messaging_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/messaging_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/messaging_test.go
new file mode 100644
index 0000000..aa806d7
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/messaging_test.go
@@ -0,0 +1,205 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"fmt"
+	"net"
+	"qpid.apache.org/proton/amqp"
+	"testing"
+	"time"
+)
+
+func panicIf(err error) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+// Start a server, return listening addr and channel for incoming Connection.
+func newServer(cont Container) (net.Addr, <-chan Connection) {
+	listener, err := net.Listen("tcp", "")
+	panicIf(err)
+	addr := listener.Addr()
+	ch := make(chan Connection)
+	go func() {
+		conn, err := listener.Accept()
+		c, err := cont.NewConnection(conn)
+		panicIf(err)
+		c.Server()
+		c.Listen()
+		panicIf(c.Open())
+		ch <- c
+	}()
+	return addr, ch
+}
+
+// Return open an client connection and session, return the session.
+func newClient(cont Container, addr net.Addr) Session {
+	conn, err := net.Dial(addr.Network(), addr.String())
+	panicIf(err)
+	c, err := cont.NewConnection(conn)
+	panicIf(err)
+	c.Open()
+	sn, err := c.NewSession()
+	panicIf(err)
+	panicIf(sn.Open())
+	return sn
+}
+
+// Return client and server ends of the same connection.
+func newClientServer() (client Session, server Connection) {
+	addr, ch := newServer(NewContainer(""))
+	client = newClient(NewContainer(""), addr)
+	return client, <-ch
+}
+
+// Close client and server
+func closeClientServer(client Session, server Connection) {
+	client.Connection().Close(nil)
+	server.Close(nil)
+}
+
+// Send a message one way with a client sender and server receiver, verify ack.
+func TestClientSendServerReceive(t *testing.T) {
+	var err error
+	client, server := newClientServer()
+	defer func() {
+		closeClientServer(client, server)
+	}()
+
+	timeout := time.Second * 2
+	nLinks := 3
+	nMessages := 3
+
+	s := make([]Sender, nLinks)
+	for i := 0; i < nLinks; i++ {
+		s[i], err = client.Sender(fmt.Sprintf("foo%d", i))
+		if err != nil {
+			t.Fatal(err)
+		}
+	}
+
+	// Server accept session and receivers
+	ep, err := server.Accept()
+	ep.Open() // Accept incoming session
+	r := make([]Receiver, nLinks)
+	for i := 0; i < nLinks; i++ { // Accept incoming receivers
+		ep, err = server.Accept()
+		r[i] = ep.(Receiver)
+		err = r[i].Open()
+		if err != nil {
+			t.Fatal(err)
+		}
+	}
+
+	for i := 0; i < nLinks; i++ {
+		for j := 0; j < nMessages; j++ {
+			// Client send
+			m := amqp.NewMessageWith(fmt.Sprintf("foobar%v-%v", i, j))
+			sm, err := s[i].Send(m)
+			if err != nil {
+				t.Fatal(err)
+			}
+
+			// Server recieve
+			rm, err := r[i].Receive()
+			if err != nil {
+				t.Fatal(err)
+			}
+			if want, got := interface{}(fmt.Sprintf("foobar%v-%v", i, j)), rm.Message.Body(); want != got {
+				t.Errorf("%#v != %#v", want, got)
+			}
+
+			// Should not be acknowledged on client yet
+			if d, err := sm.DispositionTimeout(0); err != Timeout || NoDisposition != d {
+				t.Errorf("want [no-disposition/timeout] got [%v/%v]", d, err)
+			}
+			// Server ack
+			if err := rm.Acknowledge(Rejected); err != nil {
+				t.Error(err)
+			}
+			// Client get ack.
+			if d, err := sm.DispositionTimeout(timeout); err != nil || Rejected != d {
+				t.Errorf("want [rejected/nil] got [%v/%v]", d, err)
+			}
+		}
+	}
+}
+
+func TestClientReceiver(t *testing.T) {
+	client, server := newClientServer()
+	nMessages := 3
+
+	done := make(chan struct{})
+	go func() { // Server sends
+		defer close(done)
+		for {
+			ep, err := server.Accept()
+			switch {
+			case err == Closed:
+				return
+			case err == nil:
+				break
+			default:
+				t.Error(err)
+				return
+			}
+			ep.Open()
+			if s, ok := ep.(Sender); ok {
+				go func() {
+					for i := int32(0); i < int32(nMessages); i++ {
+						sm, err := s.Send(amqp.NewMessageWith(i))
+						if err != nil {
+							t.Error(err)
+							return
+						} else {
+							sm.Disposition() // Sync send.
+						}
+					}
+					s.Close(nil)
+				}()
+			}
+		}
+	}()
+
+	r, err := client.Receiver("foo")
+	if err != nil {
+		t.Fatal(err)
+	}
+	for i := int32(0); i < int32(nMessages); i++ {
+		rm, err := r.Receive()
+		if err != nil {
+			if err != Closed {
+				t.Error(err)
+			}
+			break
+		}
+		if err := rm.Accept(); err != nil {
+			t.Error(err)
+		}
+		if b, ok := rm.Message.Body().(int32); !ok || b != i {
+			t.Errorf("want %v, true got %v, %v", i, b, ok)
+		}
+	}
+	server.Close(nil)
+	<-done
+	client.Connection().Close(nil)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/receiver.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/receiver.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/receiver.go
new file mode 100644
index 0000000..ad033a6
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/receiver.go
@@ -0,0 +1,242 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/amqp"
+	"qpid.apache.org/proton/internal"
+	"time"
+)
+
+type ReceiverSettings struct {
+	LinkSettings
+
+	// Capacity is the number of messages that the receiver can buffer locally.
+	// If unset (zero) it will be set to 1.
+	Capacity int
+
+	// Prefetch==true means the Receiver will automatically issue credit to the
+	// remote sender to keep its buffer as full as possible, i.e. it will
+	// "pre-fetch" messages independently of the application calling
+	// Receive(). This gives good throughput for applications that handle a
+	// continuous stream of messages. Larger capacity may improve throughput, the
+	// optimal value depends on the characteristics of your application.
+	//
+	// Prefetch==false means the Receiver will issue only issue credit when you
+	// call Receive(), and will only issue enough credit to satisfy the calls
+	// actually made. This gives lower throughput but will not fetch any messages
+	// in advance. It is good for synchronous applications that need to evaluate
+	// each message before deciding whether to receive another. The
+	// request-response pattern is a typical example.  If you make concurrent
+	// calls to Receive with pre-fetch disabled, you can improve performance by
+	// setting the capacity close to the expected number of concurrent calls.
+	//
+	Prefetch bool
+}
+
+// Receiver is a Link that receives messages.
+//
+type Receiver interface {
+	Link
+
+	// SetCapacity sets the Capacity and Prefetch (see ReceiverSettings) It may
+	// may called before Open() on an accepted receiver, it cannot be changed once
+	// the receiver is Open().
+	SetCapacity(capacity int, prefetch bool)
+
+	// Receive blocks until a message is available or until the Receiver is closed
+	// and has no more buffered messages.
+	Receive() (ReceivedMessage, error)
+
+	// ReceiveTimeout is like Receive but gives up after timeout, see Timeout.
+	ReceiveTimeout(timeout time.Duration) (ReceivedMessage, error)
+}
+
+// Flow control policy for a receiver.
+type policy interface {
+	// Called at the start of Receive() to adjust credit before fetching a message.
+	Pre(*receiver)
+	// Called after Receive() has received a message from Buffer() before it returns.
+	// Non-nil error means no message was received because of an error.
+	Post(*receiver, error)
+}
+
+type prefetchPolicy struct{}
+
+func (p prefetchPolicy) Flow(r *receiver) {
+	r.engine().Inject(func() {
+		_, _, max := r.credit()
+		if max > 0 {
+			r.eLink.Flow(max)
+		}
+	})
+}
+func (p prefetchPolicy) Pre(r *receiver) { p.Flow(r) }
+func (p prefetchPolicy) Post(r *receiver, err error) {
+	if err == nil {
+		p.Flow(r)
+	}
+}
+
+type noPrefetchPolicy struct{ waiting int }
+
+func (p noPrefetchPolicy) Flow(r *receiver) { // Not called in proton goroutine
+	r.engine().Inject(func() {
+		len, credit, max := r.credit()
+		add := p.waiting - (len + credit)
+		if add > max {
+			add = max // Don't overflow
+		}
+		if add > 0 {
+			r.eLink.Flow(add)
+		}
+	})
+}
+func (p noPrefetchPolicy) Pre(r *receiver) { p.waiting++; p.Flow(r) }
+func (p noPrefetchPolicy) Post(r *receiver, err error) {
+	p.waiting--
+	if err == nil {
+		p.Flow(r)
+	}
+}
+
+// Receiver implementation
+type receiver struct {
+	link
+	// Set in Setup()
+	capacity int
+	prefetch bool
+
+	// Set in Open()
+	buffer chan ReceivedMessage
+	policy policy
+}
+
+func newReceiver(l link) Receiver { return &receiver{link: l} }
+
+func (r *receiver) SetCapacity(capacity int, prefetch bool) {
+	r.setPanicIfOpen()
+	if capacity < 1 {
+		capacity = 1
+	}
+	r.capacity = capacity
+	r.prefetch = prefetch
+}
+
+// Accept and open an incoming receiver.
+func (r *receiver) Open() error {
+	if r.capacity == 0 {
+		r.SetCapacity(1, false)
+	}
+	if r.prefetch {
+		r.policy = &prefetchPolicy{}
+	} else {
+		r.policy = &noPrefetchPolicy{}
+	}
+	err := r.engine().InjectWait(func() error {
+		err := r.open()
+		if err == nil {
+			r.buffer = make(chan ReceivedMessage, r.capacity)
+			r.handler().addLink(r.eLink, r)
+		}
+		return err
+	})
+	return r.setError(err)
+}
+
+// call in proton goroutine
+func (r *receiver) credit() (buffered, credit, capacity int) {
+	return len(r.buffer), r.eLink.Credit(), cap(r.buffer)
+}
+
+func (r *receiver) Capacity() int { return cap(r.buffer) }
+
+func (r *receiver) Receive() (rm ReceivedMessage, err error) {
+	return r.ReceiveTimeout(Forever)
+}
+
+func (r *receiver) ReceiveTimeout(timeout time.Duration) (rm ReceivedMessage, err error) {
+	internal.Assert(r.buffer != nil, "Receiver is not open: %s", r)
+	r.policy.Pre(r)
+	defer func() { r.policy.Post(r, err) }()
+	rmi, ok, timedout := timedReceive(r.buffer, timeout)
+	switch {
+	case timedout:
+		return ReceivedMessage{}, Timeout
+	case !ok:
+		return ReceivedMessage{}, r.Error()
+	default:
+		return rmi.(ReceivedMessage), nil
+	}
+}
+
+// Called in proton goroutine
+func (r *receiver) handleDelivery(delivery proton.Delivery) {
+	// FIXME aconway 2015-09-24: how can this happen if we are remote closed?
+	if r.eLink.State().RemoteClosed() {
+		localClose(r.eLink, r.eLink.RemoteCondition().Error())
+		return
+	}
+	if delivery.HasMessage() {
+		m, err := delivery.Message()
+		if err != nil {
+			localClose(r.eLink, err)
+			return
+		}
+		internal.Assert(m != nil)
+		r.eLink.Advance()
+		if r.eLink.Credit() < 0 {
+			localClose(r.eLink, internal.Errorf("received message in excess of credit limit"))
+		} else {
+			// We never issue more credit than cap(buffer) so this will not block.
+			r.buffer <- ReceivedMessage{m, delivery, r}
+		}
+	}
+}
+
+func (r *receiver) closed(err error) {
+	r.closeError(err)
+	close(r.buffer)
+}
+
+// ReceivedMessage contains an amqp.Message and allows the message to be acknowledged.
+type ReceivedMessage struct {
+	// Message is the received message.
+	Message amqp.Message
+
+	eDelivery proton.Delivery
+	receiver  Receiver
+}
+
+// Acknowledge a ReceivedMessage with the given disposition code.
+func (rm *ReceivedMessage) Acknowledge(disposition Disposition) error {
+	return rm.receiver.(*receiver).engine().InjectWait(func() error {
+		// Settle doesn't return an error but if the receiver is broken the settlement won't happen.
+		rm.eDelivery.SettleAs(uint64(disposition))
+		return rm.receiver.Error()
+	})
+}
+
+// Accept is short for Acknowledge(Accpeted)
+func (rm *ReceivedMessage) Accept() error { return rm.Acknowledge(Accepted) }
+
+// Reject is short for Acknowledge(Rejected)
+func (rm *ReceivedMessage) Reject() error { return rm.Acknowledge(Rejected) }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/sender.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/sender.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/sender.go
new file mode 100644
index 0000000..7a65a24
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/sender.go
@@ -0,0 +1,190 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+// #include <proton/disposition.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/amqp"
+	"qpid.apache.org/proton/internal"
+	"time"
+)
+
+type SenderSettings struct {
+	LinkSettings
+}
+
+// Sender is a Link that sends messages.
+type Sender interface {
+	Link
+
+	// Send a message asynchronously, return a SentMessage to identify it.
+	//
+	// Returns nil if the link is in Unreliable mode and no acknowledgement
+	// will be received.
+	//
+	// See Credit() for note on buffering.
+	//
+	// Use SentMessage.Disposition() to wait for acknowledgement.
+	Send(m amqp.Message) (sm SentMessage, err error)
+}
+
+type sender struct{ link }
+
+func newSender(l link) Sender { return &sender{l} }
+
+// Open the Sender, must be called before calling Send().
+func (s *sender) Open() error {
+	err := s.engine().InjectWait(func() error {
+		err := s.open()
+		if err == nil {
+			s.handler().addLink(s.eLink, s)
+		}
+		return err
+	})
+	return s.setError(err)
+}
+
+// Disposition indicates the outcome of a settled message delivery.
+type Disposition uint64
+
+const (
+	// No disposition available, not yet acknowledged or an error occurred
+	NoDisposition Disposition = 0
+	// Message was accepted by the receiver
+	Accepted = proton.Accepted
+	// Message was rejected as invalid by the receiver
+	Rejected = proton.Rejected
+	// Message was not processed by the receiver but may be processed by some other receiver.
+	Released = proton.Released
+)
+
+// String human readable name for a Disposition.
+func (d Disposition) String() string {
+	switch d {
+	case NoDisposition:
+		return "no-disposition"
+	case Accepted:
+		return "accepted"
+	case Rejected:
+		return "rejected"
+	case Released:
+		return "released"
+	default:
+		return "unknown"
+	}
+}
+
+func (s *sender) Send(m amqp.Message) (SentMessage, error) {
+	internal.Assert(s.IsOpen(), "sender is not open: %s", s)
+	if err := s.Error(); err != nil {
+		return nil, err
+	}
+	var sm SentMessage
+	err := s.engine().InjectWait(func() error {
+		eDelivery, err := s.eLink.Send(m)
+		if err == nil {
+			if s.eLink.SndSettleMode() == proton.SndSettled {
+				eDelivery.Settle()
+			} else {
+				sm = newSentMessage(s.session.connection, eDelivery)
+				s.session.connection.handler.sentMessages[eDelivery] = sm.(*sentMessage)
+			}
+		}
+		return err
+	})
+	return sm, err
+}
+
+func (s *sender) closed(err error) {
+	s.closeError(err)
+}
+
+// SentMessage represents a previously sent message. It allows you to wait for acknowledgement.
+type SentMessage interface {
+	// Disposition blocks till the message is acknowledged and returns the
+	// disposition state.  NoDisposition means the Connection or the SentMessage
+	// was closed before the message was acknowledged.
+	Disposition() (Disposition, error)
+
+	// DispositionTimeout is like Disposition but gives up after timeout, see Timeout.
+	DispositionTimeout(time.Duration) (Disposition, error)
+
+	// Forget interrupts any call to Disposition on this SentMessage and tells the
+	// peer we are no longer interested in the disposition of this message.
+	Forget()
+
+	// Error returns the error that closed the disposition, or nil if there was no error.
+	// If the disposition closed because the connection closed, it will return Closed.
+	Error() error
+}
+
+type sentMessage struct {
+	connection  *connection
+	eDelivery   proton.Delivery
+	done        chan struct{}
+	disposition Disposition
+	err         error
+}
+
+func newSentMessage(c *connection, d proton.Delivery) *sentMessage {
+	return &sentMessage{c, d, make(chan struct{}), NoDisposition, nil}
+}
+
+func (sm *sentMessage) Disposition() (Disposition, error) {
+	<-sm.done
+	return sm.disposition, sm.err
+}
+
+func (sm *sentMessage) DispositionTimeout(timeout time.Duration) (Disposition, error) {
+	if _, _, timedout := timedReceive(sm.done, timeout); timedout {
+		return sm.disposition, Timeout
+	} else {
+		return sm.disposition, sm.err
+	}
+}
+
+func (sm *sentMessage) Forget() {
+	sm.connection.engine.Inject(func() {
+		sm.eDelivery.Settle()
+		delete(sm.connection.handler.sentMessages, sm.eDelivery)
+	})
+	sm.finish()
+}
+
+func (sm *sentMessage) settled(err error) {
+	if sm.eDelivery.Settled() {
+		sm.disposition = Disposition(sm.eDelivery.Remote().Type())
+	}
+	sm.err = err
+	sm.finish()
+}
+
+func (sm *sentMessage) finish() {
+	select {
+	case <-sm.done: // No-op if already closed
+	default:
+		close(sm.done)
+	}
+}
+
+func (sm *sentMessage) Error() error { return sm.err }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/session.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/session.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/session.go
new file mode 100644
index 0000000..ba09690
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/session.go
@@ -0,0 +1,115 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/internal"
+)
+
+// Session is an AMQP session, it contains Senders and Receivers.
+//
+type Session interface {
+	Endpoint
+	Connection() Connection
+
+	// Sender opens a new sender. v can be a string, which is used as the Target
+	// address, or a SenderSettings struct containing more details settings.
+	Sender(v interface{}) (Sender, error)
+
+	// Receiver opens a new Receiver. v can be a string, which is used as the
+	// Source address, or a ReceiverSettings struct containing more details
+	// settings.
+	Receiver(v interface{}) (Receiver, error)
+}
+
+type session struct {
+	endpoint
+	eSession   proton.Session
+	connection *connection
+}
+
+// in proton goroutine
+func newSession(c *connection, es proton.Session) *session {
+	return &session{
+		connection: c,
+		eSession:   es,
+		endpoint:   endpoint{str: es.String()},
+	}
+}
+
+func (s *session) Connection() Connection     { return s.connection }
+func (s *session) eEndpoint() proton.Endpoint { return s.eSession }
+func (s *session) engine() *proton.Engine     { return s.connection.engine }
+func (s *session) Open() error                { s.engine().Inject(s.eSession.Open); return nil }
+func (s *session) Close(err error) {
+	s.engine().Inject(func() { localClose(s.eSession, err) })
+}
+
+// NewSender create a link sending to target.
+// You must call snd.Open() before calling snd.Send().
+func (s *session) Sender(v interface{}) (snd Sender, err error) {
+	var settings LinkSettings
+	switch v := v.(type) {
+	case string:
+		settings.Target = v
+	case SenderSettings:
+		settings = v.LinkSettings
+	default:
+		internal.Assert(false, "NewSender() want string or SenderSettings, got %T", v)
+	}
+	err = s.engine().InjectWait(func() error {
+		l, err := makeLocalLink(s, true, settings)
+		snd = newSender(l)
+		return err
+	})
+	if err == nil {
+		err = snd.Open()
+	}
+	return
+}
+
+// Receiver opens a receiving link.
+func (s *session) Receiver(v interface{}) (rcv Receiver, err error) {
+	var settings ReceiverSettings
+	switch v := v.(type) {
+	case string:
+		settings.Source = v
+	case ReceiverSettings:
+		settings = v
+	default:
+		internal.Assert(false, "NewReceiver() want string or ReceiverSettings, got %T", v)
+	}
+	err = s.engine().InjectWait(func() error {
+		l, err := makeLocalLink(s, false, settings.LinkSettings)
+		rcv = newReceiver(l)
+		return err
+	})
+	rcv.SetCapacity(settings.Capacity, settings.Prefetch)
+	if err == nil {
+		err = rcv.Open()
+	}
+	return
+}
+
+// Called from handler on closed.
+func (s *session) closed(err error) {
+	s.closeError(err)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/time.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/time.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/time.go
new file mode 100644
index 0000000..e9093d3
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/time.go
@@ -0,0 +1,71 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"qpid.apache.org/proton/internal"
+	"reflect"
+	"time"
+)
+
+// Timeout is the error returned if an operation does not complete on time.
+//
+// Methods named *Timeout in this package take time.Duration timeout parameter.
+//
+// If timeout > 0 and there is no result available before the timeout, they
+// return a zero or nil value and Timeout as an error.
+//
+// If timeout == 0 they will return a result if one is immediatley available or
+// nil/zero and Timeout as an error if not.
+//
+// If timeout == Forever the function will return only when there is a result or
+// some non-timeout error occurs.
+//
+var Timeout = internal.Errorf("timeout")
+
+// Forever can be used as a timeout parameter to indicate wait forever.
+const Forever time.Duration = -1
+
+// timedReceive receives on channel (which can be a chan of any type), waiting
+// up to timeout.
+//
+// timeout==0 means do a non-blocking receive attempt. timeout < 0 means block
+// forever. Other values mean block up to the timeout.
+//
+func timedReceive(channel interface{}, timeout time.Duration) (value interface{}, ok bool, timedout bool) {
+	cases := []reflect.SelectCase{
+		reflect.SelectCase{Dir: reflect.SelectRecv, Chan: reflect.ValueOf(channel)},
+	}
+	switch {
+	case timeout == 0: // Non-blocking receive
+		cases = append(cases, reflect.SelectCase{Dir: reflect.SelectDefault})
+	case timeout < 0: // Block forever, nothing to add
+	default: // Block up to timeout
+		cases = append(cases,
+			reflect.SelectCase{Dir: reflect.SelectRecv, Chan: reflect.ValueOf(time.After(timeout))})
+	}
+	chosen, recv, recvOk := reflect.Select(cases)
+	switch {
+	case chosen == 0:
+		return recv.Interface(), recvOk, false
+	default:
+		return nil, false, true
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
new file mode 100644
index 0000000..b175cf6
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
@@ -0,0 +1,46 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package proton provides a Go binding for the Qpid proton AMQP library.
+AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
+
+Proton is an event-driven, concurrent-unsafe AMQP protocol library that allows
+you to send and receive messages using the standard AMQP concurrent protocol.
+
+For most tasks, consider using package `qpid.apache.org/proton/concurrent`.  It
+provides a concurrent-safe API that is easier and more natural to use in Go.
+
+The raw proton API is event-driven and not concurrent-safe. You implement a
+MessagingHandler event handler to react to AMQP protocol events. You must ensure
+that all events are handled in a single goroutine or that you serialize all all
+uses of the proton objects associated with a single connection using a lock.
+You can use channels to communicate between application goroutines and the
+event-handling goroutine, see type Event fro more detail.
+
+Package `qpid.apache.org/proton/concurrent` does all this for you and presents
+a simple concurrent-safe interface.
+
+*/
+package proton
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go b/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
new file mode 100644
index 0000000..3096280
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
@@ -0,0 +1,402 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package proton
+
+// #include <proton/connection.h>
+// #include <proton/event.h>
+// #include <proton/handlers.h>
+// #include <proton/session.h>
+// #include <proton/transport.h>
+// #include <memory.h>
+// #include <stdlib.h>
+//
+// PN_HANDLE(REMOTE_ADDR)
+import "C"
+
+import (
+	"fmt"
+	"io"
+	"net"
+	"qpid.apache.org/proton/internal"
+	"sync"
+	"unsafe"
+)
+
+// Injecter allows functions to be "injected" into an event-processing loop.
+type Injecter interface {
+	// Inject a function into an event-loop concurrency context.
+	//
+	// f() will be called in the same concurrency context as event handers, so it
+	// can safely use values that can used be used in that context. If f blocks it
+	// will block the event loop so be careful calling blocking functions in f.
+	//
+	// Returns a non-nil error if the function could not be injected.
+	Inject(f func()) error
+
+	// InjectWait is like Inject but does not return till f() has completed.
+	// If f() cannot be injected it returns the error from Inject(), otherwise
+	// it returns the error from f()
+	InjectWait(f func() error) error
+}
+
+// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
+type bufferChan struct {
+	buffers    chan []byte
+	buf1, buf2 []byte
+}
+
+func newBufferChan(size int) *bufferChan {
+	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
+}
+
+func (b *bufferChan) buffer() []byte {
+	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
+	return b.buf1[:cap(b.buf1)]
+}
+
+// Engine reads from a net.Conn, decodes AMQP events and calls the appropriate
+// Handler functions in a single event-loop goroutine. Actions taken by Handler
+// functions (such as sending messages) are encoded and written to the
+// net.Conn. Create a engine with NewEngine()
+//
+// The proton protocol engine is single threaded (per connection). The Engine runs
+// proton in the goroutine that calls Engine.Run() and creates goroutines to feed
+// data to/from a net.Conn. You can create multiple Engines to handle multiple
+// connections concurrently.
+//
+// Methods on proton values defined in this package (Sessions, Links etc.) can
+// only be called in the goroutine that executes the corresponding
+// Engine.Run(). You implement the EventHandler or MessagingHandler interfaces
+// and provide those values to NewEngine(). Their HandleEvent method will be
+// called in the Engine goroutine, in typical event-driven style.
+//
+// Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
+// other goroutines, store them, or use them as map indexes. Effectively they are
+// just pointers.  Other goroutines cannot call their methods directly but they can
+// can create a function closure to call such methods and pass it to Engine.Inject()
+// to have it evaluated in the engine goroutine.
+//
+// You are responsible for ensuring you don't use an event value after it is
+// invalid. The handler methods will tell you when a value is no longer valid. For
+// example after a LinkClosed event, that link is no longer valid. If you do
+// Link.Close() yourself (in a handler or injected function) the link remains valid
+// until the corresponing LinkClosed event is received by the handler.
+//
+// Engine.Close() will take care of cleaning up any remaining values when you are
+// done with the Engine. All values associated with a engine become invalid when you
+// call Engine.Close()
+//
+// The qpid.apache.org/proton/concurrent package will do all this for you, so it
+// may be a better choice for some applications.
+//
+type Engine struct {
+	// Error is set on exit from Run() if there was an error.
+	err    internal.FirstError
+	inject chan func()
+
+	conn       net.Conn
+	connection Connection
+	transport  Transport
+	collector  *C.pn_collector_t
+	read       *bufferChan    // Read buffers channel.
+	write      *bufferChan    // Write buffers channel.
+	handlers   []EventHandler // Handlers for proton events.
+	running    chan struct{}  // This channel will be closed when the goroutines are done.
+	closeOnce  sync.Once
+}
+
+const bufferSize = 4096
+
+// Map of Connection to *Engine
+var engines = internal.MakeSafeMap()
+
+// NewEngine initializes a engine with a connection and handlers. To start it running:
+//    p := NewEngine(...)
+//    go run p.Run()
+// The goroutine will exit when the engine is closed or disconnected.
+// You can check for errors on Engine.Error.
+//
+func NewEngine(conn net.Conn, handlers ...EventHandler) (*Engine, error) {
+	// Save the connection ID for Connection.String()
+	p := &Engine{
+		inject:     make(chan func()),
+		conn:       conn,
+		transport:  Transport{C.pn_transport()},
+		connection: Connection{C.pn_connection()},
+		collector:  C.pn_collector(),
+		handlers:   handlers,
+		read:       newBufferChan(bufferSize),
+		write:      newBufferChan(bufferSize),
+		running:    make(chan struct{}),
+	}
+	if p.transport.IsNil() || p.connection.IsNil() || p.collector == nil {
+		return nil, internal.Errorf("failed to allocate engine")
+	}
+
+	// TODO aconway 2015-06-25: connection settings for user, password, container etc.
+	// before transport.Bind() Set up connection before Engine, allow Engine or Reactor
+	// to run connection.
+
+	// Unique container-id by default.
+	p.connection.SetContainer(internal.UUID4().String())
+	pnErr := p.transport.Bind(p.connection)
+	if pnErr != 0 {
+		return nil, internal.Errorf("cannot setup engine: %s", internal.PnErrorCode(pnErr))
+	}
+	C.pn_connection_collect(p.connection.pn, p.collector)
+	p.connection.Open()
+	connectionContexts.Put(p.connection, connectionContext{p, p.String()})
+	return p, nil
+}
+
+func (p *Engine) String() string {
+	return fmt.Sprintf("%s-%s", p.conn.LocalAddr(), p.conn.RemoteAddr())
+}
+
+func (p *Engine) Id() string {
+	return fmt.Sprintf("%p", &p)
+}
+
+func (p *Engine) Error() error {
+	return p.err.Get()
+}
+
+// Inject a function into the Engine's event loop.
+//
+// f() will be called in the same event-processing goroutine that calls Handler
+// methods. f() can safely call methods on values that belong to this engine
+// (Sessions, Links etc)
+//
+// The injected function has no parameters or return values. It is normally a
+// closure and can use channels to communicate with the injecting goroutine if
+// necessary.
+//
+// Returns a non-nil error if the engine is closed before the function could be
+// injected.
+func (p *Engine) Inject(f func()) error {
+	select {
+	case p.inject <- f:
+		return nil
+	case <-p.running:
+		return p.Error()
+	}
+}
+
+// InjectWait is like Inject but does not return till f() has completed or the
+// engine is closed, and returns an error value from f()
+func (p *Engine) InjectWait(f func() error) error {
+	done := make(chan error)
+	defer close(done)
+	err := p.Inject(func() { done <- f() })
+	if err != nil {
+		return err
+	}
+	select {
+	case <-p.running:
+		return p.Error()
+	case err := <-done:
+		return err
+	}
+}
+
+// Server puts the Engine in server mode, meaning it will auto-detect security settings on
+// the incoming connnection such as use of SASL and SSL.
+// Must be called before Run()
+//
+func (p *Engine) Server() { p.transport.SetServer() }
+
+// Close the engine's connection, returns when the engine has exited.
+func (p *Engine) Close(err error) {
+	p.Inject(func() {
+		if err != nil {
+			p.connection.Condition().SetError(err)
+		}
+		p.connection.Close()
+	})
+	<-p.running
+}
+
+// Disconnect the engine's connection without and AMQP close, returns when the engine has exited.
+func (p *Engine) Disconnect(err error) {
+	if err != nil {
+		p.err.Set(err)
+	}
+	p.conn.Close()
+	<-p.running
+}
+
+// Run the engine. Normally called in a goroutine as: go engine.Run()
+// Engine.Run() will exit when the engine is closed or disconnected.
+// You can check for errors after exit with Engine.Error().
+//
+func (p *Engine) Run() {
+	// Signal errors from the read/write goroutines. Don't block if we don't
+	// read all the errors, we only care about the first.
+	error := make(chan error, 2)
+	wait := sync.WaitGroup{}
+	wait.Add(2)
+
+	go func() { // Read goroutine
+		defer wait.Done()
+		for {
+			rbuf := p.read.buffer()
+			n, err := p.conn.Read(rbuf)
+			if n > 0 {
+				p.read.buffers <- rbuf[:n]
+			} else if err != nil {
+				close(p.read.buffers)
+				error <- err
+				return
+			}
+		}
+	}()
+
+	go func() { // Write goroutine
+		defer wait.Done()
+		for {
+			wbuf, ok := <-p.write.buffers
+			if !ok {
+				return
+			}
+			_, err := p.conn.Write(wbuf)
+			if err != nil {
+				error <- err
+				return
+			}
+		}
+	}()
+
+	wbuf := p.write.buffer()[:0]
+loop:
+	for {
+		if len(wbuf) == 0 {
+			p.pop(&wbuf)
+		}
+		// Don't set wchan unless there is something to write.
+		var wchan chan []byte
+		if len(wbuf) > 0 {
+			wchan = p.write.buffers
+		}
+
+		select {
+		case buf := <-p.read.buffers: // Read a buffer
+			p.push(buf)
+		case wchan <- wbuf: // Write a buffer
+			wbuf = p.write.buffer()[:0]
+		case f := <-p.inject: // Function injected from another goroutine
+			f()
+		case err := <-error: // Network read or write error
+			p.conn.Close() // Make sure both sides are closed
+			p.err.Set(err)
+			p.transport.CloseHead()
+			p.transport.CloseTail()
+		}
+		p.process()
+		if p.err.Get() != nil {
+			break loop
+		}
+	}
+	close(p.write.buffers)
+	p.conn.Close()
+	wait.Wait()
+	connectionContexts.Delete(p.connection)
+	if !p.connection.IsNil() {
+		p.connection.Free()
+	}
+	if !p.transport.IsNil() {
+		p.transport.Free()
+	}
+	if p.collector != nil {
+		C.pn_collector_free(p.collector)
+	}
+	for _, h := range p.handlers {
+		switch h := h.(type) {
+		case cHandler:
+			C.pn_handler_free(h.pn)
+		}
+	}
+	close(p.running) // Signal goroutines have exited and Error is set.
+}
+
+func minInt(a, b int) int {
+	if a < b {
+		return a
+	} else {
+		return b
+	}
+}
+
+func (p *Engine) pop(buf *[]byte) {
+	pending := int(p.transport.Pending())
+	switch {
+	case pending == int(C.PN_EOS):
+		*buf = (*buf)[:]
+		return
+	case pending < 0:
+		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
+	}
+	size := minInt(pending, cap(*buf))
+	*buf = (*buf)[:size]
+	if size == 0 {
+		return
+	}
+	C.memcpy(unsafe.Pointer(&(*buf)[0]), p.transport.Head(), C.size_t(size))
+	internal.Assert(size > 0)
+	p.transport.Pop(uint(size))
+}
+
+func (p *Engine) push(buf []byte) {
+	buf2 := buf
+	for len(buf2) > 0 {
+		n := p.transport.Push(buf2)
+		if n <= 0 {
+			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
+		}
+		buf2 = buf2[n:]
+	}
+}
+
+func (p *Engine) handle(e Event) (more bool) {
+	for _, h := range p.handlers {
+		h.HandleEvent(e)
+	}
+	if e.Type() == ETransportClosed {
+		p.err.Set(e.Connection().RemoteCondition().Error())
+		p.err.Set(e.Connection().Transport().Condition().Error())
+		if p.err.Get() == nil {
+			p.err.Set(io.EOF)
+		}
+		return false
+	}
+	return true
+}
+
+func (p *Engine) process() (more bool) {
+	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
+		e := makeEvent(ce)
+		if !p.handle(e) {
+			return false
+		}
+		C.pn_collector_pop(p.collector)
+	}
+	return true
+}
+
+func (p *Engine) Connection() Connection { return p.connection }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go
deleted file mode 100644
index 7c00aa0..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/doc.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package amqp encodes and decodes AMQP messages and data as Go types.
-
-It follows the standard 'encoding' libraries pattern. The mapping between AMQP
-and Go types is described in the documentation of the Marshal and Unmarshal
-functions.
-
-The sub-packages 'event' and 'messaging' provide two alternative ways to write
-AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
-gives complete low-level control of the underlying proton C engine.
-
-AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
-*/
-package amqp
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// This file is just for the package comment.
-
-// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop
deleted file mode 120000
index cc3641d..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go
deleted file mode 100644
index 11049f7..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/interop_test.go
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Test that conversion of Go type to/from AMQP is compatible with other
-// bindings.
-//
-package amqp
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"reflect"
-	"strings"
-	"testing"
-)
-
-func assertEqual(want interface{}, got interface{}) {
-	if !reflect.DeepEqual(want, got) {
-		panic(fmt.Errorf("%#v != %#v", want, got))
-	}
-}
-
-func assertNil(err interface{}) {
-	if err != nil {
-		panic(err)
-	}
-}
-
-func getReader(name string) (r io.Reader) {
-	r, err := os.Open("interop/" + name + ".amqp")
-	if err != nil {
-		panic(fmt.Errorf("Can't open %#v: %v", name, err))
-	}
-	return
-}
-
-func remaining(d *Decoder) string {
-	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
-	return string(remainder)
-}
-
-// assertDecode: want is the expected value, gotPtr is a pointer to a
-// instance of the same type for Decode.
-func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
-
-	assertNil(d.Decode(gotPtr))
-
-	got := reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(want, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, gotPtr)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	got = reflect.ValueOf(gotPtr).Elem().Interface()
-	assertEqual(want, got)
-}
-
-func TestUnmarshal(t *testing.T) {
-	bytes, err := ioutil.ReadAll(getReader("strings"))
-	if err != nil {
-		t.Error(err)
-	}
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		n, err := Unmarshal(bytes, &got)
-		if err != nil {
-			t.Error(err)
-		}
-		if want != got {
-			t.Errorf("%#v != %#v", want, got)
-		}
-		bytes = bytes[n:]
-	}
-}
-
-func TestPrimitivesExact(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into exact types
-	var b bool
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	var u8 uint8
-	assertDecode(d, uint8(42), &u8)
-	var u16 uint16
-	assertDecode(d, uint16(42), &u16)
-	var i16 int16
-	assertDecode(d, int16(-42), &i16)
-	var u32 uint32
-	assertDecode(d, uint32(12345), &u32)
-	var i32 int32
-	assertDecode(d, int32(-12345), &i32)
-	var u64 uint64
-	assertDecode(d, uint64(12345), &u64)
-	var i64 int64
-	assertDecode(d, int64(-12345), &i64)
-	var f32 float32
-	assertDecode(d, float32(0.125), &f32)
-	var f64 float64
-	assertDecode(d, float64(0.125), &f64)
-}
-
-func TestPrimitivesCompatible(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	// Decoding into compatible types
-	var b bool
-	var i int
-	var u uint
-	var f float64
-	assertDecode(d, true, &b)
-	assertDecode(d, false, &b)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, uint(42), &u)
-	assertDecode(d, -42, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, uint(12345), &u)
-	assertDecode(d, -12345, &i)
-	assertDecode(d, 0.125, &f)
-	assertDecode(d, 0.125, &f)
-}
-
-// assertDecodeValue: want is the expected value, decode into a reflect.Value
-func assertDecodeInterface(d *Decoder, want interface{}) {
-
-	var got, got2 interface{}
-	assertNil(d.Decode(&got))
-
-	assertEqual(want, got)
-
-	// Try round trip encoding
-	bytes, err := Marshal(got, nil)
-	assertNil(err)
-	n, err := Unmarshal(bytes, &got2)
-	assertNil(err)
-	assertEqual(n, len(bytes))
-	assertEqual(want, got2)
-}
-
-func TestPrimitivesInterface(t *testing.T) {
-	d := NewDecoder(getReader("primitives"))
-	assertDecodeInterface(d, true)
-	assertDecodeInterface(d, false)
-	assertDecodeInterface(d, uint8(42))
-	assertDecodeInterface(d, uint16(42))
-	assertDecodeInterface(d, int16(-42))
-	assertDecodeInterface(d, uint32(12345))
-	assertDecodeInterface(d, int32(-12345))
-	assertDecodeInterface(d, uint64(12345))
-	assertDecodeInterface(d, int64(-12345))
-	assertDecodeInterface(d, float32(0.125))
-	assertDecodeInterface(d, float64(0.125))
-}
-
-func TestStrings(t *testing.T) {
-	d := NewDecoder(getReader("strings"))
-	// Test decoding as plain Go strings
-	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
-		var got string
-		assertDecode(d, want, &got)
-	}
-	remains := remaining(d)
-	if remains != "" {
-		t.Errorf("leftover: %s", remains)
-	}
-
-	// Test decoding as specific string types
-	d = NewDecoder(getReader("strings"))
-	var bytes []byte
-	var str, sym string
-	assertDecode(d, []byte("abc\000defg"), &bytes)
-	assertDecode(d, "abcdefg", &str)
-	assertDecode(d, "abcdefg", &sym)
-	assertDecode(d, make([]byte, 0), &bytes)
-	assertDecode(d, "", &str)
-	assertDecode(d, "", &sym)
-	remains = remaining(d)
-	if remains != "" {
-		t.Fatalf("leftover: %s", remains)
-	}
-
-	// Test some error handling
-	d = NewDecoder(getReader("strings"))
-	var s string
-	err := d.Decode(s)
-	if err == nil {
-		t.Fatal("Expected error")
-	}
-	if !strings.Contains(err.Error(), "not a pointer") {
-		t.Error(err)
-	}
-	var i int
-	err = d.Decode(&i)
-	if !strings.Contains(err.Error(), "cannot unmarshal") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte{}, nil)
-	if !strings.Contains(err.Error(), "not enough data") {
-		t.Error(err)
-	}
-	_, err = Unmarshal([]byte("foobar"), nil)
-	if !strings.Contains(err.Error(), "invalid-argument") {
-		t.Error(err)
-	}
-}
-
-func TestEncodeDecode(t *testing.T) {
-	type data struct {
-		s  string
-		i  int
-		u8 uint8
-		b  bool
-		f  float32
-		v  interface{}
-	}
-
-	in := data{"foo", 42, 9, true, 1.234, "thing"}
-
-	buf := bytes.Buffer{}
-	e := NewEncoder(&buf)
-	assertNil(e.Encode(in.s))
-	assertNil(e.Encode(in.i))
-	assertNil(e.Encode(in.u8))
-	assertNil(e.Encode(in.b))
-	assertNil(e.Encode(in.f))
-	assertNil(e.Encode(in.v))
-
-	var out data
-	d := NewDecoder(&buf)
-	assertNil(d.Decode(&out.s))
-	assertNil(d.Decode(&out.i))
-	assertNil(d.Decode(&out.u8))
-	assertNil(d.Decode(&out.b))
-	assertNil(d.Decode(&out.f))
-	assertNil(d.Decode(&out.v))
-
-	assertEqual(in, out)
-}
-
-func TestMap(t *testing.T) {
-	d := NewDecoder(getReader("maps"))
-
-	// Generic map
-	var m Map
-	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
-
-	// Interface as map
-	var i interface{}
-	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
-
-	d = NewDecoder(getReader("maps"))
-	// Specific typed map
-	var m2 map[string]int
-	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
-
-	// Round trip a nested map
-	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
-	bytes, err := Marshal(m, nil)
-	assertNil(err)
-	_, err = Unmarshal(bytes, &i)
-	assertNil(err)
-	assertEqual(m, i)
-}
-
-func TestList(t *testing.T) {
-	d := NewDecoder(getReader("lists"))
-	var l List
-	assertDecode(d, List{int32(32), "foo", true}, &l)
-	assertDecode(d, List{}, &l)
-}
-
-func FIXMETestMessage(t *testing.T) {
-	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
-	bytes, err := ioutil.ReadAll(getReader("message"))
-	assertNil(err)
-	m, err := DecodeMessage(bytes)
-	assertNil(err)
-	fmt.Printf("%+v\n", m)
-	assertEqual(m.Body(), "hello")
-
-	bytes2 := make([]byte, len(bytes))
-	bytes2, err = m.Encode(bytes2)
-	assertNil(err)
-	assertEqual(bytes, bytes2)
-}
-
-// FIXME aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go
deleted file mode 100644
index e5c2945..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/marshal.go
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"io"
-	"qpid.apache.org/proton/go/internal"
-	"reflect"
-	"unsafe"
-)
-
-func dataError(prefix string, data *C.pn_data_t) error {
-	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
-	if err != nil {
-		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
-	}
-	return err
-}
-
-/*
-Marshal encodes a Go value as AMQP data in buffer.
-If buffer is nil, or is not large enough, a new buffer  is created.
-
-Returns the buffer used for encoding with len() adjusted to the actual size of data.
-
-Go types are encoded as follows
-
- +-------------------------------------+--------------------------------------------+
- |Go type                              |AMQP type                                   |
- +-------------------------------------+--------------------------------------------+
- |bool                                 |bool                                        |
- +-------------------------------------+--------------------------------------------+
- |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
- +-------------------------------------+--------------------------------------------+
- |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
- +-------------------------------------+--------------------------------------------+
- |float32, float64                     |float, double.                              |
- +-------------------------------------+--------------------------------------------+
- |string                               |string                                      |
- +-------------------------------------+--------------------------------------------+
- |[]byte, Binary                       |binary                                      |
- +-------------------------------------+--------------------------------------------+
- |Symbol                               |symbol                                      |
- +-------------------------------------+--------------------------------------------+
- |interface{}                          |the contained type                          |
- +-------------------------------------+--------------------------------------------+
- |nil                                  |null                                        |
- +-------------------------------------+--------------------------------------------+
- |map[K]T                              |map with K and T converted as above         |
- +-------------------------------------+--------------------------------------------+
- |Map                                  |map, may have mixed types for keys, values  |
- +-------------------------------------+--------------------------------------------+
- |[]T                                  |list with T converted as above              |
- +-------------------------------------+--------------------------------------------+
- |List                                 |list, may have mixed types  values          |
- +-------------------------------------+--------------------------------------------+
-
-TODO Go types: array, slice, struct
-
-Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
-*/
-func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
-	defer internal.DoRecover(&err)
-	data := C.pn_data(0)
-	defer C.pn_data_free(data)
-	put(data, v)
-	encode := func(buf []byte) ([]byte, error) {
-		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
-		switch {
-		case n == int(C.PN_OVERFLOW):
-			return buf, overflow
-		case n < 0:
-			return buf, dataError("marshal error", data)
-		default:
-			return buf[:n], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}
-
-const minEncode = 256
-
-// overflow is returned when an encoding function can't fit data in the buffer.
-var overflow = internal.Errorf("buffer too small")
-
-// encodeFn encodes into buffer[0:len(buffer)].
-// Returns buffer with length adjusted for data encoded.
-// If buffer too small, returns overflow as error.
-type encodeFn func(buffer []byte) ([]byte, error)
-
-// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
-// Returns the final buffer.
-func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
-	if buffer == nil || len(buffer) == 0 {
-		buffer = make([]byte, minEncode)
-	}
-	var err error
-	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
-		buffer = make([]byte, 2*len(buffer))
-	}
-	return buffer, err
-}
-
-func put(data *C.pn_data_t, v interface{}) {
-	switch v := v.(type) {
-	case nil:
-		C.pn_data_put_null(data)
-	case bool:
-		C.pn_data_put_bool(data, C.bool(v))
-	case int8:
-		C.pn_data_put_byte(data, C.int8_t(v))
-	case int16:
-		C.pn_data_put_short(data, C.int16_t(v))
-	case int32:
-		C.pn_data_put_int(data, C.int32_t(v))
-	case int64:
-		C.pn_data_put_long(data, C.int64_t(v))
-	case int:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_long(data, C.int64_t(v))
-		} else {
-			C.pn_data_put_int(data, C.int32_t(v))
-		}
-	case uint8:
-		C.pn_data_put_ubyte(data, C.uint8_t(v))
-	case uint16:
-		C.pn_data_put_ushort(data, C.uint16_t(v))
-	case uint32:
-		C.pn_data_put_uint(data, C.uint32_t(v))
-	case uint64:
-		C.pn_data_put_ulong(data, C.uint64_t(v))
-	case uint:
-		if unsafe.Sizeof(0) == 8 {
-			C.pn_data_put_ulong(data, C.uint64_t(v))
-		} else {
-			C.pn_data_put_uint(data, C.uint32_t(v))
-		}
-	case float32:
-		C.pn_data_put_float(data, C.float(v))
-	case float64:
-		C.pn_data_put_double(data, C.double(v))
-	case string:
-		C.pn_data_put_string(data, pnBytes([]byte(v)))
-	case []byte:
-		C.pn_data_put_binary(data, pnBytes(v))
-	case Binary:
-		C.pn_data_put_binary(data, pnBytes([]byte(v)))
-	case Symbol:
-		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
-	case Map: // Special map type
-		C.pn_data_put_map(data)
-		C.pn_data_enter(data)
-		for key, val := range v {
-			put(data, key)
-			put(data, val)
-		}
-		C.pn_data_exit(data)
-	default:
-		switch reflect.TypeOf(v).Kind() {
-		case reflect.Map:
-			putMap(data, v)
-		case reflect.Slice:
-			putList(data, v)
-		default:
-			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
-		}
-	}
-	err := dataError("marshal", data)
-	if err != nil {
-		panic(err)
-	}
-	return
-}
-
-func putMap(data *C.pn_data_t, v interface{}) {
-	mapValue := reflect.ValueOf(v)
-	C.pn_data_put_map(data)
-	C.pn_data_enter(data)
-	for _, key := range mapValue.MapKeys() {
-		put(data, key.Interface())
-		put(data, mapValue.MapIndex(key).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-func putList(data *C.pn_data_t, v interface{}) {
-	listValue := reflect.ValueOf(v)
-	C.pn_data_put_list(data)
-	C.pn_data_enter(data)
-	for i := 0; i < listValue.Len(); i++ {
-		put(data, listValue.Index(i).Interface())
-	}
-	C.pn_data_exit(data)
-}
-
-// Encoder encodes AMQP values to an io.Writer
-type Encoder struct {
-	writer io.Writer
-	buffer []byte
-}
-
-// New encoder returns a new encoder that writes to w.
-func NewEncoder(w io.Writer) *Encoder {
-	return &Encoder{w, make([]byte, minEncode)}
-}
-
-func (e *Encoder) Encode(v interface{}) (err error) {
-	e.buffer, err = Marshal(v, e.buffer)
-	if err == nil {
-		e.writer.Write(e.buffer)
-	}
-	return err
-}
-
-func replace(data *C.pn_data_t, v interface{}) {
-	C.pn_data_clear(data)
-	put(data, v)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go
deleted file mode 100644
index 87093f5..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message.go
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
-
-// Message is the interface to an AMQP message.
-// Instances of this interface contain a pointer to the underlying struct.
-type Message interface {
-	/**
-	 * Inferred indicates how the message content
-	 * is encoded into AMQP sections. If inferred is true then binary and
-	 * list values in the body of the message will be encoded as AMQP DATA
-	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
-	 * then all values in the body of the message will be encoded as AMQP
-	 * VALUE sections regardless of their type.
-	 */
-	Inferred() bool
-	SetInferred(bool)
-
-	/**
-	 * Durable indicates that any parties taking responsibility
-	 * for the message must durably store the content.
-	 */
-	Durable() bool
-	SetDurable(bool)
-
-	/**
-	 * Priority impacts ordering guarantees. Within a
-	 * given ordered context, higher priority messages may jump ahead of
-	 * lower priority messages.
-	 */
-	Priority() uint8
-	SetPriority(uint8)
-
-	/**
-	 * TTL or Time To Live, a message it may be dropped after this duration
-	 */
-	TTL() time.Duration
-	SetTTL(time.Duration)
-
-	/**
-	 * FirstAcquirer indicates
-	 * that the recipient of the message is the first recipient to acquire
-	 * the message, i.e. there have been no failed delivery attempts to
-	 * other acquirers. Note that this does not mean the message has not
-	 * been delivered to, but not acquired, by other recipients.
-	 */
-	FirstAcquirer() bool
-	SetFirstAcquirer(bool)
-
-	/**
-	 * DeliveryCount tracks how many attempts have been made to
-	 * delivery a message.
-	 */
-	DeliveryCount() uint32
-	SetDeliveryCount(uint32)
-
-	/**
-	 * MessageId provides a unique identifier for a message.
-	 * it can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	MessageId() interface{}
-	SetMessageId(interface{})
-
-	UserId() string
-	SetUserId(string)
-
-	Address() string
-	SetAddress(string)
-
-	Subject() string
-	SetSubject(string)
-
-	ReplyTo() string
-	SetReplyTo(string)
-
-	/**
-	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
-	 * binary value.
-	 */
-	CorrelationId() interface{}
-	SetCorrelationId(interface{})
-
-	ContentType() string
-	SetContentType(string)
-
-	ContentEncoding() string
-	SetContentEncoding(string)
-
-	// ExpiryTime indicates an absoulte time when the message may be dropped.
-	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
-	ExpiryTime() time.Time
-	SetExpiryTime(time.Time)
-
-	CreationTime() time.Time
-	SetCreationTime(time.Time)
-
-	GroupId() string
-	SetGroupId(string)
-
-	GroupSequence() int32
-	SetGroupSequence(int32)
-
-	ReplyToGroupId() string
-	SetReplyToGroupId(string)
-
-	/**
-	 * Instructions can be used to access or modify AMQP delivery instructions.
-	 */
-	Instructions() *map[string]interface{}
-
-	/**
-	 * Annotations  can be used to access or modify AMQP annotations.
-	 */
-	Annotations() *map[string]interface{}
-
-	/**
-	 * Properties  can be used to access or modify the application properties of a message.
-	 */
-	Properties() *map[string]interface{}
-
-	/**
-	 * Body of the message can be any AMQP encodable type.
-	 */
-	Body() interface{}
-	SetBody(interface{})
-
-	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
-	// the message is encoded into it, otherwise a new buffer is created.
-	// Returns the buffer containing the message.
-	Encode(buffer []byte) ([]byte, error)
-}
-
-// NewMessage creates a new message instance. The returned interface contains a pointer.
-func NewMessage() Message {
-	pn := C.pn_message() // Pick up default setting from C message.
-	defer C.pn_message_free(pn)
-	return goMessage(pn)
-}
-
-// Message implementation copies all message data into Go space so it can be proprely
-// memory managed.
-//
-type message struct {
-	inferred, durable, firstAcquirer      bool
-	priority                              uint8
-	ttl                                   time.Duration
-	deliveryCount                         uint32
-	messageId                             interface{}
-	userId, address, subject, replyTo     string
-	contentType, contentEncoding          string
-	groupId, replyToGroupId               string
-	creationTime, expiryTime              time.Time
-	groupSequence                         int32
-	correlationId                         interface{}
-	instructions, annotations, properties map[string]interface{}
-	body                                  interface{}
-}
-
-func (m *message) Inferred() bool                        { return m.inferred }
-func (m *message) SetInferred(b bool)                    { m.inferred = b }
-func (m *message) Durable() bool                         { return m.durable }
-func (m *message) SetDurable(b bool)                     { m.durable = b }
-func (m *message) Priority() uint8                       { return m.priority }
-func (m *message) SetPriority(b uint8)                   { m.priority = b }
-func (m *message) TTL() time.Duration                    { return m.ttl }
-func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
-func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
-func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
-func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
-func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
-func (m *message) MessageId() interface{}                { return m.messageId }
-func (m *message) SetMessageId(id interface{})           { m.messageId = id }
-func (m *message) UserId() string                        { return m.userId }
-func (m *message) SetUserId(s string)                    { m.userId = s }
-func (m *message) Address() string                       { return m.address }
-func (m *message) SetAddress(s string)                   { m.address = s }
-func (m *message) Subject() string                       { return m.subject }
-func (m *message) SetSubject(s string)                   { m.subject = s }
-func (m *message) ReplyTo() string                       { return m.replyTo }
-func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
-func (m *message) CorrelationId() interface{}            { return m.correlationId }
-func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
-func (m *message) ContentType() string                   { return m.contentType }
-func (m *message) SetContentType(s string)               { m.contentType = s }
-func (m *message) ContentEncoding() string               { return m.contentEncoding }
-func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
-func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
-func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
-func (m *message) CreationTime() time.Time               { return m.creationTime }
-func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
-func (m *message) GroupId() string                       { return m.groupId }
-func (m *message) SetGroupId(s string)                   { m.groupId = s }
-func (m *message) GroupSequence() int32                  { return m.groupSequence }
-func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
-func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
-func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
-func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
-func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
-func (m *message) Properties() *map[string]interface{}   { return &m.properties }
-func (m *message) Body() interface{}                     { return m.body }
-func (m *message) SetBody(b interface{})                 { m.body = b }
-
-// rewindGet rewinds and then gets the value from a data object.
-func rewindGet(data *C.pn_data_t, v interface{}) {
-	if data != nil && C.pn_data_size(data) > 0 {
-		C.pn_data_rewind(data)
-		C.pn_data_next(data)
-		get(data, v)
-	}
-}
-
-// goMessage populates a Go message from a pn_message_t
-func goMessage(pn *C.pn_message_t) *message {
-	m := &message{
-		inferred:        bool(C.pn_message_is_inferred(pn)),
-		durable:         bool(C.pn_message_is_durable(pn)),
-		priority:        uint8(C.pn_message_get_priority(pn)),
-		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
-		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
-		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
-		userId:          goString(C.pn_message_get_user_id(pn)),
-		address:         C.GoString(C.pn_message_get_address(pn)),
-		subject:         C.GoString(C.pn_message_get_subject(pn)),
-		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
-		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
-		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
-		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
-		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
-		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
-		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
-		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
-		messageId:       nil,
-		correlationId:   nil,
-		instructions:    make(map[string]interface{}),
-		annotations:     make(map[string]interface{}),
-		properties:      make(map[string]interface{}),
-	}
-	rewindGet(C.pn_message_id(pn), &m.messageId)
-	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
-	rewindGet(C.pn_message_instructions(pn), &m.instructions)
-	rewindGet(C.pn_message_annotations(pn), &m.annotations)
-	rewindGet(C.pn_message_properties(pn), &m.properties)
-	rewindGet(C.pn_message_body(pn), &m.body)
-	return m
-}
-
-// pnMessage populates a pn_message_t from a Go message.
-func (m *message) pnMessage() *C.pn_message_t {
-	pn := C.pn_message()
-	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
-	C.pn_message_set_durable(pn, C.bool(m.Durable()))
-	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
-	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
-	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
-	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
-	replace(C.pn_message_id(pn), m.MessageId())
-	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
-	C.pn_message_set_address(pn, C.CString(m.Address()))
-	C.pn_message_set_subject(pn, C.CString(m.Subject()))
-	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
-	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
-	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
-	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
-	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
-	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
-	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
-	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
-	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
-	replace(C.pn_message_instructions(pn), *m.Instructions())
-	replace(C.pn_message_annotations(pn), *m.Annotations())
-	replace(C.pn_message_properties(pn), *m.Properties())
-	replace(C.pn_message_body(pn), m.Body())
-	return pn
-}
-
-// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
-
-// DecodeMessage decodes bytes as a message
-func DecodeMessage(data []byte) (Message, error) {
-	pnMsg := C.pn_message()
-	defer C.pn_message_free(pnMsg)
-	if len(data) == 0 {
-		return nil, internal.Errorf("empty buffer for decode")
-	}
-	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
-		return nil, internal.Errorf("decoding message: %s",
-			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
-	}
-	return goMessage(pnMsg), nil
-}
-
-// Encode the message into bufffer.
-// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
-// buffer will be returned.
-func (m *message) Encode(buffer []byte) ([]byte, error) {
-	pn := m.pnMessage()
-	defer C.pn_message_free(pn)
-	encode := func(buf []byte) ([]byte, error) {
-		len := cLen(buf)
-		result := C.pn_message_encode(pn, cPtr(buf), &len)
-		switch {
-		case result == C.PN_OVERFLOW:
-			return buf, overflow
-		case result < 0:
-			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
-		default:
-			return buf[:len], nil
-		}
-	}
-	return encodeGrow(buffer, encode)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go
deleted file mode 100644
index 46e26de..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/message_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package amqp
-
-import (
-	"reflect"
-	"testing"
-	"time"
-)
-
-func roundTrip(t *testing.T, m Message) {
-	buffer, err := m.Encode(nil)
-	if err != nil {
-		t.Fatalf("Encode failed: %v", err)
-	}
-	m2, err := DecodeMessage(buffer)
-	if err != nil {
-		t.Fatalf("Decode failed: %v", err)
-	}
-	if !reflect.DeepEqual(m, m2) {
-		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
-	}
-}
-
-func TestDefaultMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	// Check defaults
-	assertEqual(m.Inferred(), false)
-	assertEqual(m.Durable(), false)
-	assertEqual(m.Priority(), uint8(4))
-	assertEqual(m.TTL(), time.Duration(0))
-	assertEqual(m.UserId(), "")
-	assertEqual(m.Address(), "")
-	assertEqual(m.Subject(), "")
-	assertEqual(m.ReplyTo(), "")
-	assertEqual(m.ContentType(), "")
-	assertEqual(m.ContentEncoding(), "")
-	assertEqual(m.GroupId(), "")
-	assertEqual(m.GroupSequence(), int32(0))
-	assertEqual(m.ReplyToGroupId(), "")
-	assertEqual(m.MessageId(), nil)
-	assertEqual(m.CorrelationId(), nil)
-	assertEqual(*m.Instructions(), map[string]interface{}{})
-	assertEqual(*m.Annotations(), map[string]interface{}{})
-	assertEqual(*m.Properties(), map[string]interface{}{})
-	assertEqual(m.Body(), nil)
-
-	roundTrip(t, m)
-}
-
-func TestMessageRoundTrip(t *testing.T) {
-	m := NewMessage()
-	m.SetInferred(false)
-	m.SetDurable(true)
-	m.SetPriority(42)
-	m.SetTTL(0)
-	m.SetUserId("user")
-	m.SetAddress("address")
-	m.SetSubject("subject")
-	m.SetReplyTo("replyto")
-	m.SetContentType("content")
-	m.SetContentEncoding("encoding")
-	m.SetGroupId("group")
-	m.SetGroupSequence(42)
-	m.SetReplyToGroupId("replytogroup")
-	m.SetMessageId("id")
-	m.SetCorrelationId("correlation")
-	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
-	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
-	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
-	m.SetBody("hello")
-	roundTrip(t, m)
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[29/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/doc.go
new file mode 100644
index 0000000..cc2cd0e
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/doc.go
@@ -0,0 +1,34 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package amqp encodes and decodes AMQP messages and data as Go types.
+
+It follows the standard 'encoding' libraries pattern. The mapping between AMQP
+and Go types is described in the documentation of the Marshal and Unmarshal
+functions.
+
+AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
+*/
+package amqp
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/error.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/error.go
new file mode 100644
index 0000000..868dbf3
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/error.go
@@ -0,0 +1,66 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"fmt"
+	"reflect"
+)
+
+// Error is an AMQP error condition. It has a name and a description.
+// It implements the Go error interface so can be returned as an error value.
+//
+// You can pass amqp.Error to methods that pass an error to a remote endpoint,
+// this gives you full control over what the remote endpoint will see.
+//
+// You can also pass any Go error to such functions, the remote peer
+// will see the equivalent of MakeError(error)
+//
+type Error struct{ Name, Description string }
+
+// Error implements the Go error interface for AMQP error errors.
+func (c Error) Error() string { return fmt.Sprintf("proton %s: %s", c.Name, c.Description) }
+
+// Errorf makes a Error with name and formatted description as per fmt.Sprintf
+func Errorf(name, format string, arg ...interface{}) Error {
+	return Error{name, fmt.Sprintf(format, arg...)}
+}
+
+// MakeError makes an AMQP error from a go error using the Go error type as the name
+// and the err.Error() string as the description.
+func MakeError(err error) Error {
+	return Error{reflect.TypeOf(err).Name(), err.Error()}
+}
+
+var (
+	InternalError      = "amqp:internal-error"
+	NotFound           = "amqp:not-found"
+	UnauthorizedAccess = "amqp:unauthorized-access"
+	DecodeError        = "amqp:decode-error"
+	ResourceLimit      = "amqp:resource-limit"
+	NotAllowed         = "amqp:not-allowed"
+	InvalidField       = "amqp:invalid-field"
+	NotImplemented     = "amqp:not-implemented"
+	ResourceLocked     = "amqp:resource-locked"
+	PreerrorFailed     = "amqp:preerror-failed"
+	ResourceDeleted    = "amqp:resource-deleted"
+	IllegalState       = "amqp:illegal-state"
+	FrameSizeTooSmall  = "amqp:frame-size-too-small"
+)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop
new file mode 120000
index 0000000..b2dd603
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop
@@ -0,0 +1 @@
+../../../../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop_test.go
new file mode 100644
index 0000000..b36ef64
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/interop_test.go
@@ -0,0 +1,381 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Test that conversion of Go type to/from AMQP is compatible with other
+// bindings.
+//
+package amqp
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"reflect"
+	"strings"
+	"testing"
+)
+
+func checkEqual(want interface{}, got interface{}) error {
+	if !reflect.DeepEqual(want, got) {
+		return fmt.Errorf("%#v != %#v", want, got)
+	}
+	return nil
+}
+
+func getReader(name string) (r io.Reader) {
+	r, err := os.Open("interop/" + name + ".amqp")
+	if err != nil {
+		panic(fmt.Errorf("Can't open %#v: %v", name, err))
+	}
+	return
+}
+
+func remaining(d *Decoder) string {
+	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
+	return string(remainder)
+}
+
+// checkDecode: want is the expected value, gotPtr is a pointer to a
+// instance of the same type for Decode.
+func checkDecode(d *Decoder, want interface{}, gotPtr interface{}, t *testing.T) {
+
+	if err := d.Decode(gotPtr); err != nil {
+		t.Error("Decode failed", err)
+		return
+	}
+	got := reflect.ValueOf(gotPtr).Elem().Interface()
+	if err := checkEqual(want, got); err != nil {
+		t.Error("Decode bad value:", err)
+		return
+	}
+
+	// Try round trip encoding
+	bytes, err := Marshal(want, nil)
+	if err != nil {
+		t.Error("Marshal failed", err)
+		return
+	}
+	n, err := Unmarshal(bytes, gotPtr)
+	if err != nil {
+		t.Error("Unmarshal failed", err)
+		return
+	}
+	if err := checkEqual(n, len(bytes)); err != nil {
+		t.Error("Bad unmarshal length", err)
+		return
+	}
+	got = reflect.ValueOf(gotPtr).Elem().Interface()
+	if err = checkEqual(want, got); err != nil {
+		t.Error("Bad unmarshal value", err)
+		return
+	}
+}
+
+func TestUnmarshal(t *testing.T) {
+	bytes, err := ioutil.ReadAll(getReader("strings"))
+	if err != nil {
+		t.Error(err)
+	}
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		n, err := Unmarshal(bytes, &got)
+		if err != nil {
+			t.Error(err)
+		}
+		if want != got {
+			t.Errorf("%#v != %#v", want, got)
+		}
+		bytes = bytes[n:]
+	}
+}
+
+func TestPrimitivesExact(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into exact types
+	var b bool
+	checkDecode(d, true, &b, t)
+	checkDecode(d, false, &b, t)
+	var u8 uint8
+	checkDecode(d, uint8(42), &u8, t)
+	var u16 uint16
+	checkDecode(d, uint16(42), &u16, t)
+	var i16 int16
+	checkDecode(d, int16(-42), &i16, t)
+	var u32 uint32
+	checkDecode(d, uint32(12345), &u32, t)
+	var i32 int32
+	checkDecode(d, int32(-12345), &i32, t)
+	var u64 uint64
+	checkDecode(d, uint64(12345), &u64, t)
+	var i64 int64
+	checkDecode(d, int64(-12345), &i64, t)
+	var f32 float32
+	checkDecode(d, float32(0.125), &f32, t)
+	var f64 float64
+	checkDecode(d, float64(0.125), &f64, t)
+}
+
+func TestPrimitivesCompatible(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into compatible types
+	var b bool
+	var i int
+	var u uint
+	var f float64
+	checkDecode(d, true, &b, t)
+	checkDecode(d, false, &b, t)
+	checkDecode(d, uint(42), &u, t)
+	checkDecode(d, uint(42), &u, t)
+	checkDecode(d, -42, &i, t)
+	checkDecode(d, uint(12345), &u, t)
+	checkDecode(d, -12345, &i, t)
+	checkDecode(d, uint(12345), &u, t)
+	checkDecode(d, -12345, &i, t)
+	checkDecode(d, 0.125, &f, t)
+	checkDecode(d, 0.125, &f, t)
+}
+
+// checkDecodeValue: want is the expected value, decode into a reflect.Value
+func checkDecodeInterface(d *Decoder, want interface{}, t *testing.T) {
+
+	var got, got2 interface{}
+	if err := d.Decode(&got); err != nil {
+		t.Error("Decode failed", err)
+		return
+	}
+	if err := checkEqual(want, got); err != nil {
+		t.Error(err)
+		return
+	}
+	// Try round trip encoding
+	bytes, err := Marshal(got, nil)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	n, err := Unmarshal(bytes, &got2)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if err := checkEqual(n, len(bytes)); err != nil {
+		t.Error(err)
+		return
+	}
+	if err := checkEqual(want, got2); err != nil {
+		t.Error(err)
+		return
+	}
+}
+
+func TestPrimitivesInterface(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	checkDecodeInterface(d, true, t)
+	checkDecodeInterface(d, false, t)
+	checkDecodeInterface(d, uint8(42), t)
+	checkDecodeInterface(d, uint16(42), t)
+	checkDecodeInterface(d, int16(-42), t)
+	checkDecodeInterface(d, uint32(12345), t)
+	checkDecodeInterface(d, int32(-12345), t)
+	checkDecodeInterface(d, uint64(12345), t)
+	checkDecodeInterface(d, int64(-12345), t)
+	checkDecodeInterface(d, float32(0.125), t)
+	checkDecodeInterface(d, float64(0.125), t)
+}
+
+func TestStrings(t *testing.T) {
+	d := NewDecoder(getReader("strings"))
+	// Test decoding as plain Go strings
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		checkDecode(d, want, &got, t)
+	}
+	remains := remaining(d)
+	if remains != "" {
+		t.Errorf("leftover: %s", remains)
+	}
+
+	// Test decoding as specific string types
+	d = NewDecoder(getReader("strings"))
+	var bytes []byte
+	var str, sym string
+	checkDecode(d, []byte("abc\000defg"), &bytes, t)
+	checkDecode(d, "abcdefg", &str, t)
+	checkDecode(d, "abcdefg", &sym, t)
+	checkDecode(d, make([]byte, 0), &bytes, t)
+	checkDecode(d, "", &str, t)
+	checkDecode(d, "", &sym, t)
+	remains = remaining(d)
+	if remains != "" {
+		t.Fatalf("leftover: %s", remains)
+	}
+
+	// Test some error handling
+	d = NewDecoder(getReader("strings"))
+	var s string
+	err := d.Decode(s)
+	if err == nil {
+		t.Fatal("Expected error")
+	}
+	if !strings.Contains(err.Error(), "not a pointer") {
+		t.Error(err)
+	}
+	var i int
+	err = d.Decode(&i)
+	if !strings.Contains(err.Error(), "cannot unmarshal") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte{}, nil)
+	if !strings.Contains(err.Error(), "not enough data") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte("foobar"), nil)
+	if !strings.Contains(err.Error(), "invalid-argument") {
+		t.Error(err)
+	}
+}
+
+func TestEncodeDecode(t *testing.T) {
+	type data struct {
+		s  string
+		i  int
+		u8 uint8
+		b  bool
+		f  float32
+		v  interface{}
+	}
+
+	in := data{"foo", 42, 9, true, 1.234, "thing"}
+
+	buf := bytes.Buffer{}
+	e := NewEncoder(&buf)
+	if err := e.Encode(in.s); err != nil {
+		t.Error(err)
+	}
+	if err := e.Encode(in.i); err != nil {
+		t.Error(err)
+	}
+	if err := e.Encode(in.u8); err != nil {
+		t.Error(err)
+	}
+	if err := e.Encode(in.b); err != nil {
+		t.Error(err)
+	}
+	if err := e.Encode(in.f); err != nil {
+		t.Error(err)
+	}
+	if err := e.Encode(in.v); err != nil {
+		t.Error(err)
+	}
+
+	var out data
+	d := NewDecoder(&buf)
+	if err := d.Decode(&out.s); err != nil {
+		t.Error(err)
+	}
+	if err := d.Decode(&out.i); err != nil {
+		t.Error(err)
+	}
+	if err := d.Decode(&out.u8); err != nil {
+		t.Error(err)
+	}
+	if err := d.Decode(&out.b); err != nil {
+		t.Error(err)
+	}
+	if err := d.Decode(&out.f); err != nil {
+		t.Error(err)
+	}
+	if err := d.Decode(&out.v); err != nil {
+		t.Error(err)
+	}
+
+	if err := checkEqual(in, out); err != nil {
+		t.Error(err)
+	}
+}
+
+func TestMap(t *testing.T) {
+	d := NewDecoder(getReader("maps"))
+
+	// Generic map
+	var m Map
+	checkDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m, t)
+
+	// Interface as map
+	var i interface{}
+	checkDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i, t)
+
+	d = NewDecoder(getReader("maps"))
+	// Specific typed map
+	var m2 map[string]int
+	checkDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2, t)
+
+	// Nested map
+	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
+	bytes, err := Marshal(m, nil)
+	if err != nil {
+		t.Fatal(err)
+	}
+	_, err = Unmarshal(bytes, &i)
+	if err != nil {
+		t.Fatal(err)
+	}
+	if err = checkEqual(m, i); err != nil {
+		t.Fatal(err)
+	}
+}
+
+func TestList(t *testing.T) {
+	d := NewDecoder(getReader("lists"))
+	var l List
+	checkDecode(d, List{int32(32), "foo", true}, &l, t)
+	checkDecode(d, List{}, &l, t)
+}
+
+// TODO aconway 2015-09-08: the message.amqp file seems to be incorrectly coded as
+// as an AMQP string *inside* an AMQP binary?? Skip the test for now.
+func TODO_TestMessage(t *testing.T) {
+	bytes, err := ioutil.ReadAll(getReader("message"))
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	m, err := DecodeMessage(bytes)
+	if err != nil {
+		t.Fatal(err)
+	} else {
+		if err := checkEqual(m.Body(), "hello"); err != nil {
+			t.Error(err)
+		}
+	}
+
+	m2 := NewMessageWith("hello")
+	bytes2, err := m2.Encode(nil)
+	if err != nil {
+		t.Error(err)
+	} else {
+		if err = checkEqual(bytes, bytes2); err != nil {
+			t.Error(err)
+		}
+	}
+}
+
+// TODO aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/marshal.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/marshal.go
new file mode 100644
index 0000000..e393c97
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/marshal.go
@@ -0,0 +1,250 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"io"
+	"qpid.apache.org/proton/internal"
+	"reflect"
+	"unsafe"
+)
+
+func dataError(prefix string, data *C.pn_data_t) error {
+	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
+	if err != nil {
+		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
+	}
+	return err
+}
+
+/*
+Marshal encodes a Go value as AMQP data in buffer.
+If buffer is nil, or is not large enough, a new buffer  is created.
+
+Returns the buffer used for encoding with len() adjusted to the actual size of data.
+
+Go types are encoded as follows
+
+ +-------------------------------------+--------------------------------------------+
+ |Go type                              |AMQP type                                   |
+ +-------------------------------------+--------------------------------------------+
+ |bool                                 |bool                                        |
+ +-------------------------------------+--------------------------------------------+
+ |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
+ +-------------------------------------+--------------------------------------------+
+ |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
+ +-------------------------------------+--------------------------------------------+
+ |float32, float64                     |float, double.                              |
+ +-------------------------------------+--------------------------------------------+
+ |string                               |string                                      |
+ +-------------------------------------+--------------------------------------------+
+ |[]byte, Binary                       |binary                                      |
+ +-------------------------------------+--------------------------------------------+
+ |Symbol                               |symbol                                      |
+ +-------------------------------------+--------------------------------------------+
+ |interface{}                          |the contained type                          |
+ +-------------------------------------+--------------------------------------------+
+ |nil                                  |null                                        |
+ +-------------------------------------+--------------------------------------------+
+ |map[K]T                              |map with K and T converted as above         |
+ +-------------------------------------+--------------------------------------------+
+ |Map                                  |map, may have mixed types for keys, values  |
+ +-------------------------------------+--------------------------------------------+
+ |[]T                                  |list with T converted as above              |
+ +-------------------------------------+--------------------------------------------+
+ |List                                 |list, may have mixed types  values          |
+ +-------------------------------------+--------------------------------------------+
+
+The following Go types cannot be marshaled: uintptr, function, interface, channel
+
+TODO
+
+Go types: array, slice, struct, complex64/128.
+
+AMQP types: decimal32/64/128, char, timestamp, uuid, array, multi-section message bodies.
+
+Described types.
+
+*/
+func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
+	defer doRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	marshal(v, data)
+	encode := func(buf []byte) ([]byte, error) {
+		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
+		switch {
+		case n == int(C.PN_OVERFLOW):
+			return buf, overflow
+		case n < 0:
+			return buf, dataError("marshal error", data)
+		default:
+			return buf[:n], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
+
+const minEncode = 256
+
+// overflow is returned when an encoding function can't fit data in the buffer.
+var overflow = internal.Errorf("buffer too small")
+
+// encodeFn encodes into buffer[0:len(buffer)].
+// Returns buffer with length adjusted for data encoded.
+// If buffer too small, returns overflow as error.
+type encodeFn func(buffer []byte) ([]byte, error)
+
+// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
+// Returns the final buffer.
+func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
+	if buffer == nil || len(buffer) == 0 {
+		buffer = make([]byte, minEncode)
+	}
+	var err error
+	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
+		buffer = make([]byte, 2*len(buffer))
+	}
+	return buffer, err
+}
+
+func marshal(v interface{}, data *C.pn_data_t) {
+	switch v := v.(type) {
+	case nil:
+		C.pn_data_put_null(data)
+	case bool:
+		C.pn_data_put_bool(data, C.bool(v))
+	case int8:
+		C.pn_data_put_byte(data, C.int8_t(v))
+	case int16:
+		C.pn_data_put_short(data, C.int16_t(v))
+	case int32:
+		C.pn_data_put_int(data, C.int32_t(v))
+	case int64:
+		C.pn_data_put_long(data, C.int64_t(v))
+	case int:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_long(data, C.int64_t(v))
+		} else {
+			C.pn_data_put_int(data, C.int32_t(v))
+		}
+	case uint8:
+		C.pn_data_put_ubyte(data, C.uint8_t(v))
+	case uint16:
+		C.pn_data_put_ushort(data, C.uint16_t(v))
+	case uint32:
+		C.pn_data_put_uint(data, C.uint32_t(v))
+	case uint64:
+		C.pn_data_put_ulong(data, C.uint64_t(v))
+	case uint:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_ulong(data, C.uint64_t(v))
+		} else {
+			C.pn_data_put_uint(data, C.uint32_t(v))
+		}
+	case float32:
+		C.pn_data_put_float(data, C.float(v))
+	case float64:
+		C.pn_data_put_double(data, C.double(v))
+	case string:
+		C.pn_data_put_string(data, pnBytes([]byte(v)))
+	case []byte:
+		C.pn_data_put_binary(data, pnBytes(v))
+	case Binary:
+		C.pn_data_put_binary(data, pnBytes([]byte(v)))
+	case Symbol:
+		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
+	case Map: // Special map type
+		C.pn_data_put_map(data)
+		C.pn_data_enter(data)
+		for key, val := range v {
+			marshal(key, data)
+			marshal(val, data)
+		}
+		C.pn_data_exit(data)
+	default:
+		switch reflect.TypeOf(v).Kind() {
+		case reflect.Map:
+			putMap(data, v)
+		case reflect.Slice:
+			putList(data, v)
+		default:
+			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
+		}
+	}
+	err := dataError("marshal", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+func clearMarshal(v interface{}, data *C.pn_data_t) {
+	C.pn_data_clear(data)
+	marshal(v, data)
+}
+
+func putMap(data *C.pn_data_t, v interface{}) {
+	mapValue := reflect.ValueOf(v)
+	C.pn_data_put_map(data)
+	C.pn_data_enter(data)
+	for _, key := range mapValue.MapKeys() {
+		marshal(key.Interface(), data)
+		marshal(mapValue.MapIndex(key).Interface(), data)
+	}
+	C.pn_data_exit(data)
+}
+
+func putList(data *C.pn_data_t, v interface{}) {
+	listValue := reflect.ValueOf(v)
+	C.pn_data_put_list(data)
+	C.pn_data_enter(data)
+	for i := 0; i < listValue.Len(); i++ {
+		marshal(listValue.Index(i).Interface(), data)
+	}
+	C.pn_data_exit(data)
+}
+
+// Encoder encodes AMQP values to an io.Writer
+type Encoder struct {
+	writer io.Writer
+	buffer []byte
+}
+
+// New encoder returns a new encoder that writes to w.
+func NewEncoder(w io.Writer) *Encoder {
+	return &Encoder{w, make([]byte, minEncode)}
+}
+
+func (e *Encoder) Encode(v interface{}) (err error) {
+	e.buffer, err = Marshal(v, e.buffer)
+	if err == nil {
+		e.writer.Write(e.buffer)
+	}
+	return err
+}
+
+func replace(data *C.pn_data_t, v interface{}) {
+	C.pn_data_clear(data)
+	marshal(v, data)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message.go
new file mode 100644
index 0000000..20cfa02
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message.go
@@ -0,0 +1,347 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+// #include <stdlib.h>
+//
+// /* Helper for setting message string fields */
+// typedef int (*set_fn)(pn_message_t*, const char*);
+// int msg_set_str(pn_message_t* m, char* s, set_fn set) {
+//     int result = set(m, s);
+//     free(s);
+//     return result;
+// }
+//
+import "C"
+
+import (
+	"qpid.apache.org/proton/internal"
+	"runtime"
+	"time"
+	"unsafe"
+)
+
+// Message is the interface to an AMQP message.
+type Message interface {
+	// Durable indicates that any parties taking responsibility
+	// for the message must durably store the content.
+	Durable() bool
+	SetDurable(bool)
+
+	// Priority impacts ordering guarantees. Within a
+	// given ordered context, higher priority messages may jump ahead of
+	// lower priority messages.
+	Priority() uint8
+	SetPriority(uint8)
+
+	// TTL or Time To Live, a message it may be dropped after this duration
+	TTL() time.Duration
+	SetTTL(time.Duration)
+
+	// FirstAcquirer indicates
+	// that the recipient of the message is the first recipient to acquire
+	// the message, i.e. there have been no failed delivery attempts to
+	// other acquirers. Note that this does not mean the message has not
+	// been delivered to, but not acquired, by other recipients.
+	FirstAcquirer() bool
+	SetFirstAcquirer(bool)
+
+	// DeliveryCount tracks how many attempts have been made to
+	// delivery a message.
+	DeliveryCount() uint32
+	SetDeliveryCount(uint32)
+
+	// MessageId provides a unique identifier for a message.
+	// it can be an a string, an unsigned long, a uuid or a
+	// binary value.
+	MessageId() interface{}
+	SetMessageId(interface{})
+
+	UserId() string
+	SetUserId(string)
+
+	Address() string
+	SetAddress(string)
+
+	Subject() string
+	SetSubject(string)
+
+	ReplyTo() string
+	SetReplyTo(string)
+
+	// CorrelationId is set on correlated request and response messages. It can be
+	// an a string, an unsigned long, a uuid or a binary value.
+	CorrelationId() interface{}
+	SetCorrelationId(interface{})
+
+	ContentType() string
+	SetContentType(string)
+
+	ContentEncoding() string
+	SetContentEncoding(string)
+
+	// ExpiryTime indicates an absoulte time when the message may be dropped.
+	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
+	ExpiryTime() time.Time
+	SetExpiryTime(time.Time)
+
+	CreationTime() time.Time
+	SetCreationTime(time.Time)
+
+	GroupId() string
+	SetGroupId(string)
+
+	GroupSequence() int32
+	SetGroupSequence(int32)
+
+	ReplyToGroupId() string
+	SetReplyToGroupId(string)
+
+	// Instructions - AMQP delivery instructions.
+	Instructions() map[string]interface{}
+	SetInstructions(v map[string]interface{})
+
+	// Annotations - AMQP annotations.
+	Annotations() map[string]interface{}
+	SetAnnotations(v map[string]interface{})
+
+	// Properties - Application properties.
+	Properties() map[string]interface{}
+	SetProperties(v map[string]interface{})
+
+	// Inferred indicates how the message content
+	// is encoded into AMQP sections. If inferred is true then binary and
+	// list values in the body of the message will be encoded as AMQP DATA
+	// and AMQP SEQUENCE sections, respectively. If inferred is false,
+	// then all values in the body of the message will be encoded as AMQP
+	// VALUE sections regardless of their type.
+	Inferred() bool
+	SetInferred(bool)
+
+	// Marshal a Go value into the message body. See amqp.Marshal() for details.
+	Marshal(interface{})
+
+	// Unmarshal the message body into the value pointed to by v. See amqp.Unmarshal() for details.
+	Unmarshal(interface{})
+
+	// Body value resulting from the default unmarshalling of message body as interface{}
+	Body() interface{}
+
+	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
+	// the message is encoded into it, otherwise a new buffer is created.
+	// Returns the buffer containing the message.
+	Encode(buffer []byte) ([]byte, error)
+
+	// Decode data into this message. Overwrites an existing message content.
+	Decode(buffer []byte) error
+
+	// Clear the message contents.
+	Clear()
+
+	// Copy the contents of another message to this one.
+	Copy(m Message) error
+}
+
+type message struct{ pn *C.pn_message_t }
+
+func freeMessage(m *message) {
+	C.pn_message_free(m.pn)
+	m.pn = nil
+}
+
+// NewMessage creates a new message instance.
+func NewMessage() Message {
+	m := &message{C.pn_message()}
+	runtime.SetFinalizer(m, freeMessage)
+	return m
+}
+
+// NewMessageWith creates a message with value as the body. Equivalent to
+//     m := NewMessage(); m.Marshal(body)
+func NewMessageWith(value interface{}) Message {
+	m := NewMessage()
+	m.Marshal(value)
+	return m
+}
+
+func (m *message) Clear() { C.pn_message_clear(m.pn) }
+
+func (m *message) Copy(x Message) error {
+	if data, err := x.Encode(nil); err == nil {
+		return m.Decode(data)
+	} else {
+		return err
+	}
+}
+
+// ==== message get functions
+
+func rewindGet(data *C.pn_data_t) (v interface{}) {
+	C.pn_data_rewind(data)
+	C.pn_data_next(data)
+	unmarshal(&v, data)
+	return v
+}
+
+func rewindMap(data *C.pn_data_t) (v map[string]interface{}) {
+	C.pn_data_rewind(data)
+	C.pn_data_next(data)
+	unmarshal(&v, data)
+	return v
+}
+
+func (m *message) Inferred() bool  { return bool(C.pn_message_is_inferred(m.pn)) }
+func (m *message) Durable() bool   { return bool(C.pn_message_is_durable(m.pn)) }
+func (m *message) Priority() uint8 { return uint8(C.pn_message_get_priority(m.pn)) }
+func (m *message) TTL() time.Duration {
+	return time.Duration(C.pn_message_get_ttl(m.pn)) * time.Millisecond
+}
+func (m *message) FirstAcquirer() bool        { return bool(C.pn_message_is_first_acquirer(m.pn)) }
+func (m *message) DeliveryCount() uint32      { return uint32(C.pn_message_get_delivery_count(m.pn)) }
+func (m *message) MessageId() interface{}     { return rewindGet(C.pn_message_id(m.pn)) }
+func (m *message) UserId() string             { return goString(C.pn_message_get_user_id(m.pn)) }
+func (m *message) Address() string            { return C.GoString(C.pn_message_get_address(m.pn)) }
+func (m *message) Subject() string            { return C.GoString(C.pn_message_get_subject(m.pn)) }
+func (m *message) ReplyTo() string            { return C.GoString(C.pn_message_get_reply_to(m.pn)) }
+func (m *message) CorrelationId() interface{} { return rewindGet(C.pn_message_correlation_id(m.pn)) }
+func (m *message) ContentType() string        { return C.GoString(C.pn_message_get_content_type(m.pn)) }
+func (m *message) ContentEncoding() string    { return C.GoString(C.pn_message_get_content_encoding(m.pn)) }
+
+func (m *message) ExpiryTime() time.Time {
+	return time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(m.pn))))
+}
+func (m *message) CreationTime() time.Time {
+	return time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(m.pn)))
+}
+func (m *message) GroupId() string        { return C.GoString(C.pn_message_get_group_id(m.pn)) }
+func (m *message) GroupSequence() int32   { return int32(C.pn_message_get_group_sequence(m.pn)) }
+func (m *message) ReplyToGroupId() string { return C.GoString(C.pn_message_get_reply_to_group_id(m.pn)) }
+
+func (m *message) Instructions() map[string]interface{} {
+	return rewindMap(C.pn_message_instructions(m.pn))
+}
+func (m *message) Annotations() map[string]interface{} {
+	return rewindMap(C.pn_message_annotations(m.pn))
+}
+func (m *message) Properties() map[string]interface{} {
+	return rewindMap(C.pn_message_properties(m.pn))
+}
+
+// ==== message set methods
+
+func setData(v interface{}, data *C.pn_data_t) {
+	C.pn_data_clear(data)
+	marshal(v, data)
+}
+
+func dataString(data *C.pn_data_t) string {
+	str := C.pn_string(C.CString(""))
+	defer C.pn_free(unsafe.Pointer(str))
+	C.pn_inspect(unsafe.Pointer(data), str)
+	return C.GoString(C.pn_string_get(str))
+}
+
+func (m *message) SetInferred(b bool)  { C.pn_message_set_inferred(m.pn, C.bool(m.Inferred())) }
+func (m *message) SetDurable(b bool)   { C.pn_message_set_durable(m.pn, C.bool(b)) }
+func (m *message) SetPriority(b uint8) { C.pn_message_set_priority(m.pn, C.uint8_t(b)) }
+func (m *message) SetTTL(d time.Duration) {
+	C.pn_message_set_ttl(m.pn, C.pn_millis_t(d/time.Millisecond))
+}
+func (m *message) SetFirstAcquirer(b bool)     { C.pn_message_set_first_acquirer(m.pn, C.bool(b)) }
+func (m *message) SetDeliveryCount(c uint32)   { C.pn_message_set_delivery_count(m.pn, C.uint32_t(c)) }
+func (m *message) SetMessageId(id interface{}) { setData(id, C.pn_message_id(m.pn)) }
+func (m *message) SetUserId(s string)          { C.pn_message_set_user_id(m.pn, pnBytes(([]byte)(s))) }
+func (m *message) SetAddress(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_address))
+}
+func (m *message) SetSubject(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_subject))
+}
+func (m *message) SetReplyTo(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_reply_to))
+}
+func (m *message) SetCorrelationId(c interface{}) { setData(c, C.pn_message_correlation_id(m.pn)) }
+func (m *message) SetContentType(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_content_type))
+}
+func (m *message) SetContentEncoding(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_content_encoding))
+}
+func (m *message) SetExpiryTime(t time.Time)   { C.pn_message_set_expiry_time(m.pn, pnTime(t)) }
+func (m *message) SetCreationTime(t time.Time) { C.pn_message_set_creation_time(m.pn, pnTime(t)) }
+func (m *message) SetGroupId(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_group_id))
+}
+func (m *message) SetGroupSequence(s int32) {
+	C.pn_message_set_group_sequence(m.pn, C.pn_sequence_t(s))
+}
+func (m *message) SetReplyToGroupId(s string) {
+	C.msg_set_str(m.pn, C.CString(s), C.set_fn(C.pn_message_set_reply_to_group_id))
+}
+
+func (m *message) SetInstructions(v map[string]interface{}) {
+	setData(v, C.pn_message_instructions(m.pn))
+}
+func (m *message) SetAnnotations(v map[string]interface{}) { setData(v, C.pn_message_annotations(m.pn)) }
+func (m *message) SetProperties(v map[string]interface{})  { setData(v, C.pn_message_properties(m.pn)) }
+
+// Marshal/Unmarshal body
+func (m *message) Marshal(v interface{})   { clearMarshal(v, C.pn_message_body(m.pn)) }
+func (m *message) Unmarshal(v interface{}) { rewindUnmarshal(v, C.pn_message_body(m.pn)) }
+func (m *message) Body() (v interface{})   { m.Unmarshal(&v); return }
+
+func (m *message) Decode(data []byte) error {
+	m.Clear()
+	if len(data) == 0 {
+		return internal.Errorf("empty buffer for decode")
+	}
+	if C.pn_message_decode(m.pn, cPtr(data), cLen(data)) < 0 {
+		return internal.Errorf("decoding message: %s",
+			internal.PnError(unsafe.Pointer(C.pn_message_error(m.pn))))
+	}
+	return nil
+}
+
+func DecodeMessage(data []byte) (m Message, err error) {
+	m = NewMessage()
+	err = m.Decode(data)
+	return
+}
+
+func (m *message) Encode(buffer []byte) ([]byte, error) {
+	encode := func(buf []byte) ([]byte, error) {
+		len := cLen(buf)
+		result := C.pn_message_encode(m.pn, cPtr(buf), &len)
+		switch {
+		case result == C.PN_OVERFLOW:
+			return buf, overflow
+		case result < 0:
+			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
+		default:
+			return buf[:len], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
+
+// TODO aconway 2015-09-14: Multi-section messages.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message_test.go
new file mode 100644
index 0000000..7a6e5a8
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/message_test.go
@@ -0,0 +1,166 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"testing"
+	"time"
+)
+
+func roundTrip(m Message) error {
+	buffer, err := m.Encode(nil)
+	if err != nil {
+		return err
+	}
+	m2, err := DecodeMessage(buffer)
+	if err != nil {
+		return err
+	}
+	return checkEqual(m, m2)
+}
+
+func TestDefaultMessage(t *testing.T) {
+	m := NewMessage()
+	// Check defaults
+	for _, data := range [][]interface{}{
+		{m.Inferred(), false},
+		{m.Durable(), false},
+		{m.Priority(), uint8(4)},
+		{m.TTL(), time.Duration(0)},
+		{m.UserId(), ""},
+		{m.Address(), ""},
+		{m.Subject(), ""},
+		{m.ReplyTo(), ""},
+		{m.ContentType(), ""},
+		{m.ContentEncoding(), ""},
+		{m.GroupId(), ""},
+		{m.GroupSequence(), int32(0)},
+		{m.ReplyToGroupId(), ""},
+		{m.MessageId(), nil},
+		{m.CorrelationId(), nil},
+		{m.Instructions(), map[string]interface{}{}},
+		{m.Annotations(), map[string]interface{}{}},
+		{m.Properties(), map[string]interface{}{}},
+		{m.Body(), nil},
+	} {
+		if err := checkEqual(data[0], data[1]); err != nil {
+			t.Error(err)
+		}
+	}
+	if err := roundTrip(m); err != nil {
+		t.Error(err)
+	}
+}
+
+func TestMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	m.SetInferred(false)
+	m.SetDurable(true)
+	m.SetPriority(42)
+	m.SetTTL(0)
+	m.SetUserId("user")
+	m.SetAddress("address")
+	m.SetSubject("subject")
+	m.SetReplyTo("replyto")
+	m.SetContentType("content")
+	m.SetContentEncoding("encoding")
+	m.SetGroupId("group")
+	m.SetGroupSequence(42)
+	m.SetReplyToGroupId("replytogroup")
+	m.SetMessageId("id")
+	m.SetCorrelationId("correlation")
+	m.SetInstructions(map[string]interface{}{"instructions": "foo"})
+	m.SetAnnotations(map[string]interface{}{"annotations": "foo"})
+	m.SetProperties(map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"})
+	m.Marshal("hello")
+
+	for _, data := range [][]interface{}{
+		{m.Inferred(), false},
+		{m.Durable(), true},
+		{m.Priority(), uint8(42)},
+		{m.TTL(), time.Duration(0)},
+		{m.UserId(), "user"},
+		{m.Address(), "address"},
+		{m.Subject(), "subject"},
+		{m.ReplyTo(), "replyto"},
+		{m.ContentType(), "content"},
+		{m.ContentEncoding(), "encoding"},
+		{m.GroupId(), "group"},
+		{m.GroupSequence(), int32(42)},
+		{m.ReplyToGroupId(), "replytogroup"},
+		{m.MessageId(), "id"},
+		{m.CorrelationId(), "correlation"},
+		{m.Instructions(), map[string]interface{}{"instructions": "foo"}},
+		{m.Annotations(), map[string]interface{}{"annotations": "foo"}},
+		{m.Properties(), map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}},
+		{m.Body(), "hello"},
+	} {
+		if err := checkEqual(data[0], data[1]); err != nil {
+			t.Error(err)
+		}
+	}
+	if err := roundTrip(m); err != nil {
+		t.Error(err)
+	}
+}
+
+func TestMessageBodyTypes(t *testing.T) {
+	var s string
+	var body interface{}
+	var i int64
+
+	m := NewMessageWith(int64(42))
+	m.Unmarshal(&body)
+	m.Unmarshal(&i)
+	if err := checkEqual(body.(int64), int64(42)); err != nil {
+		t.Error(err)
+	}
+	if err := checkEqual(i, int64(42)); err != nil {
+		t.Error(err)
+	}
+
+	m = NewMessageWith("hello")
+	m.Unmarshal(&s)
+	m.Unmarshal(&body)
+	if err := checkEqual(s, "hello"); err != nil {
+		t.Error(err)
+	}
+	if err := checkEqual(body.(string), "hello"); err != nil {
+		t.Error(err)
+	}
+	if err := roundTrip(m); err != nil {
+		t.Error(err)
+	}
+
+	m = NewMessageWith(Binary("bin"))
+	m.Unmarshal(&s)
+	m.Unmarshal(&body)
+	if err := checkEqual(body.(Binary), Binary("bin")); err != nil {
+		t.Error(err)
+	}
+	if err := checkEqual(s, "bin"); err != nil {
+		t.Error(err)
+	}
+	if err := roundTrip(m); err != nil {
+		t.Error(err)
+	}
+
+	// TODO aconway 2015-09-08: array etc.
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/types.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/types.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/types.go
new file mode 100644
index 0000000..131c974
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/types.go
@@ -0,0 +1,198 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"reflect"
+	"time"
+	"unsafe"
+)
+
+type Type C.pn_type_t
+
+func (t Type) String() string {
+	switch C.pn_type_t(t) {
+	case C.PN_NULL:
+		return "null"
+	case C.PN_BOOL:
+		return "bool"
+	case C.PN_UBYTE:
+		return "ubyte"
+	case C.PN_BYTE:
+		return "byte"
+	case C.PN_USHORT:
+		return "ushort"
+	case C.PN_SHORT:
+		return "short"
+	case C.PN_CHAR:
+		return "char"
+	case C.PN_UINT:
+		return "uint"
+	case C.PN_INT:
+		return "int"
+	case C.PN_ULONG:
+		return "ulong"
+	case C.PN_LONG:
+		return "long"
+	case C.PN_TIMESTAMP:
+		return "timestamp"
+	case C.PN_FLOAT:
+		return "float"
+	case C.PN_DOUBLE:
+		return "double"
+	case C.PN_DECIMAL32:
+		return "decimal32"
+	case C.PN_DECIMAL64:
+		return "decimal64"
+	case C.PN_DECIMAL128:
+		return "decimal128"
+	case C.PN_UUID:
+		return "uuid"
+	case C.PN_BINARY:
+		return "binary"
+	case C.PN_STRING:
+		return "string"
+	case C.PN_SYMBOL:
+		return "symbol"
+	case C.PN_DESCRIBED:
+		return "described"
+	case C.PN_ARRAY:
+		return "array"
+	case C.PN_LIST:
+		return "list"
+	case C.PN_MAP:
+		return "map"
+	case C.PN_INVALID:
+		return "no-data"
+	default:
+		return fmt.Sprintf("unknown-type(%d)", t)
+	}
+}
+
+// Go types
+var (
+	bytesType = reflect.TypeOf([]byte{})
+	valueType = reflect.TypeOf(reflect.Value{})
+)
+
+// TODO aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
+
+// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
+type Map map[interface{}]interface{}
+
+// List is a generic list that can hold mixed values and can represent any AMQP list.
+//
+type List []interface{}
+
+// Symbol is a string that is encoded as an AMQP symbol
+type Symbol string
+
+func (s Symbol) GoString() string { return fmt.Sprintf("s\"%s\"", s) }
+
+// Binary is a string that is encoded as an AMQP binary.
+// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
+// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
+type Binary string
+
+func (b Binary) GoString() string { return fmt.Sprintf("b\"%s\"", b) }
+
+// GoString for Map prints values with their types, useful for debugging.
+func (m Map) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", m)
+	i := len(m)
+	for k, v := range m {
+		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
+		i--
+		if i > 0 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// GoString for List prints values with their types, useful for debugging.
+func (l List) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", l)
+	for i := 0; i < len(l); i++ {
+		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
+		if i == len(l)-1 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// pnTime converts Go time.Time to Proton millisecond Unix time.
+func pnTime(t time.Time) C.pn_timestamp_t {
+	secs := t.Unix()
+	// Note: sub-second accuracy is not guaraunteed if the Unix time in
+	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
+	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
+	return C.pn_timestamp_t(secs*1000 + msecs)
+}
+
+// goTime converts a pn_timestamp_t to a Go time.Time.
+func goTime(t C.pn_timestamp_t) time.Time {
+	secs := int64(t) / 1000
+	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
+	return time.Unix(secs, nsecs)
+}
+
+func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
+	if cBytes.start != nil {
+		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
+	}
+	return
+}
+
+func goString(cBytes C.pn_bytes_t) (str string) {
+	if cBytes.start != nil {
+		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
+	}
+	return
+}
+
+func pnBytes(b []byte) C.pn_bytes_t {
+	if len(b) == 0 {
+		return C.pn_bytes_t{0, nil}
+	} else {
+		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
+	}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/unmarshal.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/unmarshal.go
new file mode 100644
index 0000000..d645273
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/unmarshal.go
@@ -0,0 +1,556 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+oor more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"qpid.apache.org/proton/internal"
+	"reflect"
+	"unsafe"
+)
+
+const minDecode = 1024
+
+// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
+type UnmarshalError struct {
+	// The name of the AMQP type.
+	AMQPType string
+	// The Go type.
+	GoType reflect.Type
+}
+
+func newUnmarshalError(pnType C.pn_type_t, v interface{}) *UnmarshalError {
+	return &UnmarshalError{Type(pnType).String(), reflect.TypeOf(v)}
+}
+
+func (e UnmarshalError) Error() string {
+	if e.GoType.Kind() != reflect.Ptr {
+		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
+	} else {
+		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
+	}
+}
+
+func doRecover(err *error) {
+	r := recover()
+	switch r := r.(type) {
+	case nil:
+	case *UnmarshalError, internal.Error:
+		*err = r.(error)
+	default:
+		panic(r)
+	}
+}
+
+//
+// Decoding from a pn_data_t
+//
+// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
+// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
+//
+
+// Decoder decodes AMQP values from an io.Reader.
+//
+type Decoder struct {
+	reader io.Reader
+	buffer bytes.Buffer
+}
+
+// NewDecoder returns a new decoder that reads from r.
+//
+// The decoder has it's own buffer and may read more data than required for the
+// AMQP values requested.  Use Buffered to see if there is data left in the
+// buffer.
+//
+func NewDecoder(r io.Reader) *Decoder {
+	return &Decoder{r, bytes.Buffer{}}
+}
+
+// Buffered returns a reader of the data remaining in the Decoder's buffer. The
+// reader is valid until the next call to Decode.
+//
+func (d *Decoder) Buffered() io.Reader {
+	return bytes.NewReader(d.buffer.Bytes())
+}
+
+// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
+//
+// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
+//
+func (d *Decoder) Decode(v interface{}) (err error) {
+	defer doRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	var n int
+	for n == 0 && err == nil {
+		n = decode(data, d.buffer.Bytes())
+		if n == 0 { // n == 0 means not enough data, read more
+			err = d.more()
+		} else {
+			unmarshal(v, data)
+		}
+	}
+	d.buffer.Next(n)
+	return
+}
+
+/*
+Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
+Types are converted as follows:
+
+ +---------------------------+----------------------------------------------------------------------+
+ |To Go types                |From AMQP types                                                       |
+ +===========================+======================================================================+
+ |bool                       |bool                                                                  |
+ +---------------------------+----------------------------------------------------------------------+
+ |int, int8, int16,          |Equivalent or smaller signed integer type: byte, short, int, long.    |
+ |int32, int64               |                                                                      |
+ +---------------------------+----------------------------------------------------------------------+
+ |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: ubyte, ushort, uint,     |
+ |uint32, uint64 types       |ulong                                                                 |
+ +---------------------------+----------------------------------------------------------------------+
+ |float32, float64           |Equivalent or smaller float or double.                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |string, []byte             |string, symbol or binary.                                             |
+ +---------------------------+----------------------------------------------------------------------+
+ |Symbol                     |symbol                                                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
+ +---------------------------+----------------------------------------------------------------------+
+ |Map                        |map, any AMQP map                                                     |
+ +---------------------------+----------------------------------------------------------------------+
+ |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |AMQP Type               |Go Type in interface{}                       |
+ |                           +========================+=============================================+
+ |                           |bool                    |bool                                         |
+ |                           +------------------------+---------------------------------------------+
+ |                           |byte,short,int,long     |int8,int16,int32,int64                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
+ |                           +------------------------+---------------------------------------------+
+ |                           |float, double           |float32, float64                             |
+ |                           +------------------------+---------------------------------------------+
+ |                           |string                  |string                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |symbol                  |Symbol                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |binary                  |Binary                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |nulll                   |nil                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |map                     |Map                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |list                    |List                                         |
+ +---------------------------+------------------------+---------------------------------------------+
+
+The following Go types cannot be unmarshaled: uintptr, function, interface, channel.
+
+TODO
+
+Go types: array, struct.
+
+AMQP types: decimal32/64/128, char (round trip), timestamp, uuid, array, multi-section message bodies.
+
+AMQP maps with mixed/unhashable key types need an alternate representation.
+
+Described types.
+*/
+func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
+	defer doRecover(&err)
+
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	n = decode(data, bytes)
+	if n == 0 {
+		err = internal.Errorf("not enough data")
+	} else {
+		unmarshal(v, data)
+	}
+	return
+}
+
+// more reads more data when we can't parse a complete AMQP type
+func (d *Decoder) more() error {
+	var readSize int64 = minDecode
+	if int64(d.buffer.Len()) > readSize { // Grow by doubling
+		readSize = int64(d.buffer.Len())
+	}
+	var n int64
+	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
+	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
+		err = io.EOF
+	}
+	return err
+}
+
+// Unmarshal from data into value pointed at by v.
+func unmarshal(v interface{}, data *C.pn_data_t) {
+	pnType := C.pn_data_type(data)
+	switch v := v.(type) {
+	case *bool:
+		switch pnType {
+		case C.PN_BOOL:
+			*v = bool(C.pn_data_get_bool(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	case *int8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int8(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int8(C.pn_data_get_byte(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	case *uint8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint8(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint8(C.pn_data_get_ubyte(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	case *int16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int16(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int16(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int16(C.pn_data_get_short(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	case *uint16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint16(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint16(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint16(C.pn_data_get_ushort(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	case *int32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int32(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int32(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int32(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int32(C.pn_data_get_int(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	case *uint32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint32(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint32(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint32(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint32(C.pn_data_get_uint(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *int64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int64(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int64(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int64(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int64(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			*v = int64(C.pn_data_get_long(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *uint64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint64(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint64(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint64(C.pn_data_get_ushort(data))
+		case C.PN_ULONG:
+			*v = uint64(C.pn_data_get_ulong(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *int:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = int(C.pn_data_get_long(data))
+			} else {
+				panic(newUnmarshalError(pnType, v))
+			}
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *uint:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint(C.pn_data_get_uint(data))
+		case C.PN_ULONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = uint(C.pn_data_get_ulong(data))
+			} else {
+				panic(newUnmarshalError(pnType, v))
+			}
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *float32:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float32(C.pn_data_get_float(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *float64:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float64(C.pn_data_get_float(data))
+		case C.PN_DOUBLE:
+			*v = float64(C.pn_data_get_double(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *string:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goString(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goString(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goString(C.pn_data_get_binary(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *[]byte:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goBytes(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goBytes(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goBytes(C.pn_data_get_binary(data))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *Binary:
+		switch pnType {
+		case C.PN_BINARY:
+			*v = Binary(goBytes(C.pn_data_get_binary(data)))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *Symbol:
+		switch pnType {
+		case C.PN_SYMBOL:
+			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+
+	case *interface{}:
+		getInterface(data, v)
+
+	default:
+		if reflect.TypeOf(v).Kind() != reflect.Ptr {
+			panic(newUnmarshalError(pnType, v))
+		}
+		switch reflect.TypeOf(v).Elem().Kind() {
+		case reflect.Map:
+			getMap(data, v)
+		case reflect.Slice:
+			getList(data, v)
+		default:
+			panic(newUnmarshalError(pnType, v))
+		}
+	}
+	err := dataError("unmarshaling", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+func rewindUnmarshal(v interface{}, data *C.pn_data_t) {
+	C.pn_data_rewind(data)
+	C.pn_data_next(data)
+	unmarshal(v, data)
+}
+
+// Getting into an interface is driven completely by the AMQP type, since the interface{}
+// target is type-neutral.
+func getInterface(data *C.pn_data_t, v *interface{}) {
+	pnType := C.pn_data_type(data)
+	switch pnType {
+	case C.PN_NULL, C.PN_INVALID: // No data.
+		*v = nil
+	case C.PN_BOOL:
+		*v = bool(C.pn_data_get_bool(data))
+	case C.PN_UBYTE:
+		*v = uint8(C.pn_data_get_ubyte(data))
+	case C.PN_BYTE:
+		*v = int8(C.pn_data_get_byte(data))
+	case C.PN_USHORT:
+		*v = uint16(C.pn_data_get_ushort(data))
+	case C.PN_SHORT:
+		*v = int16(C.pn_data_get_short(data))
+	case C.PN_UINT:
+		*v = uint32(C.pn_data_get_uint(data))
+	case C.PN_INT:
+		*v = int32(C.pn_data_get_int(data))
+	case C.PN_CHAR:
+		*v = uint8(C.pn_data_get_char(data))
+	case C.PN_ULONG:
+		*v = uint64(C.pn_data_get_ulong(data))
+	case C.PN_LONG:
+		*v = int64(C.pn_data_get_long(data))
+	case C.PN_FLOAT:
+		*v = float32(C.pn_data_get_float(data))
+	case C.PN_DOUBLE:
+		*v = float64(C.pn_data_get_double(data))
+	case C.PN_BINARY:
+		*v = Binary(goBytes(C.pn_data_get_binary(data)))
+	case C.PN_STRING:
+		*v = goString(C.pn_data_get_string(data))
+	case C.PN_SYMBOL:
+		*v = Symbol(goString(C.pn_data_get_symbol(data)))
+	case C.PN_MAP:
+		m := make(Map)
+		unmarshal(&m, data)
+		*v = m
+	case C.PN_LIST:
+		l := make(List, 0)
+		unmarshal(&l, data)
+		*v = l
+	default:
+		panic(newUnmarshalError(pnType, v))
+	}
+}
+
+// get into map pointed at by v
+func getMap(data *C.pn_data_t, v interface{}) {
+	mapValue := reflect.ValueOf(v).Elem()
+	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
+	switch pnType := C.pn_data_type(data); pnType {
+	case C.PN_MAP:
+		count := int(C.pn_data_get_map(data))
+		if bool(C.pn_data_enter(data)) {
+			defer C.pn_data_exit(data)
+			for i := 0; i < count/2; i++ {
+				if bool(C.pn_data_next(data)) {
+					key := reflect.New(mapValue.Type().Key())
+					unmarshal(key.Interface(), data)
+					if bool(C.pn_data_next(data)) {
+						val := reflect.New(mapValue.Type().Elem())
+						unmarshal(val.Interface(), data)
+						mapValue.SetMapIndex(key.Elem(), val.Elem())
+					}
+				}
+			}
+		}
+	case C.PN_INVALID: // Leave the map empty
+	default:
+		panic(newUnmarshalError(pnType, v))
+	}
+}
+
+func getList(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_LIST {
+		panic(newUnmarshalError(pnType, v))
+	}
+	count := int(C.pn_data_get_list(data))
+	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count; i++ {
+			if bool(C.pn_data_next(data)) {
+				val := reflect.New(listValue.Type().Elem())
+				unmarshal(val.Interface(), data)
+				listValue.Index(i).Set(val.Elem())
+			}
+		}
+		C.pn_data_exit(data)
+	}
+	reflect.ValueOf(v).Elem().Set(listValue)
+}
+
+// decode from bytes.
+// Return bytes decoded or 0 if we could not decode a complete object.
+//
+func decode(data *C.pn_data_t, bytes []byte) int {
+	if len(bytes) == 0 {
+		return 0
+	}
+	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
+	if n == int(C.PN_UNDERFLOW) {
+		C.pn_error_clear(C.pn_data_error(data))
+		return 0
+	} else if n <= 0 {
+		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
+	}
+	return n
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url.go
new file mode 100644
index 0000000..7a4ef13
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url.go
@@ -0,0 +1,96 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+/*
+#include <stdlib.h>
+#include <string.h>
+#include <proton/url.h>
+
+// Helper function for setting URL fields.
+typedef void (*setter_fn)(pn_url_t* url, const char* value);
+inline void	set(pn_url_t *url, setter_fn s, const char* value) {
+  s(url, value);
+}
+*/
+import "C"
+
+import (
+	"net"
+	"net/url"
+	"qpid.apache.org/proton/internal"
+	"unsafe"
+)
+
+const (
+	amqp  string = "amqp"
+	amqps        = "amqps"
+)
+
+// ParseUrl parses an AMQP URL string and returns a net/url.Url.
+//
+// It is more forgiving than net/url.Parse and allows most of the parts of the
+// URL to be missing, assuming AMQP defaults.
+//
+func ParseURL(s string) (u *url.URL, err error) {
+	cstr := C.CString(s)
+	defer C.free(unsafe.Pointer(cstr))
+	pnUrl := C.pn_url_parse(cstr)
+	if pnUrl == nil {
+		return nil, internal.Errorf("bad URL %#v", s)
+	}
+	defer C.pn_url_free(pnUrl)
+
+	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
+	username := C.GoString(C.pn_url_get_username(pnUrl))
+	password := C.GoString(C.pn_url_get_password(pnUrl))
+	host := C.GoString(C.pn_url_get_host(pnUrl))
+	port := C.GoString(C.pn_url_get_port(pnUrl))
+	path := C.GoString(C.pn_url_get_path(pnUrl))
+
+	if err != nil {
+		return nil, internal.Errorf("bad URL %#v: %s", s, err)
+	}
+	if scheme == "" {
+		scheme = amqp
+	}
+	if port == "" {
+		if scheme == amqps {
+			port = amqps
+		} else {
+			port = amqp
+		}
+	}
+	var user *url.Userinfo
+	if password != "" {
+		user = url.UserPassword(username, password)
+	} else if username != "" {
+		user = url.User(username)
+	}
+
+	u = &url.URL{
+		Scheme: scheme,
+		User:   user,
+		Host:   net.JoinHostPort(host, port),
+		Path:   path,
+	}
+
+	return u, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url_test.go b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url_test.go
new file mode 100644
index 0000000..f80f1c4
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/amqp/url_test.go
@@ -0,0 +1,51 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"fmt"
+)
+
+func ExampleParseURL() {
+	for _, s := range []string{
+		"amqp://username:password@host:1234/path",
+		"host:1234",
+		"host",
+		":1234",
+		"host/path",
+		"amqps://host",
+		"",
+	} {
+		u, err := ParseURL(s)
+		if err != nil {
+			fmt.Println(err)
+		} else {
+			fmt.Println(u)
+		}
+	}
+	// Output:
+	// amqp://username:password@host:1234/path
+	// amqp://host:1234
+	// amqp://host:amqp
+	// amqp://:1234
+	// amqp://host:amqp/path
+	// amqps://host:amqps
+	// proton: bad URL ""
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/connection.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/connection.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/connection.go
new file mode 100644
index 0000000..9e82760
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/connection.go
@@ -0,0 +1,167 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+// #include <proton/disposition.h>
+import "C"
+
+import (
+	"net"
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/internal"
+	"sync"
+)
+
+// Connection is an AMQP connection, created by a Container.
+type Connection interface {
+	Endpoint
+
+	// Server puts the connection in server mode, must be called before Open().
+	//
+	// A server connection will do protocol negotiation to accept a incoming AMQP
+	// connection. Normally you would call this for a connection accepted by
+	// net.Listener.Accept()
+	//
+	Server()
+
+	// Listen enables endpoints opened by the remote peer to be accepted by calling Accept().
+	// Must be called before Open().
+	Listen()
+
+	// NewSession creates a new local session, you must call Session.Open()
+	// to open it with the remote peer.
+	NewSession() (s Session, err error)
+
+	// Accept returns the next Endpoint (Session, Sender or Receiver) opened by
+	// the remote peer. It returns (nil, error) if the connection closes.
+	//
+	// You must call Endpoint.Open() to complete opening the returned Endpoint or
+	// Endpoint.Close(error) to reject it. You can set endpoint properties before
+	// calling Open()
+	//
+	// You can use a type switch or type conversion to test which kind of Endpoint
+	// has been returned.
+	//
+	// You must call Connection.Listen() before Connection.Open() to enable Accept.
+	//
+	// The connection buffers endpoints until you call Accept() so normally you
+	// should have a dedicated goroutine calling Accept() in a loop to process it
+	// rapidly.
+	//
+	Accept() (Endpoint, error)
+
+	// Container for the connection.
+	Container() Container
+
+	// Disconnect the connection abrubtly.
+	Disconnect(error)
+}
+
+type connection struct {
+	endpoint
+	listenOnce sync.Once
+
+	// Set before Open()
+	container *container
+	conn      net.Conn
+	incoming  *internal.FlexChannel
+
+	// Set by Open()
+	handler     *handler
+	engine      *proton.Engine
+	err         internal.FirstError
+	eConnection proton.Connection
+}
+
+func newConnection(conn net.Conn, cont *container) (*connection, error) {
+	c := &connection{container: cont, conn: conn}
+	c.handler = newHandler(c)
+	var err error
+	c.engine, err = proton.NewEngine(c.conn, c.handler.delegator)
+	if err != nil {
+		return nil, err
+	}
+	c.str = c.engine.String()
+	c.eConnection = c.engine.Connection()
+	return c, nil
+}
+
+func (c *connection) Server() { c.engine.Server() }
+
+func (c *connection) Listen() {
+	c.listenOnce.Do(func() { c.incoming = internal.NewFlexChannel(-1) })
+}
+
+func (c *connection) Open() error {
+	go c.engine.Run()
+	return nil
+}
+
+func (c *connection) Close(err error) {
+	c.engine.Close(err)
+	c.setError(c.engine.Error()) // Will be io.EOF on close OK
+	if c.incoming != nil {
+		close(c.incoming.In)
+	}
+}
+
+func (c *connection) Disconnect(err error) {
+	c.engine.Disconnect(err)
+	if c.incoming != nil {
+		close(c.incoming.In)
+	}
+}
+
+// FIXME aconway 2015-09-24: needed?
+func (c *connection) closed(err error) {
+	// Call from another goroutine to initiate close without deadlock.
+	go c.Close(err)
+}
+
+func (c *connection) NewSession() (Session, error) {
+	var s Session
+	err := c.engine.InjectWait(func() error {
+		eSession, err := c.engine.Connection().Session()
+		if err == nil {
+			s = newSession(c, eSession)
+		}
+		return err
+	})
+	return s, err
+}
+
+func (c *connection) handleIncoming(sn *session, l proton.Link) {
+	if l.IsReceiver() {
+		c.incoming.In <- newReceiver(makeIncomingLink(sn, l))
+	} else {
+		c.incoming.In <- newSender(makeIncomingLink(sn, l))
+	}
+}
+
+func (c *connection) Accept() (Endpoint, error) {
+	v, ok := <-c.incoming.Out
+	if !ok {
+		return nil, c.Error()
+	} else {
+		return v.(Endpoint), nil
+	}
+}
+
+func (c *connection) Container() Container { return c.container }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/container.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/container.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/container.go
new file mode 100644
index 0000000..5c090e3
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/container.go
@@ -0,0 +1,71 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"net"
+	"qpid.apache.org/proton/internal"
+)
+
+// Container is an AMQP container, it represents a single AMQP "application".It
+// provides functions to create new Connections to remote containers.
+//
+// Create with NewContainer()
+//
+type Container interface {
+	// Id is a unique identifier for the container in your distributed application.
+	Id() string
+
+	// Create a new AMQP Connection over the supplied net.Conn connection.
+	//
+	// You must call Connection.Open() on the returned Connection, after
+	// setting any Connection properties you need to set. Note the net.Conn
+	// can be an outgoing connection (e.g. made with net.Dial) or an incoming
+	// connection (e.g. made with net.Listener.Accept())
+	NewConnection(conn net.Conn) (Connection, error)
+}
+
+type container struct {
+	id        string
+	linkNames internal.IdCounter
+}
+
+// NewContainer creates a new container. The id must be unique in your
+// distributed application, all connections created by the container
+// will have this container-id.
+//
+// If id == "" a random UUID will be generated for the id.
+func NewContainer(id string) Container {
+	if id == "" {
+		id = internal.UUID4().String()
+	}
+	cont := &container{id: id}
+	return cont
+}
+
+func (cont *container) Id() string { return cont.id }
+
+func (cont *container) nextLinkName() string {
+	return cont.id + "@" + cont.linkNames.Next()
+}
+
+func (cont *container) NewConnection(conn net.Conn) (Connection, error) {
+	return newConnection(conn, cont)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/doc.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/doc.go
new file mode 100644
index 0000000..3e7756c
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/doc.go
@@ -0,0 +1,38 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+
+Package concurrent provides a procedural, concurrent Go API for exchanging AMQP
+messages.
+
+AMPQ defines a credit-based scheme for flow control of messages over a
+link. Credit is the number of messages the receiver is willing to accept.  The
+receiver gives credit to the sender. The sender can send messages without
+waiting for a response from the receiver until it runs out of credit, at which
+point it must wait for more credit to send more messages.
+
+See the documentation of Sender and Receiver for details of how this API uses credit.
+*/
+package concurrent
+
+//#cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/endpoint.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/endpoint.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/endpoint.go
new file mode 100644
index 0000000..717cac1
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/endpoint.go
@@ -0,0 +1,86 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"io"
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/internal"
+)
+
+// Closed is an alias for io.EOF. It is returned as an error when an endpoint
+// was closed cleanly.
+var Closed = io.EOF
+
+// Endpoint is the common interface for Connection, Session, Link, Sender and Receiver.
+//
+// Endpoints can be created locally or by the remote peer. You must Open() an
+// endpoint before you can use it. Some endpoints have additional Set*() methods
+// that must be called before Open() to take effect, see Connection, Session,
+// Link, Sender and Receiver for details.
+//
+type Endpoint interface {
+	// Open the endpoint.
+	Open() error
+
+	// Close an endpoint and signal an error to the remote end if error != nil.
+	Close(error)
+
+	// String is a human readable identifier, useful for debugging and logging.
+	String() string
+
+	// Error returns nil if the endpoint is open, otherwise returns an error.
+	// Error() == Closed means the endpoint was closed without error.
+	Error() error
+}
+
+// Implements setError() and Error() from Endpoint values that hold an error.
+type errorHolder struct {
+	err internal.FirstError
+}
+
+func (e *errorHolder) setError(err error) error { return e.err.Set(err) }
+func (e *errorHolder) Error() error             { return e.err.Get() }
+
+// Implements Error() and String() from Endpoint
+type endpoint struct {
+	errorHolder
+	str string // Must be set by the value that embeds endpoint.
+}
+
+func (e *endpoint) String() string { return e.str }
+
+// Call in proton goroutine to close an endpoint locally
+// handler will complete the close when remote end closes.
+func localClose(ep proton.Endpoint, err error) {
+	if ep.State().LocalActive() {
+		if err != nil {
+			ep.Condition().SetError(err)
+		}
+		ep.Close()
+	}
+}
+
+func (e *endpoint) closeError(err error) {
+	if err == nil {
+		err = Closed
+	}
+	e.err.Set(err)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/handler.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/handler.go b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/handler.go
new file mode 100644
index 0000000..bf8fcd3
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/concurrent/handler.go
@@ -0,0 +1,137 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package concurrent
+
+import (
+	"qpid.apache.org/proton"
+	"qpid.apache.org/proton/amqp"
+)
+
+// NOTE: methods in this file are called only in the proton goroutine unless otherwise indicated.
+
+type handler struct {
+	delegator    *proton.MessagingDelegator
+	connection   *connection
+	links        map[proton.Link]Link
+	sentMessages map[proton.Delivery]*sentMessage
+	sessions     map[proton.Session]*session
+}
+
+func newHandler(c *connection) *handler {
+	h := &handler{
+		connection:   c,
+		links:        make(map[proton.Link]Link),
+		sentMessages: make(map[proton.Delivery]*sentMessage),
+		sessions:     make(map[proton.Session]*session),
+	}
+	h.delegator = proton.NewMessagingDelegator(h)
+	// Disable auto features of MessagingDelegator, we do these ourselves.
+	h.delegator.Prefetch = 0
+	h.delegator.AutoAccept = false
+	h.delegator.AutoSettle = false
+	h.delegator.AutoOpen = false
+	return h
+}
+
+func (h *handler) HandleMessagingEvent(t proton.MessagingEvent, e proton.Event) {
+	switch t {
+
+	case proton.MMessage:
+		if r, ok := h.links[e.Link()].(*receiver); ok {
+			r.handleDelivery(e.Delivery())
+		} else {
+			h.connection.closed(
+				amqp.Errorf(amqp.InternalError, "cannot find receiver for link %s", e.Link()))
+		}
+
+	case proton.MSettled:
+		if sm := h.sentMessages[e.Delivery()]; sm != nil {
+			sm.settled(nil)
+		}
+
+	case proton.MSessionOpening:
+		if e.Session().State().LocalUninit() { // Remotely opened
+			s := newSession(h.connection, e.Session())
+			h.sessions[e.Session()] = s
+			if h.connection.incoming != nil {
+				h.connection.incoming.In <- s
+			} else {
+				proton.CloseError(e.Session(), amqp.Errorf(amqp.NotAllowed, "remote sessions not allowed"))
+			}
+		}
+
+	case proton.MSessionClosing:
+		e.Session().Close()
+
+	case proton.MSessionClosed:
+		err := e.Session().RemoteCondition().Error()
+		for l, _ := range h.links {
+			if l.Session() == e.Session() {
+				h.linkClosed(l, err)
+			}
+		}
+		delete(h.sessions, e.Session())
+
+	case proton.MLinkOpening:
+		l := e.Link()
+		if l.State().LocalUninit() { // Remotely opened
+			if h.connection.incoming == nil {
+				proton.CloseError(l, amqp.Errorf(amqp.NotAllowed, ("no remote links")))
+				break
+			}
+			s := h.sessions[l.Session()]
+			if s == nil {
+				proton.CloseError(
+					l, amqp.Errorf(amqp.InternalError, ("cannot find session for link")))
+				break
+			}
+			h.connection.handleIncoming(s, l)
+		}
+
+	case proton.MLinkClosing:
+		e.Link().Close()
+
+	case proton.MLinkClosed:
+		h.linkClosed(e.Link(), e.Link().RemoteCondition().Error())
+
+	case proton.MDisconnected:
+		err := h.connection.Error()
+		for l, _ := range h.links {
+			h.linkClosed(l, err)
+		}
+		for _, s := range h.sessions {
+			s.closed(err)
+		}
+		for _, sm := range h.sentMessages {
+			sm.settled(err)
+		}
+	}
+}
+
+func (h *handler) linkClosed(l proton.Link, err error) {
+	if link := h.links[l]; link != nil {
+		link.closed(err)
+		delete(h.links, l)
+	}
+}
+
+func (h *handler) addLink(rl proton.Link, ll Link) {
+	h.links[rl] = ll
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[10/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/README.md
----------------------------------------------------------------------
diff --git a/go/README.md b/go/README.md
new file mode 100644
index 0000000..2b73583
--- /dev/null
+++ b/go/README.md
@@ -0,0 +1,142 @@
+# *EXPERIMENTAL* Go binding for proton
+
+    NOTE: The go directory is in the proton repository root with a symlink at
+    proton-c/bindings/go to facilitate use of go tools: go get, godep and godoc.
+    There may be a cleaner solution to this in future.
+
+This is the beginning of a [Go](http://golang.org) binding for proton.
+
+This work is in early *experimental* stages, *everything* may change in future.
+Comments and contributions are strongly encouraged, this experiment is public so
+early feedback can guide development.
+
+- Email <pr...@qpid.apache.org>
+- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
+
+There are working [examples](../examples/go/README.md) and the examples README file
+explains how to install the packages in your go workspace and read the documentation.
+
+## Goals
+
+The API should
+
+- be idiomatic, unsurprising, and easy to use for Go developers.
+- support client and server development.
+- make simple tasks simple.
+- provide deep access to AMQP protocol when that is required.
+
+There are two types of developer we want to support
+
+1. Go developers using AMQP as a message transport:
+   - Straightforward conversions between Go built-in types and AMQP types.
+   - Easy message exchange via Go channels to support use in goroutines.
+
+2. AMQP-aware developers using Go as an implementation language:
+   - Go types to exactly represent all AMQP types and encoding details.
+   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
+
+## Status
+
+There are 3 go packages for proton:
+
+- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
+- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+
+Most applications should use the `messaging` package. The `event` package is for
+applications that need low-level access to the proton engine.
+
+The `event` package is fairly complete, with the exception of the proton
+reactor. It's unclear if the reactor is important for go.
+
+The `messaging` package can run the examples but probably not much else. There
+is work to do on error handling and the API may change.
+
+There are working [examples](../../../examples/go/README.md) of a broker using `event` and
+a sender and receiver using `messaging`.
+
+## The event driven API
+
+See the package documentation for details.
+
+## The Go API
+
+The goal: A procedural API that allows any user goroutine to send and receive
+AMQP messages and other information (acknowledgments, flow control instructions
+etc.) using channels. There will be no user-visible locks and no need to run
+user code in special goroutines, e.g. as handlers in a proton event loop.
+
+See the package documentation for emerging details.
+
+Currently using a channel to receive messages, a function to send them (channels
+internally) and a channel as a "future" for acknowledgements to senders. This
+may change.
+
+## Why a separate API for Go?
+
+Go is a concurrent language and encourages applications to be divided into
+concurrent *goroutines*. It provides traditional locking but it encourages the
+use *channels* to communicate between goroutines without explicit locks:
+
+  "Share memory by communicating, don't communicate by sharing memory"
+
+The idea is that a given value is only operated on by one goroutine at a time,
+but values can easily be passed from one goroutine to another. This removes much
+of the need for locking.
+
+Go literature distinguishes between:
+
+- *concurrency*: "keeping track of things that could be done in parallel"
+- *parallelism*: "actually doing things in parallel"
+
+The application expresses concurrency by starting goroutines for potentially
+concurrent tasks. The Go run-times schedule the activity of goroutines onto a
+small number (possibly one) of actual parallel executions.
+
+Even with *no* parallelism, concurrency lets the Go run-times *order* work with
+respect to events like file descriptors being readable/writable, channels having
+data, timers firing etc. Go automatically takes care of switching out goroutines
+that block or sleep so it is normal to write code in terms of blocking calls.
+
+Event-driven API (like poll, epoll, select or the proton event API) also
+channel unpredictably ordered events to actions in one or a small pool of
+execution threads. However this requires a different style of programming:
+"event-driven" or "reactive" programming. Go developers call it "inside-out"
+programming. In an event-driven architecture blocking is a big problem as it
+consumes a scarce thread of execution, so actions that take time to complete
+have to be re-structured in terms of future event delivery.
+
+The promise of Go is that you can express your application in concurrent,
+procedural terms with simple blocking calls and the Go run-times will turn it
+inside-out for you. Write as many goroutines as you want, and let Go interleave
+and schedule them efficiently.
+
+For example: the Go equivalent of listening for connections is a goroutine with
+a simple endless loop that calls a blocking Listen() function and starts a
+goroutine for each new connection. Each connection has its own goroutine that
+deals with just that connection till it closes.
+
+The benefit is that the variables and logic live closer together. Once you're in
+a goroutine, you have everything you need in local variables, and they are
+preserved across blocking calls. There's no need to store details in context
+objects that you have to look up when handling a later event to figure out how
+to continue where you left off.
+
+So a Go-like proton API does not force the users code to run in an event-loop
+goroutine. Instead user goroutines communicate with the event loop(s) via
+channels.  There's no need to funnel connections into one event loop, in fact it
+makes no sense.  Connections can be processed concurrently so they should be
+processed in separate goroutines and left to Go to schedule. User goroutines can
+have simple loops that block channels till messages are available, the user can
+start as many or as few such goroutines as they wish to implement concurrency as
+simple or as complex as they wish. For example blocking request-response
+vs. asynchronous flows of messages and acknowledgments.
+
+## New to Go?
+
+If you are new to Go then these are a good place to start:
+
+- [A Tour of Go](http://tour.golang.org)
+- [Effective Go](http://golang.org/doc/effective_go.html)
+
+Then look at the tools and library docs at <http://golang.org> as you need them.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/doc.go
----------------------------------------------------------------------
diff --git a/go/amqp/doc.go b/go/amqp/doc.go
new file mode 100644
index 0000000..7c00aa0
--- /dev/null
+++ b/go/amqp/doc.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package amqp encodes and decodes AMQP messages and data as Go types.
+
+It follows the standard 'encoding' libraries pattern. The mapping between AMQP
+and Go types is described in the documentation of the Marshal and Unmarshal
+functions.
+
+The sub-packages 'event' and 'messaging' provide two alternative ways to write
+AMQP clients and servers. 'messaging' is easier for general purpose use. 'event'
+gives complete low-level control of the underlying proton C engine.
+
+AMQP is an open standard for inter-operable message exchange, see <http://www.amqp.org/>
+*/
+package amqp
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.
+
+// FIXME aconway 2015-04-28: need to re-organize the package, it's not very intuitive.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/interop
----------------------------------------------------------------------
diff --git a/go/amqp/interop b/go/amqp/interop
new file mode 120000
index 0000000..8f50d0e
--- /dev/null
+++ b/go/amqp/interop
@@ -0,0 +1 @@
+../../../../tests/interop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/interop_test.go
----------------------------------------------------------------------
diff --git a/go/amqp/interop_test.go b/go/amqp/interop_test.go
new file mode 100644
index 0000000..11049f7
--- /dev/null
+++ b/go/amqp/interop_test.go
@@ -0,0 +1,308 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Test that conversion of Go type to/from AMQP is compatible with other
+// bindings.
+//
+package amqp
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"io/ioutil"
+	"os"
+	"reflect"
+	"strings"
+	"testing"
+)
+
+func assertEqual(want interface{}, got interface{}) {
+	if !reflect.DeepEqual(want, got) {
+		panic(fmt.Errorf("%#v != %#v", want, got))
+	}
+}
+
+func assertNil(err interface{}) {
+	if err != nil {
+		panic(err)
+	}
+}
+
+func getReader(name string) (r io.Reader) {
+	r, err := os.Open("interop/" + name + ".amqp")
+	if err != nil {
+		panic(fmt.Errorf("Can't open %#v: %v", name, err))
+	}
+	return
+}
+
+func remaining(d *Decoder) string {
+	remainder, _ := ioutil.ReadAll(io.MultiReader(d.Buffered(), d.reader))
+	return string(remainder)
+}
+
+// assertDecode: want is the expected value, gotPtr is a pointer to a
+// instance of the same type for Decode.
+func assertDecode(d *Decoder, want interface{}, gotPtr interface{}) {
+
+	assertNil(d.Decode(gotPtr))
+
+	got := reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(want, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, gotPtr)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	got = reflect.ValueOf(gotPtr).Elem().Interface()
+	assertEqual(want, got)
+}
+
+func TestUnmarshal(t *testing.T) {
+	bytes, err := ioutil.ReadAll(getReader("strings"))
+	if err != nil {
+		t.Error(err)
+	}
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		n, err := Unmarshal(bytes, &got)
+		if err != nil {
+			t.Error(err)
+		}
+		if want != got {
+			t.Errorf("%#v != %#v", want, got)
+		}
+		bytes = bytes[n:]
+	}
+}
+
+func TestPrimitivesExact(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into exact types
+	var b bool
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	var u8 uint8
+	assertDecode(d, uint8(42), &u8)
+	var u16 uint16
+	assertDecode(d, uint16(42), &u16)
+	var i16 int16
+	assertDecode(d, int16(-42), &i16)
+	var u32 uint32
+	assertDecode(d, uint32(12345), &u32)
+	var i32 int32
+	assertDecode(d, int32(-12345), &i32)
+	var u64 uint64
+	assertDecode(d, uint64(12345), &u64)
+	var i64 int64
+	assertDecode(d, int64(-12345), &i64)
+	var f32 float32
+	assertDecode(d, float32(0.125), &f32)
+	var f64 float64
+	assertDecode(d, float64(0.125), &f64)
+}
+
+func TestPrimitivesCompatible(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	// Decoding into compatible types
+	var b bool
+	var i int
+	var u uint
+	var f float64
+	assertDecode(d, true, &b)
+	assertDecode(d, false, &b)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, uint(42), &u)
+	assertDecode(d, -42, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, uint(12345), &u)
+	assertDecode(d, -12345, &i)
+	assertDecode(d, 0.125, &f)
+	assertDecode(d, 0.125, &f)
+}
+
+// assertDecodeValue: want is the expected value, decode into a reflect.Value
+func assertDecodeInterface(d *Decoder, want interface{}) {
+
+	var got, got2 interface{}
+	assertNil(d.Decode(&got))
+
+	assertEqual(want, got)
+
+	// Try round trip encoding
+	bytes, err := Marshal(got, nil)
+	assertNil(err)
+	n, err := Unmarshal(bytes, &got2)
+	assertNil(err)
+	assertEqual(n, len(bytes))
+	assertEqual(want, got2)
+}
+
+func TestPrimitivesInterface(t *testing.T) {
+	d := NewDecoder(getReader("primitives"))
+	assertDecodeInterface(d, true)
+	assertDecodeInterface(d, false)
+	assertDecodeInterface(d, uint8(42))
+	assertDecodeInterface(d, uint16(42))
+	assertDecodeInterface(d, int16(-42))
+	assertDecodeInterface(d, uint32(12345))
+	assertDecodeInterface(d, int32(-12345))
+	assertDecodeInterface(d, uint64(12345))
+	assertDecodeInterface(d, int64(-12345))
+	assertDecodeInterface(d, float32(0.125))
+	assertDecodeInterface(d, float64(0.125))
+}
+
+func TestStrings(t *testing.T) {
+	d := NewDecoder(getReader("strings"))
+	// Test decoding as plain Go strings
+	for _, want := range []string{"abc\000defg", "abcdefg", "abcdefg", "", "", ""} {
+		var got string
+		assertDecode(d, want, &got)
+	}
+	remains := remaining(d)
+	if remains != "" {
+		t.Errorf("leftover: %s", remains)
+	}
+
+	// Test decoding as specific string types
+	d = NewDecoder(getReader("strings"))
+	var bytes []byte
+	var str, sym string
+	assertDecode(d, []byte("abc\000defg"), &bytes)
+	assertDecode(d, "abcdefg", &str)
+	assertDecode(d, "abcdefg", &sym)
+	assertDecode(d, make([]byte, 0), &bytes)
+	assertDecode(d, "", &str)
+	assertDecode(d, "", &sym)
+	remains = remaining(d)
+	if remains != "" {
+		t.Fatalf("leftover: %s", remains)
+	}
+
+	// Test some error handling
+	d = NewDecoder(getReader("strings"))
+	var s string
+	err := d.Decode(s)
+	if err == nil {
+		t.Fatal("Expected error")
+	}
+	if !strings.Contains(err.Error(), "not a pointer") {
+		t.Error(err)
+	}
+	var i int
+	err = d.Decode(&i)
+	if !strings.Contains(err.Error(), "cannot unmarshal") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte{}, nil)
+	if !strings.Contains(err.Error(), "not enough data") {
+		t.Error(err)
+	}
+	_, err = Unmarshal([]byte("foobar"), nil)
+	if !strings.Contains(err.Error(), "invalid-argument") {
+		t.Error(err)
+	}
+}
+
+func TestEncodeDecode(t *testing.T) {
+	type data struct {
+		s  string
+		i  int
+		u8 uint8
+		b  bool
+		f  float32
+		v  interface{}
+	}
+
+	in := data{"foo", 42, 9, true, 1.234, "thing"}
+
+	buf := bytes.Buffer{}
+	e := NewEncoder(&buf)
+	assertNil(e.Encode(in.s))
+	assertNil(e.Encode(in.i))
+	assertNil(e.Encode(in.u8))
+	assertNil(e.Encode(in.b))
+	assertNil(e.Encode(in.f))
+	assertNil(e.Encode(in.v))
+
+	var out data
+	d := NewDecoder(&buf)
+	assertNil(d.Decode(&out.s))
+	assertNil(d.Decode(&out.i))
+	assertNil(d.Decode(&out.u8))
+	assertNil(d.Decode(&out.b))
+	assertNil(d.Decode(&out.f))
+	assertNil(d.Decode(&out.v))
+
+	assertEqual(in, out)
+}
+
+func TestMap(t *testing.T) {
+	d := NewDecoder(getReader("maps"))
+
+	// Generic map
+	var m Map
+	assertDecode(d, Map{"one": int32(1), "two": int32(2), "three": int32(3)}, &m)
+
+	// Interface as map
+	var i interface{}
+	assertDecode(d, Map{int32(1): "one", int32(2): "two", int32(3): "three"}, &i)
+
+	d = NewDecoder(getReader("maps"))
+	// Specific typed map
+	var m2 map[string]int
+	assertDecode(d, map[string]int{"one": 1, "two": 2, "three": 3}, &m2)
+
+	// Round trip a nested map
+	m = Map{int64(1): "one", "two": int32(2), true: Map{uint8(1): true, uint8(2): false}}
+	bytes, err := Marshal(m, nil)
+	assertNil(err)
+	_, err = Unmarshal(bytes, &i)
+	assertNil(err)
+	assertEqual(m, i)
+}
+
+func TestList(t *testing.T) {
+	d := NewDecoder(getReader("lists"))
+	var l List
+	assertDecode(d, List{int32(32), "foo", true}, &l)
+	assertDecode(d, List{}, &l)
+}
+
+func FIXMETestMessage(t *testing.T) {
+	// FIXME aconway 2015-04-09: integrate Message encoding under marshal/unmarshal API.
+	bytes, err := ioutil.ReadAll(getReader("message"))
+	assertNil(err)
+	m, err := DecodeMessage(bytes)
+	assertNil(err)
+	fmt.Printf("%+v\n", m)
+	assertEqual(m.Body(), "hello")
+
+	bytes2 := make([]byte, len(bytes))
+	bytes2, err = m.Encode(bytes2)
+	assertNil(err)
+	assertEqual(bytes, bytes2)
+}
+
+// FIXME aconway 2015-03-13: finish the full interop test

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/go/amqp/marshal.go b/go/amqp/marshal.go
new file mode 100644
index 0000000..e5c2945
--- /dev/null
+++ b/go/amqp/marshal.go
@@ -0,0 +1,238 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+func dataError(prefix string, data *C.pn_data_t) error {
+	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
+	if err != nil {
+		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
+	}
+	return err
+}
+
+/*
+Marshal encodes a Go value as AMQP data in buffer.
+If buffer is nil, or is not large enough, a new buffer  is created.
+
+Returns the buffer used for encoding with len() adjusted to the actual size of data.
+
+Go types are encoded as follows
+
+ +-------------------------------------+--------------------------------------------+
+ |Go type                              |AMQP type                                   |
+ +-------------------------------------+--------------------------------------------+
+ |bool                                 |bool                                        |
+ +-------------------------------------+--------------------------------------------+
+ |int8, int16, int32, int64 (int)      |byte, short, int, long (int or long)        |
+ +-------------------------------------+--------------------------------------------+
+ |uint8, uint16, uint32, uint64 (uint) |ubyte, ushort, uint, ulong (uint or ulong)  |
+ +-------------------------------------+--------------------------------------------+
+ |float32, float64                     |float, double.                              |
+ +-------------------------------------+--------------------------------------------+
+ |string                               |string                                      |
+ +-------------------------------------+--------------------------------------------+
+ |[]byte, Binary                       |binary                                      |
+ +-------------------------------------+--------------------------------------------+
+ |Symbol                               |symbol                                      |
+ +-------------------------------------+--------------------------------------------+
+ |interface{}                          |the contained type                          |
+ +-------------------------------------+--------------------------------------------+
+ |nil                                  |null                                        |
+ +-------------------------------------+--------------------------------------------+
+ |map[K]T                              |map with K and T converted as above         |
+ +-------------------------------------+--------------------------------------------+
+ |Map                                  |map, may have mixed types for keys, values  |
+ +-------------------------------------+--------------------------------------------+
+ |[]T                                  |list with T converted as above              |
+ +-------------------------------------+--------------------------------------------+
+ |List                                 |list, may have mixed types  values          |
+ +-------------------------------------+--------------------------------------------+
+
+TODO Go types: array, slice, struct
+
+Go types that cannot be marshaled: complex64/128, uintptr, function, interface, channel
+*/
+func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	put(data, v)
+	encode := func(buf []byte) ([]byte, error) {
+		n := int(C.pn_data_encode(data, cPtr(buf), cLen(buf)))
+		switch {
+		case n == int(C.PN_OVERFLOW):
+			return buf, overflow
+		case n < 0:
+			return buf, dataError("marshal error", data)
+		default:
+			return buf[:n], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}
+
+const minEncode = 256
+
+// overflow is returned when an encoding function can't fit data in the buffer.
+var overflow = internal.Errorf("buffer too small")
+
+// encodeFn encodes into buffer[0:len(buffer)].
+// Returns buffer with length adjusted for data encoded.
+// If buffer too small, returns overflow as error.
+type encodeFn func(buffer []byte) ([]byte, error)
+
+// encodeGrow calls encode() into buffer, if it returns overflow grows the buffer.
+// Returns the final buffer.
+func encodeGrow(buffer []byte, encode encodeFn) ([]byte, error) {
+	if buffer == nil || len(buffer) == 0 {
+		buffer = make([]byte, minEncode)
+	}
+	var err error
+	for buffer, err = encode(buffer); err == overflow; buffer, err = encode(buffer) {
+		buffer = make([]byte, 2*len(buffer))
+	}
+	return buffer, err
+}
+
+func put(data *C.pn_data_t, v interface{}) {
+	switch v := v.(type) {
+	case nil:
+		C.pn_data_put_null(data)
+	case bool:
+		C.pn_data_put_bool(data, C.bool(v))
+	case int8:
+		C.pn_data_put_byte(data, C.int8_t(v))
+	case int16:
+		C.pn_data_put_short(data, C.int16_t(v))
+	case int32:
+		C.pn_data_put_int(data, C.int32_t(v))
+	case int64:
+		C.pn_data_put_long(data, C.int64_t(v))
+	case int:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_long(data, C.int64_t(v))
+		} else {
+			C.pn_data_put_int(data, C.int32_t(v))
+		}
+	case uint8:
+		C.pn_data_put_ubyte(data, C.uint8_t(v))
+	case uint16:
+		C.pn_data_put_ushort(data, C.uint16_t(v))
+	case uint32:
+		C.pn_data_put_uint(data, C.uint32_t(v))
+	case uint64:
+		C.pn_data_put_ulong(data, C.uint64_t(v))
+	case uint:
+		if unsafe.Sizeof(0) == 8 {
+			C.pn_data_put_ulong(data, C.uint64_t(v))
+		} else {
+			C.pn_data_put_uint(data, C.uint32_t(v))
+		}
+	case float32:
+		C.pn_data_put_float(data, C.float(v))
+	case float64:
+		C.pn_data_put_double(data, C.double(v))
+	case string:
+		C.pn_data_put_string(data, pnBytes([]byte(v)))
+	case []byte:
+		C.pn_data_put_binary(data, pnBytes(v))
+	case Binary:
+		C.pn_data_put_binary(data, pnBytes([]byte(v)))
+	case Symbol:
+		C.pn_data_put_symbol(data, pnBytes([]byte(v)))
+	case Map: // Special map type
+		C.pn_data_put_map(data)
+		C.pn_data_enter(data)
+		for key, val := range v {
+			put(data, key)
+			put(data, val)
+		}
+		C.pn_data_exit(data)
+	default:
+		switch reflect.TypeOf(v).Kind() {
+		case reflect.Map:
+			putMap(data, v)
+		case reflect.Slice:
+			putList(data, v)
+		default:
+			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
+		}
+	}
+	err := dataError("marshal", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+func putMap(data *C.pn_data_t, v interface{}) {
+	mapValue := reflect.ValueOf(v)
+	C.pn_data_put_map(data)
+	C.pn_data_enter(data)
+	for _, key := range mapValue.MapKeys() {
+		put(data, key.Interface())
+		put(data, mapValue.MapIndex(key).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+func putList(data *C.pn_data_t, v interface{}) {
+	listValue := reflect.ValueOf(v)
+	C.pn_data_put_list(data)
+	C.pn_data_enter(data)
+	for i := 0; i < listValue.Len(); i++ {
+		put(data, listValue.Index(i).Interface())
+	}
+	C.pn_data_exit(data)
+}
+
+// Encoder encodes AMQP values to an io.Writer
+type Encoder struct {
+	writer io.Writer
+	buffer []byte
+}
+
+// New encoder returns a new encoder that writes to w.
+func NewEncoder(w io.Writer) *Encoder {
+	return &Encoder{w, make([]byte, minEncode)}
+}
+
+func (e *Encoder) Encode(v interface{}) (err error) {
+	e.buffer, err = Marshal(v, e.buffer)
+	if err == nil {
+		e.writer.Write(e.buffer)
+	}
+	return err
+}
+
+func replace(data *C.pn_data_t, v interface{}) {
+	C.pn_data_clear(data)
+	put(data, v)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/message.go
----------------------------------------------------------------------
diff --git a/go/amqp/message.go b/go/amqp/message.go
new file mode 100644
index 0000000..87093f5
--- /dev/null
+++ b/go/amqp/message.go
@@ -0,0 +1,342 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/types.h>
+// #include <proton/message.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+	"time"
+	"unsafe"
+)
+
+// FIXME aconway 2015-04-28: Do we need the interface or can we just export the struct?
+
+// Message is the interface to an AMQP message.
+// Instances of this interface contain a pointer to the underlying struct.
+type Message interface {
+	/**
+	 * Inferred indicates how the message content
+	 * is encoded into AMQP sections. If inferred is true then binary and
+	 * list values in the body of the message will be encoded as AMQP DATA
+	 * and AMQP SEQUENCE sections, respectively. If inferred is false,
+	 * then all values in the body of the message will be encoded as AMQP
+	 * VALUE sections regardless of their type.
+	 */
+	Inferred() bool
+	SetInferred(bool)
+
+	/**
+	 * Durable indicates that any parties taking responsibility
+	 * for the message must durably store the content.
+	 */
+	Durable() bool
+	SetDurable(bool)
+
+	/**
+	 * Priority impacts ordering guarantees. Within a
+	 * given ordered context, higher priority messages may jump ahead of
+	 * lower priority messages.
+	 */
+	Priority() uint8
+	SetPriority(uint8)
+
+	/**
+	 * TTL or Time To Live, a message it may be dropped after this duration
+	 */
+	TTL() time.Duration
+	SetTTL(time.Duration)
+
+	/**
+	 * FirstAcquirer indicates
+	 * that the recipient of the message is the first recipient to acquire
+	 * the message, i.e. there have been no failed delivery attempts to
+	 * other acquirers. Note that this does not mean the message has not
+	 * been delivered to, but not acquired, by other recipients.
+	 */
+	FirstAcquirer() bool
+	SetFirstAcquirer(bool)
+
+	/**
+	 * DeliveryCount tracks how many attempts have been made to
+	 * delivery a message.
+	 */
+	DeliveryCount() uint32
+	SetDeliveryCount(uint32)
+
+	/**
+	 * MessageId provides a unique identifier for a message.
+	 * it can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	MessageId() interface{}
+	SetMessageId(interface{})
+
+	UserId() string
+	SetUserId(string)
+
+	Address() string
+	SetAddress(string)
+
+	Subject() string
+	SetSubject(string)
+
+	ReplyTo() string
+	SetReplyTo(string)
+
+	/**
+	 * CorrelationId is set on correlated request and response messages. It can be an a string, an unsigned long, a uuid or a
+	 * binary value.
+	 */
+	CorrelationId() interface{}
+	SetCorrelationId(interface{})
+
+	ContentType() string
+	SetContentType(string)
+
+	ContentEncoding() string
+	SetContentEncoding(string)
+
+	// ExpiryTime indicates an absoulte time when the message may be dropped.
+	// A Zero time (i.e. t.isZero() == true) indicates a message never expires.
+	ExpiryTime() time.Time
+	SetExpiryTime(time.Time)
+
+	CreationTime() time.Time
+	SetCreationTime(time.Time)
+
+	GroupId() string
+	SetGroupId(string)
+
+	GroupSequence() int32
+	SetGroupSequence(int32)
+
+	ReplyToGroupId() string
+	SetReplyToGroupId(string)
+
+	/**
+	 * Instructions can be used to access or modify AMQP delivery instructions.
+	 */
+	Instructions() *map[string]interface{}
+
+	/**
+	 * Annotations  can be used to access or modify AMQP annotations.
+	 */
+	Annotations() *map[string]interface{}
+
+	/**
+	 * Properties  can be used to access or modify the application properties of a message.
+	 */
+	Properties() *map[string]interface{}
+
+	/**
+	 * Body of the message can be any AMQP encodable type.
+	 */
+	Body() interface{}
+	SetBody(interface{})
+
+	// Encode encodes the message as AMQP data. If buffer is non-nil and is large enough
+	// the message is encoded into it, otherwise a new buffer is created.
+	// Returns the buffer containing the message.
+	Encode(buffer []byte) ([]byte, error)
+}
+
+// NewMessage creates a new message instance. The returned interface contains a pointer.
+func NewMessage() Message {
+	pn := C.pn_message() // Pick up default setting from C message.
+	defer C.pn_message_free(pn)
+	return goMessage(pn)
+}
+
+// Message implementation copies all message data into Go space so it can be proprely
+// memory managed.
+//
+type message struct {
+	inferred, durable, firstAcquirer      bool
+	priority                              uint8
+	ttl                                   time.Duration
+	deliveryCount                         uint32
+	messageId                             interface{}
+	userId, address, subject, replyTo     string
+	contentType, contentEncoding          string
+	groupId, replyToGroupId               string
+	creationTime, expiryTime              time.Time
+	groupSequence                         int32
+	correlationId                         interface{}
+	instructions, annotations, properties map[string]interface{}
+	body                                  interface{}
+}
+
+func (m *message) Inferred() bool                        { return m.inferred }
+func (m *message) SetInferred(b bool)                    { m.inferred = b }
+func (m *message) Durable() bool                         { return m.durable }
+func (m *message) SetDurable(b bool)                     { m.durable = b }
+func (m *message) Priority() uint8                       { return m.priority }
+func (m *message) SetPriority(b uint8)                   { m.priority = b }
+func (m *message) TTL() time.Duration                    { return m.ttl }
+func (m *message) SetTTL(d time.Duration)                { m.ttl = d }
+func (m *message) FirstAcquirer() bool                   { return m.firstAcquirer }
+func (m *message) SetFirstAcquirer(b bool)               { m.firstAcquirer = b }
+func (m *message) DeliveryCount() uint32                 { return m.deliveryCount }
+func (m *message) SetDeliveryCount(c uint32)             { m.deliveryCount = c }
+func (m *message) MessageId() interface{}                { return m.messageId }
+func (m *message) SetMessageId(id interface{})           { m.messageId = id }
+func (m *message) UserId() string                        { return m.userId }
+func (m *message) SetUserId(s string)                    { m.userId = s }
+func (m *message) Address() string                       { return m.address }
+func (m *message) SetAddress(s string)                   { m.address = s }
+func (m *message) Subject() string                       { return m.subject }
+func (m *message) SetSubject(s string)                   { m.subject = s }
+func (m *message) ReplyTo() string                       { return m.replyTo }
+func (m *message) SetReplyTo(s string)                   { m.replyTo = s }
+func (m *message) CorrelationId() interface{}            { return m.correlationId }
+func (m *message) SetCorrelationId(c interface{})        { m.correlationId = c }
+func (m *message) ContentType() string                   { return m.contentType }
+func (m *message) SetContentType(s string)               { m.contentType = s }
+func (m *message) ContentEncoding() string               { return m.contentEncoding }
+func (m *message) SetContentEncoding(s string)           { m.contentEncoding = s }
+func (m *message) ExpiryTime() time.Time                 { return m.expiryTime }
+func (m *message) SetExpiryTime(t time.Time)             { m.expiryTime = t }
+func (m *message) CreationTime() time.Time               { return m.creationTime }
+func (m *message) SetCreationTime(t time.Time)           { m.creationTime = t }
+func (m *message) GroupId() string                       { return m.groupId }
+func (m *message) SetGroupId(s string)                   { m.groupId = s }
+func (m *message) GroupSequence() int32                  { return m.groupSequence }
+func (m *message) SetGroupSequence(s int32)              { m.groupSequence = s }
+func (m *message) ReplyToGroupId() string                { return m.replyToGroupId }
+func (m *message) SetReplyToGroupId(s string)            { m.replyToGroupId = s }
+func (m *message) Instructions() *map[string]interface{} { return &m.instructions }
+func (m *message) Annotations() *map[string]interface{}  { return &m.annotations }
+func (m *message) Properties() *map[string]interface{}   { return &m.properties }
+func (m *message) Body() interface{}                     { return m.body }
+func (m *message) SetBody(b interface{})                 { m.body = b }
+
+// rewindGet rewinds and then gets the value from a data object.
+func rewindGet(data *C.pn_data_t, v interface{}) {
+	if data != nil && C.pn_data_size(data) > 0 {
+		C.pn_data_rewind(data)
+		C.pn_data_next(data)
+		get(data, v)
+	}
+}
+
+// goMessage populates a Go message from a pn_message_t
+func goMessage(pn *C.pn_message_t) *message {
+	m := &message{
+		inferred:        bool(C.pn_message_is_inferred(pn)),
+		durable:         bool(C.pn_message_is_durable(pn)),
+		priority:        uint8(C.pn_message_get_priority(pn)),
+		ttl:             time.Duration(C.pn_message_get_ttl(pn)) * time.Millisecond,
+		firstAcquirer:   bool(C.pn_message_is_first_acquirer(pn)),
+		deliveryCount:   uint32(C.pn_message_get_delivery_count(pn)),
+		userId:          goString(C.pn_message_get_user_id(pn)),
+		address:         C.GoString(C.pn_message_get_address(pn)),
+		subject:         C.GoString(C.pn_message_get_subject(pn)),
+		replyTo:         C.GoString(C.pn_message_get_reply_to(pn)),
+		contentType:     C.GoString(C.pn_message_get_content_type(pn)),
+		contentEncoding: C.GoString(C.pn_message_get_content_encoding(pn)),
+		expiryTime:      time.Unix(0, int64(time.Millisecond*time.Duration(C.pn_message_get_expiry_time(pn)))),
+		creationTime:    time.Unix(0, int64(time.Millisecond)*int64(C.pn_message_get_creation_time(pn))),
+		groupId:         C.GoString(C.pn_message_get_group_id(pn)),
+		groupSequence:   int32(C.pn_message_get_group_sequence(pn)),
+		replyToGroupId:  C.GoString(C.pn_message_get_reply_to_group_id(pn)),
+		messageId:       nil,
+		correlationId:   nil,
+		instructions:    make(map[string]interface{}),
+		annotations:     make(map[string]interface{}),
+		properties:      make(map[string]interface{}),
+	}
+	rewindGet(C.pn_message_id(pn), &m.messageId)
+	rewindGet(C.pn_message_correlation_id(pn), &m.correlationId)
+	rewindGet(C.pn_message_instructions(pn), &m.instructions)
+	rewindGet(C.pn_message_annotations(pn), &m.annotations)
+	rewindGet(C.pn_message_properties(pn), &m.properties)
+	rewindGet(C.pn_message_body(pn), &m.body)
+	return m
+}
+
+// pnMessage populates a pn_message_t from a Go message.
+func (m *message) pnMessage() *C.pn_message_t {
+	pn := C.pn_message()
+	C.pn_message_set_inferred(pn, C.bool(m.Inferred()))
+	C.pn_message_set_durable(pn, C.bool(m.Durable()))
+	C.pn_message_set_priority(pn, C.uint8_t(m.priority))
+	C.pn_message_set_ttl(pn, C.pn_millis_t(m.TTL()/time.Millisecond))
+	C.pn_message_set_first_acquirer(pn, C.bool(m.FirstAcquirer()))
+	C.pn_message_set_delivery_count(pn, C.uint32_t(m.deliveryCount))
+	replace(C.pn_message_id(pn), m.MessageId())
+	C.pn_message_set_user_id(pn, pnBytes([]byte(m.UserId())))
+	C.pn_message_set_address(pn, C.CString(m.Address()))
+	C.pn_message_set_subject(pn, C.CString(m.Subject()))
+	C.pn_message_set_reply_to(pn, C.CString(m.ReplyTo()))
+	replace(C.pn_message_correlation_id(pn), m.CorrelationId())
+	C.pn_message_set_content_type(pn, C.CString(m.ContentType()))
+	C.pn_message_set_content_encoding(pn, C.CString(m.ContentEncoding()))
+	C.pn_message_set_expiry_time(pn, pnTime(m.ExpiryTime()))
+	C.pn_message_set_creation_time(pn, pnTime(m.CreationTime()))
+	C.pn_message_set_group_id(pn, C.CString(m.GroupId()))
+	C.pn_message_set_group_sequence(pn, C.pn_sequence_t(m.GroupSequence()))
+	C.pn_message_set_reply_to_group_id(pn, C.CString(m.ReplyToGroupId()))
+	replace(C.pn_message_instructions(pn), *m.Instructions())
+	replace(C.pn_message_annotations(pn), *m.Annotations())
+	replace(C.pn_message_properties(pn), *m.Properties())
+	replace(C.pn_message_body(pn), m.Body())
+	return pn
+}
+
+// FIXME aconway 2015-04-08: Move message encode/decode under Marshal/Unmarshal interfaces.
+
+// DecodeMessage decodes bytes as a message
+func DecodeMessage(data []byte) (Message, error) {
+	pnMsg := C.pn_message()
+	defer C.pn_message_free(pnMsg)
+	if len(data) == 0 {
+		return nil, internal.Errorf("empty buffer for decode")
+	}
+	if C.pn_message_decode(pnMsg, cPtr(data), cLen(data)) < 0 {
+		return nil, internal.Errorf("decoding message: %s",
+			internal.PnError(unsafe.Pointer(C.pn_message_error(pnMsg))))
+	}
+	return goMessage(pnMsg), nil
+}
+
+// Encode the message into bufffer.
+// If buffer is nil or len(buffer) is not sufficient to encode the message a larger
+// buffer will be returned.
+func (m *message) Encode(buffer []byte) ([]byte, error) {
+	pn := m.pnMessage()
+	defer C.pn_message_free(pn)
+	encode := func(buf []byte) ([]byte, error) {
+		len := cLen(buf)
+		result := C.pn_message_encode(pn, cPtr(buf), &len)
+		switch {
+		case result == C.PN_OVERFLOW:
+			return buf, overflow
+		case result < 0:
+			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
+		default:
+			return buf[:len], nil
+		}
+	}
+	return encodeGrow(buffer, encode)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/message_test.go
----------------------------------------------------------------------
diff --git a/go/amqp/message_test.go b/go/amqp/message_test.go
new file mode 100644
index 0000000..46e26de
--- /dev/null
+++ b/go/amqp/message_test.go
@@ -0,0 +1,90 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"reflect"
+	"testing"
+	"time"
+)
+
+func roundTrip(t *testing.T, m Message) {
+	buffer, err := m.Encode(nil)
+	if err != nil {
+		t.Fatalf("Encode failed: %v", err)
+	}
+	m2, err := DecodeMessage(buffer)
+	if err != nil {
+		t.Fatalf("Decode failed: %v", err)
+	}
+	if !reflect.DeepEqual(m, m2) {
+		t.Errorf("Message mismatch got\n%#v\nwant\n%#v", m, m2)
+	}
+}
+
+func TestDefaultMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	// Check defaults
+	assertEqual(m.Inferred(), false)
+	assertEqual(m.Durable(), false)
+	assertEqual(m.Priority(), uint8(4))
+	assertEqual(m.TTL(), time.Duration(0))
+	assertEqual(m.UserId(), "")
+	assertEqual(m.Address(), "")
+	assertEqual(m.Subject(), "")
+	assertEqual(m.ReplyTo(), "")
+	assertEqual(m.ContentType(), "")
+	assertEqual(m.ContentEncoding(), "")
+	assertEqual(m.GroupId(), "")
+	assertEqual(m.GroupSequence(), int32(0))
+	assertEqual(m.ReplyToGroupId(), "")
+	assertEqual(m.MessageId(), nil)
+	assertEqual(m.CorrelationId(), nil)
+	assertEqual(*m.Instructions(), map[string]interface{}{})
+	assertEqual(*m.Annotations(), map[string]interface{}{})
+	assertEqual(*m.Properties(), map[string]interface{}{})
+	assertEqual(m.Body(), nil)
+
+	roundTrip(t, m)
+}
+
+func TestMessageRoundTrip(t *testing.T) {
+	m := NewMessage()
+	m.SetInferred(false)
+	m.SetDurable(true)
+	m.SetPriority(42)
+	m.SetTTL(0)
+	m.SetUserId("user")
+	m.SetAddress("address")
+	m.SetSubject("subject")
+	m.SetReplyTo("replyto")
+	m.SetContentType("content")
+	m.SetContentEncoding("encoding")
+	m.SetGroupId("group")
+	m.SetGroupSequence(42)
+	m.SetReplyToGroupId("replytogroup")
+	m.SetMessageId("id")
+	m.SetCorrelationId("correlation")
+	*m.Instructions() = map[string]interface{}{"instructions": "foo"}
+	*m.Annotations() = map[string]interface{}{"annotations": "foo"}
+	*m.Properties() = map[string]interface{}{"int": int32(32), "bool": true, "string": "foo"}
+	m.SetBody("hello")
+	roundTrip(t, m)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/types.go
----------------------------------------------------------------------
diff --git a/go/amqp/types.go b/go/amqp/types.go
new file mode 100644
index 0000000..8713520
--- /dev/null
+++ b/go/amqp/types.go
@@ -0,0 +1,193 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+// const pn_type_t PN_DATA_TYPE_ERROR = (pn_type_t) -1;
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"reflect"
+	"time"
+	"unsafe"
+)
+
+func pnTypeString(pt C.pn_type_t) string {
+	switch pt {
+	case C.PN_NULL:
+		return "null"
+	case C.PN_BOOL:
+		return "bool"
+	case C.PN_UBYTE:
+		return "ubyte"
+	case C.PN_BYTE:
+		return "byte"
+	case C.PN_USHORT:
+		return "ushort"
+	case C.PN_SHORT:
+		return "short"
+	case C.PN_CHAR:
+		return "char"
+	case C.PN_UINT:
+		return "uint"
+	case C.PN_INT:
+		return "int"
+	case C.PN_ULONG:
+		return "ulong"
+	case C.PN_LONG:
+		return "long"
+	case C.PN_TIMESTAMP:
+		return "timestamp"
+	case C.PN_FLOAT:
+		return "float"
+	case C.PN_DOUBLE:
+		return "double"
+	case C.PN_DECIMAL32:
+		return "decimal32"
+	case C.PN_DECIMAL64:
+		return "decimal64"
+	case C.PN_DECIMAL128:
+		return "decimal128"
+	case C.PN_UUID:
+		return "uuid"
+	case C.PN_BINARY:
+		return "binary"
+	case C.PN_STRING:
+		return "string"
+	case C.PN_SYMBOL:
+		return "symbol"
+	case C.PN_DESCRIBED:
+		return "described"
+	case C.PN_ARRAY:
+		return "array"
+	case C.PN_LIST:
+		return "list"
+	case C.PN_MAP:
+		return "map"
+	case C.PN_DATA_TYPE_ERROR:
+		return "no-data"
+	default:
+		return fmt.Sprintf("unknown-type(%d)", pt)
+	}
+}
+
+// Go types
+var (
+	bytesType = reflect.TypeOf([]byte{})
+	valueType = reflect.TypeOf(reflect.Value{})
+)
+
+// FIXME aconway 2015-04-08: can't handle AMQP maps with key types that are not valid Go map keys.
+
+// Map is a generic map that can have mixed key and value types and so can represent any AMQP map
+type Map map[interface{}]interface{}
+
+// List is a generic list that can hold mixed values and can represent any AMQP list.
+//
+type List []interface{}
+
+// Symbol is a string that is encoded as an AMQP symbol
+type Symbol string
+
+// Binary is a string that is encoded as an AMQP binary.
+// It is a string rather than a byte[] because byte[] is not hashable and can't be used as
+// a map key, AMQP frequently uses binary types as map keys. It can convert to and from []byte
+type Binary string
+
+// GoString for Map prints values with their types, useful for debugging.
+func (m Map) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", m)
+	i := len(m)
+	for k, v := range m {
+		fmt.Fprintf(out, "%T(%#v): %T(%#v)", k, k, v, v)
+		i--
+		if i > 0 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// GoString for List prints values with their types, useful for debugging.
+func (l List) GoString() string {
+	out := &bytes.Buffer{}
+	fmt.Fprintf(out, "%T{", l)
+	for i := 0; i < len(l); i++ {
+		fmt.Fprintf(out, "%T(%#v)", l[i], l[i])
+		if i == len(l)-1 {
+			fmt.Fprint(out, ", ")
+		}
+	}
+	fmt.Fprint(out, "}")
+	return out.String()
+}
+
+// pnTime converts Go time.Time to Proton millisecond Unix time.
+func pnTime(t time.Time) C.pn_timestamp_t {
+	secs := t.Unix()
+	// Note: sub-second accuracy is not guaraunteed if the Unix time in
+	// nanoseconds cannot be represented by an int64 (sometime around year 2260)
+	msecs := (t.UnixNano() % int64(time.Second)) / int64(time.Millisecond)
+	return C.pn_timestamp_t(secs*1000 + msecs)
+}
+
+// goTime converts a pn_timestamp_t to a Go time.Time.
+func goTime(t C.pn_timestamp_t) time.Time {
+	secs := int64(t) / 1000
+	nsecs := (int64(t) % 1000) * int64(time.Millisecond)
+	return time.Unix(secs, nsecs)
+}
+
+func goBytes(cBytes C.pn_bytes_t) (bytes []byte) {
+	if cBytes.start != nil {
+		bytes = C.GoBytes(unsafe.Pointer(cBytes.start), C.int(cBytes.size))
+	}
+	return
+}
+
+func goString(cBytes C.pn_bytes_t) (str string) {
+	if cBytes.start != nil {
+		str = C.GoStringN(cBytes.start, C.int(cBytes.size))
+	}
+	return
+}
+
+func pnBytes(b []byte) C.pn_bytes_t {
+	if len(b) == 0 {
+		return C.pn_bytes_t{0, nil}
+	} else {
+		return C.pn_bytes_t{C.size_t(len(b)), (*C.char)(unsafe.Pointer(&b[0]))}
+	}
+}
+
+func cPtr(b []byte) *C.char {
+	if len(b) == 0 {
+		return nil
+	}
+	return (*C.char)(unsafe.Pointer(&b[0]))
+}
+
+func cLen(b []byte) C.size_t {
+	return C.size_t(len(b))
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/uid.go
----------------------------------------------------------------------
diff --git a/go/amqp/uid.go b/go/amqp/uid.go
new file mode 100644
index 0000000..944bf6f
--- /dev/null
+++ b/go/amqp/uid.go
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Generating unique IDs for various things.
+
+package amqp
+
+import (
+	"strconv"
+	"sync/atomic"
+)
+
+// A simple atomic counter to generate unique 64 bit IDs.
+type UidCounter struct{ count uint64 }
+
+// NextInt gets the next uint64 value from the atomic counter.
+func (uc *UidCounter) NextInt() uint64 {
+	return atomic.AddUint64(&uc.count, 1)
+}
+
+// Next gets the next integer value encoded as a base32 string, safe for NUL terminated C strings.
+func (uc *UidCounter) Next() string {
+	return strconv.FormatUint(uc.NextInt(), 32)
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/go/amqp/unmarshal.go b/go/amqp/unmarshal.go
new file mode 100644
index 0000000..89ab64a
--- /dev/null
+++ b/go/amqp/unmarshal.go
@@ -0,0 +1,552 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+oor more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"qpid.apache.org/proton/go/internal"
+	"reflect"
+	"unsafe"
+)
+
+const minDecode = 1024
+
+// Error returned if AMQP data cannot be unmarshaled as the desired Go type.
+type BadUnmarshal struct {
+	// The name of the AMQP type.
+	AMQPType string
+	// The Go type.
+	GoType reflect.Type
+}
+
+func newBadUnmarshal(pnType C.pn_type_t, v interface{}) *BadUnmarshal {
+	return &BadUnmarshal{pnTypeString(pnType), reflect.TypeOf(v)}
+}
+
+func (e BadUnmarshal) Error() string {
+	if e.GoType.Kind() != reflect.Ptr {
+		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
+	} else {
+		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
+	}
+}
+
+//
+// Decoding from a pn_data_t
+//
+// NOTE: we use panic() to signal a decoding error, simplifies decoding logic.
+// We recover() at the highest possible level - i.e. in the exported Unmarshal or Decode.
+//
+
+// Decoder decodes AMQP values from an io.Reader.
+//
+type Decoder struct {
+	reader io.Reader
+	buffer bytes.Buffer
+}
+
+// NewDecoder returns a new decoder that reads from r.
+//
+// The decoder has it's own buffer and may read more data than required for the
+// AMQP values requested.  Use Buffered to see if there is data left in the
+// buffer.
+//
+func NewDecoder(r io.Reader) *Decoder {
+	return &Decoder{r, bytes.Buffer{}}
+}
+
+// Buffered returns a reader of the data remaining in the Decoder's buffer. The
+// reader is valid until the next call to Decode.
+//
+func (d *Decoder) Buffered() io.Reader {
+	return bytes.NewReader(d.buffer.Bytes())
+}
+
+// Decode reads the next AMQP value from the Reader and stores it in the value pointed to by v.
+//
+// See the documentation for Unmarshal for details about the conversion of AMQP into a Go value.
+//
+func (d *Decoder) Decode(v interface{}) (err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	var n int
+	for n == 0 && err == nil {
+		n = unmarshal(data, d.buffer.Bytes(), v)
+		if n == 0 { // n == 0 means not enough data, read more
+			err = d.more()
+			if err != nil {
+				return
+			}
+		}
+	}
+	d.buffer.Next(n)
+	return
+}
+
+/*
+Unmarshal decodes AMQP-encoded bytes and stores the result in the value pointed to by v.
+Types are converted as follows:
+
+ +---------------------------+----------------------------------------------------------------------+
+ |To Go types                |From AMQP types                                                       |
+ +===========================+======================================================================+
+ |bool                       |bool                                                                  |
+ +---------------------------+----------------------------------------------------------------------+
+ |int, int8, int16,          |Equivalent or smaller signed integer type: char, byte, short, int,    |
+ |int32, int64               |long.                                                                 |
+ +---------------------------+----------------------------------------------------------------------+
+ |uint, uint8, uint16,       |Equivalent or smaller unsigned integer type: char, ubyte, ushort,     |
+ |uint32, uint64 types       |uint, ulong                                                           |
+ +---------------------------+----------------------------------------------------------------------+
+ |float32, float64           |Equivalent or smaller float or double.                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |string, []byte             |string, symbol or binary.                                             |
+ +---------------------------+----------------------------------------------------------------------+
+ |Symbol                     |symbol                                                                |
+ +---------------------------+----------------------------------------------------------------------+
+ |map[K]T                    |map, provided all keys and values can unmarshal to types K, T         |
+ +---------------------------+----------------------------------------------------------------------+
+ |Map                        |map, any AMQP map                                                     |
+ +---------------------------+----------------------------------------------------------------------+
+ |interface{}                |Any AMQP value can be unmarshaled to an interface{} as follows:       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |AMQP Type               |Go Type in interface{}                       |
+ |                           +========================+=============================================+
+ |                           |bool                    |bool                                         |
+ |                           +------------------------+---------------------------------------------+
+ |                           |char                    |unint8                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |byte,short,int,long     |int8,int16,int32,int64                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |ubyte,ushort,uint,ulong |uint8,uint16,uint32,uint64                   |
+ |                           +------------------------+---------------------------------------------+
+ |                           |float, double           |float32, float64                             |
+ |                           +------------------------+---------------------------------------------+
+ |                           |string                  |string                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |symbol                  |Symbol                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |binary                  |Binary                                       |
+ |                           +------------------------+---------------------------------------------+
+ |                           |nulll                   |nil                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |map                     |Map                                          |
+ |                           +------------------------+---------------------------------------------+
+ |                           |list                    |List                                         |
+ +---------------------------+------------------------+---------------------------------------------+
+
+The following Go types cannot be unmarshaled: complex64/128, uintptr, function, interface, channel.
+
+TODO types
+
+AMQP: timestamp, decimal32/64/128, uuid, described, array.
+
+Go: array, struct.
+
+Maps: currently we cannot unmarshal AMQP maps with unhashable key types, need an alternate
+representation for those.
+*/
+func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
+	defer internal.DoRecover(&err)
+	data := C.pn_data(0)
+	defer C.pn_data_free(data)
+	n = unmarshal(data, bytes, v)
+	if n == 0 {
+		err = internal.Errorf("not enough data")
+	}
+	return
+}
+
+// more reads more data when we can't parse a complete AMQP type
+func (d *Decoder) more() error {
+	var readSize int64 = minDecode
+	if int64(d.buffer.Len()) > readSize { // Grow by doubling
+		readSize = int64(d.buffer.Len())
+	}
+	var n int64
+	n, err := d.buffer.ReadFrom(io.LimitReader(d.reader, readSize))
+	if n == 0 && err == nil { // ReadFrom won't report io.EOF, just returns 0
+		err = io.EOF
+	}
+	return err
+}
+
+// unmarshal decodes from bytes and converts into the value pointed to by v.
+// Used by Unmarshal and Decode
+//
+// Returns the number of bytes decoded or 0 if not enough data.
+//
+func unmarshal(data *C.pn_data_t, bytes []byte, v interface{}) (n int) {
+	n = decode(data, bytes)
+	if n == 0 {
+		return 0
+	}
+	get(data, v)
+	return
+}
+
+// get value from data into value pointed at by v.
+func get(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+
+	switch v := v.(type) {
+	case *bool:
+		switch pnType {
+		case C.PN_BOOL:
+			*v = bool(C.pn_data_get_bool(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int8(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int8(C.pn_data_get_byte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint8:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint8(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint8(C.pn_data_get_ubyte(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int16(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int16(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int16(C.pn_data_get_short(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint16:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint16(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint16(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint16(C.pn_data_get_ushort(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *int32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int32(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int32(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int32(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int32(C.pn_data_get_int(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	case *uint32:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint32(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint32(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint32(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint32(C.pn_data_get_uint(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int64(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int64(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int64(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int64(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			*v = int64(C.pn_data_get_long(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint64:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint64(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint64(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint64(C.pn_data_get_ushort(data))
+		case C.PN_ULONG:
+			*v = uint64(C.pn_data_get_ulong(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *int:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = int(C.pn_data_get_char(data))
+		case C.PN_BYTE:
+			*v = int(C.pn_data_get_byte(data))
+		case C.PN_SHORT:
+			*v = int(C.pn_data_get_short(data))
+		case C.PN_INT:
+			*v = int(C.pn_data_get_int(data))
+		case C.PN_LONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = int(C.pn_data_get_long(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *uint:
+		switch pnType {
+		case C.PN_CHAR:
+			*v = uint(C.pn_data_get_char(data))
+		case C.PN_UBYTE:
+			*v = uint(C.pn_data_get_ubyte(data))
+		case C.PN_USHORT:
+			*v = uint(C.pn_data_get_ushort(data))
+		case C.PN_UINT:
+			*v = uint(C.pn_data_get_uint(data))
+		case C.PN_ULONG:
+			if unsafe.Sizeof(0) == 8 {
+				*v = uint(C.pn_data_get_ulong(data))
+			} else {
+				panic(newBadUnmarshal(pnType, v))
+			}
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float32:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float32(C.pn_data_get_float(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *float64:
+		switch pnType {
+		case C.PN_FLOAT:
+			*v = float64(C.pn_data_get_float(data))
+		case C.PN_DOUBLE:
+			*v = float64(C.pn_data_get_double(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *string:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goString(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goString(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goString(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *[]byte:
+		switch pnType {
+		case C.PN_STRING:
+			*v = goBytes(C.pn_data_get_string(data))
+		case C.PN_SYMBOL:
+			*v = goBytes(C.pn_data_get_symbol(data))
+		case C.PN_BINARY:
+			*v = goBytes(C.pn_data_get_binary(data))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Binary:
+		switch pnType {
+		case C.PN_BINARY:
+			*v = Binary(goBytes(C.pn_data_get_binary(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *Symbol:
+		switch pnType {
+		case C.PN_SYMBOL:
+			*v = Symbol(goBytes(C.pn_data_get_symbol(data)))
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+
+	case *interface{}:
+		getInterface(data, v)
+
+	default:
+		if reflect.TypeOf(v).Kind() != reflect.Ptr {
+			panic(newBadUnmarshal(pnType, v))
+		}
+		switch reflect.TypeOf(v).Elem().Kind() {
+		case reflect.Map:
+			getMap(data, v)
+		case reflect.Slice:
+			getList(data, v)
+		default:
+			panic(newBadUnmarshal(pnType, v))
+		}
+	}
+	err := dataError("unmarshaling", data)
+	if err != nil {
+		panic(err)
+	}
+	return
+}
+
+// Getting into an interface is driven completely by the AMQP type, since the interface{}
+// target is type-neutral.
+func getInterface(data *C.pn_data_t, v *interface{}) {
+	pnType := C.pn_data_type(data)
+	switch pnType {
+	case C.PN_NULL:
+		*v = nil
+	case C.PN_BOOL:
+		*v = bool(C.pn_data_get_bool(data))
+	case C.PN_UBYTE:
+		*v = uint8(C.pn_data_get_ubyte(data))
+	case C.PN_BYTE:
+		*v = int8(C.pn_data_get_byte(data))
+	case C.PN_USHORT:
+		*v = uint16(C.pn_data_get_ushort(data))
+	case C.PN_SHORT:
+		*v = int16(C.pn_data_get_short(data))
+	case C.PN_UINT:
+		*v = uint32(C.pn_data_get_uint(data))
+	case C.PN_INT:
+		*v = int32(C.pn_data_get_int(data))
+	case C.PN_CHAR:
+		*v = uint8(C.pn_data_get_char(data))
+	case C.PN_ULONG:
+		*v = uint64(C.pn_data_get_ulong(data))
+	case C.PN_LONG:
+		*v = int64(C.pn_data_get_long(data))
+	case C.PN_FLOAT:
+		*v = float32(C.pn_data_get_float(data))
+	case C.PN_DOUBLE:
+		*v = float64(C.pn_data_get_double(data))
+	case C.PN_BINARY:
+		*v = Binary(goBytes(C.pn_data_get_binary(data)))
+	case C.PN_STRING:
+		*v = goString(C.pn_data_get_string(data))
+	case C.PN_SYMBOL:
+		*v = Symbol(goString(C.pn_data_get_symbol(data)))
+	case C.PN_MAP:
+		m := make(Map)
+		get(data, &m)
+		*v = m // FIXME aconway 2015-03-13: avoid the copy?
+	case C.PN_LIST:
+		l := make(List, 0)
+		get(data, &l)
+		*v = l // FIXME aconway 2015-03-13: avoid the copy?
+	default:
+		panic(newBadUnmarshal(pnType, v))
+	}
+}
+
+// get into map pointed at by v
+func getMap(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_MAP {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	mapValue := reflect.ValueOf(v).Elem()
+	mapValue.Set(reflect.MakeMap(mapValue.Type())) // Clear the map
+	count := int(C.pn_data_get_map(data))
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count/2; i++ {
+			if bool(C.pn_data_next(data)) {
+				key := reflect.New(mapValue.Type().Key())
+				get(data, key.Interface())
+				if bool(C.pn_data_next(data)) {
+					val := reflect.New(mapValue.Type().Elem())
+					get(data, val.Interface())
+					mapValue.SetMapIndex(key.Elem(), val.Elem())
+				}
+			}
+		}
+		C.pn_data_exit(data)
+	}
+}
+
+func getList(data *C.pn_data_t, v interface{}) {
+	pnType := C.pn_data_type(data)
+	if pnType != C.PN_LIST {
+		panic(newBadUnmarshal(pnType, v))
+	}
+	count := int(C.pn_data_get_list(data))
+	listValue := reflect.MakeSlice(reflect.TypeOf(v).Elem(), count, count)
+	if bool(C.pn_data_enter(data)) {
+		for i := 0; i < count; i++ {
+			if bool(C.pn_data_next(data)) {
+				val := reflect.New(listValue.Type().Elem())
+				get(data, val.Interface())
+				listValue.Index(i).Set(val.Elem())
+			}
+		}
+		C.pn_data_exit(data)
+	}
+	// FIXME aconway 2015-04-09: avoid the copy?
+	reflect.ValueOf(v).Elem().Set(listValue)
+}
+
+// decode from bytes.
+// Return bytes decoded or 0 if we could not decode a complete object.
+//
+func decode(data *C.pn_data_t, bytes []byte) int {
+	if len(bytes) == 0 {
+		return 0
+	}
+	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
+	if n == int(C.PN_UNDERFLOW) {
+		C.pn_error_clear(C.pn_data_error(data))
+		return 0
+	} else if n <= 0 {
+		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
+	}
+	return n
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/url.go
----------------------------------------------------------------------
diff --git a/go/amqp/url.go b/go/amqp/url.go
new file mode 100644
index 0000000..58711c7
--- /dev/null
+++ b/go/amqp/url.go
@@ -0,0 +1,96 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+/*
+#include <stdlib.h>
+#include <string.h>
+#include <proton/url.h>
+
+// Helper function for setting URL fields.
+typedef void (*setter_fn)(pn_url_t* url, const char* value);
+inline void	set(pn_url_t *url, setter_fn s, const char* value) {
+  s(url, value);
+}
+*/
+import "C"
+
+import (
+	"net"
+	"net/url"
+	"qpid.apache.org/proton/go/internal"
+	"unsafe"
+)
+
+const (
+	amqp  string = "amqp"
+	amqps        = "amqps"
+)
+
+// ParseUrl parses an AMQP URL string and returns a net/url.Url.
+//
+// It is more forgiving than net/url.Parse and allows most of the parts of the
+// URL to be missing, assuming AMQP defaults.
+//
+func ParseURL(s string) (u *url.URL, err error) {
+	cstr := C.CString(s)
+	defer C.free(unsafe.Pointer(cstr))
+	pnUrl := C.pn_url_parse(cstr)
+	if pnUrl == nil {
+		return nil, internal.Errorf("bad URL %#v", s)
+	}
+	defer C.pn_url_free(pnUrl)
+
+	scheme := C.GoString(C.pn_url_get_scheme(pnUrl))
+	username := C.GoString(C.pn_url_get_username(pnUrl))
+	password := C.GoString(C.pn_url_get_password(pnUrl))
+	host := C.GoString(C.pn_url_get_host(pnUrl))
+	port := C.GoString(C.pn_url_get_port(pnUrl))
+	path := C.GoString(C.pn_url_get_path(pnUrl))
+
+	if err != nil {
+		return nil, internal.Errorf("bad URL %#v: %s", s, err)
+	}
+	if scheme == "" {
+		scheme = amqp
+	}
+	if port == "" {
+		if scheme == amqps {
+			port = amqps
+		} else {
+			port = amqp
+		}
+	}
+	var user *url.Userinfo
+	if password != "" {
+		user = url.UserPassword(username, password)
+	} else if username != "" {
+		user = url.User(username)
+	}
+
+	u = &url.URL{
+		Scheme: scheme,
+		User:   user,
+		Host:   net.JoinHostPort(host, port),
+		Path:   path,
+	}
+
+	return u, nil
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/go/amqp/url_test.go b/go/amqp/url_test.go
new file mode 100644
index 0000000..f80f1c4
--- /dev/null
+++ b/go/amqp/url_test.go
@@ -0,0 +1,51 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package amqp
+
+import (
+	"fmt"
+)
+
+func ExampleParseURL() {
+	for _, s := range []string{
+		"amqp://username:password@host:1234/path",
+		"host:1234",
+		"host",
+		":1234",
+		"host/path",
+		"amqps://host",
+		"",
+	} {
+		u, err := ParseURL(s)
+		if err != nil {
+			fmt.Println(err)
+		} else {
+			fmt.Println(u)
+		}
+	}
+	// Output:
+	// amqp://username:password@host:1234/path
+	// amqp://host:1234
+	// amqp://host:amqp
+	// amqp://:1234
+	// amqp://host:amqp/path
+	// amqps://host:amqps
+	// proton: bad URL ""
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/event/doc.go
----------------------------------------------------------------------
diff --git a/go/event/doc.go b/go/event/doc.go
new file mode 100644
index 0000000..7a9ec12
--- /dev/null
+++ b/go/event/doc.go
@@ -0,0 +1,38 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/*
+Package event provides a low-level API to the proton AMQP engine.
+
+For most tasks, consider instead package qpid.apache.org/proton/go/messaging.
+It provides a higher-level, concurrent API that is easier to use.
+
+The API is event based. There are two alternative styles of handler. EventHandler
+provides the core proton events. MessagingHandler provides a slighly simplified
+view of the event stream and automates some common tasks.
+
+See type Pump documentation for more details of the interaction between proton
+events and goroutines.
+*/
+package event
+
+// #cgo LDFLAGS: -lqpid-proton
+import "C"
+
+// This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/go/event/handlers.go
----------------------------------------------------------------------
diff --git a/go/event/handlers.go b/go/event/handlers.go
new file mode 100644
index 0000000..d76fac9
--- /dev/null
+++ b/go/event/handlers.go
@@ -0,0 +1,411 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package event
+
+// #include <proton/reactor.h>
+// #include <proton/handlers.h>
+import "C"
+
+import (
+	"qpid.apache.org/proton/go/internal"
+)
+
+// EventHandler handles core proton events.
+type EventHandler interface {
+	// HandleEvent is called with an event.
+	// Typically HandleEvent() is implemented as a switch on e.Type()
+	HandleEvent(e Event) error
+}
+
+// cHandler wraps a C pn_handler_t
+type cHandler struct {
+	pn *C.pn_handler_t
+}
+
+func (h cHandler) HandleEvent(e Event) error {
+	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
+	return nil // FIXME aconway 2015-03-31: error handling
+}
+
+// MessagingHandler provides an alternative interface to EventHandler.
+// it is easier to use for most applications that send and receive messages.
+//
+// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
+// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
+//
+type MessagingHandler interface {
+	HandleMessagingEvent(MessagingEventType, Event) error
+}
+
+// MessagingEventType provides a set of events that are easier to work with than the
+// core events defined by EventType
+//
+// There are 3 types of "endpoint": Connection, Session and Link.
+// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
+// The meaning of these events is as follows:
+//
+// Opening: The remote end opened, the local end will open automatically.
+//
+// Opened: Both ends are open, regardless of which end opened first.
+//
+// Closing: The remote end closed without error, the local end will close automatically.
+//
+// Error: The remote end closed with an error, the local end will close automatically.
+//
+// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
+//
+type MessagingEventType int
+
+const (
+	// The event loop starts.
+	MStart MessagingEventType = iota
+	// The peer closes the connection with an error condition.
+	MConnectionError
+	// The peer closes the session with an error condition.
+	MSessionError
+	// The peer closes the link with an error condition.
+	MLinkError
+	// The peer Initiates the opening of the connection.
+	MConnectionOpening
+	// The peer initiates the opening of the session.
+	MSessionOpening
+	// The peer initiates the opening of the link.
+	MLinkOpening
+	// The connection is opened.
+	MConnectionOpened
+	// The session is opened.
+	MSessionOpened
+	// The link is opened.
+	MLinkOpened
+	// The peer initiates the closing of the connection.
+	MConnectionClosing
+	// The peer initiates the closing of the session.
+	MSessionClosing
+	// The peer initiates the closing of the link.
+	MLinkClosing
+	// Both ends of the connection are closed.
+	MConnectionClosed
+	// Both ends of the session are closed.
+	MSessionClosed
+	// Both ends of the link are closed.
+	MLinkClosed
+	// The connection is disconnected.
+	MConnectionDisconnected
+	// The session's connection was disconnected
+	MSessionDisconnected
+	// The session's connection was disconnected
+	MLinkDisconnected
+	// The sender link has credit and messages can
+	// therefore be transferred.
+	MSendable
+	// The remote peer accepts an outgoing message.
+	MAccepted
+	// The remote peer rejects an outgoing message.
+	MRejected
+	// The peer releases an outgoing message. Note that this may be in response to
+	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
+	MReleased
+	// The peer has settled the outgoing message. This is the point at which it
+	// shouod never be retransmitted.
+	MSettled
+	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
+	// To manage the outcome of this messages (e.g. to accept or reject the message)
+	// use Event.Delivery().
+	MMessage
+	// The event loop terminates, there are no more events to process.
+	MFinal
+)
+
+func (t MessagingEventType) String() string {
+	switch t {
+	case MStart:
+		return "Start"
+	case MConnectionError:
+		return "ConnectionError"
+	case MSessionError:
+		return "SessionError"
+	case MLinkError:
+		return "LinkError"
+	case MConnectionOpening:
+		return "ConnectionOpening"
+	case MSessionOpening:
+		return "SessionOpening"
+	case MLinkOpening:
+		return "LinkOpening"
+	case MConnectionOpened:
+		return "ConnectionOpened"
+	case MSessionOpened:
+		return "SessionOpened"
+	case MLinkOpened:
+		return "LinkOpened"
+	case MConnectionClosing:
+		return "ConnectionClosing"
+	case MSessionClosing:
+		return "SessionClosing"
+	case MLinkClosing:
+		return "LinkClosing"
+	case MConnectionClosed:
+		return "ConnectionClosed"
+	case MSessionClosed:
+		return "SessionClosed"
+	case MLinkClosed:
+		return "LinkClosed"
+	case MConnectionDisconnected:
+		return "ConnectionDisconnected"
+	case MSessionDisconnected:
+		return "MSessionDisconnected"
+	case MLinkDisconnected:
+		return "MLinkDisconnected"
+	case MSendable:
+		return "Sendable"
+	case MAccepted:
+		return "Accepted"
+	case MRejected:
+		return "Rejected"
+	case MReleased:
+		return "Released"
+	case MSettled:
+		return "Settled"
+	case MMessage:
+		return "Message"
+	default:
+		return "Unknown"
+	}
+}
+
+// ResourceHandler provides a simple way to track the creation and deletion of
+// various proton objects.
+// endpointDelegator captures common patterns for endpoints opening/closing
+type endpointDelegator struct {
+	remoteOpen, remoteClose, localOpen, localClose EventType
+	opening, opened, closing, closed, error        MessagingEventType
+	endpoint                                       func(Event) Endpoint
+	delegate                                       MessagingHandler
+}
+
+// HandleEvent handles an open/close event for an endpoint in a generic way.
+func (d endpointDelegator) HandleEvent(e Event) (err error) {
+	endpoint := d.endpoint(e)
+	state := endpoint.State()
+
+	switch e.Type() {
+
+	case d.localOpen:
+		if state.Is(SRemoteActive) {
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		}
+
+	case d.remoteOpen:
+		switch {
+		case state.Is(SLocalActive):
+			err = d.delegate.HandleMessagingEvent(d.opened, e)
+		case state.Is(SLocalUninit):
+			err = d.delegate.HandleMessagingEvent(d.opening, e)
+			if err == nil {
+				endpoint.Open()
+			}
+		}
+
+	case d.remoteClose:
+		var err1 error
+		if endpoint.RemoteCondition().IsSet() { // Closed with error
+			err1 = d.delegate.HandleMessagingEvent(d.error, e)
+			if err1 == nil { // Don't overwrite an application error.
+				err1 = endpoint.RemoteCondition().Error()
+			}
+		} else {
+			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
+		}
+		if state.Is(SLocalClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		} else if state.Is(SLocalActive) {
+			endpoint.Close()
+		}
+		if err1 != nil { // Keep the first error.
+			err = err1
+		}
+
+	case d.localClose:
+		if state.Is(SRemoteClosed) {
+			err = d.delegate.HandleMessagingEvent(d.closed, e)
+		}
+
+	default:
+		// We shouldn't be called with any other event type.
+		panic(internal.Errorf("internal error, not an open/close event: %s", e))
+	}
+
+	return err
+}
+
+// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
+// You can modify the exported fields before you pass the MessagingDelegator to
+// a Pump.
+type MessagingDelegator struct {
+	delegate                   MessagingHandler
+	connection, session, link  endpointDelegator
+	handshaker, flowcontroller EventHandler
+
+	// AutoSettle (default true) automatically pre-settle outgoing messages.
+	AutoSettle bool
+	// AutoAccept (default true) automatically accept and settle incoming messages
+	// if they are not settled by the delegate.
+	AutoAccept bool
+	// Prefetch (default 10) initial credit to issue for incoming links.
+	Prefetch int
+	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
+	PeerCloseError bool
+}
+
+func NewMessagingDelegator(h MessagingHandler) EventHandler {
+	return &MessagingDelegator{
+		delegate: h,
+		connection: endpointDelegator{
+			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
+			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
+			MConnectionError,
+			func(e Event) Endpoint { return e.Connection() },
+			h,
+		},
+		session: endpointDelegator{
+			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
+			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
+			MSessionError,
+			func(e Event) Endpoint { return e.Session() },
+			h,
+		},
+		link: endpointDelegator{
+			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
+			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
+			MLinkError,
+			func(e Event) Endpoint { return e.Link() },
+			h,
+		},
+		flowcontroller: nil,
+		AutoSettle:     true,
+		AutoAccept:     true,
+		Prefetch:       10,
+		PeerCloseError: false,
+	}
+}
+
+func handleIf(h EventHandler, e Event) error {
+	if h != nil {
+		return h.HandleEvent(e)
+	}
+	return nil
+}
+
+// Handle a proton event by passing the corresponding MessagingEvent(s) to
+// the MessagingHandler.
+func (d *MessagingDelegator) HandleEvent(e Event) error {
+	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
+
+	switch e.Type() {
+
+	case EConnectionInit:
+		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
+		d.delegate.HandleMessagingEvent(MStart, e)
+
+	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
+		return d.connection.HandleEvent(e)
+
+	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
+		return d.session.HandleEvent(e)
+
+	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
+		return d.link.HandleEvent(e)
+
+	case ELinkFlow:
+		if e.Link().IsSender() && e.Link().Credit() > 0 {
+			return d.delegate.HandleMessagingEvent(MSendable, e)
+		}
+
+	case EDelivery:
+		if e.Delivery().Link().IsReceiver() {
+			d.incoming(e)
+		} else {
+			d.outgoing(e)
+		}
+
+	case ETransportTailClosed:
+		c := e.Connection()
+		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
+			e2 := e
+			e2.link = l
+			e2.session = l.Session()
+			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
+		}
+		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
+			e2 := e
+			e2.session = s
+			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
+		}
+		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
+		d.delegate.HandleMessagingEvent(MFinal, e)
+	}
+	return nil
+}
+
+func (d *MessagingDelegator) incoming(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Readable() && !delivery.Partial() {
+		if e.Link().State().Is(SLocalClosed) {
+			e.Link().Advance()
+			if d.AutoAccept {
+				delivery.Release(false)
+			}
+		} else {
+			err = d.delegate.HandleMessagingEvent(MMessage, e)
+			e.Link().Advance()
+			if d.AutoAccept && !delivery.Settled() {
+				if err == nil {
+					delivery.Accept()
+				} else {
+					delivery.Reject()
+				}
+			}
+		}
+	} else if delivery.Updated() && delivery.Settled() {
+		err = d.delegate.HandleMessagingEvent(MSettled, e)
+	}
+	return
+}
+
+func (d *MessagingDelegator) outgoing(e Event) (err error) {
+	delivery := e.Delivery()
+	if delivery.Updated() {
+		switch delivery.Remote().Type() {
+		case Accepted:
+			err = d.delegate.HandleMessagingEvent(MAccepted, e)
+		case Rejected:
+			err = d.delegate.HandleMessagingEvent(MRejected, e)
+		case Released, Modified:
+			err = d.delegate.HandleMessagingEvent(MReleased, e)
+		}
+		if err == nil && delivery.Settled() {
+			err = d.delegate.HandleMessagingEvent(MSettled, e)
+		}
+		if err == nil && d.AutoSettle {
+			delivery.Settle()
+		}
+	}
+	return
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[06/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a
new file mode 100644
index 0000000..12ca729
--- /dev/null
+++ b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/amqp.a
@@ -0,0 +1,1726 @@
+!<arch>
+__.PKGDEF       0           0     0     644     30839     `
+go object linux amd64 go1.4.2 X:precisestack
+
+$$
+package amqp
+	import net "net"
+	import runtime "runtime"
+	import time "time"
+	import url "net/url"
+	import io "io"
+	import cgo "runtime/cgo"
+	import strconv "strconv"
+	import syscall "syscall"
+	import fmt "fmt"
+	import internal "qpid.apache.org/proton/go/internal"
+	import reflect "reflect"
+	import atomic "sync/atomic"
+	import bytes "bytes"
+	import unsafe "unsafe"
+	type @"".Error struct { Name string; Description string }
+	func (@"".c·2 @"".Error) Error () (? string)
+	func @"".Errorf (@"".name·2 string "esc:0x2", @"".format·3 string "esc:0x0", @"".arg·4 ...interface {} "esc:0x0") (? @"".Error)
+	func @"".MakeError (@"".err·2 error) (? @"".Error)
+	var @"".InternalError string
+	var @"".NotFound string
+	var @"".UnauthorizedAccess string
+	var @"".DecodeError string
+	var @"".ResourceLimit string
+	var @"".NotAllowed string
+	var @"".InvalidField string
+	var @"".NotImplemented string
+	var @"".ResourceLocked string
+	var @"".PreerrorFailed string
+	var @"".ResourceDeleted string
+	var @"".IllegalState string
+	var @"".FrameSizeTooSmall string
+	type @"".UidCounter struct { @"".count uint64 }
+	func (@"".uc·2 *@"".UidCounter) Next () (? string)
+	func (@"".uc·2 *@"".UidCounter) NextInt () (? uint64)
+	func @"".Marshal (@"".v·3 interface {}, @"".buffer·4 []byte) (@"".outbuf·1 []byte, @"".err·2 error)
+	type @"io".Writer interface { Write(@"io".p []byte) (@"io".n int, @"io".err error) }
+	type @"".Encoder struct { @"".writer @"io".Writer; @"".buffer []byte }
+	func (@"".e·2 *@"".Encoder) Encode (@"".v·3 interface {}) (@"".err·1 error)
+	func @"".NewEncoder (@"".w·2 @"io".Writer) (? *@"".Encoder) { return (&@"".Encoder{ @"".writer:@"".w·2, @"".buffer:make([]byte, 0x100) }) }
+	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
+	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
+	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
+	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
+	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
+	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
+	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
+	type @"time".Duration int64
+	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
+	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
+	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
+	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
+	func (@"time".d·2 @"time".Duration) String () (? string)
+	type @"time".Month int
+	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
+	type @"time".Weekday int
+	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
+	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
+	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
+	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
+	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
+	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
+	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
+	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
+	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
+	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
+	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
+	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
+	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
+	type @"".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGroupId(? string); SetGroupSequence(? int32); SetInferred(? bo
 ol); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
+	func @"".NewMessage () (? @"".Message)
+	func @"".NewMessageWith (@"".body·2 interface {}) (? @"".Message)
+	func @"".DecodeMessage (@"".data·3 []byte "esc:0x0") (? @"".Message, ? error)
+	type @"".Sections []interface {}
+	type @"".Type uint32
+	func (@"".t·2 @"".Type) String () (? string)
+	type @"".Map map[interface {}]interface {}
+	func (@"".m·2 @"".Map) GoString () (? string)
+	type @"".List []interface {}
+	func (@"".l·2 @"".List) GoString () (? string)
+	type @"".Symbol string
+	func (@"".s·2 @"".Symbol) GoString () (? string)
+	type @"".Binary string
+	func (@"".b·2 @"".Binary) GoString () (? string)
+	type @"reflect".ChanDir int
+	func (@"reflect".d·2 @"reflect".ChanDir) String () (? string)
+	type @"reflect".StructTag string
+	func (@"reflect".tag·2 @"reflect".StructTag "esc:0x0") Get (@"reflect".key·3 string "esc:0x0") (? string)
+	type @"reflect".StructField struct { Name string; PkgPath string; Type @"reflect".Type; Tag @"reflect".StructTag; Offset uintptr; Index []int; Anonymous bool }
+	type @"reflect".Kind uint
+	func (@"reflect".k·2 @"reflect".Kind) String () (? string)
+	type @"reflect".typeAlg struct { @"reflect".hash func(? @"unsafe".Pointer, ? uintptr, ? uintptr) (? uintptr); @"reflect".equal func(? @"unsafe".Pointer, ? @"unsafe".Pointer, ? uintptr) (? bool) }
+	type @"reflect".method struct { @"reflect".name *string; @"reflect".pkgPath *string; @"reflect".mtyp *@"reflect".rtype; @"reflect".typ *@"reflect".rtype; @"reflect".ifn @"unsafe".Pointer; @"reflect".tfn @"unsafe".Pointer }
+	type @"reflect".uncommonType struct { @"reflect".name *string; @"reflect".pkgPath *string; @"reflect".methods []@"reflect".method }
+	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x1") Method (@"reflect".i·3 int) (@"reflect".m·1 @"reflect".Method)
+	func (@"reflect".t·3 *@"reflect".uncommonType "esc:0x0") MethodByName (@"reflect".name·4 string "esc:0x0") (@"reflect".m·1 @"reflect".Method, @"reflect".ok·2 bool)
+	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x1") Name () (? string) { if @"reflect".t·2 == nil || @"reflect".t·2.@"reflect".name == nil { return "" }; return *@"reflect".t·2.@"reflect".name }
+	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x0") NumMethod () (? int) { if @"reflect".t·2 == nil { return 0x0 }; return len(@"reflect".t·2.@"reflect".methods) }
+	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x1") PkgPath () (? string) { if @"reflect".t·2 == nil || @"reflect".t·2.@"reflect".pkgPath == nil { return "" }; return *@"reflect".t·2.@"reflect".pkgPath }
+	func (@"reflect".t·2 *@"reflect".uncommonType "esc:0x2") @"reflect".uncommon () (? *@"reflect".uncommonType) { return @"reflect".t·2 }
+	type @"reflect".rtype struct { @"reflect".size uintptr; @"reflect".hash uint32; _ uint8; @"reflect".align uint8; @"reflect".fieldAlign uint8; @"reflect".kind uint8; @"reflect".alg *@"reflect".typeAlg; @"reflect".gc [2]@"unsafe".Pointer; @"reflect".string *string; @"reflect".? *@"reflect".uncommonType; @"reflect".ptrToThis *@"reflect".rtype; @"reflect".zero @"unsafe".Pointer }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Align () (? int) { return int(@"reflect".t·2.@"reflect".align) }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") AssignableTo (@"reflect".u·3 @"reflect".Type "esc:0x0") (? bool)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Bits () (? int)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") ChanDir () (? @"reflect".ChanDir)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Comparable () (? bool) { return @"reflect".t·2.@"reflect".alg != nil && @"reflect".t·2.@"reflect".alg.@"reflect".equal != nil }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") ConvertibleTo (@"reflect".u·3 @"reflect".Type "esc:0x0") (? bool)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") Elem () (? @"reflect".Type)
+	func (@"reflect".t·2 *@"reflect".rtype) Field (@"reflect".i·3 int) (? @"reflect".StructField)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") FieldAlign () (? int) { return int(@"reflect".t·2.@"reflect".fieldAlign) }
+	func (@"reflect".t·2 *@"reflect".rtype) FieldByIndex (@"reflect".index·3 []int "esc:0x0") (? @"reflect".StructField)
+	func (@"reflect".t·3 *@"reflect".rtype) FieldByName (@"reflect".name·4 string "esc:0x0") (? @"reflect".StructField, ? bool)
+	func (@"reflect".t·3 *@"reflect".rtype) FieldByNameFunc (@"reflect".match·4 func(? string) (? bool) "esc:0x0") (? @"reflect".StructField, ? bool)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Implements (@"reflect".u·3 @"reflect".Type) (? bool)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") In (@"reflect".i·3 int) (? @"reflect".Type)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") IsVariadic () (? bool)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") Key () (? @"reflect".Type)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Kind () (? @"reflect".Kind) { return @"reflect".Kind(@"reflect".t·2.@"reflect".kind & 0x1F) }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Len () (? int)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Method (@"reflect".i·3 int) (@"reflect".m·1 @"reflect".Method)
+	func (@"reflect".t·3 *@"reflect".rtype "esc:0x0") MethodByName (@"reflect".name·4 string "esc:0x0") (@"reflect".m·1 @"reflect".Method, @"reflect".ok·2 bool)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") Name () (? string)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumField () (? int)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumIn () (? int)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumMethod () (? int)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") NumOut () (? int)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Out (@"reflect".i·3 int) (? @"reflect".Type)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") PkgPath () (? string)
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") Size () (? uintptr) { return @"reflect".t·2.@"reflect".size }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x1") String () (? string) { return *@"reflect".t·2.@"reflect".string }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x2") @"reflect".common () (? *@"reflect".rtype) { return @"reflect".t·2 }
+	func (@"reflect".t·2 *@"reflect".rtype "esc:0x0") @"reflect".pointers () (? bool) { return @"reflect".t·2.@"reflect".kind & 0x80 == 0x0 }
+	func (@"reflect".t·2 *@"reflect".rtype) @"reflect".ptrTo () (? *@"reflect".rtype)
+	type @"reflect".flag uintptr
+	func (@"reflect".f·2 @"reflect".flag) @"reflect".kind () (? @"reflect".Kind) { return @"reflect".Kind(@"reflect".f·2 & @"reflect".flag(0x1F)) }
+	func (@"reflect".f·1 @"reflect".flag) @"reflect".mustBe (@"reflect".expected·2 @"reflect".Kind)
+	func (@"reflect".f·1 @"reflect".flag) @"reflect".mustBeAssignable ()
+	func (@"reflect".f·1 @"reflect".flag) @"reflect".mustBeExported ()
+	type @"reflect".Value struct { @"reflect".typ *@"reflect".rtype; @"reflect".ptr @"unsafe".Pointer; @"reflect".? @"reflect".flag }
+	func (@"reflect".v·2 @"reflect".Value) Addr () (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Bool () (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x1") Bytes () (? []byte)
+	func (@"reflect".v·2 @"reflect".Value) Call (@"reflect".in·3 []@"reflect".Value "esc:0x0") (? []@"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) CallSlice (@"reflect".in·3 []@"reflect".Value "esc:0x0") (? []@"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") CanAddr () (? bool) { return @"reflect".v·2.@"reflect".flag & @"reflect".flag(0x80) != @"reflect".flag(0x0) }
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") CanInterface () (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") CanSet () (? bool) { return @"reflect".v·2.@"reflect".flag & @"reflect".flag(0xA0) == @"reflect".flag(0x80) }
+	func (@"reflect".v·2 @"reflect".Value) Cap () (? int)
+	func (@"reflect".v·1 @"reflect".Value) Close ()
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Complex () (? complex128)
+	func (@"reflect".v·2 @"reflect".Value) Convert (@"reflect".t·3 @"reflect".Type) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Elem () (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Field (@"reflect".i·3 int) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x2") FieldByIndex (@"reflect".index·3 []int "esc:0x0") (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) FieldByName (@"reflect".name·3 string "esc:0x0") (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) FieldByNameFunc (@"reflect".match·3 func(? string) (? bool) "esc:0x0") (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Float () (? float64)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Index (@"reflect".i·3 int) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Int () (? int64)
+	func (@"reflect".v·2 @"reflect".Value) Interface () (@"reflect".i·1 interface {})
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") InterfaceData () (? [2]uintptr)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") IsNil () (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") IsValid () (? bool) { return @"reflect".v·2.@"reflect".flag != @"reflect".flag(0x0) }
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Kind () (? @"reflect".Kind)
+	func (@"reflect".v·2 @"reflect".Value) Len () (? int)
+	func (@"reflect".v·2 @"reflect".Value) MapIndex (@"reflect".key·3 @"reflect".Value) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) MapKeys () (? []@"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x2") Method (@"reflect".i·3 int) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x2") MethodByName (@"reflect".name·3 string "esc:0x0") (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") NumField () (? int)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") NumMethod () (? int)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowComplex (@"reflect".x·3 complex128) (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowFloat (@"reflect".x·3 float64) (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowInt (@"reflect".x·3 int64) (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") OverflowUint (@"reflect".x·3 uint64) (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x2") Pointer () (? uintptr)
+	func (@"reflect".v·3 @"reflect".Value) Recv () (@"reflect".x·1 @"reflect".Value, @"reflect".ok·2 bool)
+	func (@"reflect".v·1 @"reflect".Value) Send (@"reflect".x·2 @"reflect".Value)
+	func (@"reflect".v·1 @"reflect".Value) Set (@"reflect".x·2 @"reflect".Value)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetBool (@"reflect".x·2 bool)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetBytes (@"reflect".x·2 []byte)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetCap (@"reflect".n·2 int)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetComplex (@"reflect".x·2 complex128)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetFloat (@"reflect".x·2 float64)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetInt (@"reflect".x·2 int64)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetLen (@"reflect".n·2 int)
+	func (@"reflect".v·1 @"reflect".Value) SetMapIndex (@"reflect".key·2 @"reflect".Value, @"reflect".val·3 @"reflect".Value)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetPointer (@"reflect".x·2 @"unsafe".Pointer)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetString (@"reflect".x·2 string)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") SetUint (@"reflect".x·2 uint64)
+	func (@"reflect".v·2 @"reflect".Value) Slice (@"reflect".i·3 int, @"reflect".j·4 int) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) Slice3 (@"reflect".i·3 int, @"reflect".j·4 int, @"reflect".k·5 int) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) String () (? string)
+	func (@"reflect".v·3 @"reflect".Value) TryRecv () (@"reflect".x·1 @"reflect".Value, @"reflect".ok·2 bool)
+	func (@"reflect".v·2 @"reflect".Value) TrySend (@"reflect".x·3 @"reflect".Value) (? bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x3") Type () (? @"reflect".Type)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x0") Uint () (? uint64)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x2") UnsafeAddr () (? uintptr)
+	func (@"reflect".v·2 @"reflect".Value) @"reflect".assignTo (@"reflect".context·3 string "esc:0x0", @"reflect".dst·4 *@"reflect".rtype, @"reflect".target·5 @"unsafe".Pointer) (? @"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value) @"reflect".call (@"reflect".op·3 string "esc:0x0", @"reflect".in·4 []@"reflect".Value "esc:0x0") (? []@"reflect".Value)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x3") @"reflect".pointer () (? @"unsafe".Pointer)
+	func (@"reflect".v·3 @"reflect".Value) @"reflect".recv (@"reflect".nb·4 bool) (@"reflect".val·1 @"reflect".Value, @"reflect".ok·2 bool)
+	func (@"reflect".v·2 @"reflect".Value "esc:0x1") @"reflect".runes () (? []rune)
+	func (@"reflect".v·2 @"reflect".Value) @"reflect".send (@"reflect".x·3 @"reflect".Value, @"reflect".nb·4 bool) (@"reflect".selected·1 bool)
+	func (@"reflect".v·1 @"reflect".Value "esc:0x0") @"reflect".setRunes (@"reflect".x·2 []rune)
+	type @"reflect".Method struct { Name string; PkgPath string; Type @"reflect".Type; Func @"reflect".Value; Index int }
+	type @"reflect".Type interface { Align() (? int); AssignableTo(@"reflect".u @"reflect".Type) (? bool); Bits() (? int); ChanDir() (? @"reflect".ChanDir); Comparable() (? bool); ConvertibleTo(@"reflect".u @"reflect".Type) (? bool); Elem() (? @"reflect".Type); Field(@"reflect".i int) (? @"reflect".StructField); FieldAlign() (? int); FieldByIndex(@"reflect".index []int) (? @"reflect".StructField); FieldByName(@"reflect".name string) (? @"reflect".StructField, ? bool); FieldByNameFunc(@"reflect".match func(? string) (? bool)) (? @"reflect".StructField, ? bool); Implements(@"reflect".u @"reflect".Type) (? bool); In(@"reflect".i int) (? @"reflect".Type); IsVariadic() (? bool); Key() (? @"reflect".Type); Kind() (? @"reflect".Kind); Len() (? int); Method(? int) (? @"reflect".Method); MethodByName(? string) (? @"reflect".Method, ? bool); Name() (? string); NumField() (? int); NumIn() (? int); NumMethod() (? int); NumOut() (? int); Out(@"reflect".i int) (? @"reflect".Type); PkgPath() (? strin
 g); Size() (? uintptr); String() (? string); @"reflect".common() (? *@"reflect".rtype); @"reflect".uncommon() (? *@"reflect".uncommonType) }
+	type @"".BadUnmarshal struct { AMQPType string; GoType @"reflect".Type }
+	func (@"".e·2 @"".BadUnmarshal) Error () (? string)
+	type @"io".Reader interface { Read(@"io".p []byte) (@"io".n int, @"io".err error) }
+	type @"bytes".readOp int
+	type @"bytes".Buffer struct { @"bytes".buf []byte; @"bytes".off int; @"bytes".runeBytes [4]byte; @"bytes".bootstrap [64]byte; @"bytes".lastRead @"bytes".readOp }
+	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x1") Bytes () (? []byte) { return @"bytes".b·2.@"bytes".buf[@"bytes".b·2.@"bytes".off:] }
+	func (@"bytes".b·1 *@"bytes".Buffer) Grow (@"bytes".n·2 int)
+	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") Len () (? int) { return len(@"bytes".b·2.@"bytes".buf) - @"bytes".b·2.@"bytes".off }
+	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x1") Next (@"bytes".n·3 int) (? []byte)
+	func (@"bytes".b·3 *@"bytes".Buffer) Read (@"bytes".p·4 []byte "esc:0x0") (@"bytes".n·1 int, @"bytes".err·2 error)
+	func (@"bytes".b·3 *@"bytes".Buffer) ReadByte () (@"bytes".c·1 byte, @"bytes".err·2 error)
+	func (@"bytes".b·3 *@"bytes".Buffer "esc:0x0") ReadBytes (@"bytes".delim·4 byte) (@"bytes".line·1 []byte, @"bytes".err·2 error)
+	func (@"bytes".b·3 *@"bytes".Buffer) ReadFrom (@"bytes".r·4 @"io".Reader) (@"bytes".n·1 int64, @"bytes".err·2 error)
+	func (@"bytes".b·4 *@"bytes".Buffer) ReadRune () (@"bytes".r·1 rune, @"bytes".size·2 int, @"bytes".err·3 error)
+	func (@"bytes".b·3 *@"bytes".Buffer "esc:0x0") ReadString (@"bytes".delim·4 byte) (@"bytes".line·1 string, @"bytes".err·2 error)
+	func (@"bytes".b·1 *@"bytes".Buffer) Reset ()
+	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") String () (? string) { if @"bytes".b·2 == nil { return "<nil>" }; return string(@"bytes".b·2.@"bytes".buf[@"bytes".b·2.@"bytes".off:]) }
+	func (@"bytes".b·1 *@"bytes".Buffer) Truncate (@"bytes".n·2 int)
+	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") UnreadByte () (? error)
+	func (@"bytes".b·2 *@"bytes".Buffer "esc:0x0") UnreadRune () (? error)
+	func (@"bytes".b·3 *@"bytes".Buffer) Write (@"bytes".p·4 []byte "esc:0x0") (@"bytes".n·1 int, @"bytes".err·2 error)
+	func (@"bytes".b·2 *@"bytes".Buffer) WriteByte (@"bytes".c·3 byte) (? error)
+	func (@"bytes".b·3 *@"bytes".Buffer) WriteRune (@"bytes".r·4 rune) (@"bytes".n·1 int, @"bytes".err·2 error)
+	func (@"bytes".b·3 *@"bytes".Buffer) WriteString (@"bytes".s·4 string "esc:0x0") (@"bytes".n·1 int, @"bytes".err·2 error)
+	func (@"bytes".b·3 *@"bytes".Buffer) WriteTo (@"bytes".w·4 @"io".Writer) (@"bytes".n·1 int64, @"bytes".err·2 error)
+	func (@"bytes".b·2 *@"bytes".Buffer) @"bytes".grow (@"bytes".n·3 int) (? int)
+	func (@"bytes".b·3 *@"bytes".Buffer "esc:0x1") @"bytes".readSlice (@"bytes".delim·4 byte) (@"bytes".line·1 []byte, @"bytes".err·2 error)
+	type @"".Decoder struct { @"".reader @"io".Reader; @"".buffer @"bytes".Buffer }
+	func (@"".d·2 *@"".Decoder) Buffered () (? @"io".Reader)
+	func (@"".d·2 *@"".Decoder) Decode (@"".v·3 interface {}) (@"".err·1 error)
+	func (@"".d·2 *@"".Decoder) @"".more () (? error)
+	func @"".NewDecoder (@"".r·2 @"io".Reader) (? *@"".Decoder) { return (&@"".Decoder{ @"".reader:@"".r·2, @"".buffer:(@"bytes".Buffer{  }) }) }
+	func @"".Unmarshal (@"".bytes·3 []byte "esc:0x0", @"".v·4 interface {}) (@"".n·1 int, @"".err·2 error)
+	type @"net/url".Userinfo struct { @"net/url".username string; @"net/url".password string; @"net/url".passwordSet bool }
+	func (@"net/url".u·3 *@"net/url".Userinfo "esc:0x1") Password () (? string, ? bool) { if @"net/url".u·3.@"net/url".passwordSet { return @"net/url".u·3.@"net/url".password, true }; return "", false }
+	func (@"net/url".u·2 *@"net/url".Userinfo "esc:0x1") String () (? string)
+	func (@"net/url".u·2 *@"net/url".Userinfo "esc:0x1") Username () (? string) { return @"net/url".u·2.@"net/url".username }
+	type @"net/url".Values map[string][]string
+	func (@"net/url".v·1 @"net/url".Values "esc:0x0") Add (@"net/url".key·2 string, @"net/url".value·3 string) { @"net/url".v·1[@"net/url".key·2] = append(@"net/url".v·1[@"net/url".key·2], @"net/url".value·3) }
+	func (@"net/url".v·1 @"net/url".Values "esc:0x0") Del (@"net/url".key·2 string "esc:0x0") { delete(@"net/url".v·1, @"net/url".key·2) }
+	func (@"net/url".v·2 @"net/url".Values "esc:0x0") Encode () (? string)
+	func (@"net/url".v·2 @"net/url".Values "esc:0x0") Get (@"net/url".key·3 string "esc:0x0") (? string) { if @"net/url".v·2 == nil { return "" }; var @"net/url".vs·4 []string; ; var @"net/url".ok·5 bool; ; @"net/url".vs·4, @"net/url".ok·5 = @"net/url".v·2[@"net/url".key·3]; if !@"net/url".ok·5 || len(@"net/url".vs·4) == 0x0 { return "" }; return @"net/url".vs·4[0x0] }
+	func (@"net/url".v·1 @"net/url".Values "esc:0x0") Set (@"net/url".key·2 string, @"net/url".value·3 string) { @"net/url".v·1[@"net/url".key·2] = ([]string{ 0x0:@"net/url".value·3 }) }
+	type @"net/url".URL struct { Scheme string; Opaque string; User *@"net/url".Userinfo; Host string; Path string; RawQuery string; Fragment string }
+	func (@"net/url".u·2 *@"net/url".URL "esc:0x0") IsAbs () (? bool) { return @"net/url".u·2.Scheme != "" }
+	func (@"net/url".u·3 *@"net/url".URL "esc:0x2") Parse (@"net/url".ref·4 string) (? *@"net/url".URL, ? error)
+	func (@"net/url".u·2 *@"net/url".URL) Query () (? @"net/url".Values)
+	func (@"net/url".u·2 *@"net/url".URL "esc:0x1") RequestURI () (? string)
+	func (@"net/url".u·2 *@"net/url".URL "esc:0x2") ResolveReference (@"net/url".ref·3 *@"net/url".URL "esc:0x2") (? *@"net/url".URL)
+	func (@"net/url".u·2 *@"net/url".URL "esc:0x0") String () (? string)
+	func @"".ParseURL (@"".s·3 string) (@"".u·1 *@"net/url".URL, @"".err·2 error)
+	func @"".init ()
+	const @"".minEncode = 0x100
+	var @"time".months [12]string
+	var @"time".days [7]string
+	var @"time".Local *@"time".Location
+	var @"time".UTC *@"time".Location
+
+$$
+_go_.6          0           0     0     644     468681    `
+go object linux amd64 go1.4.2 X:precisestack
+
+!
+go13ld
+fmt.areflect.astrconv.async/atomic.aruntime/cgo.asyscall.aio.aHqpid.apache.org/proton/go/internal.atime.abytes.a
+net.anet/url.a�"".Error.Error��dH�%H;aw���H��HDŽ$�HDŽ$�H�|$`1��H�\$`H���H��H��H�\$HH�T$PH�L$XH�H�$H��$�H�\$�H�L$H�D$H�\$HH�$H�L$8H�L$H�D$@H�D$�H�H�$H��$�H�\$H�D$�H�L$H�D$H�\$HH��H�$H�L$8H�L$H�D$@H�D$�H�H�,$H��H��H�H�H�\$HH�\$H�\$PH�\$H�\$XH�\$ �H�L$(H�D$0H��$�H��$�H�ĀÉ�����
+ 0runtime.morestack_noctxtz� runtime.duffzero�type.string�runtime.convT2E�2runtime.writebarrieriface�type.string�runtime.convT2E�2runtime.writebarrieriface�2go.string."proton %s: %s"�fmt.Sprintf`�"".autotmp_0008"type.interface {}"".autotmp_0007�"type.interface {}"".autotmp_0005o&type.[]interface {}"".autotmp_0003?(type.[2]interface {}"".~r0@type.string"".ctype."".Error����
�B���4Tgclocals·89e6b2848881d386696738078d0e941dTgclocals·aa288e3c39d4102a912a36b10515d40d�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/error.go�"".Errorf��dH�%H;aw���H��XH��$�1��H�\$pH�$H�\$xH�\$H��$�H�\$H��$�H�\$H��$�H�\$ �H�l$(H�T$0H�|$81��H�\$`H�\$8H�t$hH�t$@H
 �l$HH�T$PH�t$8H��$�H���H��X�
+ 0runtime.morestack_noctxtJ� runtime.duffzero�fmt.Sprintf�� runtime.duffzero�� runtime.duffcopy��
+"".autotmp_0013?type."".Error"".~r3ptype."".Error"".arg@&type.[]interface {}"".format type.string"".nametype.string����H)�
+c]Tgclocals·9cbabfc7b1ba9b18a1b3687d46073813Tgclocals·44568aa369055d8938d809aa5d80843b�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/error.go�"".MakeError��dH�%H;aw���H��`H�|$x1��H�\$hH�$H�\$pH�\$�H�\$H�,$H��H��H�H��H�T$H�D$H�D$8H�$H�T$0H�����H�\$H�\$ H�\$H�\$(H�\$pH�$H�\$hH�[ ��H�l$H�T$H�|$@1��H�\$ H�\$@H�t$(H�t$HH�l$PH�T$XH�t$@H�l$xH���H��`�
+ 0runtime.morestack_noctxtD� runtime.duffzerotruntime.convI2E�reflect.TypeOf�
+�
+�� runtime.duffzero�� runtime.duffcopy`�
+"".autotmp_0017?type."".Error"".autotmp_0015type.string"".autotmp_0014_"type.reflect.Type"".~r1 type."".Error"".errtype.error����R&�9dSTgclocals·cede55e64cfaf842aa360488b9c978baTgclocals·4398bb51467914f29637b614067b995f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/error.go�0"".(*UidCounter).NextInt��dH�%H;aw���H��H�\$ H�$H�<$tH�D$�H�\$H�\$(H��É%��
+ 0runtime.morestack_noctxth*sync/atomic.AddUint64 0"".~r0type.uint64
+"".uc&type.*"".UidCounter0,/0	P
+D6
+3Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go�*"".(*UidCounter).Next��dH�%H;aw���H�� H�D$0H�D$8H�\$(H�$�H�\$H�$H�D$ �H�L$H�D$H�L$0H�D$8H�� �
+ 0runtime.morestack_noctxtl0"".(*UidCounter).NextInt�$strconv.FormatUint0@"".~r0type.string
+"".uc&type.*"".UidCounter@O?p
+N,D
+5;Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/uid.go�""._Cgo_ptr H�\$H�\$� "".~r1&type.unsafe.Pointer"".ptr&type.unsafe.PointerTgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9ffqpid.apache.org/proton/go/amqp/_obj/_cgo_gotypes.go�"""._Cfunc_CString��dH�%H;aw���H��PH�\$`H��H�$H�H���H�t$H�t$ H�t$H����H��@H��@H�L$HH�T$XH�L$`H�D$@H�L$0H9�}H��H�t$8H�4$H�T$(H�T$H�D$�H�D$`H�\$H��t%H=@sH��H�\$ H�\$hH��P����׉�t���
+ 0runtime.morestack_noctxtR.""._cgo_runtime_cmalloc`
+�runtime.memmove�$runtime.panicindex0�"".autotmp_0027type.uintptr"".autotmp_0026type.int"".autotmp_0025Otype.string"".autotmp_0024/type.[]uint8"".autotmp_0023type.int
+"".ppo.type.*[1073741824]uint8"".p_&type.unsafe.Pointer"".~r1 (type.*""._Ctype_char"".stype.string�����"|[0b3Tgclocals·d7e8a62d22b1cde6d92b17a55c33fe8fTgclocals·283619d6755c7337ece602447ba790ff�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�"""._Cfunc_GoBytes��dH�%H;aw���H��(H�D$@H�D$HH�D$PH�\$0H�$Hc\$8H�\$H�H���H�T$H�L$H�D$ H�T$@H�L$HH�D$PH��(�
+ 0runtime.morestack_noctxt�.""._cgo_runtime_gobytes�
+PP"".~r2 type.[]uint8"".l$type.""._Ctype_int"".p&type.unsafe.PointerP\O
+��5K
+R.Tgclocals·69799e6b08b04134ac5d3d02564aacadTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�$""._Cfunc_GoString��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�H���H�L$H�D$H�L$(H�D$0H���
+ 0runtime.morestack_noctxtp0""._cgo_runtime_gostring~
+00"".~r1type.string"".p(type.*""._Ctype_char0?/`�,4
+?!Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�&""._Cfunc_GoStringN��dH�%H;aw���H�� H�D$8H�D$@H�\$(H�$Hc\$0H�\$H�H���H�L$H�D$H�L$8H�D$@H�� �
+ 0runtime.morestack_noctxt�2""._cgo_runtime_gostringn�
+@@"".~r2 type.string"".l$type.""._Ctype_int"".p(type.*""._Ctype_char@I?
p�,D
+I'Tgclocals·6a2e5ab2d393a1bfd331903fbd0fd425Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�""._Cfunc_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN>""._cgo_e3cd7c286e0f_Cfunc_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0&type.unsafe.Pointer0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�"""._Cfunc_pn_data��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLD""._cgo_e3cd7c286e0f_Cfunc_pn_datav:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0*type.""._Ctype_size_t0./P�#!
+BTgclocals·8512b64a8c2de1386e17b894ea692148Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_data_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_e3cd7c286e0f_Cfunc_pn_data_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_data_decode��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLR""._cgo_e3cd7c286e0f_Cfunc_pn_data_decodev:""._cgo_runtime_cgocall_errno�
+@0
+"".r10,type.""._Ctype_ssize_t
+"".p2 *type.""._Ctype_size_t
+"".p1(type.*""._Ctype_char
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·eaf31f95896361dc5cdd0293aac48f97Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_data_encode��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLR""._cgo_e3cd7c286e0f_Cfunc_pn_data_encodev:""._cgo_runtime_cgocall_errno�
+@0
+"".r10,type.""._Ctype_ssize_t
+"".p2 *type.""._Ctype_size_t
+"".p1(type.*""._Ctype_char
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·eaf31f95896361dc5cdd0293aac48f97Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_data_enter��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDP""._cgo_e3cd7c286e0f_Cfunc_pn_data_entern:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_data_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLP""._cgo_e3cd7c286e0f_Cfunc_pn_data_errorv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_error_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_exit��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDN""._cgo_e3cd7c286e0f_Cfunc_pn_data_exitn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNN""._cgo_e3cd7c286e0f_Cfunc_pn_data_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_binary��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^Z""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_binary�:""._cgo_runtime_cgocall_errno�
+00
+"".r12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_data_t07/`�,!
+KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_bool��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_booln:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_byte��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_byten:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1*type.""._Ctype_int8_t
+"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_char��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_chart:""._cgo_runtime_cgocall_errno�
+ 0
+"".r10type.""._Ctype_pn_char_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_double��dH�%H;aw���H�����D$(H�H�$H�\$ H�\$H�H���H���
+ 0runtime.morestack_noctxt<*$f64.0000000000000000L*$f64.0000000000000000fZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_double�:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1*type.""._Ctype_double
+"".p0@type.*""._Ctype_struct_pn_data_t0;/`�0!
+OTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_float��dH�%H;aw���H�����D$(H�H�$H�\$ H�\$H�H���H���
+ 0runtime.morestack_noctxt<$f32.00000000L$f32.00000000fX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_float�:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.""._Ctype_float
+"".p0@type.*""._Ctype_struct_pn_data_t0;/`�0!
+OTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_get_int��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJT""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_intt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1,type.""._Ctype_int32_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_list��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_listv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1*type.""._Ctype_size_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_long��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_longv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1,type.""._Ctype_int64_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_get_map��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLT""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_mapv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1*type.""._Ctype_size_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_short��dH�%H;aw���H��f�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtHX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_shortr:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1,type.""._Ctype_int16_t
+"".p0@type.*""._Ctype_struct_pn_data_t0,/
+P�!!
+@Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_string��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^Z""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_string�:""._cgo_runtime_cgocall_errno�
+00
+"".r12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_data_t07/`�,!
+KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_symbol��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^Z""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_symbol�:""._cgo_runtime_cgocall_errno�
+00
+"".r12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_data_t07/`�,!
+KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_ubyte��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_ubyten:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1,type.""._Ctype_uint8_t
+"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_get_uint��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_uintt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint32_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_get_ulong��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_ulongv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_get_ushort��dH�%H;aw���H��f�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtHZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_get_ushortr:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint16_t
+"".p0@type.*""._Ctype_struct_pn_data_t0,/
+P�!!
+@Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_next��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDN""._cgo_e3cd7c286e0f_Cfunc_pn_data_nextn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_data_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_binary��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_binaryt:""._cgo_runtime_cgocall_errno�
+@0
+"".r10$type.""._Ctype_int
+"".p12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·1012e749cb483d93a3e4aab6e4099c45Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_bool��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_boolt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_byte��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_bytet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1*type.""._Ctype_int8_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_double��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_doublet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1*type.""._Ctype_double
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_float��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_floatt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.""._Ctype_float
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_put_int��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJT""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_intt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1,type.""._Ctype_int32_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_list��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_listt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_long��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_longt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1,type.""._Ctype_int64_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_data_put_map��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJT""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_mapt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_null��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_nullt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_short��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_shortt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1,type.""._Ctype_int16_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_string��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_stringt:""._cgo_runtime_cgocall_errno�
+@0
+"".r10$type.""._Ctype_int
+"".p12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·1012e749cb483d93a3e4aab6e4099c45Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_symbol��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_symbolt:""._cgo_runtime_cgocall_errno�
+@0
+"".r10$type.""._Ctype_int
+"".p12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·1012e749cb483d93a3e4aab6e4099c45Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_ubyte��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_ubytet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1,type.""._Ctype_uint8_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_data_put_uint��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJV""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_uintt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1.type.""._Ctype_uint32_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_data_put_ulong��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_ulongt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1.type.""._Ctype_uint64_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_data_put_ushort��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_data_put_ushortt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1.type.""._Ctype_uint16_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_data_rewind��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNR""._cgo_e3cd7c286e0f_Cfunc_pn_data_rewindx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_size��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLN""._cgo_e3cd7c286e0f_Cfunc_pn_data_sizev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1*type.""._Ctype_size_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�,""._Cfunc_pn_data_type��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJN""._cgo_e3cd7c286e0f_Cfunc_pn_data_typet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r10type.""._Ctype_pn_type_t
+"".p0@type.*""._Ctype_struct_pn_data_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�0""._Cfunc_pn_error_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNR""._cgo_e3cd7c286e0f_Cfunc_pn_error_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Btype.*""._Ctype_struct_pn_error_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�(""._Cfunc_pn_message��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^J""._cgo_e3cd7c286e0f_Cfunc_pn_message�:""._cgo_runtime_cgocall_errno�
+0
+"".r1Ftype.*""._Ctype_struct_pn_message_t07/`�,!
+KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_annotations��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLb""._cgo_e3cd7c286e0f_Cfunc_pn_message_annotationsv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_message_body��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLT""._cgo_e3cd7c286e0f_Cfunc_pn_message_bodyv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�F""._Cfunc_pn_message_correlation_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLh""._cgo_e3cd7c286e0f_Cfunc_pn_message_correlation_idv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_message_decode��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_message_decodet:""._cgo_runtime_cgocall_errno�
+@0
+"".r10$type.""._Ctype_int
+"".p2 *type.""._Ctype_size_t
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·eaf31f95896361dc5cdd0293aac48f97Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�6""._Cfunc_pn_message_encode��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_e3cd7c286e0f_Cfunc_pn_message_encodet:""._cgo_runtime_cgocall_errno�
+@0
+"".r10$type.""._Ctype_int
+"".p2 ,type.*""._Ctype_size_t
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·cd788548226369186d2e16a002d1f558Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�4""._Cfunc_pn_message_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_e3cd7c286e0f_Cfunc_pn_message_errorv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_error_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�2""._Cfunc_pn_message_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNT""._cgo_e3cd7c286e0f_Cfunc_pn_message_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ftype.*""._Ctype_struct_pn_message_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_get_address��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLb""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_addressv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�R""._Cfunc_pn_message_get_content_encoding��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLt""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_content_encodingv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�J""._Cfunc_pn_message_get_content_type��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLl""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_content_typev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�L""._Cfunc_pn_message_get_creation_time��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLn""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_creation_timev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1:type.""._Ctype_pn_timestamp_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_get_delivery_count��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_delivery_countt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint32_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�H""._Cfunc_pn_message_get_expiry_time��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_expiry_timev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1:type.""._Ctype_pn_timestamp_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_get_group_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_group_idv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_get_group_sequence��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_group_sequencet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r18type.""._Ctype_pn_sequence_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_get_priority��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDd""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_priorityn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1,type.""._Ctype_uint8_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_get_reply_to��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_reply_tov:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�T""._Cfunc_pn_message_get_reply_to_group_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLv""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_reply_to_group_idv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_get_subject��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLb""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_subjectv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_message_get_ttl��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_ttlt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r14type.""._Ctype_pn_millis_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_get_user_id��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^b""._cgo_e3cd7c286e0f_Cfunc_pn_message_get_user_id�:""._cgo_runtime_cgocall_errno�
+00
+"".r12type.""._Ctype_struct___0
+"".p0Ftype.*""._Ctype_struct_pn_message_t07/`�,!
+KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�.""._Cfunc_pn_message_id��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLP""._cgo_e3cd7c286e0f_Cfunc_pn_message_idv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_instructions��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_e3cd7c286e0f_Cfunc_pn_message_instructionsv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�>""._Cfunc_pn_message_is_durable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD`""._cgo_e3cd7c286e0f_Cfunc_pn_message_is_durablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�L""._Cfunc_pn_message_is_first_acquirer��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDn""._cgo_e3cd7c286e0f_Cfunc_pn_message_is_first_acquirern:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_is_inferred��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDb""._cgo_e3cd7c286e0f_Cfunc_pn_message_is_inferredn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ftype.*""._Ctype_struct_pn_message_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�>""._Cfunc_pn_message_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL`""._cgo_e3cd7c286e0f_Cfunc_pn_message_propertiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_address��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_addresst:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�R""._Cfunc_pn_message_set_content_encoding��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJt""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_content_encodingt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�J""._Cfunc_pn_message_set_content_type��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJl""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_content_typet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�L""._Cfunc_pn_message_set_creation_time��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJn""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_creation_timet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1:type.""._Ctype_pn_timestamp_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_set_delivery_count��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_delivery_countt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1.type.""._Ctype_uint32_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_durable��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_durablet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.""._Ctype__Bool
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�H""._Cfunc_pn_message_set_expiry_time��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJj""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_expiry_timet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1:type.""._Ctype_pn_timestamp_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_set_first_acquirer��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_first_acquirert:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.""._Ctype__Bool
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_group_id��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_group_idt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�N""._Cfunc_pn_message_set_group_sequence��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJp""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_group_sequencet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p18type.""._Ctype_pn_sequence_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_inferred��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_inferredt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.""._Ctype__Bool
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_priority��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_priorityt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1,type.""._Ctype_uint8_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�B""._Cfunc_pn_message_set_reply_to��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJd""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_reply_tot:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�T""._Cfunc_pn_message_set_reply_to_group_id��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJv""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_reply_to_group_idt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_subject��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_subjectt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�8""._Cfunc_pn_message_set_ttl��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJZ""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_ttlt:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p14type.""._Ctype_pn_millis_t
+"".p0Ftype.*""._Ctype_struct_pn_message_t0-/	P�	"!

+ATgclocals·07547bb90cfc1ed024dcd2d84e37c161Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/amqp/�@""._Cfunc_pn_message_set_user_id��dH�%H;aw���H���D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJb""._cgo_e3cd7c286e0f_Cfunc_pn_message_set_user_idt:""._cgo_runtime_cgocall_errno�
+@0
+"".r10$type.""._Ctype_int
+"".p12type.""._Ctype_struct___0
+"".p0Ft

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[19/36] qpid-proton git commit: PROTON-827: Re-create go worspace, cmake support for testing.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/handlers.go
----------------------------------------------------------------------
diff --git a/go/event/handlers.go b/go/event/handlers.go
deleted file mode 100644
index d76fac9..0000000
--- a/go/event/handlers.go
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/internal"
-)
-
-// EventHandler handles core proton events.
-type EventHandler interface {
-	// HandleEvent is called with an event.
-	// Typically HandleEvent() is implemented as a switch on e.Type()
-	HandleEvent(e Event) error
-}
-
-// cHandler wraps a C pn_handler_t
-type cHandler struct {
-	pn *C.pn_handler_t
-}
-
-func (h cHandler) HandleEvent(e Event) error {
-	C.pn_handler_dispatch(h.pn, e.pn, C.pn_event_type(e.pn))
-	return nil // FIXME aconway 2015-03-31: error handling
-}
-
-// MessagingHandler provides an alternative interface to EventHandler.
-// it is easier to use for most applications that send and receive messages.
-//
-// Implement this interface and then wrap your value with a MessagingHandlerDelegator.
-// MessagingHandlerDelegator implements EventHandler and can be registered with a Pump.
-//
-type MessagingHandler interface {
-	HandleMessagingEvent(MessagingEventType, Event) error
-}
-
-// MessagingEventType provides a set of events that are easier to work with than the
-// core events defined by EventType
-//
-// There are 3 types of "endpoint": Connection, Session and Link.
-// For each endpoint there are 5 event types: Opening, Opened, Closing, Closed and Error.
-// The meaning of these events is as follows:
-//
-// Opening: The remote end opened, the local end will open automatically.
-//
-// Opened: Both ends are open, regardless of which end opened first.
-//
-// Closing: The remote end closed without error, the local end will close automatically.
-//
-// Error: The remote end closed with an error, the local end will close automatically.
-//
-// Closed: Both ends are closed, regardless of which end closed first or if there was an error.
-//
-type MessagingEventType int
-
-const (
-	// The event loop starts.
-	MStart MessagingEventType = iota
-	// The peer closes the connection with an error condition.
-	MConnectionError
-	// The peer closes the session with an error condition.
-	MSessionError
-	// The peer closes the link with an error condition.
-	MLinkError
-	// The peer Initiates the opening of the connection.
-	MConnectionOpening
-	// The peer initiates the opening of the session.
-	MSessionOpening
-	// The peer initiates the opening of the link.
-	MLinkOpening
-	// The connection is opened.
-	MConnectionOpened
-	// The session is opened.
-	MSessionOpened
-	// The link is opened.
-	MLinkOpened
-	// The peer initiates the closing of the connection.
-	MConnectionClosing
-	// The peer initiates the closing of the session.
-	MSessionClosing
-	// The peer initiates the closing of the link.
-	MLinkClosing
-	// Both ends of the connection are closed.
-	MConnectionClosed
-	// Both ends of the session are closed.
-	MSessionClosed
-	// Both ends of the link are closed.
-	MLinkClosed
-	// The connection is disconnected.
-	MConnectionDisconnected
-	// The session's connection was disconnected
-	MSessionDisconnected
-	// The session's connection was disconnected
-	MLinkDisconnected
-	// The sender link has credit and messages can
-	// therefore be transferred.
-	MSendable
-	// The remote peer accepts an outgoing message.
-	MAccepted
-	// The remote peer rejects an outgoing message.
-	MRejected
-	// The peer releases an outgoing message. Note that this may be in response to
-	// either the RELEASE or MODIFIED state as defined by the AMQP specification.
-	MReleased
-	// The peer has settled the outgoing message. This is the point at which it
-	// shouod never be retransmitted.
-	MSettled
-	// A message is received. Call DecodeMessage() to decode as an amqp.Message.
-	// To manage the outcome of this messages (e.g. to accept or reject the message)
-	// use Event.Delivery().
-	MMessage
-	// The event loop terminates, there are no more events to process.
-	MFinal
-)
-
-func (t MessagingEventType) String() string {
-	switch t {
-	case MStart:
-		return "Start"
-	case MConnectionError:
-		return "ConnectionError"
-	case MSessionError:
-		return "SessionError"
-	case MLinkError:
-		return "LinkError"
-	case MConnectionOpening:
-		return "ConnectionOpening"
-	case MSessionOpening:
-		return "SessionOpening"
-	case MLinkOpening:
-		return "LinkOpening"
-	case MConnectionOpened:
-		return "ConnectionOpened"
-	case MSessionOpened:
-		return "SessionOpened"
-	case MLinkOpened:
-		return "LinkOpened"
-	case MConnectionClosing:
-		return "ConnectionClosing"
-	case MSessionClosing:
-		return "SessionClosing"
-	case MLinkClosing:
-		return "LinkClosing"
-	case MConnectionClosed:
-		return "ConnectionClosed"
-	case MSessionClosed:
-		return "SessionClosed"
-	case MLinkClosed:
-		return "LinkClosed"
-	case MConnectionDisconnected:
-		return "ConnectionDisconnected"
-	case MSessionDisconnected:
-		return "MSessionDisconnected"
-	case MLinkDisconnected:
-		return "MLinkDisconnected"
-	case MSendable:
-		return "Sendable"
-	case MAccepted:
-		return "Accepted"
-	case MRejected:
-		return "Rejected"
-	case MReleased:
-		return "Released"
-	case MSettled:
-		return "Settled"
-	case MMessage:
-		return "Message"
-	default:
-		return "Unknown"
-	}
-}
-
-// ResourceHandler provides a simple way to track the creation and deletion of
-// various proton objects.
-// endpointDelegator captures common patterns for endpoints opening/closing
-type endpointDelegator struct {
-	remoteOpen, remoteClose, localOpen, localClose EventType
-	opening, opened, closing, closed, error        MessagingEventType
-	endpoint                                       func(Event) Endpoint
-	delegate                                       MessagingHandler
-}
-
-// HandleEvent handles an open/close event for an endpoint in a generic way.
-func (d endpointDelegator) HandleEvent(e Event) (err error) {
-	endpoint := d.endpoint(e)
-	state := endpoint.State()
-
-	switch e.Type() {
-
-	case d.localOpen:
-		if state.Is(SRemoteActive) {
-			err = d.delegate.HandleMessagingEvent(d.opened, e)
-		}
-
-	case d.remoteOpen:
-		switch {
-		case state.Is(SLocalActive):
-			err = d.delegate.HandleMessagingEvent(d.opened, e)
-		case state.Is(SLocalUninit):
-			err = d.delegate.HandleMessagingEvent(d.opening, e)
-			if err == nil {
-				endpoint.Open()
-			}
-		}
-
-	case d.remoteClose:
-		var err1 error
-		if endpoint.RemoteCondition().IsSet() { // Closed with error
-			err1 = d.delegate.HandleMessagingEvent(d.error, e)
-			if err1 == nil { // Don't overwrite an application error.
-				err1 = endpoint.RemoteCondition().Error()
-			}
-		} else {
-			err1 = d.delegate.HandleMessagingEvent(d.closing, e)
-		}
-		if state.Is(SLocalClosed) {
-			err = d.delegate.HandleMessagingEvent(d.closed, e)
-		} else if state.Is(SLocalActive) {
-			endpoint.Close()
-		}
-		if err1 != nil { // Keep the first error.
-			err = err1
-		}
-
-	case d.localClose:
-		if state.Is(SRemoteClosed) {
-			err = d.delegate.HandleMessagingEvent(d.closed, e)
-		}
-
-	default:
-		// We shouldn't be called with any other event type.
-		panic(internal.Errorf("internal error, not an open/close event: %s", e))
-	}
-
-	return err
-}
-
-// MessagingDelegator implments a EventHandler and delegates to a MessagingHandler.
-// You can modify the exported fields before you pass the MessagingDelegator to
-// a Pump.
-type MessagingDelegator struct {
-	delegate                   MessagingHandler
-	connection, session, link  endpointDelegator
-	handshaker, flowcontroller EventHandler
-
-	// AutoSettle (default true) automatically pre-settle outgoing messages.
-	AutoSettle bool
-	// AutoAccept (default true) automatically accept and settle incoming messages
-	// if they are not settled by the delegate.
-	AutoAccept bool
-	// Prefetch (default 10) initial credit to issue for incoming links.
-	Prefetch int
-	// PeerCloseIsError (default false) if true a close by the peer will be treated as an error.
-	PeerCloseError bool
-}
-
-func NewMessagingDelegator(h MessagingHandler) EventHandler {
-	return &MessagingDelegator{
-		delegate: h,
-		connection: endpointDelegator{
-			EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose,
-			MConnectionOpening, MConnectionOpened, MConnectionClosing, MConnectionClosed,
-			MConnectionError,
-			func(e Event) Endpoint { return e.Connection() },
-			h,
-		},
-		session: endpointDelegator{
-			ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose,
-			MSessionOpening, MSessionOpened, MSessionClosing, MSessionClosed,
-			MSessionError,
-			func(e Event) Endpoint { return e.Session() },
-			h,
-		},
-		link: endpointDelegator{
-			ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose,
-			MLinkOpening, MLinkOpened, MLinkClosing, MLinkClosed,
-			MLinkError,
-			func(e Event) Endpoint { return e.Link() },
-			h,
-		},
-		flowcontroller: nil,
-		AutoSettle:     true,
-		AutoAccept:     true,
-		Prefetch:       10,
-		PeerCloseError: false,
-	}
-}
-
-func handleIf(h EventHandler, e Event) error {
-	if h != nil {
-		return h.HandleEvent(e)
-	}
-	return nil
-}
-
-// Handle a proton event by passing the corresponding MessagingEvent(s) to
-// the MessagingHandler.
-func (d *MessagingDelegator) HandleEvent(e Event) error {
-	handleIf(d.flowcontroller, e) // FIXME aconway 2015-03-31: error handling.
-
-	switch e.Type() {
-
-	case EConnectionInit:
-		d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
-		d.delegate.HandleMessagingEvent(MStart, e)
-
-	case EConnectionRemoteOpen, EConnectionRemoteClose, EConnectionLocalOpen, EConnectionLocalClose:
-		return d.connection.HandleEvent(e)
-
-	case ESessionRemoteOpen, ESessionRemoteClose, ESessionLocalOpen, ESessionLocalClose:
-		return d.session.HandleEvent(e)
-
-	case ELinkRemoteOpen, ELinkRemoteClose, ELinkLocalOpen, ELinkLocalClose:
-		return d.link.HandleEvent(e)
-
-	case ELinkFlow:
-		if e.Link().IsSender() && e.Link().Credit() > 0 {
-			return d.delegate.HandleMessagingEvent(MSendable, e)
-		}
-
-	case EDelivery:
-		if e.Delivery().Link().IsReceiver() {
-			d.incoming(e)
-		} else {
-			d.outgoing(e)
-		}
-
-	case ETransportTailClosed:
-		c := e.Connection()
-		for l := c.LinkHead(SRemoteActive); !l.IsNil(); l = l.Next(SRemoteActive) {
-			e2 := e
-			e2.link = l
-			e2.session = l.Session()
-			d.delegate.HandleMessagingEvent(MLinkDisconnected, e2)
-		}
-		for s := c.SessionHead(SRemoteActive); !s.IsNil(); s = s.Next(SRemoteActive) {
-			e2 := e
-			e2.session = s
-			d.delegate.HandleMessagingEvent(MSessionDisconnected, e2)
-		}
-		d.delegate.HandleMessagingEvent(MConnectionDisconnected, e)
-		d.delegate.HandleMessagingEvent(MFinal, e)
-	}
-	return nil
-}
-
-func (d *MessagingDelegator) incoming(e Event) (err error) {
-	delivery := e.Delivery()
-	if delivery.Readable() && !delivery.Partial() {
-		if e.Link().State().Is(SLocalClosed) {
-			e.Link().Advance()
-			if d.AutoAccept {
-				delivery.Release(false)
-			}
-		} else {
-			err = d.delegate.HandleMessagingEvent(MMessage, e)
-			e.Link().Advance()
-			if d.AutoAccept && !delivery.Settled() {
-				if err == nil {
-					delivery.Accept()
-				} else {
-					delivery.Reject()
-				}
-			}
-		}
-	} else if delivery.Updated() && delivery.Settled() {
-		err = d.delegate.HandleMessagingEvent(MSettled, e)
-	}
-	return
-}
-
-func (d *MessagingDelegator) outgoing(e Event) (err error) {
-	delivery := e.Delivery()
-	if delivery.Updated() {
-		switch delivery.Remote().Type() {
-		case Accepted:
-			err = d.delegate.HandleMessagingEvent(MAccepted, e)
-		case Rejected:
-			err = d.delegate.HandleMessagingEvent(MRejected, e)
-		case Released, Modified:
-			err = d.delegate.HandleMessagingEvent(MReleased, e)
-		}
-		if err == nil && delivery.Settled() {
-			err = d.delegate.HandleMessagingEvent(MSettled, e)
-		}
-		if err == nil && d.AutoSettle {
-			delivery.Settle()
-		}
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/message.go
----------------------------------------------------------------------
diff --git a/go/event/message.go b/go/event/message.go
deleted file mode 100644
index d900744..0000000
--- a/go/event/message.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/types.h>
-// #include <proton/message.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/internal"
-)
-
-// DecodeMessage decodes the message containined in a delivery event.
-func DecodeMessage(e Event) (m amqp.Message, err error) {
-	defer internal.DoRecover(&err)
-	delivery := e.Delivery()
-	if !delivery.Readable() || delivery.Partial() {
-		return nil, internal.Errorf("attempting to get incomplete message")
-	}
-	data := make([]byte, delivery.Pending())
-	result := delivery.Link().Recv(data)
-	if result != len(data) {
-		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
-	}
-	return amqp.DecodeMessage(data)
-}
-
-// FIXME aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
-var tags amqp.UidCounter
-
-// Send sends a amqp.Message over a Link.
-// Returns a Delivery that can be use to determine the outcome of the message.
-func (link Link) Send(m amqp.Message) (Delivery, error) {
-	if !link.IsSender() {
-		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
-	}
-	// FIXME aconway 2015-04-08: buffering, error handling
-	delivery := link.Delivery(tags.Next())
-	bytes, err := m.Encode(nil)
-	if err != nil {
-		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
-	}
-	result := link.SendBytes(bytes)
-	link.Advance()
-	if result != len(bytes) {
-		if result < 0 {
-			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
-		} else {
-			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
-		}
-	}
-	if link.RemoteSndSettleMode() == PnSndSettled { // FIXME aconway 2015-04-08: enum names
-		delivery.Settle()
-	}
-	return delivery, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/pump.go
----------------------------------------------------------------------
diff --git a/go/event/pump.go b/go/event/pump.go
deleted file mode 100644
index db022ff..0000000
--- a/go/event/pump.go
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-// #include <proton/connection.h>
-// #include <proton/transport.h>
-// #include <proton/event.h>
-// #include <proton/reactor.h>
-// #include <proton/handlers.h>
-// #include <proton/transport.h>
-// #include <proton/session.h>
-// #include <memory.h>
-// #include <stdlib.h>
-//
-// PN_HANDLE(REMOTE_ADDR)
-import "C"
-
-import (
-	"fmt"
-	"io"
-	"net"
-	"qpid.apache.org/proton/go/internal"
-	"sync"
-	"unsafe"
-)
-
-// bufferChan manages a pair of ping-pong buffers to pass bytes through a channel.
-type bufferChan struct {
-	buffers    chan []byte
-	buf1, buf2 []byte
-}
-
-func newBufferChan(size int) *bufferChan {
-	return &bufferChan{make(chan []byte), make([]byte, size), make([]byte, size)}
-}
-
-func (b *bufferChan) buffer() []byte {
-	b.buf1, b.buf2 = b.buf2, b.buf1 // Alternate buffers.
-	return b.buf1[:cap(b.buf1)]
-}
-
-// FIXME aconway 2015-05-04: direct sending to Inject may block user goroutines if
-// the pum stops. Make this a function that selects on running.
-
-// FIXME aconway 2015-05-05: for consistency should Pump be called Driver?
-
-/*
-Pump reads from a net.Conn, decodes AMQP events and calls the appropriate
-Handler functions. Actions taken by Handler functions (such as sending messages)
-are encoded and written to the net.Conn.
-
-The proton protocol engine is single threaded (per connection). The Pump runs
-proton in the goroutine that calls Pump.Run() and creates goroutines to feed
-data to/from a net.Conn. You can create multiple Pumps to handle multiple
-connections concurrently.
-
-Methods in this package can only be called in the goroutine that executes the
-corresponding Pump.Run(). You implement the EventHandler or MessagingHandler
-interfaces and provide those values to NewPump(). Their HandleEvent method will be
-called in the Pump goroutine, in typical event-driven style.
-
-Handlers can pass values from an event (Connections, Links, Deliveries etc.) to
-other goroutines, store them, or use them as map indexes. Effectively they are
-just C pointers.  Other goroutines cannot call their methods directly but they
-can can create function closures that call their methods and send those closures
-to the Pump.Inject channel. They will execute safely in the pump
-goroutine. Injected functions, or your handlers, can set up channels to get
-results back to other goroutines.
-
-You are responsible for ensuring you don't use an event value after the C object
-has been deleted. The handler methods will tell you when a value is no longer
-valid. For example after a MethodHandler handles a LinkClosed event, that link
-is no longer valid. If you do Link.Close() yourself (in a handler or injected
-function) the link remains valid until the corresponing LinkClosed event is
-received by the handler.
-
-Pump.Close() will take care of cleaning up any remaining values and types when
-you are done with the Pump. All values associated with a pump become invalid
-when you call Pump.Close()
-
-The qpid.apache.org/proton/go/messaging package will do all this for you, so unless
-you are doing something fairly low-level it is probably a better choice.
-
-*/
-type Pump struct {
-	// Error is set on exit from Run() if there was an error.
-	Error error
-	// Channel to inject functions to be executed in the Pump's proton event loop.
-	Inject chan func()
-
-	conn       net.Conn
-	transport  *C.pn_transport_t
-	connection *C.pn_connection_t
-	collector  *C.pn_collector_t
-	read       *bufferChan    // Read buffers channel.
-	write      *bufferChan    // Write buffers channel.
-	handlers   []EventHandler // Handlers for proton events.
-	running    chan struct{}  // This channel will be closed when the goroutines are done.
-}
-
-const bufferSize = 4096
-
-var pumps map[*C.pn_connection_t]*Pump
-
-func init() {
-	pumps = make(map[*C.pn_connection_t]*Pump)
-}
-
-// NewPump initializes a pump with a connection and handlers. To start it running:
-//    p := NewPump(...)
-//    go run p.Run()
-// The goroutine will exit when the pump is closed or disconnected.
-// You can check for errors on Pump.Error.
-//
-func NewPump(conn net.Conn, handlers ...EventHandler) (*Pump, error) {
-	// Save the connection ID for Connection.String()
-	p := &Pump{
-		Inject:     make(chan func(), 100), // FIXME aconway 2015-05-04: blocking hack
-		conn:       conn,
-		transport:  C.pn_transport(),
-		connection: C.pn_connection(),
-		collector:  C.pn_collector(),
-		handlers:   handlers,
-		read:       newBufferChan(bufferSize),
-		write:      newBufferChan(bufferSize),
-		running:    make(chan struct{}),
-	}
-	if p.transport == nil || p.connection == nil || p.collector == nil {
-		return nil, internal.Errorf("failed to allocate pump")
-	}
-	pnErr := int(C.pn_transport_bind(p.transport, p.connection))
-	if pnErr != 0 {
-		return nil, internal.Errorf("cannot setup pump: %s", internal.PnErrorCode(pnErr))
-	}
-	C.pn_connection_collect(p.connection, p.collector)
-	C.pn_connection_open(p.connection)
-	pumps[p.connection] = p
-	return p, nil
-}
-
-func (p *Pump) String() string {
-	return fmt.Sprintf("(%s-%s)", p.conn.LocalAddr(), p.conn.RemoteAddr())
-}
-
-func (p *Pump) Id() string {
-	return fmt.Sprintf("%p", &p)
-}
-
-// setError sets error only if not already set
-func (p *Pump) setError(e error) {
-	if p.Error == nil {
-		p.Error = e
-	}
-}
-
-// Server puts the Pump in server mode, meaning it will auto-detect security settings on
-// the incoming connnection such as use of SASL and SSL.
-// Must be called before Run()
-//
-func (p *Pump) Server() {
-	C.pn_transport_set_server(p.transport)
-}
-
-func (p *Pump) free() {
-	if p.connection != nil {
-		C.pn_connection_free(p.connection)
-	}
-	if p.transport != nil {
-		C.pn_transport_free(p.transport)
-	}
-	if p.collector != nil {
-		C.pn_collector_free(p.collector)
-	}
-	for _, h := range p.handlers {
-		switch h := h.(type) {
-		case cHandler:
-			C.pn_handler_free(h.pn)
-		}
-	}
-}
-
-// Close closes the AMQP connection, the net.Conn, and stops associated goroutines.
-// It will cause Run() to return. Run() may return earlier if the network disconnects
-// but you must still call Close() to clean everything up.
-//
-// Methods on values associated with the pump (Connections, Sessions, Links) will panic
-// if called after Close()
-//
-func (p *Pump) Close() error {
-	// If the pump is still running, inject a close. Either way wait for it to finish.
-	select {
-	case p.Inject <- func() { C.pn_connection_close(p.connection) }:
-		<-p.running // Wait to finish
-	case <-p.running: // Wait for goroutines to finish
-	}
-	delete(pumps, p.connection)
-	p.free()
-	return p.Error
-}
-
-// Run the pump. Normally called in a goroutine as: go pump.Run()
-// An error dunring Run is stored on p.Error.
-//
-func (p *Pump) Run() {
-	// Signal errors from the read/write goroutines. Don't block if we don't
-	// read all the errors, we only care about the first.
-	error := make(chan error, 2)
-	// FIXME aconway 2015-05-04: 	stop := make(chan struct{}) // Closed to signal that read/write should stop.
-
-	wait := sync.WaitGroup{}
-	wait.Add(2)
-
-	go func() { // Read goroutine
-		defer wait.Done()
-		for {
-			rbuf := p.read.buffer()
-			n, err := p.conn.Read(rbuf)
-			if n > 0 {
-				p.read.buffers <- rbuf[:n]
-			} else if err != nil {
-				close(p.read.buffers)
-				error <- err
-				return
-			}
-		}
-	}()
-
-	go func() { // Write goroutine
-		defer wait.Done()
-		for {
-			wbuf, ok := <-p.write.buffers
-			if !ok {
-				return
-			}
-			_, err := p.conn.Write(wbuf)
-			if err != nil {
-				error <- err
-				return
-			}
-		}
-	}()
-
-	wbuf := p.write.buffer()[:0]
-loop:
-	for {
-		if len(wbuf) == 0 {
-			p.pop(&wbuf)
-		}
-		// Don't set wchan unless there is something to write.
-		var wchan chan []byte
-		if len(wbuf) > 0 {
-			wchan = p.write.buffers
-		}
-
-		select {
-		case buf := <-p.read.buffers: // Read a buffer
-			p.push(buf)
-		case wchan <- wbuf: // Write a buffer
-			wbuf = p.write.buffer()[:0]
-		case f := <-p.Inject: // Function injected from another goroutine
-			f()
-		case err := <-error: // Read or write error
-			p.setError(err)
-			C.pn_transport_close_tail(p.transport)
-			C.pn_transport_close_head(p.transport)
-		}
-		if err := p.process(); err != nil {
-			p.setError(err)
-			break loop
-		}
-	}
-	close(p.write.buffers)
-	p.conn.Close()
-	wait.Wait()
-	close(p.running) // Signal goroutines have exited and Error is set.
-}
-
-func minInt(a, b int) int {
-	if a < b {
-		return a
-	} else {
-		return b
-	}
-}
-
-func (p *Pump) pop(buf *[]byte) {
-	pending := int(C.pn_transport_pending(p.transport))
-	switch {
-	case pending == int(C.PN_EOS):
-		*buf = (*buf)[:]
-		return
-	case pending < 0:
-		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
-	}
-	size := minInt(pending, cap(*buf))
-	*buf = (*buf)[:size]
-	if size == 0 {
-		return
-	}
-	C.memcpy(unsafe.Pointer(&(*buf)[0]), unsafe.Pointer(C.pn_transport_head(p.transport)), C.size_t(size))
-	C.pn_transport_pop(p.transport, C.size_t(size))
-}
-
-func (p *Pump) push(buf []byte) {
-	buf2 := buf
-	for len(buf2) > 0 {
-		n := int(C.pn_transport_push(p.transport, (*C.char)(unsafe.Pointer((&buf2[0]))), C.size_t(len(buf2))))
-		if n <= 0 {
-			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
-		}
-		buf2 = buf2[n:]
-	}
-}
-
-func (p *Pump) handle(e Event) error {
-	for _, h := range p.handlers {
-		if err := h.HandleEvent(e); err != nil {
-			return err
-		}
-	}
-	if e.Type() == ETransportClosed {
-		return io.EOF
-	}
-	return nil
-}
-
-func (p *Pump) process() error {
-	// FIXME aconway 2015-05-04: if a Handler returns error we should stop the pump
-	for ce := C.pn_collector_peek(p.collector); ce != nil; ce = C.pn_collector_peek(p.collector) {
-		e := makeEvent(ce)
-		if err := p.handle(e); err != nil {
-			return err
-		}
-		C.pn_collector_pop(p.collector)
-	}
-	return nil
-}
-
-// Connectoin gets the Pump's connection value.
-func (p *Pump) Connection() Connection { return Connection{p.connection} }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/wrappers.go
----------------------------------------------------------------------
diff --git a/go/event/wrappers.go b/go/event/wrappers.go
deleted file mode 100644
index 7043b9c..0000000
--- a/go/event/wrappers.go
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package event
-
-//#include <proton/codec.h>
-//#include <proton/connection.h>
-//#include <proton/session.h>
-//#include <proton/session.h>
-//#include <proton/delivery.h>
-//#include <proton/link.h>
-//#include <proton/event.h>
-//#include <proton/transport.h>
-//#include <proton/link.h>
-//#include <stdlib.h>
-import "C"
-
-import (
-	"fmt"
-	"qpid.apache.org/proton/go/internal"
-	"unsafe"
-)
-
-// FIXME aconway 2015-05-05: Documentation for generated types.
-
-// Event is an AMQP protocol event.
-type Event struct {
-	pn         *C.pn_event_t
-	eventType  EventType
-	connection Connection
-	session    Session
-	link       Link
-	delivery   Delivery
-}
-
-func makeEvent(pn *C.pn_event_t) Event {
-	return Event{
-		pn:         pn,
-		eventType:  EventType(C.pn_event_type(pn)),
-		connection: Connection{C.pn_event_connection(pn)},
-		session:    Session{C.pn_event_session(pn)},
-		link:       Link{C.pn_event_link(pn)},
-		delivery:   Delivery{C.pn_event_delivery(pn)},
-	}
-}
-func (e Event) IsNil() bool            { return e.eventType == EventType(0) }
-func (e Event) Type() EventType        { return e.eventType }
-func (e Event) Connection() Connection { return e.connection }
-func (e Event) Session() Session       { return e.session }
-func (e Event) Link() Link             { return e.link }
-func (e Event) Delivery() Delivery     { return e.delivery }
-func (e Event) String() string         { return e.Type().String() }
-
-// Data holds a pointer to decoded AMQP data.
-// Use amqp.marshal/unmarshal to access it as Go data types.
-//
-type Data struct{ pn *C.pn_data_t }
-
-func NewData(p unsafe.Pointer) Data { return Data{(*C.pn_data_t)(p)} }
-
-func (d Data) Free()                   { C.pn_data_free(d.pn) }
-func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
-func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
-func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
-func (d Data) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
-}
-
-// State holds the state flags for an AMQP endpoint.
-type State byte
-
-const (
-	SLocalUninit  State = C.PN_LOCAL_UNINIT
-	SLocalActive        = C.PN_LOCAL_ACTIVE
-	SLocalClosed        = C.PN_LOCAL_CLOSED
-	SRemoteUninit       = C.PN_REMOTE_UNINIT
-	SRemoteActive       = C.PN_REMOTE_ACTIVE
-	SRemoteClosed       = C.PN_REMOTE_CLOSED
-)
-
-// Is is True if bits & state is non 0.
-func (s State) Is(bits State) bool { return s&bits != 0 }
-
-// Return a State containig just the local flags
-func (s State) Local() State { return State(s & C.PN_LOCAL_MASK) }
-
-// Return a State containig just the remote flags
-func (s State) Remote() State { return State(s & C.PN_REMOTE_MASK) }
-
-// Endpoint is the common interface for Connection, Link and Session.
-type Endpoint interface {
-	// State is the open/closed state.
-	State() State
-	// Open an endpoint.
-	Open()
-	// Close an endpoint.
-	Close()
-	// Condition holds a local error condition.
-	Condition() Condition
-	// RemoteCondition holds a remote error condition.
-	RemoteCondition() Condition
-}
-
-const (
-	Received uint64 = C.PN_RECEIVED
-	Accepted        = C.PN_ACCEPTED
-	Rejected        = C.PN_REJECTED
-	Released        = C.PN_RELEASED
-	Modified        = C.PN_MODIFIED
-)
-
-// SettleAs is equivalent to d.Update(disposition); d.Settle()
-// It is a no-op if e does not have a delivery.
-func (d Delivery) SettleAs(disposition uint64) {
-	d.Update(disposition)
-	d.Settle()
-}
-
-// Accept accepts and settles a delivery.
-func (d Delivery) Accept() { d.SettleAs(Accepted) }
-
-// Reject rejects and settles a delivery
-func (d Delivery) Reject() { d.SettleAs(Rejected) }
-
-// Release releases and settles a delivery
-// If delivered is true the delivery count for the message will be increased.
-func (d Delivery) Release(delivered bool) {
-	if delivered {
-		d.SettleAs(Modified)
-	} else {
-		d.SettleAs(Released)
-	}
-}
-
-// FIXME aconway 2015-05-05: don't expose DeliveryTag as a C pointer, just as a String?
-
-type DeliveryTag struct{ pn C.pn_delivery_tag_t }
-
-func (t DeliveryTag) String() string { return C.GoStringN(t.pn.start, C.int(t.pn.size)) }
-
-func (l Link) Recv(buf []byte) int {
-	if len(buf) == 0 {
-		return 0
-	}
-	return int(C.pn_link_recv(l.pn, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))))
-}
-
-func (l Link) SendBytes(bytes []byte) int {
-	return int(C.pn_link_send(l.pn, cPtr(bytes), cLen(bytes)))
-}
-
-func pnTag(tag string) C.pn_delivery_tag_t {
-	bytes := []byte(tag)
-	return C.pn_dtag(cPtr(bytes), cLen(bytes))
-}
-
-func (l Link) Delivery(tag string) Delivery {
-	return Delivery{C.pn_delivery(l.pn, pnTag(tag))}
-}
-
-func cPtr(b []byte) *C.char {
-	if len(b) == 0 {
-		return nil
-	}
-	return (*C.char)(unsafe.Pointer(&b[0]))
-}
-
-func cLen(b []byte) C.size_t {
-	return C.size_t(len(b))
-}
-
-func (s Session) Sender(name string) Link {
-	cname := C.CString(name)
-	defer C.free(unsafe.Pointer(cname))
-	return Link{C.pn_sender(s.pn, cname)}
-}
-
-func (s Session) Receiver(name string) Link {
-	cname := C.CString(name)
-	defer C.free(unsafe.Pointer(cname))
-	return Link{C.pn_receiver(s.pn, cname)}
-}
-
-func joinId(a, b interface{}) string {
-	return fmt.Sprintf("%s/%s", a, b)
-}
-
-// Pump associated with this connection.
-func (c Connection) Pump() *Pump { return pumps[c.pn] }
-
-// Unique (per process) string identifier for a connection, useful for debugging.
-func (c Connection) String() string { return pumps[c.pn].String() }
-
-// Head functions don't follow the normal naming conventions so missed by the generator.
-
-func (c Connection) LinkHead(s State) Link {
-	return Link{C.pn_link_head(c.pn, C.pn_state_t(s))}
-}
-
-func (c Connection) SessionHead(s State) Session {
-	return Session{C.pn_session_head(c.pn, C.pn_state_t(s))}
-}
-
-// Unique (per process) string identifier for a session, including connection identifier.
-func (s Session) String() string {
-	return joinId(s.Connection(), fmt.Sprintf("%p", s.pn))
-}
-
-// Unique (per process) string identifier for a link, inlcuding session identifier.
-func (l Link) String() string {
-	return joinId(l.Session(), l.Name())
-}
-
-// Error returns an error interface corresponding to Condition.
-func (c Condition) Error() error {
-	if c.IsNil() {
-		return nil
-	} else {
-		return fmt.Errorf("%s: %s", c.Name(), c.Description())
-	}
-}
-
-// SetIfUnset sets name and description on a condition if it is not already set.
-func (c Condition) SetIfUnset(name, description string) {
-	if !c.IsSet() {
-		c.SetName(name)
-		c.SetDescription(description)
-	}
-}
-
-func (c Connection) Session() (Session, error) {
-	s := Session{C.pn_session(c.pn)}
-	if s.IsNil() {
-		return s, Connection(c).Error()
-	}
-	return s, nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/event/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/go/event/wrappers_gen.go b/go/event/wrappers_gen.go
deleted file mode 100644
index 73f0d3b..0000000
--- a/go/event/wrappers_gen.go
+++ /dev/null
@@ -1,732 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-//
-// NOTE: This file was generated by genwrap.go, do not edit it by hand.
-//
-
-package event
-
-import (
-	"qpid.apache.org/proton/go/internal"
-	"time"
-	"unsafe"
-)
-
-// #include <proton/types.h>
-// #include <proton/event.h>
-// #include <stdlib.h>
-// #include <proton/session.h>
-// #include <proton/link.h>
-// #include <proton/delivery.h>
-// #include <proton/disposition.h>
-// #include <proton/condition.h>
-// #include <proton/terminus.h>
-// #include <proton/connection.h>
-import "C"
-
-type EventType int
-
-const (
-	EConnectionInit         EventType = C.PN_CONNECTION_INIT
-	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
-	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
-	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
-	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
-	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
-	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
-	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
-	ESessionInit            EventType = C.PN_SESSION_INIT
-	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
-	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
-	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
-	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
-	ESessionFinal           EventType = C.PN_SESSION_FINAL
-	ELinkInit               EventType = C.PN_LINK_INIT
-	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
-	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
-	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
-	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
-	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
-	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
-	ELinkFlow               EventType = C.PN_LINK_FLOW
-	ELinkFinal              EventType = C.PN_LINK_FINAL
-	EDelivery               EventType = C.PN_DELIVERY
-	ETransport              EventType = C.PN_TRANSPORT
-	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
-	ETransportError         EventType = C.PN_TRANSPORT_ERROR
-	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
-	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
-	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
-)
-
-func (e EventType) String() string {
-	switch e {
-
-	case C.PN_CONNECTION_INIT:
-		return "ConnectionInit"
-	case C.PN_CONNECTION_BOUND:
-		return "ConnectionBound"
-	case C.PN_CONNECTION_UNBOUND:
-		return "ConnectionUnbound"
-	case C.PN_CONNECTION_LOCAL_OPEN:
-		return "ConnectionLocalOpen"
-	case C.PN_CONNECTION_REMOTE_OPEN:
-		return "ConnectionRemoteOpen"
-	case C.PN_CONNECTION_LOCAL_CLOSE:
-		return "ConnectionLocalClose"
-	case C.PN_CONNECTION_REMOTE_CLOSE:
-		return "ConnectionRemoteClose"
-	case C.PN_CONNECTION_FINAL:
-		return "ConnectionFinal"
-	case C.PN_SESSION_INIT:
-		return "SessionInit"
-	case C.PN_SESSION_LOCAL_OPEN:
-		return "SessionLocalOpen"
-	case C.PN_SESSION_REMOTE_OPEN:
-		return "SessionRemoteOpen"
-	case C.PN_SESSION_LOCAL_CLOSE:
-		return "SessionLocalClose"
-	case C.PN_SESSION_REMOTE_CLOSE:
-		return "SessionRemoteClose"
-	case C.PN_SESSION_FINAL:
-		return "SessionFinal"
-	case C.PN_LINK_INIT:
-		return "LinkInit"
-	case C.PN_LINK_LOCAL_OPEN:
-		return "LinkLocalOpen"
-	case C.PN_LINK_REMOTE_OPEN:
-		return "LinkRemoteOpen"
-	case C.PN_LINK_LOCAL_CLOSE:
-		return "LinkLocalClose"
-	case C.PN_LINK_REMOTE_CLOSE:
-		return "LinkRemoteClose"
-	case C.PN_LINK_LOCAL_DETACH:
-		return "LinkLocalDetach"
-	case C.PN_LINK_REMOTE_DETACH:
-		return "LinkRemoteDetach"
-	case C.PN_LINK_FLOW:
-		return "LinkFlow"
-	case C.PN_LINK_FINAL:
-		return "LinkFinal"
-	case C.PN_DELIVERY:
-		return "Delivery"
-	case C.PN_TRANSPORT:
-		return "Transport"
-	case C.PN_TRANSPORT_AUTHENTICATED:
-		return "TransportAuthenticated"
-	case C.PN_TRANSPORT_ERROR:
-		return "TransportError"
-	case C.PN_TRANSPORT_HEAD_CLOSED:
-		return "TransportHeadClosed"
-	case C.PN_TRANSPORT_TAIL_CLOSED:
-		return "TransportTailClosed"
-	case C.PN_TRANSPORT_CLOSED:
-		return "TransportClosed"
-	}
-	return "Unknown"
-}
-
-// Wrappers for declarations in session.h
-
-type Session struct{ pn *C.pn_session_t }
-
-func (s Session) IsNil() bool { return s.pn == nil }
-func (s Session) Free() {
-	C.pn_session_free(s.pn)
-}
-func (s Session) State() State {
-	return State(C.pn_session_state(s.pn))
-}
-func (s Session) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
-}
-func (s Session) Condition() Condition {
-	return Condition{C.pn_session_condition(s.pn)}
-}
-func (s Session) RemoteCondition() Condition {
-	return Condition{C.pn_session_remote_condition(s.pn)}
-}
-func (s Session) Connection() Connection {
-	return Connection{C.pn_session_connection(s.pn)}
-}
-func (s Session) Open() {
-	C.pn_session_open(s.pn)
-}
-func (s Session) Close() {
-	C.pn_session_close(s.pn)
-}
-func (s Session) IncomingCapacity() uint {
-	return uint(C.pn_session_get_incoming_capacity(s.pn))
-}
-func (s Session) SetIncomingCapacity(capacity uint) {
-	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
-}
-func (s Session) OutgoingBytes() uint {
-	return uint(C.pn_session_outgoing_bytes(s.pn))
-}
-func (s Session) IncomingBytes() uint {
-	return uint(C.pn_session_incoming_bytes(s.pn))
-}
-func (s Session) Next(state State) Session {
-	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
-}
-
-// Wrappers for declarations in link.h
-
-type SndSettleMode C.pn_snd_settle_mode_t
-
-const (
-	PnSndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
-	PnSndSettled   SndSettleMode = C.PN_SND_SETTLED
-	PnSndMixed     SndSettleMode = C.PN_SND_MIXED
-)
-
-func (e SndSettleMode) String() string {
-	switch e {
-
-	case C.PN_SND_UNSETTLED:
-		return "SndUnsettled"
-	case C.PN_SND_SETTLED:
-		return "SndSettled"
-	case C.PN_SND_MIXED:
-		return "SndMixed"
-	}
-	return "unknown"
-}
-
-type RcvSettleMode C.pn_rcv_settle_mode_t
-
-const (
-	PnRcvFirst  RcvSettleMode = C.PN_RCV_FIRST
-	PnRcvSecond RcvSettleMode = C.PN_RCV_SECOND
-)
-
-func (e RcvSettleMode) String() string {
-	switch e {
-
-	case C.PN_RCV_FIRST:
-		return "RcvFirst"
-	case C.PN_RCV_SECOND:
-		return "RcvSecond"
-	}
-	return "unknown"
-}
-
-type Link struct{ pn *C.pn_link_t }
-
-func (l Link) IsNil() bool { return l.pn == nil }
-func (l Link) Free() {
-	C.pn_link_free(l.pn)
-}
-func (l Link) Name() string {
-	return C.GoString(C.pn_link_name(l.pn))
-}
-func (l Link) IsSender() bool {
-	return bool(C.pn_link_is_sender(l.pn))
-}
-func (l Link) IsReceiver() bool {
-	return bool(C.pn_link_is_receiver(l.pn))
-}
-func (l Link) State() State {
-	return State(C.pn_link_state(l.pn))
-}
-func (l Link) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
-}
-func (l Link) Condition() Condition {
-	return Condition{C.pn_link_condition(l.pn)}
-}
-func (l Link) RemoteCondition() Condition {
-	return Condition{C.pn_link_remote_condition(l.pn)}
-}
-func (l Link) Session() Session {
-	return Session{C.pn_link_session(l.pn)}
-}
-func (l Link) Next(state State) Link {
-	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
-}
-func (l Link) Open() {
-	C.pn_link_open(l.pn)
-}
-func (l Link) Close() {
-	C.pn_link_close(l.pn)
-}
-func (l Link) Detach() {
-	C.pn_link_detach(l.pn)
-}
-func (l Link) Source() Terminus {
-	return Terminus{C.pn_link_source(l.pn)}
-}
-func (l Link) Target() Terminus {
-	return Terminus{C.pn_link_target(l.pn)}
-}
-func (l Link) RemoteSource() Terminus {
-	return Terminus{C.pn_link_remote_source(l.pn)}
-}
-func (l Link) RemoteTarget() Terminus {
-	return Terminus{C.pn_link_remote_target(l.pn)}
-}
-func (l Link) Current() Delivery {
-	return Delivery{C.pn_link_current(l.pn)}
-}
-func (l Link) Advance() bool {
-	return bool(C.pn_link_advance(l.pn))
-}
-func (l Link) Credit() int {
-	return int(C.pn_link_credit(l.pn))
-}
-func (l Link) Queued() int {
-	return int(C.pn_link_queued(l.pn))
-}
-func (l Link) RemoteCredit() int {
-	return int(C.pn_link_remote_credit(l.pn))
-}
-func (l Link) IsDrain() bool {
-	return bool(C.pn_link_get_drain(l.pn))
-}
-func (l Link) Drained() int {
-	return int(C.pn_link_drained(l.pn))
-}
-func (l Link) Available() int {
-	return int(C.pn_link_available(l.pn))
-}
-func (l Link) SndSettleMode() SndSettleMode {
-	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
-}
-func (l Link) RcvSettleMode() RcvSettleMode {
-	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
-}
-func (l Link) SetSndSettleMode(mode SndSettleMode) {
-	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
-}
-func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
-	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
-}
-func (l Link) RemoteSndSettleMode() SndSettleMode {
-	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
-}
-func (l Link) RemoteRcvSettleMode() RcvSettleMode {
-	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
-}
-func (l Link) Unsettled() int {
-	return int(C.pn_link_unsettled(l.pn))
-}
-func (l Link) Offered(credit int) {
-	C.pn_link_offered(l.pn, C.int(credit))
-}
-func (l Link) Flow(credit int) {
-	C.pn_link_flow(l.pn, C.int(credit))
-}
-func (l Link) Drain(credit int) {
-	C.pn_link_drain(l.pn, C.int(credit))
-}
-func (l Link) SetDrain(drain bool) {
-	C.pn_link_set_drain(l.pn, C.bool(drain))
-}
-func (l Link) Draining() bool {
-	return bool(C.pn_link_draining(l.pn))
-}
-
-// Wrappers for declarations in delivery.h
-
-type Delivery struct{ pn *C.pn_delivery_t }
-
-func (d Delivery) IsNil() bool { return d.pn == nil }
-func (d Delivery) Tag() DeliveryTag {
-	return DeliveryTag{C.pn_delivery_tag(d.pn)}
-}
-func (d Delivery) Link() Link {
-	return Link{C.pn_delivery_link(d.pn)}
-}
-func (d Delivery) Local() Disposition {
-	return Disposition{C.pn_delivery_local(d.pn)}
-}
-func (d Delivery) LocalState() uint64 {
-	return uint64(C.pn_delivery_local_state(d.pn))
-}
-func (d Delivery) Remote() Disposition {
-	return Disposition{C.pn_delivery_remote(d.pn)}
-}
-func (d Delivery) RemoteState() uint64 {
-	return uint64(C.pn_delivery_remote_state(d.pn))
-}
-func (d Delivery) Settled() bool {
-	return bool(C.pn_delivery_settled(d.pn))
-}
-func (d Delivery) Pending() uint {
-	return uint(C.pn_delivery_pending(d.pn))
-}
-func (d Delivery) Partial() bool {
-	return bool(C.pn_delivery_partial(d.pn))
-}
-func (d Delivery) Writable() bool {
-	return bool(C.pn_delivery_writable(d.pn))
-}
-func (d Delivery) Readable() bool {
-	return bool(C.pn_delivery_readable(d.pn))
-}
-func (d Delivery) Updated() bool {
-	return bool(C.pn_delivery_updated(d.pn))
-}
-func (d Delivery) Update(state uint64) {
-	C.pn_delivery_update(d.pn, C.uint64_t(state))
-}
-func (d Delivery) Clear() {
-	C.pn_delivery_clear(d.pn)
-}
-func (d Delivery) Current() bool {
-	return bool(C.pn_delivery_current(d.pn))
-}
-func (d Delivery) Settle() {
-	C.pn_delivery_settle(d.pn)
-}
-func (d Delivery) Dump() {
-	C.pn_delivery_dump(d.pn)
-}
-func (d Delivery) Buffered() bool {
-	return bool(C.pn_delivery_buffered(d.pn))
-}
-
-// Wrappers for declarations in disposition.h
-
-type Disposition struct{ pn *C.pn_disposition_t }
-
-func (d Disposition) IsNil() bool { return d.pn == nil }
-func (d Disposition) Type() uint64 {
-	return uint64(C.pn_disposition_type(d.pn))
-}
-func (d Disposition) Condition() Condition {
-	return Condition{C.pn_disposition_condition(d.pn)}
-}
-func (d Disposition) Data() Data {
-	return Data{C.pn_disposition_data(d.pn)}
-}
-func (d Disposition) SectionNumber() uint16 {
-	return uint16(C.pn_disposition_get_section_number(d.pn))
-}
-func (d Disposition) SetSectionNumber(section_number uint16) {
-	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
-}
-func (d Disposition) SectionOffset() uint64 {
-	return uint64(C.pn_disposition_get_section_offset(d.pn))
-}
-func (d Disposition) SetSectionOffset(section_offset uint64) {
-	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
-}
-func (d Disposition) IsFailed() bool {
-	return bool(C.pn_disposition_is_failed(d.pn))
-}
-func (d Disposition) SetFailed(failed bool) {
-	C.pn_disposition_set_failed(d.pn, C.bool(failed))
-}
-func (d Disposition) IsUndeliverable() bool {
-	return bool(C.pn_disposition_is_undeliverable(d.pn))
-}
-func (d Disposition) SetUndeliverable(undeliverable bool) {
-	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
-}
-func (d Disposition) Annotations() Data {
-	return Data{C.pn_disposition_annotations(d.pn)}
-}
-
-// Wrappers for declarations in condition.h
-
-type Condition struct{ pn *C.pn_condition_t }
-
-func (c Condition) IsNil() bool { return c.pn == nil }
-func (c Condition) IsSet() bool {
-	return bool(C.pn_condition_is_set(c.pn))
-}
-func (c Condition) Clear() {
-	C.pn_condition_clear(c.pn)
-}
-func (c Condition) Name() string {
-	return C.GoString(C.pn_condition_get_name(c.pn))
-}
-func (c Condition) SetName(name string) int {
-	nameC := C.CString(name)
-	defer C.free(unsafe.Pointer(nameC))
-
-	return int(C.pn_condition_set_name(c.pn, nameC))
-}
-func (c Condition) Description() string {
-	return C.GoString(C.pn_condition_get_description(c.pn))
-}
-func (c Condition) SetDescription(description string) int {
-	descriptionC := C.CString(description)
-	defer C.free(unsafe.Pointer(descriptionC))
-
-	return int(C.pn_condition_set_description(c.pn, descriptionC))
-}
-func (c Condition) Info() Data {
-	return Data{C.pn_condition_info(c.pn)}
-}
-func (c Condition) IsRedirect() bool {
-	return bool(C.pn_condition_is_redirect(c.pn))
-}
-func (c Condition) RedirectHost() string {
-	return C.GoString(C.pn_condition_redirect_host(c.pn))
-}
-func (c Condition) RedirectPort() int {
-	return int(C.pn_condition_redirect_port(c.pn))
-}
-
-// Wrappers for declarations in terminus.h
-
-type TerminusType C.pn_terminus_type_t
-
-const (
-	PnUnspecified TerminusType = C.PN_UNSPECIFIED
-	PnSource      TerminusType = C.PN_SOURCE
-	PnTarget      TerminusType = C.PN_TARGET
-	PnCoordinator TerminusType = C.PN_COORDINATOR
-)
-
-func (e TerminusType) String() string {
-	switch e {
-
-	case C.PN_UNSPECIFIED:
-		return "Unspecified"
-	case C.PN_SOURCE:
-		return "Source"
-	case C.PN_TARGET:
-		return "Target"
-	case C.PN_COORDINATOR:
-		return "Coordinator"
-	}
-	return "unknown"
-}
-
-type Durability C.pn_durability_t
-
-const (
-	PnNondurable    Durability = C.PN_NONDURABLE
-	PnConfiguration Durability = C.PN_CONFIGURATION
-	PnDeliveries    Durability = C.PN_DELIVERIES
-)
-
-func (e Durability) String() string {
-	switch e {
-
-	case C.PN_NONDURABLE:
-		return "Nondurable"
-	case C.PN_CONFIGURATION:
-		return "Configuration"
-	case C.PN_DELIVERIES:
-		return "Deliveries"
-	}
-	return "unknown"
-}
-
-type ExpiryPolicy C.pn_expiry_policy_t
-
-const (
-	PnExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
-	PnExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
-	PnExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
-	PnExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
-)
-
-func (e ExpiryPolicy) String() string {
-	switch e {
-
-	case C.PN_EXPIRE_WITH_LINK:
-		return "ExpireWithLink"
-	case C.PN_EXPIRE_WITH_SESSION:
-		return "ExpireWithSession"
-	case C.PN_EXPIRE_WITH_CONNECTION:
-		return "ExpireWithConnection"
-	case C.PN_EXPIRE_NEVER:
-		return "ExpireNever"
-	}
-	return "unknown"
-}
-
-type DistributionMode C.pn_distribution_mode_t
-
-const (
-	PnDistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
-	PnDistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
-	PnDistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
-)
-
-func (e DistributionMode) String() string {
-	switch e {
-
-	case C.PN_DIST_MODE_UNSPECIFIED:
-		return "DistModeUnspecified"
-	case C.PN_DIST_MODE_COPY:
-		return "DistModeCopy"
-	case C.PN_DIST_MODE_MOVE:
-		return "DistModeMove"
-	}
-	return "unknown"
-}
-
-type Terminus struct{ pn *C.pn_terminus_t }
-
-func (t Terminus) IsNil() bool { return t.pn == nil }
-func (t Terminus) Type() TerminusType {
-	return TerminusType(C.pn_terminus_get_type(t.pn))
-}
-func (t Terminus) SetType(type_ TerminusType) int {
-	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
-}
-func (t Terminus) Address() string {
-	return C.GoString(C.pn_terminus_get_address(t.pn))
-}
-func (t Terminus) SetAddress(address string) int {
-	addressC := C.CString(address)
-	defer C.free(unsafe.Pointer(addressC))
-
-	return int(C.pn_terminus_set_address(t.pn, addressC))
-}
-func (t Terminus) SetDistributionMode(mode DistributionMode) int {
-	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
-}
-func (t Terminus) Durability() Durability {
-	return Durability(C.pn_terminus_get_durability(t.pn))
-}
-func (t Terminus) SetDurability(durability Durability) int {
-	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
-}
-func (t Terminus) ExpiryPolicy() ExpiryPolicy {
-	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
-}
-func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
-	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
-}
-func (t Terminus) Timeout() time.Duration {
-	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
-}
-func (t Terminus) SetTimeout(timeout time.Duration) int {
-	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
-}
-func (t Terminus) IsDynamic() bool {
-	return bool(C.pn_terminus_is_dynamic(t.pn))
-}
-func (t Terminus) SetDynamic(dynamic bool) int {
-	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
-}
-func (t Terminus) Properties() Data {
-	return Data{C.pn_terminus_properties(t.pn)}
-}
-func (t Terminus) Capabilities() Data {
-	return Data{C.pn_terminus_capabilities(t.pn)}
-}
-func (t Terminus) Outcomes() Data {
-	return Data{C.pn_terminus_outcomes(t.pn)}
-}
-func (t Terminus) Filter() Data {
-	return Data{C.pn_terminus_filter(t.pn)}
-}
-func (t Terminus) Copy(src Terminus) int {
-	return int(C.pn_terminus_copy(t.pn, src.pn))
-}
-
-// Wrappers for declarations in connection.h
-
-type Connection struct{ pn *C.pn_connection_t }
-
-func (c Connection) IsNil() bool { return c.pn == nil }
-func (c Connection) Free() {
-	C.pn_connection_free(c.pn)
-}
-func (c Connection) Release() {
-	C.pn_connection_release(c.pn)
-}
-func (c Connection) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
-}
-func (c Connection) State() State {
-	return State(C.pn_connection_state(c.pn))
-}
-func (c Connection) Open() {
-	C.pn_connection_open(c.pn)
-}
-func (c Connection) Close() {
-	C.pn_connection_close(c.pn)
-}
-func (c Connection) Reset() {
-	C.pn_connection_reset(c.pn)
-}
-func (c Connection) Condition() Condition {
-	return Condition{C.pn_connection_condition(c.pn)}
-}
-func (c Connection) RemoteCondition() Condition {
-	return Condition{C.pn_connection_remote_condition(c.pn)}
-}
-func (c Connection) Container() string {
-	return C.GoString(C.pn_connection_get_container(c.pn))
-}
-func (c Connection) SetContainer(container string) {
-	containerC := C.CString(container)
-	defer C.free(unsafe.Pointer(containerC))
-
-	C.pn_connection_set_container(c.pn, containerC)
-}
-func (c Connection) SetUser(user string) {
-	userC := C.CString(user)
-	defer C.free(unsafe.Pointer(userC))
-
-	C.pn_connection_set_user(c.pn, userC)
-}
-func (c Connection) SetPassword(password string) {
-	passwordC := C.CString(password)
-	defer C.free(unsafe.Pointer(passwordC))
-
-	C.pn_connection_set_password(c.pn, passwordC)
-}
-func (c Connection) User() string {
-	return C.GoString(C.pn_connection_get_user(c.pn))
-}
-func (c Connection) Hostname() string {
-	return C.GoString(C.pn_connection_get_hostname(c.pn))
-}
-func (c Connection) SetHostname(hostname string) {
-	hostnameC := C.CString(hostname)
-	defer C.free(unsafe.Pointer(hostnameC))
-
-	C.pn_connection_set_hostname(c.pn, hostnameC)
-}
-func (c Connection) RemoteContainer() string {
-	return C.GoString(C.pn_connection_remote_container(c.pn))
-}
-func (c Connection) RemoteHostname() string {
-	return C.GoString(C.pn_connection_remote_hostname(c.pn))
-}
-func (c Connection) OfferedCapabilities() Data {
-	return Data{C.pn_connection_offered_capabilities(c.pn)}
-}
-func (c Connection) DesiredCapabilities() Data {
-	return Data{C.pn_connection_desired_capabilities(c.pn)}
-}
-func (c Connection) Properties() Data {
-	return Data{C.pn_connection_properties(c.pn)}
-}
-func (c Connection) RemoteOfferedCapabilities() Data {
-	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
-}
-func (c Connection) RemoteDesiredCapabilities() Data {
-	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
-}
-func (c Connection) RemoteProperties() Data {
-	return Data{C.pn_connection_remote_properties(c.pn)}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/internal/error.go
----------------------------------------------------------------------
diff --git a/go/internal/error.go b/go/internal/error.go
deleted file mode 100644
index 01ba890..0000000
--- a/go/internal/error.go
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Internal implementation details - ignore.
-package internal
-
-// #cgo LDFLAGS: -lqpid-proton
-// #include <proton/error.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"fmt"
-	"runtime"
-	"sync"
-	"sync/atomic"
-	"unsafe"
-)
-
-// Error type for all proton errors.
-type Error string
-
-// Error prefixes error message with proton:
-func (e Error) Error() string {
-	return "proton: " + string(e)
-}
-
-// Errorf creates an Error with a formatted message
-func Errorf(format string, a ...interface{}) Error {
-	return Error(fmt.Sprintf(format, a...))
-}
-
-type PnErrorCode int
-
-func (e PnErrorCode) String() string {
-	switch e {
-	case C.PN_EOS:
-		return "end-of-data"
-	case C.PN_ERR:
-		return "error"
-	case C.PN_OVERFLOW:
-		return "overflow"
-	case C.PN_UNDERFLOW:
-		return "underflow"
-	case C.PN_STATE_ERR:
-		return "bad-state"
-	case C.PN_ARG_ERR:
-		return "invalid-argument"
-	case C.PN_TIMEOUT:
-		return "timeout"
-	case C.PN_INTR:
-		return "interrupted"
-	case C.PN_INPROGRESS:
-		return "in-progress"
-	default:
-		return fmt.Sprintf("unknown-error(%d)", e)
-	}
-}
-
-func PnError(p unsafe.Pointer) error {
-	e := (*C.pn_error_t)(p)
-	if e == nil || C.pn_error_code(e) == 0 {
-		return nil
-	}
-	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
-}
-
-// DoRecover is called to recover from internal panics
-func DoRecover(err *error) {
-	r := recover()
-	switch r := r.(type) {
-	case nil: // We are not recovering
-		return
-	case runtime.Error: // Don't catch runtime.Error
-		panic(r)
-	case error:
-		*err = r
-	default:
-		panic(r)
-	}
-}
-
-// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
-func panicIf(condition bool, fmt string, args ...interface{}) {
-	if condition {
-		panic(Errorf(fmt, args...))
-	}
-}
-
-// FirstError is a goroutine-safe error holder that keeps the first error that is set.
-type FirstError struct {
-	err  atomic.Value
-	once sync.Once
-}
-
-// Set the error if not allread set.
-func (e *FirstError) Set(err error) {
-	e.once.Do(func() { e.err.Store(err) })
-}
-
-// Get the error.
-func (e *FirstError) Get() error {
-	v := e.err.Load()
-	if v != nil {
-		return v.(error)
-	} else {
-		return nil
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/messaging/doc.go
----------------------------------------------------------------------
diff --git a/go/messaging/doc.go b/go/messaging/doc.go
deleted file mode 100644
index c815f4e..0000000
--- a/go/messaging/doc.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-/*
-Package messaging provides a procedural, concurrent Go API for exchanging AMQP messages.
-*/
-package messaging
-
-// #cgo LDFLAGS: -lqpid-proton
-import "C"
-
-// Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/messaging/handler.go
----------------------------------------------------------------------
diff --git a/go/messaging/handler.go b/go/messaging/handler.go
deleted file mode 100644
index 4a97b9d..0000000
--- a/go/messaging/handler.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package messaging
-
-import (
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-)
-
-// FIXME aconway 2015-04-28: cleanup - exposing delivery vs. disposition.
-
-type acksMap map[event.Delivery]chan Disposition
-type receiverMap map[event.Link]chan amqp.Message
-
-type handler struct {
-	connection *Connection
-	acks       acksMap
-	receivers  receiverMap
-}
-
-func newHandler(c *Connection) *handler {
-	return &handler{c, make(acksMap), make(receiverMap)}
-}
-
-func (h *handler) HandleMessagingEvent(t event.MessagingEventType, e event.Event) error {
-	switch t {
-	// FIXME aconway 2015-04-29: handle errors.
-	case event.MConnectionClosed:
-		for _, ack := range h.acks {
-			// FIXME aconway 2015-04-29: communicate error info
-			close(ack)
-		}
-
-	case event.MSettled:
-		ack := h.acks[e.Delivery()]
-		if ack != nil {
-			ack <- Disposition(e.Delivery().Remote().Type())
-			close(ack)
-			delete(h.acks, e.Delivery())
-		}
-
-	case event.MMessage:
-		r := h.receivers[e.Link()]
-		if r != nil {
-			m, _ := event.DecodeMessage(e)
-			// FIXME aconway 2015-04-29: hack, direct send, possible blocking.
-			r <- m
-		} else {
-			// FIXME aconway 2015-04-29: Message with no receiver - log? panic? deadletter? drop?
-		}
-	}
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/go/messaging/messaging.go
----------------------------------------------------------------------
diff --git a/go/messaging/messaging.go b/go/messaging/messaging.go
deleted file mode 100644
index e653de2..0000000
--- a/go/messaging/messaging.go
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package messaging
-
-// #include <proton/disposition.h>
-import "C"
-
-import (
-	"net"
-	"qpid.apache.org/proton/go/amqp"
-	"qpid.apache.org/proton/go/event"
-)
-
-// Connection is a connection to a remote AMQP endpoint.
-//
-// You can set exported fields to configure the connection before calling
-// Connection.Open()
-//
-type Connection struct {
-	// Server = true means a the connection will do automatic protocol detection.
-	Server bool
-
-	// FIXME aconway 2015-04-17: Other parameters to set up SSL, SASL etc.
-
-	handler *handler
-	pump    *event.Pump
-	session Session
-}
-
-// Make an AMQP connection over a net.Conn connection.
-//
-// Use Connection.Close() to close the Connection, this will also close conn.
-// Using conn.Close() directly will cause an abrupt disconnect rather than an
-// orderly AMQP close.
-//
-func (c *Connection) Open(conn net.Conn) (err error) {
-	c.handler = newHandler(c)
-	c.pump, err = event.NewPump(conn,
-		event.NewMessagingDelegator(c.handler),
-	)
-	if err != nil {
-		return err
-	}
-	if c.Server {
-		c.pump.Server()
-	}
-	go c.pump.Run()
-	return nil
-}
-
-// Connect opens a default client connection. It is a shortcut for
-//    c := &Connection
-//    c.Open()
-//
-func Connect(conn net.Conn) (*Connection, error) {
-	c := &Connection{}
-	err := c.Open(conn)
-	return c, err
-}
-
-// Close the connection.
-//
-// Connections must be closed to clean up resources and stop associated goroutines.
-func (c *Connection) Close() error { return c.pump.Close() }
-
-// DefaultSession returns a default session for the connection.
-//
-// It is created on the first call to DefaultSession() and returned from all subsequent calls.
-// Use Session() for more control over creating sessions.
-//
-func (c *Connection) DefaultSession() (s Session, err error) {
-	if c.session.e.IsNil() {
-		c.session, err = c.Session()
-	}
-	return c.session, err
-}
-
-type sessionErr struct {
-	s   event.Session
-	err error
-}
-
-// Session creates a new session.
-func (c *Connection) Session() (Session, error) {
-	connection := c.pump.Connection()
-	result := make(chan sessionErr)
-	c.pump.Inject <- func() {
-		s, err := connection.Session()
-		if err == nil {
-			s.Open()
-		}
-		result <- sessionErr{s, err}
-	}
-	se := <-result
-	return Session{se.s, c.pump}, se.err
-}
-
-// FIXME aconway 2015-04-27: set sender name, options etc.
-
-// Sender creates a Sender that will send messages to the address addr.
-func (c *Connection) Sender(addr string) (s Sender, err error) {
-	session, err := c.DefaultSession()
-	if err != nil {
-		return Sender{}, err
-	}
-	result := make(chan Sender)
-	c.pump.Inject <- func() {
-		link := session.e.Sender(linkNames.Next())
-		if link.IsNil() {
-			err = session.e.Error()
-		} else {
-			link.Target().SetAddress(addr)
-			// FIXME aconway 2015-04-27: link options?
-			link.Open()
-		}
-		result <- Sender{Link{c, link}}
-	}
-	return <-result, err
-}
-
-// Receiver returns a receiver that will receive messages sent to address addr.
-func (c *Connection) Receiver(addr string) (r Receiver, err error) {
-	// FIXME aconway 2015-04-29: move code to session, in link.go?
-	session, err := c.DefaultSession()
-	if err != nil {
-		return Receiver{}, err
-	}
-	result := make(chan Receiver)
-	c.pump.Inject <- func() {
-		link := session.e.Receiver(linkNames.Next())
-		if link.IsNil() {
-			err = session.e.Error()
-		} else {
-			link.Source().SetAddress(addr)
-			// FIXME aconway 2015-04-27: link options?
-			link.Open()
-		}
-		// FIXME aconway 2015-04-29: hack to avoid blocking, need proper buffering linked to flow control
-		rchan := make(chan amqp.Message, 1000)
-		c.handler.receivers[link] = rchan
-		result <- Receiver{Link{c, link}, rchan}
-	}
-	return <-result, err
-}
-
-// FIXME aconway 2015-04-29: counter per session.
-var linkNames amqp.UidCounter
-
-// Session is an AMQP session, it contains Senders and Receivers.
-// Every Connection has a DefaultSession, you can create additional sessions
-// with Connection.Session()
-type Session struct {
-	e    event.Session
-	pump *event.Pump
-}
-
-// FIXME aconway 2015-05-05: REWORK Sender/receiver/session.
-
-// Disposition indicates the outcome of a settled message delivery.
-type Disposition uint64
-
-const (
-	// Message was accepted by the receiver
-	Accepted Disposition = C.PN_ACCEPTED
-	// Message was rejected as invalid by the receiver
-	Rejected = C.PN_REJECTED
-	// Message was not processed by the receiver but may be processed by some other receiver.
-	Released = C.PN_RELEASED
-)
-
-// String human readable name for a Disposition.
-func (d Disposition) String() string {
-	switch d {
-	case Accepted:
-		return "Accepted"
-	case Rejected:
-		return "Rejected"
-	case Released:
-		return "Released"
-	default:
-		return "Unknown"
-	}
-}
-
-// FIXME aconway 2015-04-29: How to signal errors via ack channels.
-
-// An Acknowledgement is a channel which will receive the Disposition of the message
-// when it is acknowledged. The channel is closed after the disposition is sent.
-type Acknowledgement <-chan Disposition
-
-// Link has common data and methods for Sender and Receiver links.
-type Link struct {
-	connection *Connection
-	elink      event.Link
-}
-
-// Sender sends messages.
-type Sender struct {
-	Link
-}
-
-// FIXME aconway 2015-04-28: allow user to specify delivery tag.
-// FIXME aconway 2015-04-28: should we provide a sending channel rather than a send function?
-
-// Send sends a message. If d is not nil, the disposition is retured on d.
-// If d is nil the message is sent pre-settled and no disposition is returned.
-func (s *Sender) Send(m amqp.Message) (ack Acknowledgement, err error) {
-	ackChan := make(chan Disposition, 1)
-	ack = ackChan
-	s.connection.pump.Inject <- func() {
-		// FIXME aconway 2015-04-28: flow control & credit, buffer or fail?
-		delivery, err := s.elink.Send(m)
-		if err == nil { // FIXME aconway 2015-04-28: error handling
-			s.connection.handler.acks[delivery] = ackChan
-		}
-	}
-	return ack, nil
-}
-
-// Close the sender.
-func (s *Sender) Close() error { return nil } // FIXME aconway 2015-04-27: close/free
-
-// Receiver receives messages via the channel Receive.
-type Receiver struct {
-	Link
-	// Channel of messag
-	Receive <-chan amqp.Message
-}
-
-// FIXME aconway 2015-04-29: settlement - ReceivedMessage with Settle() method?
-
-// Close the Receiver.
-func (r *Receiver) Close() error { return nil } // FIXME aconway 2015-04-29: close/free

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/CMakeLists.txt b/proton-c/bindings/CMakeLists.txt
index 693e533..4508adf 100644
--- a/proton-c/bindings/CMakeLists.txt
+++ b/proton-c/bindings/CMakeLists.txt
@@ -19,7 +19,7 @@
 
 # Add bindings that do not require swig here - the directory name must be the same as the binding name
 # See below for swig bindings
-set(BINDINGS javascript cpp)
+set(BINDINGS javascript cpp go)
 
 # Prerequisites for javascript.
 #
@@ -36,6 +36,13 @@ if (CMAKE_CXX_COMPILER)
   set (DEFAULT_CPP ON)
 endif (CMAKE_CXX_COMPILER)
 
+# Prerequisites for Go
+find_program(GO_EXE go)
+mark_as_advanced(GO_EXE)
+if (GO_EXE)
+  set (DEFAULT_GO ON)
+endif (GO_EXE)
+
 if(SWIG_FOUND)
   # Add any new swig bindings here - the directory name must be the same as the binding name
   list(APPEND BINDINGS python ruby php perl)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/CMakeLists.txt b/proton-c/bindings/go/CMakeLists.txt
new file mode 100644
index 0000000..ea6238f
--- /dev/null
+++ b/proton-c/bindings/go/CMakeLists.txt
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# FIXME aconway 2015-05-20: install targets for go source.
+
+set(GO_BUILD_FLAGS "" CACHE STRING "Flags for 'go build'")
+set(GO_TEST_FLAGS "-v" CACHE STRING "Flags for 'go test'")
+
+separate_arguments(GO_BUILD_FLAGS)
+separate_arguments(GO_TEST_FLAGS)
+list(APPEND GO_BUILD_FLAGS "-ldflags=-r ${CMAKE_BINARY_DIR}/proton-c")
+
+if (BUILD_GO)
+  # Build in the source tree, go tools aren't friendly otherwise.
+  # All build output goes in git-ignored pkg or bin subdirectories.
+  set(qgo "qpid.apache.org/proton/go")
+  set(packages ${qgo}/amqp ${qgo}/event ${qgo}/messaging)
+
+  # Following are CACHE INTERNAL so examples/CMakeLists.txt can see them.
+  set(GO_ENV ${env_py} --
+    "GOPATH=${CMAKE_CURRENT_SOURCE_DIR}"
+    "CGO_CFLAGS=-I${CMAKE_SOURCE_DIR}/proton-c/include"
+    "CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/proton-c"
+    ${GO_EXE} CACHE INTERNAL "Run go with environment set"
+    )
+  set(GO_BUILD ${GO_ENV} build ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go build")
+  set(GO_TEST ${GO_ENV} test ${GO_BUILD_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
+
+  add_test(NAME go_package_test COMMAND ${GO_TEST} ${packages})
+
+  set (GO_INSTALL_DIR ${SHARE_INSTALL_DIR}/gocode/src CACHE PATH "Installation directory for Go code")
+  mark_as_advanced (GO_INSTALL_DIR)
+  install(DIRECTORY src/qpid.apache.org DESTINATION ${GO_INSTALL_DIR} COMPONENT Go)
+
+endif(BUILD_GO)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7cecb8ed/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
new file mode 100644
index 0000000..2b73583
--- /dev/null
+++ b/proton-c/bindings/go/README.md
@@ -0,0 +1,142 @@
+# *EXPERIMENTAL* Go binding for proton
+
+    NOTE: The go directory is in the proton repository root with a symlink at
+    proton-c/bindings/go to facilitate use of go tools: go get, godep and godoc.
+    There may be a cleaner solution to this in future.
+
+This is the beginning of a [Go](http://golang.org) binding for proton.
+
+This work is in early *experimental* stages, *everything* may change in future.
+Comments and contributions are strongly encouraged, this experiment is public so
+early feedback can guide development.
+
+- Email <pr...@qpid.apache.org>
+- Create issues <https://issues.apache.org/jira/browse/PROTON>, attach patches to an issue.
+
+There are working [examples](../examples/go/README.md) and the examples README file
+explains how to install the packages in your go workspace and read the documentation.
+
+## Goals
+
+The API should
+
+- be idiomatic, unsurprising, and easy to use for Go developers.
+- support client and server development.
+- make simple tasks simple.
+- provide deep access to AMQP protocol when that is required.
+
+There are two types of developer we want to support
+
+1. Go developers using AMQP as a message transport:
+   - Straightforward conversions between Go built-in types and AMQP types.
+   - Easy message exchange via Go channels to support use in goroutines.
+
+2. AMQP-aware developers using Go as an implementation language:
+   - Go types to exactly represent all AMQP types and encoding details.
+   - Full access to detailed AMQP concepts: sessions, links, deliveries etc.
+
+## Status
+
+There are 3 go packages for proton:
+
+- qpid.apache.org/proton/go/amqp: converts AMQP messages and data types to and from Go data types.
+- qpid.apache.org/proton/go/messaging: easy-to-use, concurrent API for messaging clients and servers.
+- qpid.apache.org/proton/go/event: full low-level access to the proton engine.
+
+Most applications should use the `messaging` package. The `event` package is for
+applications that need low-level access to the proton engine.
+
+The `event` package is fairly complete, with the exception of the proton
+reactor. It's unclear if the reactor is important for go.
+
+The `messaging` package can run the examples but probably not much else. There
+is work to do on error handling and the API may change.
+
+There are working [examples](../../../examples/go/README.md) of a broker using `event` and
+a sender and receiver using `messaging`.
+
+## The event driven API
+
+See the package documentation for details.
+
+## The Go API
+
+The goal: A procedural API that allows any user goroutine to send and receive
+AMQP messages and other information (acknowledgments, flow control instructions
+etc.) using channels. There will be no user-visible locks and no need to run
+user code in special goroutines, e.g. as handlers in a proton event loop.
+
+See the package documentation for emerging details.
+
+Currently using a channel to receive messages, a function to send them (channels
+internally) and a channel as a "future" for acknowledgements to senders. This
+may change.
+
+## Why a separate API for Go?
+
+Go is a concurrent language and encourages applications to be divided into
+concurrent *goroutines*. It provides traditional locking but it encourages the
+use *channels* to communicate between goroutines without explicit locks:
+
+  "Share memory by communicating, don't communicate by sharing memory"
+
+The idea is that a given value is only operated on by one goroutine at a time,
+but values can easily be passed from one goroutine to another. This removes much
+of the need for locking.
+
+Go literature distinguishes between:
+
+- *concurrency*: "keeping track of things that could be done in parallel"
+- *parallelism*: "actually doing things in parallel"
+
+The application expresses concurrency by starting goroutines for potentially
+concurrent tasks. The Go run-times schedule the activity of goroutines onto a
+small number (possibly one) of actual parallel executions.
+
+Even with *no* parallelism, concurrency lets the Go run-times *order* work with
+respect to events like file descriptors being readable/writable, channels having
+data, timers firing etc. Go automatically takes care of switching out goroutines
+that block or sleep so it is normal to write code in terms of blocking calls.
+
+Event-driven API (like poll, epoll, select or the proton event API) also
+channel unpredictably ordered events to actions in one or a small pool of
+execution threads. However this requires a different style of programming:
+"event-driven" or "reactive" programming. Go developers call it "inside-out"
+programming. In an event-driven architecture blocking is a big problem as it
+consumes a scarce thread of execution, so actions that take time to complete
+have to be re-structured in terms of future event delivery.
+
+The promise of Go is that you can express your application in concurrent,
+procedural terms with simple blocking calls and the Go run-times will turn it
+inside-out for you. Write as many goroutines as you want, and let Go interleave
+and schedule them efficiently.
+
+For example: the Go equivalent of listening for connections is a goroutine with
+a simple endless loop that calls a blocking Listen() function and starts a
+goroutine for each new connection. Each connection has its own goroutine that
+deals with just that connection till it closes.
+
+The benefit is that the variables and logic live closer together. Once you're in
+a goroutine, you have everything you need in local variables, and they are
+preserved across blocking calls. There's no need to store details in context
+objects that you have to look up when handling a later event to figure out how
+to continue where you left off.
+
+So a Go-like proton API does not force the users code to run in an event-loop
+goroutine. Instead user goroutines communicate with the event loop(s) via
+channels.  There's no need to funnel connections into one event loop, in fact it
+makes no sense.  Connections can be processed concurrently so they should be
+processed in separate goroutines and left to Go to schedule. User goroutines can
+have simple loops that block channels till messages are available, the user can
+start as many or as few such goroutines as they wish to implement concurrency as
+simple or as complex as they wish. For example blocking request-response
+vs. asynchronous flows of messages and acknowledgments.
+
+## New to Go?
+
+If you are new to Go then these are a good place to start:
+
+- [A Tour of Go](http://tour.golang.org)
+- [Effective Go](http://golang.org/doc/effective_go.html)
+
+Then look at the tools and library docs at <http://golang.org> as you need them.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[25/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
new file mode 100644
index 0000000..82de2cf
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
@@ -0,0 +1,874 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+//
+// NOTE: DO NOT EDIT. This file was generated by genwrap.go from the proton header files.
+// Update the generator and re-run if you need to modify this code.
+//
+
+package proton
+
+import (
+	"qpid.apache.org/proton/internal"
+	"time"
+	"unsafe"
+)
+
+// #include <proton/types.h>
+// #include <proton/event.h>
+// #include <stdlib.h>
+// #include <proton/session.h>
+// #include <proton/link.h>
+// #include <proton/delivery.h>
+// #include <proton/disposition.h>
+// #include <proton/condition.h>
+// #include <proton/terminus.h>
+// #include <proton/connection.h>
+// #include <proton/transport.h>
+import "C"
+
+type EventType int
+
+const (
+	EConnectionInit         EventType = C.PN_CONNECTION_INIT
+	EConnectionBound        EventType = C.PN_CONNECTION_BOUND
+	EConnectionUnbound      EventType = C.PN_CONNECTION_UNBOUND
+	EConnectionLocalOpen    EventType = C.PN_CONNECTION_LOCAL_OPEN
+	EConnectionRemoteOpen   EventType = C.PN_CONNECTION_REMOTE_OPEN
+	EConnectionLocalClose   EventType = C.PN_CONNECTION_LOCAL_CLOSE
+	EConnectionRemoteClose  EventType = C.PN_CONNECTION_REMOTE_CLOSE
+	EConnectionFinal        EventType = C.PN_CONNECTION_FINAL
+	ESessionInit            EventType = C.PN_SESSION_INIT
+	ESessionLocalOpen       EventType = C.PN_SESSION_LOCAL_OPEN
+	ESessionRemoteOpen      EventType = C.PN_SESSION_REMOTE_OPEN
+	ESessionLocalClose      EventType = C.PN_SESSION_LOCAL_CLOSE
+	ESessionRemoteClose     EventType = C.PN_SESSION_REMOTE_CLOSE
+	ESessionFinal           EventType = C.PN_SESSION_FINAL
+	ELinkInit               EventType = C.PN_LINK_INIT
+	ELinkLocalOpen          EventType = C.PN_LINK_LOCAL_OPEN
+	ELinkRemoteOpen         EventType = C.PN_LINK_REMOTE_OPEN
+	ELinkLocalClose         EventType = C.PN_LINK_LOCAL_CLOSE
+	ELinkRemoteClose        EventType = C.PN_LINK_REMOTE_CLOSE
+	ELinkLocalDetach        EventType = C.PN_LINK_LOCAL_DETACH
+	ELinkRemoteDetach       EventType = C.PN_LINK_REMOTE_DETACH
+	ELinkFlow               EventType = C.PN_LINK_FLOW
+	ELinkFinal              EventType = C.PN_LINK_FINAL
+	EDelivery               EventType = C.PN_DELIVERY
+	ETransport              EventType = C.PN_TRANSPORT
+	ETransportAuthenticated EventType = C.PN_TRANSPORT_AUTHENTICATED
+	ETransportError         EventType = C.PN_TRANSPORT_ERROR
+	ETransportHeadClosed    EventType = C.PN_TRANSPORT_HEAD_CLOSED
+	ETransportTailClosed    EventType = C.PN_TRANSPORT_TAIL_CLOSED
+	ETransportClosed        EventType = C.PN_TRANSPORT_CLOSED
+)
+
+func (e EventType) String() string {
+	switch e {
+
+	case C.PN_CONNECTION_INIT:
+		return "ConnectionInit"
+	case C.PN_CONNECTION_BOUND:
+		return "ConnectionBound"
+	case C.PN_CONNECTION_UNBOUND:
+		return "ConnectionUnbound"
+	case C.PN_CONNECTION_LOCAL_OPEN:
+		return "ConnectionLocalOpen"
+	case C.PN_CONNECTION_REMOTE_OPEN:
+		return "ConnectionRemoteOpen"
+	case C.PN_CONNECTION_LOCAL_CLOSE:
+		return "ConnectionLocalClose"
+	case C.PN_CONNECTION_REMOTE_CLOSE:
+		return "ConnectionRemoteClose"
+	case C.PN_CONNECTION_FINAL:
+		return "ConnectionFinal"
+	case C.PN_SESSION_INIT:
+		return "SessionInit"
+	case C.PN_SESSION_LOCAL_OPEN:
+		return "SessionLocalOpen"
+	case C.PN_SESSION_REMOTE_OPEN:
+		return "SessionRemoteOpen"
+	case C.PN_SESSION_LOCAL_CLOSE:
+		return "SessionLocalClose"
+	case C.PN_SESSION_REMOTE_CLOSE:
+		return "SessionRemoteClose"
+	case C.PN_SESSION_FINAL:
+		return "SessionFinal"
+	case C.PN_LINK_INIT:
+		return "LinkInit"
+	case C.PN_LINK_LOCAL_OPEN:
+		return "LinkLocalOpen"
+	case C.PN_LINK_REMOTE_OPEN:
+		return "LinkRemoteOpen"
+	case C.PN_LINK_LOCAL_CLOSE:
+		return "LinkLocalClose"
+	case C.PN_LINK_REMOTE_CLOSE:
+		return "LinkRemoteClose"
+	case C.PN_LINK_LOCAL_DETACH:
+		return "LinkLocalDetach"
+	case C.PN_LINK_REMOTE_DETACH:
+		return "LinkRemoteDetach"
+	case C.PN_LINK_FLOW:
+		return "LinkFlow"
+	case C.PN_LINK_FINAL:
+		return "LinkFinal"
+	case C.PN_DELIVERY:
+		return "Delivery"
+	case C.PN_TRANSPORT:
+		return "Transport"
+	case C.PN_TRANSPORT_AUTHENTICATED:
+		return "TransportAuthenticated"
+	case C.PN_TRANSPORT_ERROR:
+		return "TransportError"
+	case C.PN_TRANSPORT_HEAD_CLOSED:
+		return "TransportHeadClosed"
+	case C.PN_TRANSPORT_TAIL_CLOSED:
+		return "TransportTailClosed"
+	case C.PN_TRANSPORT_CLOSED:
+		return "TransportClosed"
+	}
+	return "Unknown"
+}
+
+// Wrappers for declarations in session.h
+
+type Session struct{ pn *C.pn_session_t }
+
+func (s Session) IsNil() bool          { return s.pn == nil }
+func (s Session) CPtr() unsafe.Pointer { return unsafe.Pointer(s.pn) }
+func (s Session) Free() {
+	C.pn_session_free(s.pn)
+}
+func (s Session) State() State {
+	return State(C.pn_session_state(s.pn))
+}
+func (s Session) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
+}
+func (s Session) Condition() Condition {
+	return Condition{C.pn_session_condition(s.pn)}
+}
+func (s Session) RemoteCondition() Condition {
+	return Condition{C.pn_session_remote_condition(s.pn)}
+}
+func (s Session) Connection() Connection {
+	return Connection{C.pn_session_connection(s.pn)}
+}
+func (s Session) Open() {
+	C.pn_session_open(s.pn)
+}
+func (s Session) Close() {
+	C.pn_session_close(s.pn)
+}
+func (s Session) IncomingCapacity() uint {
+	return uint(C.pn_session_get_incoming_capacity(s.pn))
+}
+func (s Session) SetIncomingCapacity(capacity uint) {
+	C.pn_session_set_incoming_capacity(s.pn, C.size_t(capacity))
+}
+func (s Session) OutgoingWindow() uint {
+	return uint(C.pn_session_get_outgoing_window(s.pn))
+}
+func (s Session) SetOutgoingWindow(window uint) {
+	C.pn_session_set_outgoing_window(s.pn, C.size_t(window))
+}
+func (s Session) OutgoingBytes() uint {
+	return uint(C.pn_session_outgoing_bytes(s.pn))
+}
+func (s Session) IncomingBytes() uint {
+	return uint(C.pn_session_incoming_bytes(s.pn))
+}
+func (s Session) Next(state State) Session {
+	return Session{C.pn_session_next(s.pn, C.pn_state_t(state))}
+}
+
+// Wrappers for declarations in link.h
+
+type SndSettleMode C.pn_snd_settle_mode_t
+
+const (
+	SndUnsettled SndSettleMode = C.PN_SND_UNSETTLED
+	SndSettled   SndSettleMode = C.PN_SND_SETTLED
+	SndMixed     SndSettleMode = C.PN_SND_MIXED
+)
+
+func (e SndSettleMode) String() string {
+	switch e {
+
+	case C.PN_SND_UNSETTLED:
+		return "SndUnsettled"
+	case C.PN_SND_SETTLED:
+		return "SndSettled"
+	case C.PN_SND_MIXED:
+		return "SndMixed"
+	}
+	return "unknown"
+}
+
+type RcvSettleMode C.pn_rcv_settle_mode_t
+
+const (
+	RcvFirst  RcvSettleMode = C.PN_RCV_FIRST
+	RcvSecond RcvSettleMode = C.PN_RCV_SECOND
+)
+
+func (e RcvSettleMode) String() string {
+	switch e {
+
+	case C.PN_RCV_FIRST:
+		return "RcvFirst"
+	case C.PN_RCV_SECOND:
+		return "RcvSecond"
+	}
+	return "unknown"
+}
+
+type Link struct{ pn *C.pn_link_t }
+
+func (l Link) IsNil() bool          { return l.pn == nil }
+func (l Link) CPtr() unsafe.Pointer { return unsafe.Pointer(l.pn) }
+func (l Link) Free() {
+	C.pn_link_free(l.pn)
+}
+func (l Link) Name() string {
+	return C.GoString(C.pn_link_name(l.pn))
+}
+func (l Link) IsSender() bool {
+	return bool(C.pn_link_is_sender(l.pn))
+}
+func (l Link) IsReceiver() bool {
+	return bool(C.pn_link_is_receiver(l.pn))
+}
+func (l Link) State() State {
+	return State(C.pn_link_state(l.pn))
+}
+func (l Link) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
+}
+func (l Link) Condition() Condition {
+	return Condition{C.pn_link_condition(l.pn)}
+}
+func (l Link) RemoteCondition() Condition {
+	return Condition{C.pn_link_remote_condition(l.pn)}
+}
+func (l Link) Session() Session {
+	return Session{C.pn_link_session(l.pn)}
+}
+func (l Link) Next(state State) Link {
+	return Link{C.pn_link_next(l.pn, C.pn_state_t(state))}
+}
+func (l Link) Open() {
+	C.pn_link_open(l.pn)
+}
+func (l Link) Close() {
+	C.pn_link_close(l.pn)
+}
+func (l Link) Detach() {
+	C.pn_link_detach(l.pn)
+}
+func (l Link) Source() Terminus {
+	return Terminus{C.pn_link_source(l.pn)}
+}
+func (l Link) Target() Terminus {
+	return Terminus{C.pn_link_target(l.pn)}
+}
+func (l Link) RemoteSource() Terminus {
+	return Terminus{C.pn_link_remote_source(l.pn)}
+}
+func (l Link) RemoteTarget() Terminus {
+	return Terminus{C.pn_link_remote_target(l.pn)}
+}
+func (l Link) Current() Delivery {
+	return Delivery{C.pn_link_current(l.pn)}
+}
+func (l Link) Advance() bool {
+	return bool(C.pn_link_advance(l.pn))
+}
+func (l Link) Credit() int {
+	return int(C.pn_link_credit(l.pn))
+}
+func (l Link) Queued() int {
+	return int(C.pn_link_queued(l.pn))
+}
+func (l Link) RemoteCredit() int {
+	return int(C.pn_link_remote_credit(l.pn))
+}
+func (l Link) IsDrain() bool {
+	return bool(C.pn_link_get_drain(l.pn))
+}
+func (l Link) Drained() int {
+	return int(C.pn_link_drained(l.pn))
+}
+func (l Link) Available() int {
+	return int(C.pn_link_available(l.pn))
+}
+func (l Link) SndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_snd_settle_mode(l.pn))
+}
+func (l Link) RcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_rcv_settle_mode(l.pn))
+}
+func (l Link) SetSndSettleMode(mode SndSettleMode) {
+	C.pn_link_set_snd_settle_mode(l.pn, C.pn_snd_settle_mode_t(mode))
+}
+func (l Link) SetRcvSettleMode(mode RcvSettleMode) {
+	C.pn_link_set_rcv_settle_mode(l.pn, C.pn_rcv_settle_mode_t(mode))
+}
+func (l Link) RemoteSndSettleMode() SndSettleMode {
+	return SndSettleMode(C.pn_link_remote_snd_settle_mode(l.pn))
+}
+func (l Link) RemoteRcvSettleMode() RcvSettleMode {
+	return RcvSettleMode(C.pn_link_remote_rcv_settle_mode(l.pn))
+}
+func (l Link) Unsettled() int {
+	return int(C.pn_link_unsettled(l.pn))
+}
+func (l Link) Offered(credit int) {
+	C.pn_link_offered(l.pn, C.int(credit))
+}
+func (l Link) Flow(credit int) {
+	C.pn_link_flow(l.pn, C.int(credit))
+}
+func (l Link) Drain(credit int) {
+	C.pn_link_drain(l.pn, C.int(credit))
+}
+func (l Link) SetDrain(drain bool) {
+	C.pn_link_set_drain(l.pn, C.bool(drain))
+}
+func (l Link) Draining() bool {
+	return bool(C.pn_link_draining(l.pn))
+}
+
+// Wrappers for declarations in delivery.h
+
+type Delivery struct{ pn *C.pn_delivery_t }
+
+func (d Delivery) IsNil() bool          { return d.pn == nil }
+func (d Delivery) CPtr() unsafe.Pointer { return unsafe.Pointer(d.pn) }
+func (d Delivery) Tag() DeliveryTag {
+	return DeliveryTag{C.pn_delivery_tag(d.pn)}
+}
+func (d Delivery) Link() Link {
+	return Link{C.pn_delivery_link(d.pn)}
+}
+func (d Delivery) Local() Disposition {
+	return Disposition{C.pn_delivery_local(d.pn)}
+}
+func (d Delivery) LocalState() uint64 {
+	return uint64(C.pn_delivery_local_state(d.pn))
+}
+func (d Delivery) Remote() Disposition {
+	return Disposition{C.pn_delivery_remote(d.pn)}
+}
+func (d Delivery) RemoteState() uint64 {
+	return uint64(C.pn_delivery_remote_state(d.pn))
+}
+func (d Delivery) Settled() bool {
+	return bool(C.pn_delivery_settled(d.pn))
+}
+func (d Delivery) Pending() uint {
+	return uint(C.pn_delivery_pending(d.pn))
+}
+func (d Delivery) Partial() bool {
+	return bool(C.pn_delivery_partial(d.pn))
+}
+func (d Delivery) Writable() bool {
+	return bool(C.pn_delivery_writable(d.pn))
+}
+func (d Delivery) Readable() bool {
+	return bool(C.pn_delivery_readable(d.pn))
+}
+func (d Delivery) Updated() bool {
+	return bool(C.pn_delivery_updated(d.pn))
+}
+func (d Delivery) Update(state uint64) {
+	C.pn_delivery_update(d.pn, C.uint64_t(state))
+}
+func (d Delivery) Clear() {
+	C.pn_delivery_clear(d.pn)
+}
+func (d Delivery) Current() bool {
+	return bool(C.pn_delivery_current(d.pn))
+}
+func (d Delivery) Settle() {
+	C.pn_delivery_settle(d.pn)
+}
+func (d Delivery) Dump() {
+	C.pn_delivery_dump(d.pn)
+}
+func (d Delivery) Buffered() bool {
+	return bool(C.pn_delivery_buffered(d.pn))
+}
+
+// Wrappers for declarations in disposition.h
+
+type Disposition struct{ pn *C.pn_disposition_t }
+
+func (d Disposition) IsNil() bool          { return d.pn == nil }
+func (d Disposition) CPtr() unsafe.Pointer { return unsafe.Pointer(d.pn) }
+func (d Disposition) Type() uint64 {
+	return uint64(C.pn_disposition_type(d.pn))
+}
+func (d Disposition) Condition() Condition {
+	return Condition{C.pn_disposition_condition(d.pn)}
+}
+func (d Disposition) Data() Data {
+	return Data{C.pn_disposition_data(d.pn)}
+}
+func (d Disposition) SectionNumber() uint16 {
+	return uint16(C.pn_disposition_get_section_number(d.pn))
+}
+func (d Disposition) SetSectionNumber(section_number uint16) {
+	C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
+}
+func (d Disposition) SectionOffset() uint64 {
+	return uint64(C.pn_disposition_get_section_offset(d.pn))
+}
+func (d Disposition) SetSectionOffset(section_offset uint64) {
+	C.pn_disposition_set_section_offset(d.pn, C.uint64_t(section_offset))
+}
+func (d Disposition) IsFailed() bool {
+	return bool(C.pn_disposition_is_failed(d.pn))
+}
+func (d Disposition) SetFailed(failed bool) {
+	C.pn_disposition_set_failed(d.pn, C.bool(failed))
+}
+func (d Disposition) IsUndeliverable() bool {
+	return bool(C.pn_disposition_is_undeliverable(d.pn))
+}
+func (d Disposition) SetUndeliverable(undeliverable bool) {
+	C.pn_disposition_set_undeliverable(d.pn, C.bool(undeliverable))
+}
+func (d Disposition) Annotations() Data {
+	return Data{C.pn_disposition_annotations(d.pn)}
+}
+
+// Wrappers for declarations in condition.h
+
+type Condition struct{ pn *C.pn_condition_t }
+
+func (c Condition) IsNil() bool          { return c.pn == nil }
+func (c Condition) CPtr() unsafe.Pointer { return unsafe.Pointer(c.pn) }
+func (c Condition) IsSet() bool {
+	return bool(C.pn_condition_is_set(c.pn))
+}
+func (c Condition) Clear() {
+	C.pn_condition_clear(c.pn)
+}
+func (c Condition) Name() string {
+	return C.GoString(C.pn_condition_get_name(c.pn))
+}
+func (c Condition) SetName(name string) int {
+	nameC := C.CString(name)
+	defer C.free(unsafe.Pointer(nameC))
+
+	return int(C.pn_condition_set_name(c.pn, nameC))
+}
+func (c Condition) Description() string {
+	return C.GoString(C.pn_condition_get_description(c.pn))
+}
+func (c Condition) SetDescription(description string) int {
+	descriptionC := C.CString(description)
+	defer C.free(unsafe.Pointer(descriptionC))
+
+	return int(C.pn_condition_set_description(c.pn, descriptionC))
+}
+func (c Condition) Info() Data {
+	return Data{C.pn_condition_info(c.pn)}
+}
+func (c Condition) IsRedirect() bool {
+	return bool(C.pn_condition_is_redirect(c.pn))
+}
+func (c Condition) RedirectHost() string {
+	return C.GoString(C.pn_condition_redirect_host(c.pn))
+}
+func (c Condition) RedirectPort() int {
+	return int(C.pn_condition_redirect_port(c.pn))
+}
+
+// Wrappers for declarations in terminus.h
+
+type TerminusType C.pn_terminus_type_t
+
+const (
+	Unspecified TerminusType = C.PN_UNSPECIFIED
+	Source      TerminusType = C.PN_SOURCE
+	Target      TerminusType = C.PN_TARGET
+	Coordinator TerminusType = C.PN_COORDINATOR
+)
+
+func (e TerminusType) String() string {
+	switch e {
+
+	case C.PN_UNSPECIFIED:
+		return "Unspecified"
+	case C.PN_SOURCE:
+		return "Source"
+	case C.PN_TARGET:
+		return "Target"
+	case C.PN_COORDINATOR:
+		return "Coordinator"
+	}
+	return "unknown"
+}
+
+type Durability C.pn_durability_t
+
+const (
+	Nondurable    Durability = C.PN_NONDURABLE
+	Configuration Durability = C.PN_CONFIGURATION
+	Deliveries    Durability = C.PN_DELIVERIES
+)
+
+func (e Durability) String() string {
+	switch e {
+
+	case C.PN_NONDURABLE:
+		return "Nondurable"
+	case C.PN_CONFIGURATION:
+		return "Configuration"
+	case C.PN_DELIVERIES:
+		return "Deliveries"
+	}
+	return "unknown"
+}
+
+type ExpiryPolicy C.pn_expiry_policy_t
+
+const (
+	ExpireWithLink       ExpiryPolicy = C.PN_EXPIRE_WITH_LINK
+	ExpireWithSession    ExpiryPolicy = C.PN_EXPIRE_WITH_SESSION
+	ExpireWithConnection ExpiryPolicy = C.PN_EXPIRE_WITH_CONNECTION
+	ExpireNever          ExpiryPolicy = C.PN_EXPIRE_NEVER
+)
+
+func (e ExpiryPolicy) String() string {
+	switch e {
+
+	case C.PN_EXPIRE_WITH_LINK:
+		return "ExpireWithLink"
+	case C.PN_EXPIRE_WITH_SESSION:
+		return "ExpireWithSession"
+	case C.PN_EXPIRE_WITH_CONNECTION:
+		return "ExpireWithConnection"
+	case C.PN_EXPIRE_NEVER:
+		return "ExpireNever"
+	}
+	return "unknown"
+}
+
+type DistributionMode C.pn_distribution_mode_t
+
+const (
+	DistModeUnspecified DistributionMode = C.PN_DIST_MODE_UNSPECIFIED
+	DistModeCopy        DistributionMode = C.PN_DIST_MODE_COPY
+	DistModeMove        DistributionMode = C.PN_DIST_MODE_MOVE
+)
+
+func (e DistributionMode) String() string {
+	switch e {
+
+	case C.PN_DIST_MODE_UNSPECIFIED:
+		return "DistModeUnspecified"
+	case C.PN_DIST_MODE_COPY:
+		return "DistModeCopy"
+	case C.PN_DIST_MODE_MOVE:
+		return "DistModeMove"
+	}
+	return "unknown"
+}
+
+type Terminus struct{ pn *C.pn_terminus_t }
+
+func (t Terminus) IsNil() bool          { return t.pn == nil }
+func (t Terminus) CPtr() unsafe.Pointer { return unsafe.Pointer(t.pn) }
+func (t Terminus) Type() TerminusType {
+	return TerminusType(C.pn_terminus_get_type(t.pn))
+}
+func (t Terminus) SetType(type_ TerminusType) int {
+	return int(C.pn_terminus_set_type(t.pn, C.pn_terminus_type_t(type_)))
+}
+func (t Terminus) Address() string {
+	return C.GoString(C.pn_terminus_get_address(t.pn))
+}
+func (t Terminus) SetAddress(address string) int {
+	addressC := C.CString(address)
+	defer C.free(unsafe.Pointer(addressC))
+
+	return int(C.pn_terminus_set_address(t.pn, addressC))
+}
+func (t Terminus) SetDistributionMode(mode DistributionMode) int {
+	return int(C.pn_terminus_set_distribution_mode(t.pn, C.pn_distribution_mode_t(mode)))
+}
+func (t Terminus) Durability() Durability {
+	return Durability(C.pn_terminus_get_durability(t.pn))
+}
+func (t Terminus) SetDurability(durability Durability) int {
+	return int(C.pn_terminus_set_durability(t.pn, C.pn_durability_t(durability)))
+}
+func (t Terminus) ExpiryPolicy() ExpiryPolicy {
+	return ExpiryPolicy(C.pn_terminus_get_expiry_policy(t.pn))
+}
+func (t Terminus) SetExpiryPolicy(policy ExpiryPolicy) int {
+	return int(C.pn_terminus_set_expiry_policy(t.pn, C.pn_expiry_policy_t(policy)))
+}
+func (t Terminus) Timeout() time.Duration {
+	return (time.Duration(C.pn_terminus_get_timeout(t.pn)) * time.Second)
+}
+func (t Terminus) SetTimeout(timeout time.Duration) int {
+	return int(C.pn_terminus_set_timeout(t.pn, C.pn_seconds_t(timeout)))
+}
+func (t Terminus) IsDynamic() bool {
+	return bool(C.pn_terminus_is_dynamic(t.pn))
+}
+func (t Terminus) SetDynamic(dynamic bool) int {
+	return int(C.pn_terminus_set_dynamic(t.pn, C.bool(dynamic)))
+}
+func (t Terminus) Properties() Data {
+	return Data{C.pn_terminus_properties(t.pn)}
+}
+func (t Terminus) Capabilities() Data {
+	return Data{C.pn_terminus_capabilities(t.pn)}
+}
+func (t Terminus) Outcomes() Data {
+	return Data{C.pn_terminus_outcomes(t.pn)}
+}
+func (t Terminus) Filter() Data {
+	return Data{C.pn_terminus_filter(t.pn)}
+}
+func (t Terminus) Copy(src Terminus) int {
+	return int(C.pn_terminus_copy(t.pn, src.pn))
+}
+
+// Wrappers for declarations in connection.h
+
+type Connection struct{ pn *C.pn_connection_t }
+
+func (c Connection) IsNil() bool          { return c.pn == nil }
+func (c Connection) CPtr() unsafe.Pointer { return unsafe.Pointer(c.pn) }
+func (c Connection) Free() {
+	C.pn_connection_free(c.pn)
+}
+func (c Connection) Release() {
+	C.pn_connection_release(c.pn)
+}
+func (c Connection) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
+}
+func (c Connection) State() State {
+	return State(C.pn_connection_state(c.pn))
+}
+func (c Connection) Open() {
+	C.pn_connection_open(c.pn)
+}
+func (c Connection) Close() {
+	C.pn_connection_close(c.pn)
+}
+func (c Connection) Reset() {
+	C.pn_connection_reset(c.pn)
+}
+func (c Connection) Condition() Condition {
+	return Condition{C.pn_connection_condition(c.pn)}
+}
+func (c Connection) RemoteCondition() Condition {
+	return Condition{C.pn_connection_remote_condition(c.pn)}
+}
+func (c Connection) Container() string {
+	return C.GoString(C.pn_connection_get_container(c.pn))
+}
+func (c Connection) SetContainer(container string) {
+	containerC := C.CString(container)
+	defer C.free(unsafe.Pointer(containerC))
+
+	C.pn_connection_set_container(c.pn, containerC)
+}
+func (c Connection) SetUser(user string) {
+	userC := C.CString(user)
+	defer C.free(unsafe.Pointer(userC))
+
+	C.pn_connection_set_user(c.pn, userC)
+}
+func (c Connection) SetPassword(password string) {
+	passwordC := C.CString(password)
+	defer C.free(unsafe.Pointer(passwordC))
+
+	C.pn_connection_set_password(c.pn, passwordC)
+}
+func (c Connection) User() string {
+	return C.GoString(C.pn_connection_get_user(c.pn))
+}
+func (c Connection) Hostname() string {
+	return C.GoString(C.pn_connection_get_hostname(c.pn))
+}
+func (c Connection) SetHostname(hostname string) {
+	hostnameC := C.CString(hostname)
+	defer C.free(unsafe.Pointer(hostnameC))
+
+	C.pn_connection_set_hostname(c.pn, hostnameC)
+}
+func (c Connection) RemoteContainer() string {
+	return C.GoString(C.pn_connection_remote_container(c.pn))
+}
+func (c Connection) RemoteHostname() string {
+	return C.GoString(C.pn_connection_remote_hostname(c.pn))
+}
+func (c Connection) OfferedCapabilities() Data {
+	return Data{C.pn_connection_offered_capabilities(c.pn)}
+}
+func (c Connection) DesiredCapabilities() Data {
+	return Data{C.pn_connection_desired_capabilities(c.pn)}
+}
+func (c Connection) Properties() Data {
+	return Data{C.pn_connection_properties(c.pn)}
+}
+func (c Connection) RemoteOfferedCapabilities() Data {
+	return Data{C.pn_connection_remote_offered_capabilities(c.pn)}
+}
+func (c Connection) RemoteDesiredCapabilities() Data {
+	return Data{C.pn_connection_remote_desired_capabilities(c.pn)}
+}
+func (c Connection) RemoteProperties() Data {
+	return Data{C.pn_connection_remote_properties(c.pn)}
+}
+func (c Connection) Transport() Transport {
+	return Transport{C.pn_connection_transport(c.pn)}
+}
+
+// Wrappers for declarations in transport.h
+
+type Transport struct{ pn *C.pn_transport_t }
+
+func (t Transport) IsNil() bool          { return t.pn == nil }
+func (t Transport) CPtr() unsafe.Pointer { return unsafe.Pointer(t.pn) }
+func (t Transport) SetServer() {
+	C.pn_transport_set_server(t.pn)
+}
+func (t Transport) Free() {
+	C.pn_transport_free(t.pn)
+}
+func (t Transport) User() string {
+	return C.GoString(C.pn_transport_get_user(t.pn))
+}
+func (t Transport) RequireAuth(required bool) {
+	C.pn_transport_require_auth(t.pn, C.bool(required))
+}
+func (t Transport) IsAuthenticated() bool {
+	return bool(C.pn_transport_is_authenticated(t.pn))
+}
+func (t Transport) RequireEncryption(required bool) {
+	C.pn_transport_require_encryption(t.pn, C.bool(required))
+}
+func (t Transport) IsEncrypted() bool {
+	return bool(C.pn_transport_is_encrypted(t.pn))
+}
+func (t Transport) Condition() Condition {
+	return Condition{C.pn_transport_condition(t.pn)}
+}
+func (t Transport) Error() error {
+	return internal.PnError(unsafe.Pointer(C.pn_transport_error(t.pn)))
+}
+func (t Transport) Bind(connection Connection) int {
+	return int(C.pn_transport_bind(t.pn, connection.pn))
+}
+func (t Transport) Unbind() int {
+	return int(C.pn_transport_unbind(t.pn))
+}
+func (t Transport) Log(message string) {
+	messageC := C.CString(message)
+	defer C.free(unsafe.Pointer(messageC))
+
+	C.pn_transport_log(t.pn, messageC)
+}
+func (t Transport) ChannelMax() uint32 {
+	return uint32(C.pn_transport_get_channel_max(t.pn))
+}
+func (t Transport) SetChannelMax(channel_max uint32) int {
+	return int(C.pn_transport_set_channel_max(t.pn, C.uint16_t(channel_max)))
+}
+func (t Transport) RemoteChannelMax() uint32 {
+	return uint32(C.pn_transport_remote_channel_max(t.pn))
+}
+func (t Transport) MaxFrame() uint16 {
+	return uint16(C.pn_transport_get_max_frame(t.pn))
+}
+func (t Transport) SetMaxFrame(size uint16) {
+	C.pn_transport_set_max_frame(t.pn, C.uint32_t(size))
+}
+func (t Transport) RemoteMaxFrame() uint16 {
+	return uint16(C.pn_transport_get_remote_max_frame(t.pn))
+}
+func (t Transport) IdleTimeout() time.Duration {
+	return (time.Duration(C.pn_transport_get_idle_timeout(t.pn)) * time.Millisecond)
+}
+func (t Transport) SetIdleTimeout(timeout time.Duration) {
+	C.pn_transport_set_idle_timeout(t.pn, C.pn_millis_t(timeout))
+}
+func (t Transport) RemoteIdleTimeout() time.Duration {
+	return (time.Duration(C.pn_transport_get_remote_idle_timeout(t.pn)) * time.Millisecond)
+}
+func (t Transport) Input(bytes string, available uint) int {
+	bytesC := C.CString(bytes)
+	defer C.free(unsafe.Pointer(bytesC))
+
+	return int(C.pn_transport_input(t.pn, bytesC, C.size_t(available)))
+}
+func (t Transport) Output(bytes string, size uint) int {
+	bytesC := C.CString(bytes)
+	defer C.free(unsafe.Pointer(bytesC))
+
+	return int(C.pn_transport_output(t.pn, bytesC, C.size_t(size)))
+}
+func (t Transport) Capacity() int {
+	return int(C.pn_transport_capacity(t.pn))
+}
+func (t Transport) Tail() string {
+	return C.GoString(C.pn_transport_tail(t.pn))
+}
+func (t Transport) Process(size uint) int {
+	return int(C.pn_transport_process(t.pn, C.size_t(size)))
+}
+func (t Transport) CloseTail() int {
+	return int(C.pn_transport_close_tail(t.pn))
+}
+func (t Transport) Pending() int {
+	return int(C.pn_transport_pending(t.pn))
+}
+func (t Transport) Peek(dst string, size uint) int {
+	dstC := C.CString(dst)
+	defer C.free(unsafe.Pointer(dstC))
+
+	return int(C.pn_transport_peek(t.pn, dstC, C.size_t(size)))
+}
+func (t Transport) Pop(size uint) {
+	C.pn_transport_pop(t.pn, C.size_t(size))
+}
+func (t Transport) CloseHead() int {
+	return int(C.pn_transport_close_head(t.pn))
+}
+func (t Transport) Quiesced() bool {
+	return bool(C.pn_transport_quiesced(t.pn))
+}
+func (t Transport) Closed() bool {
+	return bool(C.pn_transport_closed(t.pn))
+}
+func (t Transport) Tick(now time.Time) time.Time {
+	return goTime(C.pn_transport_tick(t.pn, pnTime(now)))
+}
+func (t Transport) Connection() Connection {
+	return Connection{C.pn_transport_connection(t.pn)}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/include/proton/link.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/link.h b/proton-c/include/proton/link.h
index d9ddca4..1ac2270 100644
--- a/proton-c/include/proton/link.h
+++ b/proton-c/include/proton/link.h
@@ -216,7 +216,7 @@ PN_EXTERN pn_session_t *pn_link_session(pn_link_t *link);
  * both local and remote flags, then an exact match against those
  * flags is performed. If state contains only local or only remote
  * flags, then a match occurs if any of the local or remote flags are
- * set respectively.
+ * set respectively. state==0 matches all links.
  *
  * @param[in] connection to be searched for matching Links
  * @param[in] state mask to match


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[31/36] qpid-proton git commit: PROTON-827: Concurrent Go API for proton.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7b880b88/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a
deleted file mode 100644
index 3bafe9c..0000000
--- a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/messaging.a
+++ /dev/null
@@ -1,1100 +0,0 @@
-!<arch>
-__.PKGDEF       0           0     0     644     63393     `
-go object linux amd64 go1.4.2 X:precisestack
-
-$$
-package messaging
-	import net "net"
-	import runtime "runtime"
-	import time "time"
-	import io "io"
-	import cgo "runtime/cgo"
-	import amqp "qpid.apache.org/proton/go/amqp"
-	import syscall "syscall"
-	import fmt "fmt"
-	import internal "qpid.apache.org/proton/go/internal"
-	import reflect "reflect"
-	import reactor "qpid.apache.org/proton/go/reactor"
-	import unsafe "unsafe"
-	var @"".Closed error
-	type @"".Endpoint interface { Close(? error); Error() (? error); Open() (? error); String() (? string) }
-	type @"".Link interface { Close(? error); Error() (? error); IsOpen() (? bool); IsReceiver() (? bool); IsSender() (? bool); Name() (? string); Open() (? error); SetName(? string); SetSource(? string); SetTarget(? string); Source() (? string); String() (? string); Target() (? string) }
-	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
-	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
-	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
-	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
-	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
-	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
-	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
-	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
-	type @"time".Duration int64
-	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
-	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
-	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
-	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
-	func (@"time".d·2 @"time".Duration) String () (? string)
-	type @"time".Month int
-	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
-	type @"time".Weekday int
-	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
-	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
-	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
-	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
-	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
-	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
-	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
-	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
-	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
-	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
-	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
-	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
-	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
-	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
-	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
-	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
-	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
-	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
-	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
-	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
-	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
-	type @"qpid.apache.org/proton/go/amqp".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"qpid.apache.org/proton/go/amqp".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGr
 oupId(? string); SetGroupSequence(? int32); SetInferred(? bool); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_delivery_t struct {}
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_link_t struct {}
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_condition_t struct {}
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_data_t struct {}
-	type @"qpid.apache.org/proton/go/reactor".Data struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_data_t }
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Clear ()
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Error () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Free ()
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Data "esc:0x2") Pointer () (? @"unsafe".Pointer) { return @"unsafe".Pointer(@"qpid.apache.org/proton/go/reactor".d·2.@"qpid.apache.org/proton/go/reactor".pn) }
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Data "esc:0x0") Rewind ()
-	type @"qpid.apache.org/proton/go/reactor".Condition struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_condition_t }
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Clear ()
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Description () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Error () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Info () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".c·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") IsRedirect () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") IsSet () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") Name () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") RedirectHost () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") RedirectPort () (? int)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") SetDescription (@"qpid.apache.org/proton/go/reactor".description·3 string "esc:0x0") (? int)
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") SetError (@"qpid.apache.org/proton/go/reactor".err·2 error)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Condition "esc:0x0") SetName (@"qpid.apache.org/proton/go/reactor".name·3 string "esc:0x0") (? int)
-	type @"qpid.apache.org/proton/go/reactor".State uint8
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".State) Is (@"qpid.apache.org/proton/go/reactor".bits·3 @"qpid.apache.org/proton/go/reactor".State) (? bool) { return @"qpid.apache.org/proton/go/reactor".s·2 & @"qpid.apache.org/proton/go/reactor".bits·3 != @"qpid.apache.org/proton/go/reactor".State(0x0) }
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".State) Local () (? @"qpid.apache.org/proton/go/reactor".State) { return @"qpid.apache.org/proton/go/reactor".State(@"qpid.apache.org/proton/go/reactor".s·2 & @"qpid.apache.org/proton/go/reactor".State(0x7)) }
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".State) Remote () (? @"qpid.apache.org/proton/go/reactor".State) { return @"qpid.apache.org/proton/go/reactor".State(@"qpid.apache.org/proton/go/reactor".s·2 & @"qpid.apache.org/proton/go/reactor".State(0x38)) }
-	type @"qpid.apache.org/proton/go/reactor".RcvSettleMode uint32
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".RcvSettleMode) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".SndSettleMode uint32
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".SndSettleMode) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_terminus_t struct {}
-	type @"qpid.apache.org/proton/go/reactor".Durability uint32
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Durability) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".ExpiryPolicy uint32
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".ExpiryPolicy) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".DistributionMode uint32
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".DistributionMode) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".TerminusType uint32
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".TerminusType) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".Terminus struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_terminus_t }
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Address () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Capabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Copy (@"qpid.apache.org/proton/go/reactor".src·3 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Durability () (? @"qpid.apache.org/proton/go/reactor".Durability)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") ExpiryPolicy () (? @"qpid.apache.org/proton/go/reactor".ExpiryPolicy)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Filter () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") IsDynamic () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".t·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Outcomes () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Properties () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetAddress (@"qpid.apache.org/proton/go/reactor".address·3 string "esc:0x0") (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetDistributionMode (@"qpid.apache.org/proton/go/reactor".mode·3 @"qpid.apache.org/proton/go/reactor".DistributionMode) (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetDurability (@"qpid.apache.org/proton/go/reactor".durability·3 @"qpid.apache.org/proton/go/reactor".Durability) (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetDynamic (@"qpid.apache.org/proton/go/reactor".dynamic·3 bool) (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetExpiryPolicy (@"qpid.apache.org/proton/go/reactor".policy·3 @"qpid.apache.org/proton/go/reactor".ExpiryPolicy) (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetTimeout (@"qpid.apache.org/proton/go/reactor".timeout·3 @"time".Duration) (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") SetType (@"qpid.apache.org/proton/go/reactor".type_·3 @"qpid.apache.org/proton/go/reactor".TerminusType) (? int)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Timeout () (? @"time".Duration)
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".Terminus "esc:0x0") Type () (? @"qpid.apache.org/proton/go/reactor".TerminusType)
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_session_t struct {}
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_connection_t struct {}
-	import sync "sync" // indirect
-	type @"sync".Mutex struct { @"sync".state int32; @"sync".sema uint32 }
-	func (@"sync".m·1 *@"sync".Mutex) Lock ()
-	func (@"sync".m·1 *@"sync".Mutex) Unlock ()
-	type @"qpid.apache.org/proton/go/internal".FirstError struct { @"qpid.apache.org/proton/go/internal".err error; @"qpid.apache.org/proton/go/internal".lock @"sync".Mutex }
-	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Get () (? error)
-	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Set (@"qpid.apache.org/proton/go/internal".err·3 error) (? error)
-	type @"net".Addr interface { Network() (? string); String() (? string) }
-	type @"net".Conn interface { Close() (? error); LocalAddr() (? @"net".Addr); Read(@"net".b []byte) (@"net".n int, @"net".err error); RemoteAddr() (? @"net".Addr); SetDeadline(@"net".t @"time".Time) (? error); SetReadDeadline(@"net".t @"time".Time) (? error); SetWriteDeadline(@"net".t @"time".Time) (? error); Write(@"net".b []byte) (@"net".n int, @"net".err error) }
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_transport_t struct {}
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_collector_t struct {}
-	type @"qpid.apache.org/proton/go/reactor".bufferChan struct { @"qpid.apache.org/proton/go/reactor".buffers chan []byte; @"qpid.apache.org/proton/go/reactor".buf1 []byte; @"qpid.apache.org/proton/go/reactor".buf2 []byte }
-	func (@"qpid.apache.org/proton/go/reactor".b·2 *@"qpid.apache.org/proton/go/reactor".bufferChan) @"qpid.apache.org/proton/go/reactor".buffer () (? []byte) { @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1, @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf2 = @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf2, @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1; return @"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1[:cap(@"qpid.apache.org/proton/go/reactor".b·2.@"qpid.apache.org/proton/go/reactor".buf1)] }
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_event_t struct {}
-	type @"qpid.apache.org/proton/go/reactor".EventType int
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".EventType) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".Event struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_event_t; @"qpid.apache.org/proton/go/reactor".eventType @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".connection @"qpid.apache.org/proton/go/reactor".Connection; @"qpid.apache.org/proton/go/reactor".session @"qpid.apache.org/proton/go/reactor".Session; @"qpid.apache.org/proton/go/reactor".link @"qpid.apache.org/proton/go/reactor".Link; @"qpid.apache.org/proton/go/reactor".delivery @"qpid.apache.org/proton/go/reactor".Delivery }
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Connection () (? @"qpid.apache.org/proton/go/reactor".Connection) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".connection }
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Delivery () (? @"qpid.apache.org/proton/go/reactor".Delivery) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".delivery }
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".eventType == @"qpid.apache.org/proton/go/reactor".EventType(0x0) }
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Link () (? @"qpid.apache.org/proton/go/reactor".Link) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".link }
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x2") Session () (? @"qpid.apache.org/proton/go/reactor".Session) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".session }
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x0") String () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".e·2 @"qpid.apache.org/proton/go/reactor".Event "esc:0x0") Type () (? @"qpid.apache.org/proton/go/reactor".EventType) { return @"qpid.apache.org/proton/go/reactor".e·2.@"qpid.apache.org/proton/go/reactor".eventType }
-	type @"qpid.apache.org/proton/go/reactor".EventHandler interface { HandleEvent(@"qpid.apache.org/proton/go/reactor".e @"qpid.apache.org/proton/go/reactor".Event) (? error) }
-	type @"sync".Once struct { @"sync".m @"sync".Mutex; @"sync".done uint32 }
-	func (@"sync".o·1 *@"sync".Once) Do (@"sync".f·2 func() "esc:0x0")
-	type @"qpid.apache.org/proton/go/reactor".Pump struct { @"qpid.apache.org/proton/go/reactor".err @"qpid.apache.org/proton/go/internal".FirstError; @"qpid.apache.org/proton/go/reactor".inject chan func(); @"qpid.apache.org/proton/go/reactor".conn @"net".Conn; @"qpid.apache.org/proton/go/reactor".connection @"qpid.apache.org/proton/go/reactor".Connection; @"qpid.apache.org/proton/go/reactor".transport *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_transport_t; @"qpid.apache.org/proton/go/reactor".collector *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_collector_t; @"qpid.apache.org/proton/go/reactor".read *@"qpid.apache.org/proton/go/reactor".bufferChan; @"qpid.apache.org/proton/go/reactor".write *@"qpid.apache.org/proton/go/reactor".bufferChan; @"qpid.apache.org/proton/go/reactor".handlers []@"qpid.apache.org/proton/go/reactor".EventHandler; @"qpid.apache.org/proton/go/reactor".running chan struct {}; @"qpid.apache.org/proton/go/reactor".closeOnce @"sync".Once }
-	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump) Close (@"qpid.apache.org/proton/go/reactor".err·2 error)
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x1") Connection () (? @"qpid.apache.org/proton/go/reactor".Connection) { return @"qpid.apache.org/proton/go/reactor".p·2.@"qpid.apache.org/proton/go/reactor".connection }
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) Error () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) Id () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) Inject (@"qpid.apache.org/proton/go/reactor".f·3 func()) (? error)
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) InjectWait (@"qpid.apache.org/proton/go/reactor".f·3 func()) (@"qpid.apache.org/proton/go/reactor".err·1 error)
-	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump) Run ()
-	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") Server ()
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump) String () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".handle (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (? error)
-	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".pop (@"qpid.apache.org/proton/go/reactor".buf·2 *[]byte)
-	func (@"qpid.apache.org/proton/go/reactor".p·2 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".process () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".p·1 *@"qpid.apache.org/proton/go/reactor".Pump "esc:0x0") @"qpid.apache.org/proton/go/reactor".push (@"qpid.apache.org/proton/go/reactor".buf·2 []byte "esc:0x0")
-	type @"qpid.apache.org/proton/go/reactor".Connection struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_connection_t }
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Close ()
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Container () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") DesiredCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Error () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Free ()
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Hostname () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".c·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") LinkHead (@"qpid.apache.org/proton/go/reactor".s·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Link)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Links (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (@"qpid.apache.org/proton/go/reactor".links·1 []@"qpid.apache.org/proton/go/reactor".Link)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") OfferedCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Open ()
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Properties () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Pump () (? *@"qpid.apache.org/proton/go/reactor".Pump)
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Release ()
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteCondition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteContainer () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteDesiredCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteHostname () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteOfferedCapabilities () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") RemoteProperties () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Reset ()
-	func (@"qpid.apache.org/proton/go/reactor".c·3 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Session () (? @"qpid.apache.org/proton/go/reactor".Session, ? error)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SessionHead (@"qpid.apache.org/proton/go/reactor".s·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Session)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") Sessions (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (@"qpid.apache.org/proton/go/reactor".sessions·1 []@"qpid.apache.org/proton/go/reactor".Session)
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetContainer (@"qpid.apache.org/proton/go/reactor".container·2 string "esc:0x0")
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetHostname (@"qpid.apache.org/proton/go/reactor".hostname·2 string "esc:0x0")
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetPassword (@"qpid.apache.org/proton/go/reactor".password·2 string "esc:0x0")
-	func (@"qpid.apache.org/proton/go/reactor".c·1 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") SetUser (@"qpid.apache.org/proton/go/reactor".user·2 string "esc:0x0")
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") State () (? @"qpid.apache.org/proton/go/reactor".State)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") String () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".c·2 @"qpid.apache.org/proton/go/reactor".Connection "esc:0x0") User () (? string)
-	type @"qpid.apache.org/proton/go/reactor".Session struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_session_t }
-	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Close ()
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Connection () (? @"qpid.apache.org/proton/go/reactor".Connection)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Error () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Free ()
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") IncomingBytes () (? uint)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") IncomingCapacity () (? uint)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".s·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Next (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Session)
-	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Open ()
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") OutgoingBytes () (? uint)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") OutgoingWindow () (? uint)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Receiver (@"qpid.apache.org/proton/go/reactor".name·3 string "esc:0x0") (? @"qpid.apache.org/proton/go/reactor".Link)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") RemoteCondition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") Sender (@"qpid.apache.org/proton/go/reactor".name·3 string "esc:0x0") (? @"qpid.apache.org/proton/go/reactor".Link)
-	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") SetIncomingCapacity (@"qpid.apache.org/proton/go/reactor".capacity·2 uint)
-	func (@"qpid.apache.org/proton/go/reactor".s·1 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") SetOutgoingWindow (@"qpid.apache.org/proton/go/reactor".window·2 uint)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session "esc:0x0") State () (? @"qpid.apache.org/proton/go/reactor".State)
-	func (@"qpid.apache.org/proton/go/reactor".s·2 @"qpid.apache.org/proton/go/reactor".Session) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".Link struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_link_t }
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Advance () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Available () (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Close ()
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Credit () (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Current () (? @"qpid.apache.org/proton/go/reactor".Delivery)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Delivery (@"qpid.apache.org/proton/go/reactor".tag·3 string "esc:0x0") (? @"qpid.apache.org/proton/go/reactor".Delivery)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Detach ()
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Drain (@"qpid.apache.org/proton/go/reactor".credit·2 int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Drained () (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Draining () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Error () (? error)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Flow (@"qpid.apache.org/proton/go/reactor".credit·2 int)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Free ()
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsDrain () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".l·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsReceiver () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") IsSender () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Name () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Next (@"qpid.apache.org/proton/go/reactor".state·3 @"qpid.apache.org/proton/go/reactor".State) (? @"qpid.apache.org/proton/go/reactor".Link)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Offered (@"qpid.apache.org/proton/go/reactor".credit·2 int)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Open ()
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Queued () (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RcvSettleMode () (? @"qpid.apache.org/proton/go/reactor".RcvSettleMode)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Recv (@"qpid.apache.org/proton/go/reactor".buf·3 []byte "esc:0x0") (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteCondition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteCredit () (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteRcvSettleMode () (? @"qpid.apache.org/proton/go/reactor".RcvSettleMode)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteSndSettleMode () (? @"qpid.apache.org/proton/go/reactor".SndSettleMode)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteSource () (? @"qpid.apache.org/proton/go/reactor".Terminus)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") RemoteTarget () (? @"qpid.apache.org/proton/go/reactor".Terminus)
-	func (@"qpid.apache.org/proton/go/reactor".link·3 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Send (@"qpid.apache.org/proton/go/reactor".m·4 @"qpid.apache.org/proton/go/amqp".Message) (? @"qpid.apache.org/proton/go/reactor".Delivery, ? error)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SendBytes (@"qpid.apache.org/proton/go/reactor".bytes·3 []byte "esc:0x0") (? int)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Session () (? @"qpid.apache.org/proton/go/reactor".Session)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SetDrain (@"qpid.apache.org/proton/go/reactor".drain·2 bool)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SetRcvSettleMode (@"qpid.apache.org/proton/go/reactor".mode·2 @"qpid.apache.org/proton/go/reactor".RcvSettleMode)
-	func (@"qpid.apache.org/proton/go/reactor".l·1 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SetSndSettleMode (@"qpid.apache.org/proton/go/reactor".mode·2 @"qpid.apache.org/proton/go/reactor".SndSettleMode)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") SndSettleMode () (? @"qpid.apache.org/proton/go/reactor".SndSettleMode)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Source () (? @"qpid.apache.org/proton/go/reactor".Terminus)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") State () (? @"qpid.apache.org/proton/go/reactor".State)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") String () (? string)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Target () (? @"qpid.apache.org/proton/go/reactor".Terminus)
-	func (@"qpid.apache.org/proton/go/reactor".l·2 @"qpid.apache.org/proton/go/reactor".Link "esc:0x0") Unsettled () (? int)
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_disposition_t struct {}
-	type @"qpid.apache.org/proton/go/reactor".Disposition struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_disposition_t }
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Annotations () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Condition () (? @"qpid.apache.org/proton/go/reactor".Condition)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Data () (? @"qpid.apache.org/proton/go/reactor".Data)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") IsFailed () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".d·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") IsUndeliverable () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SectionNumber () (? uint16)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SectionOffset () (? uint64)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetFailed (@"qpid.apache.org/proton/go/reactor".failed·2 bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetSectionNumber (@"qpid.apache.org/proton/go/reactor".section_number·2 uint16)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetSectionOffset (@"qpid.apache.org/proton/go/reactor".section_offset·2 uint64)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") SetUndeliverable (@"qpid.apache.org/proton/go/reactor".undeliverable·2 bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Disposition "esc:0x0") Type () (? uint64)
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_size_t uint64
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_char int8
-	type @"qpid.apache.org/proton/go/reactor"._Ctype_struct___0 struct { @"qpid.apache.org/proton/go/reactor".size @"qpid.apache.org/proton/go/reactor"._Ctype_size_t; @"qpid.apache.org/proton/go/reactor".start *@"qpid.apache.org/proton/go/reactor"._Ctype_char }
-	type @"qpid.apache.org/proton/go/reactor".DeliveryTag struct { @"qpid.apache.org/proton/go/reactor".pn @"qpid.apache.org/proton/go/reactor"._Ctype_struct___0 }
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".DeliveryTag) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".Delivery struct { @"qpid.apache.org/proton/go/reactor".pn *@"qpid.apache.org/proton/go/reactor"._Ctype_struct_pn_delivery_t }
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Accept ()
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Buffered () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Clear ()
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Current () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Dump ()
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") HasMessage () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") IsNil () (? bool) { return @"qpid.apache.org/proton/go/reactor".d·2.@"qpid.apache.org/proton/go/reactor".pn == nil }
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Link () (? @"qpid.apache.org/proton/go/reactor".Link)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Local () (? @"qpid.apache.org/proton/go/reactor".Disposition)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") LocalState () (? uint64)
-	func (@"qpid.apache.org/proton/go/reactor".delivery·3 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Message () (@"qpid.apache.org/proton/go/reactor".m·1 @"qpid.apache.org/proton/go/amqp".Message, @"qpid.apache.org/proton/go/reactor".err·2 error)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Partial () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Pending () (? uint)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Readable () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Reject ()
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Release (@"qpid.apache.org/proton/go/reactor".delivered·2 bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Remote () (? @"qpid.apache.org/proton/go/reactor".Disposition)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") RemoteState () (? uint64)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Settle ()
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") SettleAs (@"qpid.apache.org/proton/go/reactor".disposition·2 uint64)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Settled () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Tag () (? @"qpid.apache.org/proton/go/reactor".DeliveryTag)
-	func (@"qpid.apache.org/proton/go/reactor".d·1 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Update (@"qpid.apache.org/proton/go/reactor".state·2 uint64)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Updated () (? bool)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0") Writable () (? bool)
-	type @"".Disposition uint64
-	func (@"".d·2 @"".Disposition) String () (? string)
-	type @"".ReceivedMessage struct { Message @"qpid.apache.org/proton/go/amqp".Message; @"".eDelivery @"qpid.apache.org/proton/go/reactor".Delivery; @"".receiver @"".Receiver }
-	func (@"".rm·2 *@"".ReceivedMessage) Accept () (? error)
-	func (@"".rm·2 *@"".ReceivedMessage) Acknowledge (@"".disposition·3 @"".Disposition) (@"".err·1 error)
-	func (@"".rm·2 *@"".ReceivedMessage) Reject () (? error)
-	type @"".Receiver interface { AddCredit(@"".n int); Buffer() (? chan<- @"".ReceivedMessage); Close(? error); Credit() (@"".len int, @"".credit int, @"".max int); Error() (? error); IsOpen() (? bool); IsReceiver() (? bool); IsSender() (? bool); Name() (? string); Open() (? error); Receive() (? @"".ReceivedMessage, ? error); SetCapacity(@"".capacity int, @"".prefetch bool); SetName(? string); SetSource(? string); SetTarget(? string); Source() (? string); String() (? string); Target() (? string) }
-	type @"".errorHolder struct { @"".err @"qpid.apache.org/proton/go/internal".FirstError }
-	func (@"".e·2 *@"".errorHolder) Error () (? error)
-	func (@"".e·2 *@"".errorHolder) @"".setError (@"".err·3 error) (? error)
-	type @"".endpoint struct { ? @"".errorHolder; @"".str string }
-	func (@"".e·2 *@"".endpoint "esc:0x1") String () (? string) { return @"".e·2.@"".str }
-	type @"qpid.apache.org/proton/go/reactor".MessagingEventType int
-	func (@"qpid.apache.org/proton/go/reactor".t·2 @"qpid.apache.org/proton/go/reactor".MessagingEventType) String () (? string)
-	type @"qpid.apache.org/proton/go/reactor".MessagingHandler interface { HandleMessagingEvent(? @"qpid.apache.org/proton/go/reactor".MessagingEventType, ? @"qpid.apache.org/proton/go/reactor".Event) (? error) }
-	type @"qpid.apache.org/proton/go/reactor".Endpoint interface { Close(); Condition() (? @"qpid.apache.org/proton/go/reactor".Condition); Open(); RemoteCondition() (? @"qpid.apache.org/proton/go/reactor".Condition); State() (? @"qpid.apache.org/proton/go/reactor".State); String() (? string) }
-	type @"qpid.apache.org/proton/go/reactor".endpointDelegator struct { @"qpid.apache.org/proton/go/reactor".remoteOpen @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".remoteClose @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".localOpen @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".localClose @"qpid.apache.org/proton/go/reactor".EventType; @"qpid.apache.org/proton/go/reactor".opening @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".opened @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".closing @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".closed @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".error @"qpid.apache.org/proton/go/reactor".MessagingEventType; @"qpid.apache.org/proton/go/reactor".
 endpoint func(? @"qpid.apache.org/proton/go/reactor".Event) (? @"qpid.apache.org/proton/go/reactor".Endpoint); @"qpid.apache.org/proton/go/reactor".delegate @"qpid.apache.org/proton/go/reactor".MessagingHandler }
-	func (@"qpid.apache.org/proton/go/reactor".d·2 @"qpid.apache.org/proton/go/reactor".endpointDelegator) HandleEvent (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (@"qpid.apache.org/proton/go/reactor".err·1 error)
-	type @"qpid.apache.org/proton/go/reactor".MessagingDelegator struct { @"qpid.apache.org/proton/go/reactor".delegate @"qpid.apache.org/proton/go/reactor".MessagingHandler; @"qpid.apache.org/proton/go/reactor".connection @"qpid.apache.org/proton/go/reactor".endpointDelegator; @"qpid.apache.org/proton/go/reactor".session @"qpid.apache.org/proton/go/reactor".endpointDelegator; @"qpid.apache.org/proton/go/reactor".link @"qpid.apache.org/proton/go/reactor".endpointDelegator; @"qpid.apache.org/proton/go/reactor".handshaker @"qpid.apache.org/proton/go/reactor".EventHandler; @"qpid.apache.org/proton/go/reactor".flowcontroller @"qpid.apache.org/proton/go/reactor".EventHandler; AutoSettle bool; AutoAccept bool; Prefetch int; PeerCloseError bool }
-	func (@"qpid.apache.org/proton/go/reactor".d·2 *@"qpid.apache.org/proton/go/reactor".MessagingDelegator) HandleEvent (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (? error)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 *@"qpid.apache.org/proton/go/reactor".MessagingDelegator) @"qpid.apache.org/proton/go/reactor".incoming (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (@"qpid.apache.org/proton/go/reactor".err·1 error)
-	func (@"qpid.apache.org/proton/go/reactor".d·2 *@"qpid.apache.org/proton/go/reactor".MessagingDelegator) @"qpid.apache.org/proton/go/reactor".outgoing (@"qpid.apache.org/proton/go/reactor".e·3 @"qpid.apache.org/proton/go/reactor".Event) (@"qpid.apache.org/proton/go/reactor".err·1 error)
-	type @"".sender struct { ? @"".link; @"".deliveries map[@"qpid.apache.org/proton/go/reactor".Delivery]*@"".SentMessage }
-	func (@"".s·1 *@"".sender) Close (@"".err·2 error)
-	func (@"".s·2 *@"".sender) Open () (@"".err·1 error)
-	func (@"".s·3 *@"".sender) Send (@"".m·4 @"qpid.apache.org/proton/go/amqp".Message) (@"".sm·1 *@"".SentMessage, @"".err·2 error)
-	func (@"".s·1 *@"".sender) @"".close (@"".err·2 error)
-	func (@"".s·1 *@"".sender "esc:0x0") @"".handleDelivery (@"".delivery·2 @"qpid.apache.org/proton/go/reactor".Delivery "esc:0x0")
-	type @"".SentMessage struct { @"".sender *@"".sender; @"".eDelivery @"qpid.apache.org/proton/go/reactor".Delivery; @"".done chan struct {}; @"".disposition @"".Disposition }
-	func (@"".sm·3 *@"".SentMessage) Wait () (? @"".Disposition, ? error)
-	func (@"".sm·3 *@"".SentMessage) WaitTimeout (@"".timeout·4 @"time".Duration) (? @"".Disposition, ? error)
-	type @"".Sender interface { Close(? error); Error() (? error); IsOpen() (? bool); IsReceiver() (? bool); IsSender() (? bool); Name() (? string); Open() (? error); Send(@"".m @"qpid.apache.org/proton/go/amqp".Message) (@"".sm *@"".SentMessage, @"".err error); SetName(? string); SetSource(? string); SetTarget(? string); Source() (? string); String() (? string); Target() (? string) }
-	type @"".session struct { ? @"".endpoint; @"".eSession @"qpid.apache.org/proton/go/reactor".Session; @"".connection *@"".Connection }
-	func (@"".s·1 *@"".session) Close (@"".err·2 error)
-	func (@"".s·2 *@"".session "esc:0x1") Connection () (? *@"".Connection) { return @"".s·2.@"".connection }
-	func (@"".s·2 *@"".session) NewReceiver (@"".target·3 string) (@"".rcv·1 @"".Receiver)
-	func (@"".s·2 *@"".session) NewSender (@"".target·3 string) (@"".snd·1 @"".Sender)
-	func (@"".s·2 *@"".session) Open () (? error)
-	func (@"".s·2 *@"".session "esc:0x1") @"".eEndpoint () (? @"qpid.apache.org/proton/go/reactor".Endpoint) { return @"".s·2.@"".eSession }
-	func (@"".s·2 *@"".session "esc:0x1") @"".pump () (? *@"qpid.apache.org/proton/go/reactor".Pump) { return @"".s·2.@"".connection.@"".pump }
-	type @"".link struct { ? @"".endpoint; @"".session *@"".session; @"".isSender bool; @"".eLink @"qpid.apache.org/proton/go/reactor".Link; @"".name string; @"".source string; @"".target string; @"".isOpen bool }
-	func (@"".l·2 *@"".link "esc:0x1") Connection () (? *@"".Connection)
-	func (@"".l·2 *@"".link "esc:0x0") IsOpen () (? bool) { return @"".l·2.@"".isOpen }
-	func (@"".l·2 *@"".link "esc:0x0") IsReceiver () (? bool) { return !@"".l·2.@"".isSender }
-	func (@"".l·2 *@"".link "esc:0x0") IsSender () (? bool) { return @"".l·2.@"".isSender }
-	func (@"".l·2 *@"".link "esc:0x1") Name () (? string) { return @"".l·2.@"".name }
-	func (@"".l·2 *@"".link "esc:0x1") Session () (? @"".Session) { return @"".l·2.@"".session }
-	func (@"".l·1 *@"".link) SetName (@"".s·2 string)
-	func (@"".l·1 *@"".link) SetSource (@"".s·2 string)
-	func (@"".l·1 *@"".link) SetTarget (@"".s·2 string)
-	func (@"".l·2 *@"".link "esc:0x1") Source () (? string) { return @"".l·2.@"".source }
-	func (@"".l·2 *@"".link "esc:0x1") Target () (? string) { return @"".l·2.@"".target }
-	func (@"".l·1 *@"".link) @"".close (@"".err·2 error)
-	func (@"".l·2 *@"".link "esc:0x0") @"".handler () (? *@"".handler)
-	func (@"".l·2 *@"".link) @"".localSetup () (? error)
-	func (@"".l·2 *@"".link) @"".open () (? error)
-	func (@"".l·2 *@"".link "esc:0x0") @"".pump () (? *@"qpid.apache.org/proton/go/reactor".Pump)
-	func (@"".l·1 *@"".link) @"".setPanicIfLink ()
-	func (@"".l·1 *@"".link) @"".setPanicIfOpen ()
-	func (@"".l·1 *@"".link) @"".setString ()
-	type @"".policy interface { Post(? *@"".receiver, ? error); Pre(? *@"".receiver) }
-	type @"".receiver struct { ? @"".link; @"".capacity int; @"".prefetch bool; @"".buffer chan @"".ReceivedMessage; @"".policy @"".policy }
-	func (@"".r·1 *@"".receiver) AddCredit (@"".n·2 int)
-	func (@"".r·2 *@"".receiver "esc:0x1") Buffer () (? chan<- @"".ReceivedMessage) { return @"".r·2.@"".buffer }
-	func (@"".r·2 *@"".receiver "esc:0x0") Capacity () (? int) { return cap(@"".r·2.@"".buffer) }
-	func (@"".r·1 *@"".receiver) Close (@"".err·2 error)
-	func (@"".r·4 *@"".receiver) Credit () (@"".buffered·1 int, @"".credit·2 int, @"".capacity·3 int)
-	func (@"".r·2 *@"".receiver) Open () (@"".err·1 error)
-	func (@"".r·3 *@"".receiver) Receive () (@"".rm·1 @"".ReceivedMessage, @"".err·2 error)
-	func (@"".r·1 *@"".receiver) SetCapacity (@"".capacity·2 int, @"".prefetch·3 bool)
-	func (@"".r·1 *@"".receiver) @"".close (@"".err·2 error)
-	func (@"".r·4 *@"".receiver "esc:0x0") @"".credit () (@"".buffered·1 int, @"".credit·2 int, @"".capacity·3 int)
-	func (@"".r·1 *@"".receiver) @"".handleDelivery (@"".delivery·2 @"qpid.apache.org/proton/go/reactor".Delivery)
-	type @"".handler struct { @"".delegator *@"qpid.apache.org/proton/go/reactor".MessagingDelegator; @"".connection *@"".Connection; @"".receivers map[@"qpid.apache.org/proton/go/reactor".Link]*@"".receiver; @"".senders map[@"qpid.apache.org/proton/go/reactor".Link]*@"".sender; @"".sessions map[@"qpid.apache.org/proton/go/reactor".Session]*@"".session }
-	func (@"".h·2 *@"".handler) HandleMessagingEvent (@"".t·3 @"qpid.apache.org/proton/go/reactor".MessagingEventType, @"".e·4 @"qpid.apache.org/proton/go/reactor".Event) (? error)
-	func (@"".h·1 *@"".handler "esc:0x0") @"".close ()
-	type @"qpid.apache.org/proton/go/amqp".UidCounter struct { @"qpid.apache.org/proton/go/amqp".count uint64 }
-	func (@"qpid.apache.org/proton/go/amqp".uc·2 *@"qpid.apache.org/proton/go/amqp".UidCounter) Next () (? string)
-	func (@"qpid.apache.org/proton/go/amqp".uc·2 *@"qpid.apache.org/proton/go/amqp".UidCounter) NextInt () (? uint64)
-	type @"qpid.apache.org/proton/go/internal".FlexChannel struct { In chan<- interface {}; Out <-chan interface {}; @"qpid.apache.org/proton/go/internal".in chan interface {}; @"qpid.apache.org/proton/go/internal".out chan interface {}; @"qpid.apache.org/proton/go/internal".buffer []interface {}; @"qpid.apache.org/proton/go/internal".limit int }
-	func (@"qpid.apache.org/proton/go/internal".fc·1 *@"qpid.apache.org/proton/go/internal".FlexChannel) @"qpid.apache.org/proton/go/internal".run ()
-	type @"net".Listener interface { Accept() (@"net".c @"net".Conn, @"net".err error); Addr() (? @"net".Addr); Close() (? error) }
-	type @"".Connection struct { Server bool; AllowIncoming int; LinkPrefix string; ? @"".endpoint; @"".handler *@"".handler; @"".pump *@"qpid.apache.org/proton/go/reactor".Pump; @"".err @"qpid.apache.org/proton/go/internal".FirstError; @"".linkNames @"qpid.apache.org/proton/go/amqp".UidCounter; @"".eConnection @"qpid.apache.org/proton/go/reactor".Connection; @"".incoming *@"qpid.apache.org/proton/go/internal".FlexChannel }
-	func (@"".c·2 *@"".Connection) Accept (@"".l·3 @"net".Listener) (? error)
-	func (@"".c·1 *@"".Connection) Close (@"".err·2 error)
-	func (@"".c·2 *@"".Connection) Dial (@"".network·3 string, @"".address·4 string) (? error)
-	func (@"".c·3 *@"".Connection) Incoming () (? @"".Endpoint, ? error)
-	func (@"".c·3 *@"".Connection) IncomingTimeout (@"".timeout·4 @"time".Duration) (? @"".Endpoint, ? error)
-	func (@"".c·2 *@"".Connection) Open (@"".conn·3 @"net".Conn) (@"".err·1 error)
-	func (@"".c·3 *@"".Connection) OpenSession () (@"".s·1 @"".Session, @"".err·2 error)
-	func (@"".c·1 *@"".Connection) @"".close (@"".err·2 error)
-	func (@"".c·1 *@"".Connection "esc:0x0") @"".handleIncoming (@"".sn·2 *@"".session, @"".l·3 @"qpid.apache.org/proton/go/reactor".Link)
-	func (@"".c·2 *@"".Connection) @"".nextLinkName () (? string)
-	type @"".Session interface { Close(? error); Connection() (? *@"".Connection); Error() (? error); NewReceiver(@"".target string) (? @"".Receiver); NewSender(@"".target string) (? @"".Sender); Open() (? error); String() (? string) }
-	type @"qpid.apache.org/proton/go/internal".Error string
-	func (@"qpid.apache.org/proton/go/internal".e·2 @"qpid.apache.org/proton/go/internal".Error "esc:0x0") Error () (? string) { return "proton: " + string(@"qpid.apache.org/proton/go/internal".e·2) }
-	var @"".Timeout @"qpid.apache.org/proton/go/internal".Error
-	const @"".Forever @"time".Duration = -0x1
-	const @"".Unlimited = -0x1
-	const @"".NoDisposition @"".Disposition = 0x0
-	const @"".Accepted = 0x24
-	const @"".Rejected = 0x25
-	const @"".Released = 0x26
-	func @"".init ()
-	var @"time".months [12]string
-	var @"time".days [7]string
-	var @"time".Local *@"time".Location
-	var @"time".UTC *@"time".Location
-
-$$
-_go_.6          0           0     0     644     468572    `
-go object linux amd64 go1.4.2 X:precisestack
-
-!
-go13ld@qpid.apache.org/proton/go/amqp.aFqpid.apache.org/proton/go/reactor.a
-fmt.aio.aHqpid.apache.org/proton/go/internal.areflect.atime.aruntime/cgo.asyscall.a
-net.a�"".newHandler�	�	dH�%H;aw���H��XH�H�$H�D$�H�\$H�\$@H�H�$H�D$�H�\$H�\$8H�H�$H�D$�H�\$H�\$0H�H�$�H�L$H��H����1��H�L$(H�$H�<$�yH�$H�\$`H�\$�H�\$(H�$H�<$�EH�$H�\$@H�\$�H�\$(H�$H�<$�H�$H�\$8H�\$�H�\$(H�$H�<$��H�$ H�\$0H�\$�H�D$(H�D$ H�D$(H�1�H9�tzH�L$(H�D$HH�$H�L$PH�L$�H�D$H�\$ H�$H�<$t?H�D$�H�D$ H�HǃXH�1�@��QH�1�@��PH�D$hH��XÉ%�H�H�$H�H�\$H�H�\$�H�D$�T����%�����%������%�����%�{�����Y���,
- 0runtime.morestack_noctxt:xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver^runtime.makemap�ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�runtime.makemap�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�runtime.makemap�type."".handler�"runtime.newobject�� runtime.duffzero�.runtime.writebarrierptr�.runtime.writebarrierptr�.runtime.writebarrierptr�.runtime.writebarrierptr��go.itab.*"".handler.qpid.apache.org/proton/go/reactor.MessagingHandler�nqpid.apache.org/proton/go/reactor.NewMessagingDelegator�.runtime.writebarrierptr� type.*"".handler�ntype.qpid.apache.org/proton/go/reactor.MessagingHandler��go.itab.*"".handler.qpid.apache.org/proton/go/reactor.MessagingHandler� runtime.typ2Itab �"".autotmp_0033_ type.*"".handle
 r"".autotmp_0031 type.*"".handler"".autotmp_0030O|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session"".autotmp_0029?ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender"".autotmp_0028/xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver"".ho type.*"".handler"".~r1 type.*"".handler"".c&type.*"".Connection����v�4L##�Y
-	;;0.##A(((:�JTgclocals·a89e82532b08703817da6ad245f4f6c1Tgclocals·afe2b15161969548d2683e49e081ad97�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go�D"".(*handler).HandleMessagingEvent�:�:dH�%H��$ ���H;Aw���H��`H��$hHDŽ$�HDŽ$�H��$pH���>H���tH���H��$xH��$@H��H���H��$XH��$�H�$��\$H��H!À���1�<�.H��$xH��$�H��H���H��$�H��$hH�kH�,$H�D$hH�D$�H�T$H��$xH��$ H��H���H��$8H��$�H��$�H��$�H��$�H�H�$H��$hH�k H�l$H��$�H�\$H��$�H�\$�H��$hH�iH���1�H9�toH��$�H��$@H�H��$8H�H�$H�YH��
 ��H�+H�l$H��$8H�\$�HDŽ$�HDŽ$�H��`�H��$xH��$H��H���H��$H��$�H��$�H�H�$H�5H�t$H�5H�l$H��H�H�H�\$ H�H�CH�C�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$�H�\$�H�\$ H��$H�\$(H��$ H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$H�$H��$ H�\$�����H���M���H���y���H��$xH��$H��H���H��$0H��$�H��$�H�$�H��$��\$H��H!À���1�<����H��$hH�mH���1�H9��&H��$H�H�$H�5H�t$H�5H�l$H��H�H�H�\$ H�H�CH�C�H�\$8H��$pH�
 �H���H�H�$H�H�\$H�H�\$H��$H�\$�H�\$ H��$H�\$(H��$ H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$H�$H��$ H�\$������H�4$�H�\$H��$�H�H�$H��$hH�k H�l$H��$�H�\$�H��$�H�\$H�1�H9��&H��$H�H�$H�5H�t$H�5H�l$H��H�H�H�\$ H�H�CH�C�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$H�\$�H�\$ H��$H�\$(H��$ H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$H�$H��$ H�\$��J���H��$hH�kH�,$H�D$H�T$��&���H�������H��u^H��$xH��$�H�
 ���H���H��$�H��$�H��$�H�H�$H�j H�l$H��$�H�\$�����H�������H��$xH��$�H��H���H��$�H�D$xH��$�H�$�H�D$H��$�H�$�H�L$H�D$H��$H��$H��$�H��$H�H�$H��$hH�kH�l$H��$H�\$�H�\$H�1�H9�t#H�$H��$H�\$H��$H�\$�H��$�H��$H�H�$H��$hH�kH�l$H��$H�\$�H�\$H�1�H9������H�$H��$H�\$H��$H�\$��Z���H���{H���H��$xH��$pH��H���H��$�H��$�H��$H�H�$H�jH�l$H��$H�\$�H�\$H�1�H9�tH�$H�\$H�H�C�H��$xH��$0H��H���H��$PH��$�H��$H�
 ��H�$H��$hH�kH�l$H��$H�\$�H�\$H�1�H9��M���H�$H�\$H�H�C��+���H���!���H��$xH��$�H��H���H��$�H�D$pH��$H�H�$H�jH�l$H��$H�\$�H�\$H�1�H9�t;H��$xH��$PH��H���H��$xH�$H�L$`H�L$�����H��$xH��$�H��H���H��$H��$�H��$H��$HH�H�CH��$HH���IH��H��H��$XH��$`H��$hH�H�$H��$H�\$�H�T$H�D$H��$XH�$H��$(H�T$H��$0H�D$�H�H�$H�5H�t$H�5H�l$H��H�H�H��$XH�\$ H��$`H�\$(H��$hH�\$0�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l
 $H��H��H�H�H��$hH�kH�,$�����������H���OH��$xH��$�H��H���H��$H��$�H��$H�H�$H�jH�l$H��$H�\$�H�\$H�1�H9�t>H��$xH��$�H��H���H��$�H�$H��$�H�L$��%���H��$xH��$�H��H���H��$�H�D$XH��$H��$HH�H�CH��$HH���IH��H��H��$XH��$`H��$hH�H�$H��$H�\$�H�T$H�D$H��$XH�$H��$(H�T$H��$0H�D$�H�H�$H�5H�t$H�5H�l$H��H�H�H��$XH�\$ H��$`H�\$(H��$hH�\$0�H�\$8H��$pH��H���H�H�$H�H�\$H�H�\$H��$pH�\$�H�\$ H�l$H��H��H�H�H��$hH�kH�,$���
 ���������H���r���H�$��d����
-00runtime.morestack_noctxt�� runtime.duffcopy�^qpid.apache.org/proton/go/reactor.Session.State�� runtime.duffcopy�"".newSession�� runtime.duffcopy�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�$runtime.mapassign1� type.*"".session�0type.chan<- interface {}�"runtime.chansend1�� runtime.duffcopy�	Rqpid.apache.org/proton/go/amqp.NotAllowed�	Rqpid.apache.org/proton/go/amqp.NotAllowed�	Ngo.string."remote sessions not allowed"�
-Jqpid.apache.org/proton/go/amqp.Errorf�
-� runtime.duffcopy�
-\type.qpid.apache.org/proton/go/reactor.Session�
-^type.qpid.apache.org/proton/go/reactor.Endpoint�
-�go.itab.qpid.apache.org/proton/go/reactor.Session.qpid.apache.org/proton/go/reactor.Endpoint�runtime.convT2I�Rtype.qpid.apache.org/proton/go/amqp.Error�type.error�dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�runtime.convT2I�
Xqpid.apache.org/proton/go/reactor.CloseError�� runtime.duffcopy�Xqpid.apache.org/proton/go/reactor.Link.State�Rqpid.apache.org/proton/go/amqp.NotAllowed�Rqpid.apache.org/proton/go/amqp.NotAllowed�6go.string."no remote links"�Jqpid.apache.org/proton/go/amqp.Errorf�� runtime.duffcopy�Vtype.qpid.apache.org/proton/go/reactor.Link�^type.qpid.apache.org/proton/go/reactor.Endpoint��go.itab.qpid.apache.org/proton/go/reactor.Link.qpid.apache.org/proton/go/reactor.Endpoint�runtime.convT2I�Rtype.qpid.apache.org/proton/go/amqp.Error�type.error�dgo.ita
 b.qpid.apache.org/proton/go/amqp.Error.error�runtime.convT2I�Xqpid.apache.org/proton/go/reactor.CloseError�\qpid.apache.org/proton/go/reactor.Link.Session�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�$runtime.mapaccess1�Xqpid.apache.org/proton/go/amqp.InternalError�Xqpid.apache.org/proton/go/amqp.InternalError�Pgo.string."cannot find session for link"�Jqpid.apache.org/proton/go/amqp.Errorf�� runtime.duffcopy�Vtype.qpid.apache.org/proton/go/reactor.Link�^type.qpid.apache.org/proton/go/reactor.Endpoint��go.itab.qpid.apache.org/proton/go/reactor.Link.qpid.apache.org/proton/go/reactor.Endpoint�runtime.convT2I�Rtype.qpid.apache.org/proton/go/amqp.Error�type.error�dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�runtime.convT2I�Xqpid.apache.org/proton/go/reactor.CloseErro
 r�>"".(*Connection).handleIncoming�� runtime.duffcopy�|type.map[qpid.apache.org/proton/go/reactor.Session]*"".session�"runtime.mapdelete�� runtime.duffcopy�lqpid.apache.org/proton/go/reactor.Link.RemoteCondition�bqpid.apache.org/proton/go/reactor.Condition.Error�xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�$runtime.mapaccess1� ("".(*receiver).close� ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�!$runtime.mapaccess1�"$"".(*sender).close�#� runtime.duffcopy�#xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�#$runtime.mapaccess1�$("".(*receiver).close�%� runtime.duffcopy�%ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�&$runtime.mapaccess1�&$"".(*sender).close�'� runtime.duffcopy�(ttype.map[qpid.apache.org/pro
 ton/go/reactor.Link]*"".sender�($runtime.mapaccess1�)� runtime.duffcopy�)6"".(*sender).handleDelivery�*� runtime.duffcopy�+Vtype.qpid.apache.org/proton/go/reactor.Link�,runtime.convT2E�,2runtime.writebarrieriface�-Xqpid.apache.org/proton/go/amqp.InternalError�-Xqpid.apache.org/proton/go/amqp.InternalError�-Tgo.string."cannot find sender for link %s"�.Jqpid.apache.org/proton/go/amqp.Errorf�.� runtime.duffcopy�.Rtype.qpid.apache.org/proton/go/amqp.Error�.type.error�/dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�/runtime.convT2I�0,"".(*Connection).close�0� runtime.duffcopy�1xtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�1$runtime.mapaccess1�2� runtime.duffcopy�3:"".(*receiver).handleDelivery�3� runtime.duffcopy�5Vtype.qpid.apache.org/prot
 on/go/reactor.Link�5runtime.convT2E�62runtime.writebarrieriface�6Xqpid.apache.org/proton/go/amqp.InternalError�6Xqpid.apache.org/proton/go/amqp.InternalError�6Xgo.string."cannot find receiver for link %s"�7Jqpid.apache.org/proton/go/amqp.Errorf�8� runtime.duffcopy�8Rtype.qpid.apache.org/proton/go/amqp.Error�8type.error�8dgo.itab.qpid.apache.org/proton/go/amqp.Error.error�8runtime.convT2I�9,"".(*Connection).close�:&"".(*handler).close���"".autotmp_0084^type.qpid.apache.org/proton/go/reactor.Endpoint"".autotmp_0083^type.qpid.apache.org/proton/go/reactor.Endpoint"".autotmp_0082type.bool"".autotmp_0081�
^type.qpid.apache.org/proton/go/reactor.Endpoint"".autotmp_0079"type.interface {}"".autotmp_0078*type.*[1]interface {}"".autotmp_0077&type.[]interface {}"".autotmp_0076�"type.interface {}"".autotmp_0074�&
 type.[]interface {}"".autotmp_0072type.*"".sender"".autotmp_0071Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0070"type.*"".receiver"".autotmp_0069Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0068type.*"".sender"".autotmp_0067Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0066"type.*"".receiver"".autotmp_0065Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0063�
`type.qpid.apache.org/proton/go/reactor.Condition"".autotmp_0062Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0061Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0060 type.*"".session"".autotmp_0059\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0058Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0057Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0056Xtype.qpid.apache.org/proton/go/reactor.State"".autotmp_0055\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0
 054Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0053\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0052�"type.interface {}"".autotmp_0051 type.*"".session"".autotmp_0050�
 type.*"".session"".autotmp_0049�
\type.qpid.apache.org/proton/go/reactor.Session"".autotmp_0046Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0045Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0044(type.[1]interface {}"".autotmp_0042Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0041�Rtype.qpid.apache.org/proton/go/amqp.Error"".autotmp_0040Vtype.qpid.apache.org/proton/go/reactor.Link"".autotmp_0039�(type.[1]interface {}"".autotmp_0037�
Vtype.qpid.apache.org/proton/go/reactor.Link"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2_Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/p
 roton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type.qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�\type
 .qpid.apache.org/proton/go/reactor.SessionLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�	Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�^type.qpid.apache.org/proton/go/reactor.DeliveryLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�
-Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�^type.qpid.apache.org/proton/go/reactor.DeliveryLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".~r0�Vtype.qpid.apache.org/proton/go/reactor.LinkLqpid.apache.org/proton/go/reactor.e·2�Xtype.qpid.apache.org/proton/go/reactor.Event"".err�
type.error"".l�
Vtype.qpid.apache.org/proton/go/reactor.Link"".l�Vtype.qpid.apache.org/proton/go/reactor.Link"".s� type.*"".session"".~r2�type.error"".e Xtype.qpid.apache.org/proton/go/reactor.Event"".trtype.qpid.apache.org/proton/go/reactor.MessagingEventType"".h type.*"".handler%�������jE&
-VG�Ob ]�^i
-+;�HAT�>78K	YT1
-(AM#Q#$�
-z
-ht}
-e6xq�rq
-h9�����f
-	
-���i�MO2W�MO2;nMO2$pHn2>6r,
a0
eE
��M�H
��MH!Tgclocals·b82cb6ebf331abc37c079649e2b6da7cTgclocals·8db54c8e460d681e679ff513c38148da�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go�&"".(*handler).close��dH�%H�D$�H;Aw���H��H��$�H�kH�|$h1��H�H�$H�l$H�\$hH�\$�H�\$h1�H9�tNH�\$pH�+H�\$hH����H�,$H�\$H�H�C�H�\$hH�$�H�\$h1�H9�u�H��$�H�kH�|$1��H�H�$H�l$H�\$H�\$�H�\$1�H9�tJH�\$ H�+H�\$H��t?H�,$H�\$H�H�C�H�\$H�$�H�\$1�H9�u�H�ĸÉ뽉�)���
-*0runtime.morestack_noctxtl� runtime.duffzerozxtype.map[qpid.apache.org/proton/go/reactor.Link]*"".receiver�&runtime.mapiterinit�("".(*receiver).close�&runtime.mapiternext�� runtime.duffzero�ttype.map[qpid.apache.org/proton/go/reactor.Link]*"".sender�&runtime.mapiterinit�$"".(*sender).close�&runtime.mapiternext�"".autotmp_0095�~type.map.iter[qpid.apache.org/proton/go/reactor.Link]*"".sender"".autotmp_0093��type.map.iter[qpid.apache.org/proton/go/reactor.Link]*"".receiver"".h type.*"".handler"�����4�"ZVT�{Tgclocals·15395a9df917b4c9aa74d5c6c7e1ebf4Tgclocals·71f80432bc6668593abff0f0dbd021b7�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/handler.go�4"".(*errorHolder).setError��dH�%H;aw���H��(H�D$HH�D$P
 H�\$0H�$H�<$t2H�\$8H�\$H�\$@H�\$�H�L$H�D$ H�L$HH�D$PH��(É%��
- 0runtime.morestack_noctxt�hqpid.apache.org/proton/go/internal.(*FirstError).SetPP"".~r10type.error"".errtype.error"".e(type.*"".errorHolderPSOP�|�
-P0Tgclocals·57e1009a600f832f844e0e3c49ba5a89Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�."".(*errorHolder).Error��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�<$t�H�L$H�D$H�L$(H�D$0H��É%��
- 0runtime.morestack_noctxtzhqpid.apache.org/proton/go/internal.(*FirstError).Get00"".~r0type.error"".e(type.*"".errorHolder0?/0p~p
-<4Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�*"".(*endpoint).String`DH�\$H��tH�kH�l$H�k H�l$É��0"".~r0type.string"".e"type.*"".endpoint00�0Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�2"".(*link).setPanicIfOpen��dH�%H;aw���H��H��$��ip@����H��H�\$XH�H�CH�\$XH����H��H��H�T$pH�L$xH�\$hH�$H�H�D$8H�D$H�l$@H�l$�H�H�,$H��H��H�H�H�\$hH�\$H�\$pH�\$H�\$xH�\$ �H�\$(H�\$HH�\$0H�\$PH�H�$H�\$HH�\$�H�\$H�,$H��H��H�H��
 ��8���H��
- 0runtime.morestack_noctxt�type.*"".link�2runtime.writebarrieriface�^go.string."cannot set property on open link %s"�Rqpid.apache.org/proton/go/internal.Errorf�Ztype.qpid.apache.org/proton/go/internal.Error�runtime.convT2E�runtime.gopanic�"".autotmp_0103/&type.[]interface {}"".autotmp_0102oZtype.qpid.apache.org/proton/go/internal.Error"".autotmp_0100O(type.[1]interface {}"".ltype.*"".link�����%��8.5Tgclocals·fbd5b7009fdd3864023723132632a4f4Tgclocals·2276d8371a4f8737752113708e64c2a5�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�2"".(*link).setPanicIfLink��dH�%H�D$�H;Aw���H��H��$�H�$�H��$�H���&H�Y8H�\$81�H9��1�<��H��H�\$`H�H�CH�\$`H����H
 ��H��H�T$xH��$�H�\$pH�$H�H�D$@H�D$H�l$HH�l$�H�H�,$H��H��H�H�H�\$pH�\$H�\$xH�\$H��$�H�\$ �H�\$(H�\$PH�\$0H�\$XH�H�$H�\$PH�\$�H�\$H�,$H��H��H�H����2���H�Ĉ�H�������������
-*0runtime.morestack_noctxt^2"".(*link).setPanicIfOpen�type.*"".link�2runtime.writebarrieriface�xgo.string."cannot set set link property on incoming link %s"�Rqpid.apache.org/proton/go/internal.Errorf�Ztype.qpid.apache.org/proton/go/internal.Error�runtime.convT2E�runtime.gopanic�
-"".autotmp_0114/&type.[]interface {}"".autotmp_0112oZtype.qpid.apache.org/proton/go/internal.Error"".autotmp_0110O(type.[1]interface {}Lqpid.apache.org/proton/go/reactor.l·2�Vtype.qpid.apache.org/proton/go/reactor.Link"".ltype.*"".link"����!��"(�!.�;.OTgclocals·fbd5b7009fdd3864023723132632a4f4Tgclocals·bdc8dbf2e07519097eddde01a6360fd2�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�""".(*link).Source`DH�\$H��tH�kPH�l$H�kXH�l$É��0"".~r0type.string"".ltype.*"".link00�0Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�""".(*link).Target`DH�\$H��tH�k`H�l$H�khH�l$É��0"".~r0type.string"".ltype.*"".link00�0Tgc
 locals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�"".(*link).Name`DH�\$H��tH�k@H�l$H�kHH�l$É��0"".~r0type.string"".ltype.*"".link00�0Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�&"".(*link).IsSender H�\$�k0@�l$� "".~r0type.bool"".ltype.*"".link�Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�*"".(*link).IsReceiver@6H�l$�]0��t�D$��D$�� "".~r0type.bool"".ltype.*"".link  � Tgclocals·06cab038d51064a089bda21
 fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�("".(*link).SetSource��dH�%H;aw���H��H�\$ H�$�H�\$ H�$H�<$t#H�$PH�\$(H�\$H�\$0H�\$�H��É%��
- 0runtime.morestack_noctxtH2"".(*link).setPanicIfLink�4runtime.writebarrierstring00"".stype.string"".ltype.*"".link0@/0p�p
-#MTgclocals·d3486bc7ce1948dc22d7ad1c0be2887aTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�("".(*link).SetTarget��dH�%H;aw���H��H�\$ H�$�H�\$ H�$H�<$t#H�$`H�\$(H�\$H�\$0H�\$�H��É%��
- 0runtime.morestack_noctxtH2"".(*link).setPanicIfLink�4runtime.writebarrierstring00"".stype.string"".ltype.*"".link0@/0p�p
-#MTgclocals·d3486bc7ce1948dc22d7ad1c0be2887aTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�$"".(*link).SetName��dH�%H;aw���H��H�\$ H�$�H�\$ H�$H�<$t#H�$@H�\$(H�\$H�\$0H�\$�H��É%��
- 0runtime.morestack_noctxtH2"".(*link).setPanicIfLink�4runtime.writebarrierstring00"".stype.string"".ltype.*"".link0@/0p�p
-#MTgclocals·d3486bc7ce1948dc22d7ad1c0be2887aTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�""".(*link).IsOpen H�\$�kp@�l$� "".~r0type.bool"".ltype.*"".link�Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�$"".(*link).Session��dH�%H;aw���H�� H�D$0H�D$8H�1�H9�tH�\$(H�k(H�l$8H�D$0H�� �H�H�$H�H�\$H�H�\$�H�D$�
- 0runtime.morestack_noctxt^<go.itab.*"".session."".Session� type.*"".session�type."".Session�<go.itab.*"".session."".Session� runtime.typ2Itab0@"".~r0type."".Session"".ltype.*"".link@7?@>�
-��
-uTgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�*"".(*link).Connection@&H�\$H�k(H�m0H�l$� "".~r0&type.*"".Connection"".ltype.*"".link  � Tgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/messaging/link.go�"".(*link).pump�vdH�%H;aw���H��H�\$H�$�H�\

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[02/36] qpid-proton git commit: PROTON-827: Switch go directory and symlink locations, problems with some go tools.

Posted by ac...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9276ae33/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a
new file mode 100644
index 0000000..866a862
--- /dev/null
+++ b/proton-c/bindings/go/pkg/linux_amd64/qpid.apache.org/proton/go/reactor.a
@@ -0,0 +1,3319 @@
+!<arch>
+__.PKGDEF       0           0     0     644     33136     `
+go object linux amd64 go1.4.2 X:precisestack
+
+$$
+package reactor
+	import net "net"
+	import sync "sync"
+	import runtime "runtime"
+	import time "time"
+	import io "io"
+	import cgo "runtime/cgo"
+	import amqp "qpid.apache.org/proton/go/amqp"
+	import os "os"
+	import syscall "syscall"
+	import fmt "fmt"
+	import internal "qpid.apache.org/proton/go/internal"
+	import reflect "reflect"
+	import path "path"
+	import unsafe "unsafe"
+	type @""._Ctype_struct_pn_event_t struct {}
+	type @"".EventType int
+	func (@"".e·2 @"".EventType) String () (? string)
+	type @""._Ctype_struct_pn_connection_t struct {}
+	type @"sync".Mutex struct { @"sync".state int32; @"sync".sema uint32 }
+	func (@"sync".m·1 *@"sync".Mutex) Lock ()
+	func (@"sync".m·1 *@"sync".Mutex) Unlock ()
+	type @"qpid.apache.org/proton/go/internal".FirstError struct { @"qpid.apache.org/proton/go/internal".err error; @"qpid.apache.org/proton/go/internal".lock @"sync".Mutex }
+	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Get () (? error)
+	func (@"qpid.apache.org/proton/go/internal".e·2 *@"qpid.apache.org/proton/go/internal".FirstError) Set (@"qpid.apache.org/proton/go/internal".err·3 error) (? error)
+	type @"net".Addr interface { Network() (? string); String() (? string) }
+	type @"time".zone struct { @"time".name string; @"time".offset int; @"time".isDST bool }
+	type @"time".zoneTrans struct { @"time".when int64; @"time".index uint8; @"time".isstd bool; @"time".isutc bool }
+	type @"time".Location struct { @"time".name string; @"time".zone []@"time".zone; @"time".tx []@"time".zoneTrans; @"time".cacheStart int64; @"time".cacheEnd int64; @"time".cacheZone *@"time".zone }
+	func (@"time".l·2 *@"time".Location "esc:0x0") String () (? string)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".firstZoneUsed () (? bool)
+	func (@"time".l·2 *@"time".Location "esc:0x2") @"time".get () (? *@"time".Location)
+	func (@"time".l·6 *@"time".Location "esc:0x1") @"time".lookup (@"time".sec·7 int64) (@"time".name·1 string, @"time".offset·2 int, @"time".isDST·3 bool, @"time".start·4 int64, @"time".end·5 int64)
+	func (@"time".l·2 *@"time".Location "esc:0x0") @"time".lookupFirstZone () (? int)
+	func (@"time".l·4 *@"time".Location "esc:0x0") @"time".lookupName (@"time".name·5 string "esc:0x0", @"time".unix·6 int64) (@"time".offset·1 int, @"time".isDST·2 bool, @"time".ok·3 bool)
+	type @"time".Duration int64
+	func (@"time".d·2 @"time".Duration) Hours () (? float64) { var @"time".hour·3 @"time".Duration; ; @"time".hour·3 = @"time".d·2 / @"time".Duration(0x34630B8A000); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x34630B8A000); return float64(@"time".hour·3) + float64(@"time".nsec·4) * 0x9C5FFF26ED75Fp-93 }
+	func (@"time".d·2 @"time".Duration) Minutes () (? float64) { var @"time".min·3 @"time".Duration; ; @"time".min·3 = @"time".d·2 / @"time".Duration(0xDF8475800); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0xDF8475800); return float64(@"time".min·3) + float64(@"time".nsec·4) * 0x9299FF347E9E9p-87 }
+	func (@"time".d·2 @"time".Duration) Nanoseconds () (? int64) { return int64(@"time".d·2) }
+	func (@"time".d·2 @"time".Duration) Seconds () (? float64) { var @"time".sec·3 @"time".Duration; ; @"time".sec·3 = @"time".d·2 / @"time".Duration(0x3B9ACA00); var @"time".nsec·4 @"time".Duration; ; @"time".nsec·4 = @"time".d·2 % @"time".Duration(0x3B9ACA00); return float64(@"time".sec·3) + float64(@"time".nsec·4) * 0x112E0BE826D695p-82 }
+	func (@"time".d·2 @"time".Duration) String () (? string)
+	type @"time".Month int
+	func (@"time".m·2 @"time".Month) String () (? string) { return @"time".months[@"time".m·2 - @"time".Month(0x1)] }
+	type @"time".Weekday int
+	func (@"time".d·2 @"time".Weekday) String () (? string) { return @"time".days[@"time".d·2] }
+	type @"time".Time struct { @"time".sec int64; @"time".nsec int32; @"time".loc *@"time".Location }
+	func (@"time".t·2 @"time".Time "esc:0x2") Add (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") AddDate (@"time".years·3 int, @"time".months·4 int, @"time".days·5 int) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") After (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec > @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec > @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Before (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec < @"time".u·3.@"time".sec || @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec < @"time".u·3.@"time".nsec }
+	func (@"time".t·4 @"time".Time "esc:0x0") Clock () (@"time".hour·1 int, @"time".min·2 int, @"time".sec·3 int)
+	func (@"time".t·4 @"time".Time "esc:0x0") Date () (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Day () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Equal (@"time".u·3 @"time".Time "esc:0x0") (? bool) { return @"time".t·2.@"time".sec == @"time".u·3.@"time".sec && @"time".t·2.@"time".nsec == @"time".u·3.@"time".nsec }
+	func (@"time".t·2 @"time".Time "esc:0x0") Format (@"time".layout·3 string "esc:0x0") (? string)
+	func (@"time".t·2 *@"time".Time "esc:0x0") GobDecode (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") GobEncode () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Hour () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") ISOWeek () (@"time".year·1 int, @"time".week·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x2") In (@"time".loc·3 *@"time".Location "esc:0x2") (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") IsZero () (? bool) { return @"time".t·2.@"time".sec == 0x0 && @"time".t·2.@"time".nsec == 0x0 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Local () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".Local; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x2") Location () (? *@"time".Location) { var @"time".l·3 *@"time".Location; ; @"time".l·3 = @"time".t·2.@"time".loc; if @"time".l·3 == nil { @"time".l·3 = @"time".UTC }; return @"time".l·3 }
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalBinary () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalJSON () (? []byte, ? error)
+	func (@"time".t·3 @"time".Time "esc:0x0") MarshalText () (? []byte, ? error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Minute () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") Month () (? @"time".Month)
+	func (@"time".t·2 @"time".Time "esc:0x0") Nanosecond () (? int) { return int(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 @"time".Time "esc:0x2") Round (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x0") Second () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") String () (? string)
+	func (@"time".t·2 @"time".Time "esc:0x0") Sub (@"time".u·3 @"time".Time "esc:0x0") (? @"time".Duration)
+	func (@"time".t·2 @"time".Time "esc:0x2") Truncate (@"time".d·3 @"time".Duration) (? @"time".Time)
+	func (@"time".t·2 @"time".Time "esc:0x2") UTC () (? @"time".Time) { @"time".t·2.@"time".loc = @"time".UTC; return @"time".t·2 }
+	func (@"time".t·2 @"time".Time "esc:0x0") Unix () (? int64) { return @"time".t·2.@"time".sec + -0xE7791F700 }
+	func (@"time".t·2 @"time".Time "esc:0x0") UnixNano () (? int64) { return (@"time".t·2.@"time".sec + -0xE7791F700) * 0x3B9ACA00 + int64(@"time".t·2.@"time".nsec) }
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalBinary (@"time".data·3 []byte "esc:0x0") (? error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalJSON (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 *@"time".Time "esc:0x0") UnmarshalText (@"time".data·3 []byte "esc:0x0") (@"time".err·1 error)
+	func (@"time".t·2 @"time".Time "esc:0x0") Weekday () (? @"time".Weekday)
+	func (@"time".t·2 @"time".Time "esc:0x0") Year () (? int)
+	func (@"time".t·2 @"time".Time "esc:0x0") YearDay () (? int)
+	func (@"time".t·3 @"time".Time "esc:0x0") Zone () (@"time".name·1 string, @"time".offset·2 int)
+	func (@"time".t·2 @"time".Time "esc:0x0") @"time".abs () (? uint64)
+	func (@"time".t·5 @"time".Time "esc:0x0") @"time".date (@"time".full·6 bool) (@"time".year·1 int, @"time".month·2 @"time".Month, @"time".day·3 int, @"time".yday·4 int)
+	func (@"time".t·4 @"time".Time "esc:0x1") @"time".locabs () (@"time".name·1 string, @"time".offset·2 int, @"time".abs·3 uint64)
+	type @"net".Conn interface { Close() (? error); LocalAddr() (? @"net".Addr); Read(@"net".b []byte) (@"net".n int, @"net".err error); RemoteAddr() (? @"net".Addr); SetDeadline(@"net".t @"time".Time) (? error); SetReadDeadline(@"net".t @"time".Time) (? error); SetWriteDeadline(@"net".t @"time".Time) (? error); Write(@"net".b []byte) (@"net".n int, @"net".err error) }
+	type @""._Ctype_struct_pn_transport_t struct {}
+	type @""._Ctype_struct_pn_collector_t struct {}
+	type @"".bufferChan struct { @"".buffers chan []byte; @"".buf1 []byte; @"".buf2 []byte }
+	func (@"".b·2 *@"".bufferChan) @"".buffer () (? []byte) { @"".b·2.@"".buf1, @"".b·2.@"".buf2 = @"".b·2.@"".buf2, @"".b·2.@"".buf1; return @"".b·2.@"".buf1[:cap(@"".b·2.@"".buf1)] }
+	type @"sync".Once struct { @"sync".m @"sync".Mutex; @"sync".done uint32 }
+	func (@"sync".o·1 *@"sync".Once) Do (@"sync".f·2 func() "esc:0x0")
+	type @"".Pump struct { @"".err @"qpid.apache.org/proton/go/internal".FirstError; @"".inject chan func(); @"".conn @"net".Conn; @"".connection @"".Connection; @"".transport *@""._Ctype_struct_pn_transport_t; @"".collector *@""._Ctype_struct_pn_collector_t; @"".read *@"".bufferChan; @"".write *@"".bufferChan; @"".handlers []@"".EventHandler; @"".running chan struct {}; @"".closeOnce @"sync".Once }
+	func (@"".p·1 *@"".Pump) Close (@"".err·2 error)
+	func (@"".p·2 *@"".Pump "esc:0x1") Connection () (? @"".Connection) { return @"".p·2.@"".connection }
+	func (@"".p·2 *@"".Pump) Error () (? error)
+	func (@"".p·2 *@"".Pump) Id () (? string)
+	func (@"".p·2 *@"".Pump) Inject (@"".f·3 func()) (? error)
+	func (@"".p·2 *@"".Pump) InjectWait (@"".f·3 func()) (@"".err·1 error)
+	func (@"".p·1 *@"".Pump) Run ()
+	func (@"".p·1 *@"".Pump "esc:0x0") Server ()
+	func (@"".p·2 *@"".Pump) String () (? string)
+	func (@"".p·2 *@"".Pump "esc:0x0") @"".handle (@"".e·3 @"".Event) (? error)
+	func (@"".p·1 *@"".Pump "esc:0x0") @"".pop (@"".buf·2 *[]byte)
+	func (@"".p·2 *@"".Pump "esc:0x0") @"".process () (? error)
+	func (@"".p·1 *@"".Pump "esc:0x0") @"".push (@"".buf·2 []byte "esc:0x0")
+	type @""._Ctype_struct_pn_link_t struct {}
+	type @""._Ctype_struct_pn_delivery_t struct {}
+	type @"qpid.apache.org/proton/go/amqp".Message interface { Address() (? string); Annotations() (? *map[string]interface {}); Body() (? interface {}); ContentEncoding() (? string); ContentType() (? string); CorrelationId() (? interface {}); CreationTime() (? @"time".Time); DeliveryCount() (? uint32); Durable() (? bool); Encode(@"qpid.apache.org/proton/go/amqp".buffer []byte) (? []byte, ? error); ExpiryTime() (? @"time".Time); FirstAcquirer() (? bool); GroupId() (? string); GroupSequence() (? int32); Inferred() (? bool); Instructions() (? *map[string]interface {}); MessageId() (? interface {}); Priority() (? uint8); Properties() (? *map[string]interface {}); ReplyTo() (? string); ReplyToGroupId() (? string); SetAddress(? string); SetBody(? interface {}); SetContentEncoding(? string); SetContentType(? string); SetCorrelationId(? interface {}); SetCreationTime(? @"time".Time); SetDeliveryCount(? uint32); SetDurable(? bool); SetExpiryTime(? @"time".Time); SetFirstAcquirer(? bool); SetGr
 oupId(? string); SetGroupSequence(? int32); SetInferred(? bool); SetMessageId(? interface {}); SetPriority(? uint8); SetReplyTo(? string); SetReplyToGroupId(? string); SetSubject(? string); SetTTL(? @"time".Duration); SetUserId(? string); Subject() (? string); TTL() (? @"time".Duration); UserId() (? string) }
+	type @""._Ctype_size_t uint64
+	type @""._Ctype_char int8
+	type @""._Ctype_struct___0 struct { @"".size @""._Ctype_size_t; @"".start *@""._Ctype_char }
+	type @"".DeliveryTag struct { @"".pn @""._Ctype_struct___0 }
+	func (@"".t·2 @"".DeliveryTag) String () (? string)
+	type @""._Ctype_struct_pn_disposition_t struct {}
+	type @""._Ctype_struct_pn_condition_t struct {}
+	type @""._Ctype_struct_pn_data_t struct {}
+	type @"".Data struct { @"".pn *@""._Ctype_struct_pn_data_t }
+	func (@"".d·1 @"".Data "esc:0x0") Clear ()
+	func (@"".d·2 @"".Data "esc:0x0") Error () (? error)
+	func (@"".d·1 @"".Data "esc:0x0") Free ()
+	func (@"".d·2 @"".Data "esc:0x2") Pointer () (? @"unsafe".Pointer) { return @"unsafe".Pointer(@"".d·2.@"".pn) }
+	func (@"".d·1 @"".Data "esc:0x0") Rewind ()
+	type @"".Condition struct { @"".pn *@""._Ctype_struct_pn_condition_t }
+	func (@"".c·1 @"".Condition "esc:0x0") Clear ()
+	func (@"".c·2 @"".Condition "esc:0x0") Description () (? string)
+	func (@"".c·2 @"".Condition "esc:0x0") Error () (? error)
+	func (@"".c·2 @"".Condition "esc:0x0") Info () (? @"".Data)
+	func (@"".c·2 @"".Condition "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
+	func (@"".c·2 @"".Condition "esc:0x0") IsRedirect () (? bool)
+	func (@"".c·2 @"".Condition "esc:0x0") IsSet () (? bool)
+	func (@"".c·2 @"".Condition "esc:0x0") Name () (? string)
+	func (@"".c·2 @"".Condition "esc:0x0") RedirectHost () (? string)
+	func (@"".c·2 @"".Condition "esc:0x0") RedirectPort () (? int)
+	func (@"".c·2 @"".Condition "esc:0x0") SetDescription (@"".description·3 string "esc:0x0") (? int)
+	func (@"".c·1 @"".Condition "esc:0x0") SetError (@"".err·2 error)
+	func (@"".c·2 @"".Condition "esc:0x0") SetName (@"".name·3 string "esc:0x0") (? int)
+	type @"".Disposition struct { @"".pn *@""._Ctype_struct_pn_disposition_t }
+	func (@"".d·2 @"".Disposition "esc:0x0") Annotations () (? @"".Data)
+	func (@"".d·2 @"".Disposition "esc:0x0") Condition () (? @"".Condition)
+	func (@"".d·2 @"".Disposition "esc:0x0") Data () (? @"".Data)
+	func (@"".d·2 @"".Disposition "esc:0x0") IsFailed () (? bool)
+	func (@"".d·2 @"".Disposition "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
+	func (@"".d·2 @"".Disposition "esc:0x0") IsUndeliverable () (? bool)
+	func (@"".d·2 @"".Disposition "esc:0x0") SectionNumber () (? uint16)
+	func (@"".d·2 @"".Disposition "esc:0x0") SectionOffset () (? uint64)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetFailed (@"".failed·2 bool)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionNumber (@"".section_number·2 uint16)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetSectionOffset (@"".section_offset·2 uint64)
+	func (@"".d·1 @"".Disposition "esc:0x0") SetUndeliverable (@"".undeliverable·2 bool)
+	func (@"".d·2 @"".Disposition "esc:0x0") Type () (? uint64)
+	type @"".Delivery struct { @"".pn *@""._Ctype_struct_pn_delivery_t }
+	func (@"".d·1 @"".Delivery "esc:0x0") Accept ()
+	func (@"".d·2 @"".Delivery "esc:0x0") Buffered () (? bool)
+	func (@"".d·1 @"".Delivery "esc:0x0") Clear ()
+	func (@"".d·2 @"".Delivery "esc:0x0") Current () (? bool)
+	func (@"".d·1 @"".Delivery "esc:0x0") Dump ()
+	func (@"".d·2 @"".Delivery "esc:0x0") HasMessage () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") IsNil () (? bool) { return @"".d·2.@"".pn == nil }
+	func (@"".d·2 @"".Delivery "esc:0x0") Link () (? @"".Link)
+	func (@"".d·2 @"".Delivery "esc:0x0") Local () (? @"".Disposition)
+	func (@"".d·2 @"".Delivery "esc:0x0") LocalState () (? uint64)
+	func (@"".delivery·3 @"".Delivery "esc:0x0") Message () (@"".m·1 @"qpid.apache.org/proton/go/amqp".Message, @"".err·2 error)
+	func (@"".d·2 @"".Delivery "esc:0x0") Partial () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Pending () (? uint)
+	func (@"".d·2 @"".Delivery "esc:0x0") Readable () (? bool)
+	func (@"".d·1 @"".Delivery "esc:0x0") Reject ()
+	func (@"".d·1 @"".Delivery "esc:0x0") Release (@"".delivered·2 bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Remote () (? @"".Disposition)
+	func (@"".d·2 @"".Delivery "esc:0x0") RemoteState () (? uint64)
+	func (@"".d·1 @"".Delivery "esc:0x0") Settle ()
+	func (@"".d·1 @"".Delivery "esc:0x0") SettleAs (@"".disposition·2 uint64)
+	func (@"".d·2 @"".Delivery "esc:0x0") Settled () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Tag () (? @"".DeliveryTag)
+	func (@"".d·1 @"".Delivery "esc:0x0") Update (@"".state·2 uint64)
+	func (@"".d·2 @"".Delivery "esc:0x0") Updated () (? bool)
+	func (@"".d·2 @"".Delivery "esc:0x0") Writable () (? bool)
+	type @"".State uint8
+	func (@"".s·2 @"".State) Is (@"".bits·3 @"".State) (? bool) { return @"".s·2 & @"".bits·3 != @"".State(0x0) }
+	func (@"".s·2 @"".State) Local () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x7)) }
+	func (@"".s·2 @"".State) Remote () (? @"".State) { return @"".State(@"".s·2 & @"".State(0x38)) }
+	type @""._Ctype_struct_pn_session_t struct {}
+	type @"".Session struct { @"".pn *@""._Ctype_struct_pn_session_t }
+	func (@"".s·1 @"".Session "esc:0x0") Close ()
+	func (@"".s·2 @"".Session "esc:0x0") Condition () (? @"".Condition)
+	func (@"".s·2 @"".Session "esc:0x0") Connection () (? @"".Connection)
+	func (@"".s·2 @"".Session "esc:0x0") Error () (? error)
+	func (@"".s·1 @"".Session "esc:0x0") Free ()
+	func (@"".s·2 @"".Session "esc:0x0") IncomingBytes () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") IncomingCapacity () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") IsNil () (? bool) { return @"".s·2.@"".pn == nil }
+	func (@"".s·2 @"".Session "esc:0x0") Next (@"".state·3 @"".State) (? @"".Session)
+	func (@"".s·1 @"".Session "esc:0x0") Open ()
+	func (@"".s·2 @"".Session "esc:0x0") OutgoingBytes () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") OutgoingWindow () (? uint)
+	func (@"".s·2 @"".Session "esc:0x0") Receiver (@"".name·3 string "esc:0x0") (? @"".Link)
+	func (@"".s·2 @"".Session "esc:0x0") RemoteCondition () (? @"".Condition)
+	func (@"".s·2 @"".Session "esc:0x0") Sender (@"".name·3 string "esc:0x0") (? @"".Link)
+	func (@"".s·1 @"".Session "esc:0x0") SetIncomingCapacity (@"".capacity·2 uint)
+	func (@"".s·1 @"".Session "esc:0x0") SetOutgoingWindow (@"".window·2 uint)
+	func (@"".s·2 @"".Session "esc:0x0") State () (? @"".State)
+	func (@"".s·2 @"".Session) String () (? string)
+	type @""._Ctype_struct_pn_terminus_t struct {}
+	type @"".TerminusType uint32
+	func (@"".e·2 @"".TerminusType) String () (? string)
+	type @"".DistributionMode uint32
+	func (@"".e·2 @"".DistributionMode) String () (? string)
+	type @"".Durability uint32
+	func (@"".e·2 @"".Durability) String () (? string)
+	type @"".ExpiryPolicy uint32
+	func (@"".e·2 @"".ExpiryPolicy) String () (? string)
+	type @"".Terminus struct { @"".pn *@""._Ctype_struct_pn_terminus_t }
+	func (@"".t·2 @"".Terminus "esc:0x0") Address () (? string)
+	func (@"".t·2 @"".Terminus "esc:0x0") Capabilities () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") Copy (@"".src·3 @"".Terminus "esc:0x0") (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") Durability () (? @"".Durability)
+	func (@"".t·2 @"".Terminus "esc:0x0") ExpiryPolicy () (? @"".ExpiryPolicy)
+	func (@"".t·2 @"".Terminus "esc:0x0") Filter () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") IsDynamic () (? bool)
+	func (@"".t·2 @"".Terminus "esc:0x0") IsNil () (? bool) { return @"".t·2.@"".pn == nil }
+	func (@"".t·2 @"".Terminus "esc:0x0") Outcomes () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") Properties () (? @"".Data)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetAddress (@"".address·3 string "esc:0x0") (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetDistributionMode (@"".mode·3 @"".DistributionMode) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetDurability (@"".durability·3 @"".Durability) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetDynamic (@"".dynamic·3 bool) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetExpiryPolicy (@"".policy·3 @"".ExpiryPolicy) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetTimeout (@"".timeout·3 @"time".Duration) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") SetType (@"".type_·3 @"".TerminusType) (? int)
+	func (@"".t·2 @"".Terminus "esc:0x0") Timeout () (? @"time".Duration)
+	func (@"".t·2 @"".Terminus "esc:0x0") Type () (? @"".TerminusType)
+	type @"".SndSettleMode uint32
+	func (@"".e·2 @"".SndSettleMode) String () (? string)
+	type @"".RcvSettleMode uint32
+	func (@"".e·2 @"".RcvSettleMode) String () (? string)
+	type @"".Link struct { @"".pn *@""._Ctype_struct_pn_link_t }
+	func (@"".l·2 @"".Link "esc:0x0") Advance () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") Available () (? int)
+	func (@"".l·1 @"".Link "esc:0x0") Close ()
+	func (@"".l·2 @"".Link "esc:0x0") Condition () (? @"".Condition)
+	func (@"".l·2 @"".Link "esc:0x0") Credit () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") Current () (? @"".Delivery)
+	func (@"".l·2 @"".Link "esc:0x0") Delivery (@"".tag·3 string "esc:0x0") (? @"".Delivery)
+	func (@"".l·1 @"".Link "esc:0x0") Detach ()
+	func (@"".l·1 @"".Link "esc:0x0") Drain (@"".credit·2 int)
+	func (@"".l·2 @"".Link "esc:0x0") Drained () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") Draining () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") Error () (? error)
+	func (@"".l·1 @"".Link "esc:0x0") Flow (@"".credit·2 int)
+	func (@"".l·1 @"".Link "esc:0x0") Free ()
+	func (@"".l·2 @"".Link "esc:0x0") IsDrain () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") IsNil () (? bool) { return @"".l·2.@"".pn == nil }
+	func (@"".l·2 @"".Link "esc:0x0") IsReceiver () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") IsSender () (? bool)
+	func (@"".l·2 @"".Link "esc:0x0") Name () (? string)
+	func (@"".l·2 @"".Link "esc:0x0") Next (@"".state·3 @"".State) (? @"".Link)
+	func (@"".l·1 @"".Link "esc:0x0") Offered (@"".credit·2 int)
+	func (@"".l·1 @"".Link "esc:0x0") Open ()
+	func (@"".l·2 @"".Link "esc:0x0") Queued () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") RcvSettleMode () (? @"".RcvSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") Recv (@"".buf·3 []byte "esc:0x0") (? int)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteCondition () (? @"".Condition)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteCredit () (? int)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteRcvSettleMode () (? @"".RcvSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteSndSettleMode () (? @"".SndSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteSource () (? @"".Terminus)
+	func (@"".l·2 @"".Link "esc:0x0") RemoteTarget () (? @"".Terminus)
+	func (@"".link·3 @"".Link "esc:0x0") Send (@"".m·4 @"qpid.apache.org/proton/go/amqp".Message) (? @"".Delivery, ? error)
+	func (@"".l·2 @"".Link "esc:0x0") SendBytes (@"".bytes·3 []byte "esc:0x0") (? int)
+	func (@"".l·2 @"".Link "esc:0x0") Session () (? @"".Session)
+	func (@"".l·1 @"".Link "esc:0x0") SetDrain (@"".drain·2 bool)
+	func (@"".l·1 @"".Link "esc:0x0") SetRcvSettleMode (@"".mode·2 @"".RcvSettleMode)
+	func (@"".l·1 @"".Link "esc:0x0") SetSndSettleMode (@"".mode·2 @"".SndSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") SndSettleMode () (? @"".SndSettleMode)
+	func (@"".l·2 @"".Link "esc:0x0") Source () (? @"".Terminus)
+	func (@"".l·2 @"".Link "esc:0x0") State () (? @"".State)
+	func (@"".l·2 @"".Link "esc:0x0") String () (? string)
+	func (@"".l·2 @"".Link "esc:0x0") Target () (? @"".Terminus)
+	func (@"".l·2 @"".Link "esc:0x0") Unsettled () (? int)
+	type @"".Connection struct { @"".pn *@""._Ctype_struct_pn_connection_t }
+	func (@"".c·1 @"".Connection "esc:0x0") Close ()
+	func (@"".c·2 @"".Connection "esc:0x0") Condition () (? @"".Condition)
+	func (@"".c·2 @"".Connection "esc:0x0") Container () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") DesiredCapabilities () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") Error () (? error)
+	func (@"".c·1 @"".Connection "esc:0x0") Free ()
+	func (@"".c·2 @"".Connection "esc:0x0") Hostname () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") IsNil () (? bool) { return @"".c·2.@"".pn == nil }
+	func (@"".c·2 @"".Connection "esc:0x0") LinkHead (@"".s·3 @"".State) (? @"".Link)
+	func (@"".c·2 @"".Connection "esc:0x0") Links (@"".state·3 @"".State) (@"".links·1 []@"".Link)
+	func (@"".c·2 @"".Connection "esc:0x0") OfferedCapabilities () (? @"".Data)
+	func (@"".c·1 @"".Connection "esc:0x0") Open ()
+	func (@"".c·2 @"".Connection "esc:0x0") Properties () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") Pump () (? *@"".Pump)
+	func (@"".c·1 @"".Connection "esc:0x0") Release ()
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteCondition () (? @"".Condition)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteContainer () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteDesiredCapabilities () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteHostname () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteOfferedCapabilities () (? @"".Data)
+	func (@"".c·2 @"".Connection "esc:0x0") RemoteProperties () (? @"".Data)
+	func (@"".c·1 @"".Connection "esc:0x0") Reset ()
+	func (@"".c·3 @"".Connection "esc:0x0") Session () (? @"".Session, ? error)
+	func (@"".c·2 @"".Connection "esc:0x0") SessionHead (@"".s·3 @"".State) (? @"".Session)
+	func (@"".c·2 @"".Connection "esc:0x0") Sessions (@"".state·3 @"".State) (@"".sessions·1 []@"".Session)
+	func (@"".c·1 @"".Connection "esc:0x0") SetContainer (@"".container·2 string "esc:0x0")
+	func (@"".c·1 @"".Connection "esc:0x0") SetHostname (@"".hostname·2 string "esc:0x0")
+	func (@"".c·1 @"".Connection "esc:0x0") SetPassword (@"".password·2 string "esc:0x0")
+	func (@"".c·1 @"".Connection "esc:0x0") SetUser (@"".user·2 string "esc:0x0")
+	func (@"".c·2 @"".Connection "esc:0x0") State () (? @"".State)
+	func (@"".c·2 @"".Connection "esc:0x0") String () (? string)
+	func (@"".c·2 @"".Connection "esc:0x0") User () (? string)
+	type @"".Event struct { @"".pn *@""._Ctype_struct_pn_event_t; @"".eventType @"".EventType; @"".connection @"".Connection; @"".session @"".Session; @"".link @"".Link; @"".delivery @"".Delivery }
+	func (@"".e·2 @"".Event "esc:0x2") Connection () (? @"".Connection) { return @"".e·2.@"".connection }
+	func (@"".e·2 @"".Event "esc:0x2") Delivery () (? @"".Delivery) { return @"".e·2.@"".delivery }
+	func (@"".e·2 @"".Event "esc:0x0") IsNil () (? bool) { return @"".e·2.@"".eventType == @"".EventType(0x0) }
+	func (@"".e·2 @"".Event "esc:0x2") Link () (? @"".Link) { return @"".e·2.@"".link }
+	func (@"".e·2 @"".Event "esc:0x2") Session () (? @"".Session) { return @"".e·2.@"".session }
+	func (@"".e·2 @"".Event "esc:0x0") String () (? string)
+	func (@"".e·2 @"".Event "esc:0x0") Type () (? @"".EventType) { return @"".e·2.@"".eventType }
+	type @"".EventHandler interface { HandleEvent(@"".e @"".Event) (? error) }
+	type @"".MessagingEventType int
+	func (@"".t·2 @"".MessagingEventType) String () (? string)
+	type @"".MessagingHandler interface { HandleMessagingEvent(? @"".MessagingEventType, ? @"".Event) (? error) }
+	const @"".MStart @"".MessagingEventType = 0x0
+	const @"".MConnectionError @"".MessagingEventType = 0x1
+	const @"".MSessionError @"".MessagingEventType = 0x2
+	const @"".MLinkError @"".MessagingEventType = 0x3
+	const @"".MConnectionOpening @"".MessagingEventType = 0x4
+	const @"".MSessionOpening @"".MessagingEventType = 0x5
+	const @"".MLinkOpening @"".MessagingEventType = 0x6
+	const @"".MConnectionOpened @"".MessagingEventType = 0x7
+	const @"".MSessionOpened @"".MessagingEventType = 0x8
+	const @"".MLinkOpened @"".MessagingEventType = 0x9
+	const @"".MConnectionClosing @"".MessagingEventType = 0xA
+	const @"".MSessionClosing @"".MessagingEventType = 0xB
+	const @"".MLinkClosing @"".MessagingEventType = 0xC
+	const @"".MConnectionClosed @"".MessagingEventType = 0xD
+	const @"".MSessionClosed @"".MessagingEventType = 0xE
+	const @"".MLinkClosed @"".MessagingEventType = 0xF
+	const @"".MConnectionDisconnected @"".MessagingEventType = 0x10
+	const @"".MSessionDisconnected @"".MessagingEventType = 0x11
+	const @"".MLinkDisconnected @"".MessagingEventType = 0x12
+	const @"".MSendable @"".MessagingEventType = 0x13
+	const @"".MAccepted @"".MessagingEventType = 0x14
+	const @"".MRejected @"".MessagingEventType = 0x15
+	const @"".MReleased @"".MessagingEventType = 0x16
+	const @"".MSettled @"".MessagingEventType = 0x17
+	const @"".MMessage @"".MessagingEventType = 0x18
+	const @"".MFinal @"".MessagingEventType = 0x19
+	type @"".Endpoint interface { Close(); Condition() (? @"".Condition); Open(); RemoteCondition() (? @"".Condition); State() (? @"".State); String() (? string) }
+	type @"".endpointDelegator struct { @"".remoteOpen @"".EventType; @"".remoteClose @"".EventType; @"".localOpen @"".EventType; @"".localClose @"".EventType; @"".opening @"".MessagingEventType; @"".opened @"".MessagingEventType; @"".closing @"".MessagingEventType; @"".closed @"".MessagingEventType; @"".error @"".MessagingEventType; @"".endpoint func(? @"".Event) (? @"".Endpoint); @"".delegate @"".MessagingHandler }
+	func (@"".d·2 @"".endpointDelegator) HandleEvent (@"".e·3 @"".Event) (@"".err·1 error)
+	type @"".MessagingDelegator struct { @"".delegate @"".MessagingHandler; @"".connection @"".endpointDelegator; @"".session @"".endpointDelegator; @"".link @"".endpointDelegator; @"".handshaker @"".EventHandler; @"".flowcontroller @"".EventHandler; AutoSettle bool; AutoAccept bool; Prefetch int; PeerCloseError bool }
+	func (@"".d·2 *@"".MessagingDelegator) HandleEvent (@"".e·3 @"".Event) (? error)
+	func (@"".d·2 *@"".MessagingDelegator) @"".incoming (@"".e·3 @"".Event) (@"".err·1 error)
+	func (@"".d·2 *@"".MessagingDelegator) @"".outgoing (@"".e·3 @"".Event) (@"".err·1 error)
+	func @"".NewMessagingDelegator (@"".h·2 @"".MessagingHandler) (? *@"".MessagingDelegator)
+	func @"".NewPump (@"".conn·3 @"net".Conn, @"".handlers·4 ...@"".EventHandler) (? *@"".Pump, ? error)
+	func @"".NewData (@"".p·2 @"unsafe".Pointer "esc:0x2") (? @"".Data) { return (@"".Data{ @"".pn:(*@""._Ctype_struct_pn_data_t)(@"".p·2) }) }
+	const @"".SLocalUninit @"".State = 0x1
+	const @"".SLocalActive = 0x2
+	const @"".SLocalClosed = 0x4
+	const @"".SRemoteUninit = 0x8
+	const @"".SRemoteActive = 0x10
+	const @"".SRemoteClosed = 0x20
+	func @"".CloseError (@"".e·1 @"".Endpoint, @"".err·2 error)
+	const @"".Received uint64 = 0x23
+	const @"".Accepted = 0x24
+	const @"".Rejected = 0x25
+	const @"".Released = 0x26
+	const @"".Modified = 0x27
+	const @"".EConnectionInit @"".EventType = 0x5
+	const @"".EConnectionBound @"".EventType = 0x6
+	const @"".EConnectionUnbound @"".EventType = 0x7
+	const @"".EConnectionLocalOpen @"".EventType = 0x8
+	const @"".EConnectionRemoteOpen @"".EventType = 0x9
+	const @"".EConnectionLocalClose @"".EventType = 0xA
+	const @"".EConnectionRemoteClose @"".EventType = 0xB
+	const @"".EConnectionFinal @"".EventType = 0xC
+	const @"".ESessionInit @"".EventType = 0xD
+	const @"".ESessionLocalOpen @"".EventType = 0xE
+	const @"".ESessionRemoteOpen @"".EventType = 0xF
+	const @"".ESessionLocalClose @"".EventType = 0x10
+	const @"".ESessionRemoteClose @"".EventType = 0x11
+	const @"".ESessionFinal @"".EventType = 0x12
+	const @"".ELinkInit @"".EventType = 0x13
+	const @"".ELinkLocalOpen @"".EventType = 0x14
+	const @"".ELinkRemoteOpen @"".EventType = 0x15
+	const @"".ELinkLocalClose @"".EventType = 0x16
+	const @"".ELinkRemoteClose @"".EventType = 0x17
+	const @"".ELinkLocalDetach @"".EventType = 0x18
+	const @"".ELinkRemoteDetach @"".EventType = 0x19
+	const @"".ELinkFlow @"".EventType = 0x1A
+	const @"".ELinkFinal @"".EventType = 0x1B
+	const @"".EDelivery @"".EventType = 0x1C
+	const @"".ETransport @"".EventType = 0x1D
+	const @"".ETransportAuthenticated @"".EventType = 0x1E
+	const @"".ETransportError @"".EventType = 0x1F
+	const @"".ETransportHeadClosed @"".EventType = 0x20
+	const @"".ETransportTailClosed @"".EventType = 0x21
+	const @"".ETransportClosed @"".EventType = 0x22
+	const @"".PnSndUnsettled @"".SndSettleMode = 0x0
+	const @"".PnSndSettled @"".SndSettleMode = 0x1
+	const @"".PnSndMixed @"".SndSettleMode = 0x2
+	const @"".PnRcvFirst @"".RcvSettleMode = 0x0
+	const @"".PnRcvSecond @"".RcvSettleMode = 0x1
+	const @"".PnUnspecified @"".TerminusType = 0x0
+	const @"".PnSource @"".TerminusType = 0x1
+	const @"".PnTarget @"".TerminusType = 0x2
+	const @"".PnCoordinator @"".TerminusType = 0x3
+	const @"".PnNondurable @"".Durability = 0x0
+	const @"".PnConfiguration @"".Durability = 0x1
+	const @"".PnDeliveries @"".Durability = 0x2
+	const @"".PnExpireWithLink @"".ExpiryPolicy = 0x0
+	const @"".PnExpireWithSession @"".ExpiryPolicy = 0x1
+	const @"".PnExpireWithConnection @"".ExpiryPolicy = 0x2
+	const @"".PnExpireNever @"".ExpiryPolicy = 0x3
+	const @"".PnDistModeUnspecified @"".DistributionMode = 0x0
+	const @"".PnDistModeCopy @"".DistributionMode = 0x1
+	const @"".PnDistModeMove @"".DistributionMode = 0x2
+	func @"".init ()
+	var @"time".months [12]string
+	var @"time".days [7]string
+	var @"time".Local *@"time".Location
+	var @"time".UTC *@"time".Location
+	const @""._Cconst_PN_LOCAL_MASK = 0x7
+	const @""._Cconst_PN_REMOTE_MASK = 0x38
+
+$$
+_go_.6          0           0     0     644     987291    `
+go object linux amd64 go1.4.2 X:precisestack
+
+!
+go13ldruntime/cgo.asyscall.aHqpid.apache.org/proton/go/internal.a@qpid.apache.org/proton/go/amqp.a
+fmt.aio.a
+net.aos.apath.async.areflect.atime.a�""._Cgo_ptr H�\$H�\$� "".~r1&type.unsafe.Pointer"".ptr&type.unsafe.PointerTgclocals·06cab038d51064a089bda21fa03e00f7Tgclocals·3280bececceccd33cb74587feedb1f9flqpid.apache.org/proton/go/reactor/_obj/_cgo_gotypes.go�"""._Cfunc_CString��dH�%H;aw���H��PH�\$`H��H�$H�H���H�t$H�t$ H�t$H����H��@H��@H�L$HH�T$XH�L$`H�D$@H�L$0H9�}H��H�t$8H�4$H�T$(H�T$H�D$�H�D$`H�\$H��t%H=@sH��H�\$ H�\$hH��P����׉�t���
+ 0runtime.morestack_noctxtR.""._cgo_runtime_cmalloc`
+�runtime.memmove�$runtime.panicindex0�"".autotmp_0015type.uintptr"".autotmp_0014type.int"".autotmp_0013Otype.string"".autotmp_0012/type.[]uint8"".autotmp_0011type.int
+"".ppo.type.*[1073741824]uint8"".p_&type.unsafe.Pointer"".~r1 (type.*""._Ctype_char"".stype.string�����$�[0b3Tgclocals·d7e8a62d22b1cde6d92b17a55c33fe8fTgclocals·283619d6755c7337ece602447ba790ff�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�$""._Cfunc_GoString��dH�%H;aw���H��H�D$(H�D$0H�\$ H�$H�H���H�L$H�D$H�L$(H�D$0H���
+ 0runtime.morestack_noctxtp0""._cgo_runtime_gostring~
+00"".~r1type.string"".p(type.*""._Ctype_char0?/`�,4
+?!Tgclocals·a08e9001cb8f9d822225de3b8e406515Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�&""._Cfunc_GoStringN��dH�%H;aw���H�� H�D$8H�D$@H�\$(H�$Hc\$0H�\$H�H���H�L$H�D$H�L$8H�D$@H�� �
+ 0runtime.morestack_noctxt�2""._cgo_runtime_gostringn�
+@@"".~r2 type.string"".l$type.""._Ctype_int"".p(type.*""._Ctype_char@I?
p�,D
+I'Tgclocals·6a2e5ab2d393a1bfd331903fbd0fd425Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�""._Cfunc_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN>""._cgo_307d13c7f705_Cfunc_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0&type.unsafe.Pointer0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/� ""._Cfunc_memcpy��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLB""._cgo_307d13c7f705_Cfunc_memcpyv:""._cgo_runtime_cgocall_errno�
+@0
+"".r10&type.unsafe.Pointer
+"".p2 *type.""._Ctype_size_t
+"".p1&type.unsafe.Pointer
+"".p0&type.unsafe.Pointer0./P�#!
+BTgclocals·a05343871e6f69ae44bc4db2bd3d1078Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�,""._Cfunc_pn_collector��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^N""._cgo_307d13c7f705_Cfunc_pn_collector�:""._cgo_runtime_cgocall_errno�
+0
+"".r1Jtype.*""._Ctype_struct_pn_collector_t07/`�,!
+KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_collector_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNX""._cgo_307d13c7f705_Cfunc_pn_collector_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Jtype.*""._Ctype_struct_pn_collector_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_collector_peek��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_collector_peekv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_event_t
+"".p0Jtype.*""._Ctype_struct_pn_collector_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_collector_pop��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDV""._cgo_307d13c7f705_Cfunc_pn_collector_popn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Jtype.*""._Ctype_struct_pn_collector_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_condition_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_condition_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�L""._Cfunc_pn_condition_get_description��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLn""._cgo_307d13c7f705_Cfunc_pn_condition_get_descriptionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_condition_get_name��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL`""._cgo_307d13c7f705_Cfunc_pn_condition_get_namev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_condition_info��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_condition_infov:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_condition_is_redirect��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDf""._cgo_307d13c7f705_Cfunc_pn_condition_is_redirectn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_condition_is_set��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_condition_is_setn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_condition_redirect_host��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_307d13c7f705_Cfunc_pn_condition_redirect_hostv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_condition_redirect_port��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJj""._cgo_307d13c7f705_Cfunc_pn_condition_redirect_portt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�L""._Cfunc_pn_condition_set_description��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJn""._cgo_307d13c7f705_Cfunc_pn_condition_set_descriptiont:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_condition_set_name��dH�%H;aw���H���D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJ`""._cgo_307d13c7f705_Cfunc_pn_condition_set_namet:""._cgo_runtime_cgocall_errno�
+00
+"".r1 $type.""._Ctype_int
+"".p1(type.*""._Ctype_char
+"".p0Jtype.*""._Ctype_struct_pn_condition_t0-/	P�"!

+ATgclocals·ceae0f3fbce95b025d016ed5a5a0a539Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_connection��dH�%H;aw���H��H�D$ H�D$ H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^P""._cgo_307d13c7f705_Cfunc_pn_connection�:""._cgo_runtime_cgocall_errno�
+0
+"".r1Ltype.*""._Ctype_struct_pn_connection_t07/`�,!
+KTgclocals·e1ae6533a9e39048ba0735a2264ce16aTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN\""._cgo_307d13c7f705_Cfunc_pn_connection_closex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_connection_collect��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN`""._cgo_307d13c7f705_Cfunc_pn_connection_collectx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1Jtype.*""._Ctype_struct_pn_collector_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�B""._Cfunc_pn_connection_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_307d13c7f705_Cfunc_pn_connection_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�X""._Cfunc_pn_connection_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLz""._cgo_307d13c7f705_Cfunc_pn_connection_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_connection_errorv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_error_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_connection_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_connection_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�J""._Cfunc_pn_connection_get_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLl""._cgo_307d13c7f705_Cfunc_pn_connection_get_containerv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_connection_get_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_307d13c7f705_Cfunc_pn_connection_get_hostnamev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�@""._Cfunc_pn_connection_get_user��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLb""._cgo_307d13c7f705_Cfunc_pn_connection_get_userv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�X""._Cfunc_pn_connection_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLz""._cgo_307d13c7f705_Cfunc_pn_connection_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_connection_open��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_connection_openx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_connection_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLf""._cgo_307d13c7f705_Cfunc_pn_connection_propertiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�>""._Cfunc_pn_connection_release��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN`""._cgo_307d13c7f705_Cfunc_pn_connection_releasex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�P""._Cfunc_pn_connection_remote_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLr""._cgo_307d13c7f705_Cfunc_pn_connection_remote_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�P""._Cfunc_pn_connection_remote_container��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLr""._cgo_307d13c7f705_Cfunc_pn_connection_remote_containerv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�f""._Cfunc_pn_connection_remote_desired_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL�""._cgo_307d13c7f705_Cfunc_pn_connection_remote_desired_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�N""._Cfunc_pn_connection_remote_hostname��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLp""._cgo_307d13c7f705_Cfunc_pn_connection_remote_hostnamev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�f""._Cfunc_pn_connection_remote_offered_capabilities��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL�""._cgo_307d13c7f705_Cfunc_pn_connection_remote_offered_capabilitiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�R""._Cfunc_pn_connection_remote_properties��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLt""._cgo_307d13c7f705_Cfunc_pn_connection_remote_propertiesv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_reset��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN\""._cgo_307d13c7f705_Cfunc_pn_connection_resetx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�J""._Cfunc_pn_connection_set_container��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNl""._cgo_307d13c7f705_Cfunc_pn_connection_set_containerx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_connection_set_hostname��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNj""._cgo_307d13c7f705_Cfunc_pn_connection_set_hostnamex:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_connection_set_password��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNj""._cgo_307d13c7f705_Cfunc_pn_connection_set_passwordx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�@""._Cfunc_pn_connection_set_user��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNb""._cgo_307d13c7f705_Cfunc_pn_connection_set_userx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.*""._Ctype_char
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0//P�$!
+C
Tgclocals·e8c55b930b09fa5028b5e4b78b8932dcTgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_connection_state��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJ\""._cgo_307d13c7f705_Cfunc_pn_connection_statet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r12type.""._Ctype_pn_state_t
+"".p0Ltype.*""._Ctype_struct_pn_connection_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_data_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_307d13c7f705_Cfunc_pn_data_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_data_error��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLP""._cgo_307d13c7f705_Cfunc_pn_data_errorv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Btype.*""._Ctype_struct_pn_error_t
+"".p0@type.*""._Ctype_struct_pn_data_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�,""._Cfunc_pn_data_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNN""._cgo_307d13c7f705_Cfunc_pn_data_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�0""._Cfunc_pn_data_rewind��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNR""._cgo_307d13c7f705_Cfunc_pn_data_rewindx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_data_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�*""._Cfunc_pn_delivery��dH�%H;aw���H��H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLL""._cgo_307d13c7f705_Cfunc_pn_deliveryv:""._cgo_runtime_cgocall_errno�
+@0
+"".r10Htype.*""._Ctype_struct_pn_delivery_t
+"".p12type.""._Ctype_struct___0
+"".p0@type.*""._Ctype_struct_pn_link_t0./P�#!
+BTgclocals·9d50c2650bd14b076465d970d8016122Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�<""._Cfunc_pn_delivery_buffered��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD^""._cgo_307d13c7f705_Cfunc_pn_delivery_bufferedn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_delivery_clear��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNX""._cgo_307d13c7f705_Cfunc_pn_delivery_clearx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_current��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_currentn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_delivery_dump��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNV""._cgo_307d13c7f705_Cfunc_pn_delivery_dumpx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_delivery_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_307d13c7f705_Cfunc_pn_delivery_linkv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_link_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_delivery_local��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_delivery_localv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ntype.*""._Ctype_struct_pn_disposition_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�B""._Cfunc_pn_delivery_local_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLd""._cgo_307d13c7f705_Cfunc_pn_delivery_local_statev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_partial��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_partialn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_pending��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_delivery_pendingv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1*type.""._Ctype_size_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�<""._Cfunc_pn_delivery_readable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD^""._cgo_307d13c7f705_Cfunc_pn_delivery_readablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_delivery_remote��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLZ""._cgo_307d13c7f705_Cfunc_pn_delivery_remotev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ntype.*""._Ctype_struct_pn_disposition_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_delivery_remote_state��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLf""._cgo_307d13c7f705_Cfunc_pn_delivery_remote_statev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_delivery_settle��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_delivery_settlex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_settled��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_settledn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_delivery_tag��dH�%H;aw���H��H�D$(H�D$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^T""._cgo_307d13c7f705_Cfunc_pn_delivery_tag�:""._cgo_runtime_cgocall_errno�
+00
+"".r12type.""._Ctype_struct___0
+"".p0Htype.*""._Ctype_struct_pn_delivery_t07/`�,!
+KTgclocals·fd048cbd93869b53d7c80f9fed37c06cTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�8""._Cfunc_pn_delivery_update��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNZ""._cgo_307d13c7f705_Cfunc_pn_delivery_updatex:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1.type.""._Ctype_uint64_t
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_delivery_updated��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD\""._cgo_307d13c7f705_Cfunc_pn_delivery_updatedn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�<""._Cfunc_pn_delivery_writable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtD^""._cgo_307d13c7f705_Cfunc_pn_delivery_writablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Htype.*""._Ctype_struct_pn_delivery_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�H""._Cfunc_pn_disposition_annotations��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLj""._cgo_307d13c7f705_Cfunc_pn_disposition_annotationsv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_disposition_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLf""._cgo_307d13c7f705_Cfunc_pn_disposition_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_disposition_data��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_disposition_datav:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_data_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_get_section_number��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJx""._cgo_307d13c7f705_Cfunc_pn_disposition_get_section_numbert:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint32_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0-/	P�"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_get_section_offset��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLx""._cgo_307d13c7f705_Cfunc_pn_disposition_get_section_offsetv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�D""._Cfunc_pn_disposition_is_failed��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDf""._cgo_307d13c7f705_Cfunc_pn_disposition_is_failedn:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�R""._Cfunc_pn_disposition_is_undeliverable��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDt""._cgo_307d13c7f705_Cfunc_pn_disposition_is_undeliverablen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0*/P�!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�F""._Cfunc_pn_disposition_set_failed��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNh""._cgo_307d13c7f705_Cfunc_pn_disposition_set_failedx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_set_section_number��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNx""._cgo_307d13c7f705_Cfunc_pn_disposition_set_section_numberx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1.type.""._Ctype_uint32_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�V""._Cfunc_pn_disposition_set_section_offset��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNx""._cgo_307d13c7f705_Cfunc_pn_disposition_set_section_offsetx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1.type.""._Ctype_uint64_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�T""._Cfunc_pn_disposition_set_undeliverable��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNv""._cgo_307d13c7f705_Cfunc_pn_disposition_set_undeliverablex:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1(type.""._Ctype__Bool
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0//P�	$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_disposition_type��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_disposition_typev:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1.type.""._Ctype_uint64_t
+"".p0Ntype.*""._Ctype_struct_pn_disposition_t0./P�	#!
+BTgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�"""._Cfunc_pn_dtag��dH�%H;aw���H��H�D$0H�D$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxt^D""._cgo_307d13c7f705_Cfunc_pn_dtag�:""._cgo_runtime_cgocall_errno�
+@0
+"".r1 2type.""._Ctype_struct___0
+"".p1*type.""._Ctype_size_t
+"".p0(type.*""._Ctype_char07/`�	,!
+KTgclocals·2ab34f76b7fe498424f2c49491d7ce91Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_event_connection��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtL\""._cgo_307d13c7f705_Cfunc_pn_event_connectionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ltype.*""._Ctype_struct_pn_connection_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_event_delivery��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_event_deliveryv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Htype.*""._Ctype_struct_pn_delivery_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_event_link��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLP""._cgo_307d13c7f705_Cfunc_pn_event_linkv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1@type.*""._Ctype_struct_pn_link_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�4""._Cfunc_pn_event_session��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLV""._cgo_307d13c7f705_Cfunc_pn_event_sessionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ftype.*""._Ctype_struct_pn_session_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0./P�	#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_event_type��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJP""._cgo_307d13c7f705_Cfunc_pn_event_typet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1<type.""._Ctype_pn_event_type_t
+"".p0Btype.*""._Ctype_struct_pn_event_t0-/	P�	"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_flowcontroller��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_flowcontrollerv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Ftype.*""._Ctype_struct_pn_handler_t
+"".p0$type.""._Ctype_int0./P�	#!
+BTgclocals·8512b64a8c2de1386e17b894ea692148Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�:""._Cfunc_pn_handler_dispatch��dH�%H;aw���H��H�\$8H�\$8H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtN\""._cgo_307d13c7f705_Cfunc_pn_handler_dispatchx:""._cgo_runtime_cgocall_errno�
+00
+"".r10&type.""._Ctype_void
+"".p2 <type.""._Ctype_pn_event_type_t
+"".p1Btype.*""._Ctype_struct_pn_event_t
+"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
+C
Tgclocals·72c306c66d827d7caa50958774c351b5Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_handler_free��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNT""._cgo_307d13c7f705_Cfunc_pn_handler_freex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0Ftype.*""._Ctype_struct_pn_handler_t0//P�	$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_link_advance��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtDT""._cgo_307d13c7f705_Cfunc_pn_link_advancen:""._cgo_runtime_cgocall_errno|
+ 0
+"".r1(type.""._Ctype__Bool
+"".p0@type.*""._Ctype_struct_pn_link_t0*/P�
+!
+>Tgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_link_available��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJX""._cgo_307d13c7f705_Cfunc_pn_link_availablet:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
+"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_link_close��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_307d13c7f705_Cfunc_pn_link_closex:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_link_t0//P�
+$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�6""._Cfunc_pn_link_condition��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLX""._cgo_307d13c7f705_Cfunc_pn_link_conditionv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Jtype.*""._Ctype_struct_pn_condition_t
+"".p0@type.*""._Ctype_struct_pn_link_t0./P�
+#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�0""._Cfunc_pn_link_credit��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJR""._cgo_307d13c7f705_Cfunc_pn_link_creditt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
+"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_link_current��dH�%H;aw���H��H�D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtLT""._cgo_307d13c7f705_Cfunc_pn_link_currentv:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1Htype.*""._Ctype_struct_pn_delivery_t
+"".p0@type.*""._Ctype_struct_pn_link_t0./P�
+#!
+BTgclocals·0d07eeeeb0a929c278204725c205f82eTgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�0""._Cfunc_pn_link_detach��dH�%H;aw���H��H�\$(H�\$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNR""._cgo_307d13c7f705_Cfunc_pn_link_detachx:""._cgo_runtime_cgocall_errno�
+0
+"".r1&type.""._Ctype_void
+"".p0@type.*""._Ctype_struct_pn_link_t0//P�
+$!
+C
Tgclocals·519efd86263089ddb84df3cfe7fd2992Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�.""._Cfunc_pn_link_drain��dH�%H;aw���H��H�\$0H�\$0H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtNP""._cgo_307d13c7f705_Cfunc_pn_link_drainx:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1 &type.""._Ctype_void
+"".p1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0//P�
+$!
+C
Tgclocals·cd30d2bcfdea04ed7c49639580b4bd08Tgclocals·3280bececceccd33cb74587feedb1f9f�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�2""._Cfunc_pn_link_drained��dH�%H;aw���H���D$(H�H�$H�\$ H�\$H�H���H���
+
+ 0runtime.morestack_noctxtJT""._cgo_307d13c7f705_Cfunc_pn_link_drainedt:""._cgo_runtime_cgocall_errno�
+ 0
+"".r1$type.""._Ctype_int
+"".p0@type.*""._Ctype_struct_pn_link_t0-/	P�
+"!

+ATgclocals·cf86db206769ec68369d07e260728f65Tgclocals·0115f8d53b75c1696444f08ad03251d9�/home/aconway/proton/proton-c/bindings/go/src/qpid.apache.org/proton/go/reactor/�

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org