maintner: start of package maintner and server maintainerd

This will be a package and server for working with Git, Github, and
Gerrit data.

Change-Id: I12c04d31c792d6cf752ce63b05a0b155d1f53f26
Reviewed-on: https://go-review.googlesource.com/36554
Reviewed-by: Kevin Burke <kev@inburke.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/maintner/maintner.go b/maintner/maintner.go
new file mode 100644
index 0000000..abeea8a
--- /dev/null
+++ b/maintner/maintner.go
@@ -0,0 +1,35 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package maintner mirrors, searches, syncs, and serves Git, Github,
+// and Gerrit metadata.
+//
+// Maintner is short for "Maintainer". This package is intended for
+// use by many tools. The name of the daemon that serves the maintner
+// data to other tools is "maintnerd".
+package maintner
+
+import "context"
+
+// Corpus holds all of a project's metadata.
+type Corpus struct {
+	// ... TODO
+}
+
+// PopulateFromServer populates the corpus from a maintnerd server.
+func (c *Corpus) PopulateFromServer(ctx context.Context, serverURL string) error {
+	panic("TODO")
+}
+
+// PopulateFromDisk populates the corpus from a set of mutation logs
+// in a local directory.
+func (c *Corpus) PopulateFromDisk(ctx context.Context, dir string) error {
+	panic("TODO")
+}
+
+// PopulateFromAPIs populates the corpus using API calls to
+// the upstream Git, Github, and/or Gerrit servers.
+func (c *Corpus) PopulateFromAPIs(ctx context.Context) error {
+	panic("TODO")
+}
diff --git a/maintner/maintnerd/maintnerd.go b/maintner/maintnerd/maintnerd.go
new file mode 100644
index 0000000..fd6ae77
--- /dev/null
+++ b/maintner/maintnerd/maintnerd.go
@@ -0,0 +1,27 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The maintnerd command serves project maintainer data from Git,
+// Github, and/or Gerrit.
+package main
+
+import (
+	"flag"
+	"log"
+	"net"
+)
+
+var (
+	listen = flag.String("listen", ":6343", "listen address")
+)
+
+func main() {
+	flag.Parse()
+	ln, err := net.Listen("tcp", *listen)
+	if err != nil {
+		log.Fatal(err)
+	}
+	ln.Close() // TODO: use
+	log.Fatal("TODO")
+}