bootcfg/: Rename and document packages with their purpose (#145)

This commit is contained in:
Dalton Hubble
2016-04-12 11:25:17 -07:00
parent d54eb0447f
commit 3e5115a6e0
44 changed files with 55 additions and 41 deletions

2
bootcfg/cli/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package cli provides a command line interface client.
package cli

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"io"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"github.com/spf13/cobra"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"io/ioutil"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"github.com/spf13/cobra"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"github.com/spf13/cobra"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"io/ioutil"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package cmd
package cli
import (
"fmt"

2
bootcfg/client/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package client provides the bootcfg gRPC client.
package client

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"bytes"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"errors"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"testing"

2
bootcfg/http/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package http provides the bootcfg HTTP server
package http

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"bytes"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"bytes"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"bytes"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"bufio"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"net/http"

View File

@@ -1,4 +1,4 @@
package api
package http
import (
"github.com/coreos/coreos-baremetal/bootcfg/storage/storagepb"

2
bootcfg/rpc/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package rpc provides the bootcfg gRPC server
package rpc

2
bootcfg/server/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package server is a bootcfg library package for implementing servers.
package server

2
bootcfg/sign/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package sign adds signatures to bootcfg responses.
package sign

2
bootcfg/storage/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package storage defines bootcfg's storage and object types.
package storage

View File

@@ -12,7 +12,7 @@ import (
"github.com/coreos/pkg/capnslog"
"github.com/coreos/pkg/flagutil"
"github.com/coreos/coreos-baremetal/bootcfg/api"
web "github.com/coreos/coreos-baremetal/bootcfg/http"
"github.com/coreos/coreos-baremetal/bootcfg/rpc"
"github.com/coreos/coreos-baremetal/bootcfg/server"
"github.com/coreos/coreos-baremetal/bootcfg/sign"
@@ -100,13 +100,13 @@ func main() {
Root: flags.dataPath,
})
bootcfgServer := server.NewServer(&server.Config{
server := server.NewServer(&server.Config{
Store: store,
})
// gRPC Server (feature hidden)
if flags.rpcAddress != "" {
grpcServer, err := rpc.NewServer(bootcfgServer)
grpcServer, err := rpc.NewServer(server)
if err != nil {
log.Fatal(err)
}
@@ -120,13 +120,13 @@ func main() {
}
// HTTP Server
config := &api.Config{
config := &web.Config{
Store: store,
AssetsPath: flags.assetsPath,
Signer: signer,
ArmoredSigner: armoredSigner,
}
httpServer := api.NewServer(config)
httpServer := web.NewServer(config)
log.Infof("starting bootcfg HTTP server on %s", flags.address)
err = http.ListenAndServe(flags.address, httpServer.HTTPHandler())
if err != nil {

View File

@@ -3,5 +3,5 @@ package main
import "github.com/coreos/coreos-baremetal/bootcfg/cli"
func main() {
cmd.Execute()
cli.Execute()
}