mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
bootcfg/: Rename and document packages with their purpose (#145)
This commit is contained in:
2
bootcfg/cli/doc.go
Normal file
2
bootcfg/cli/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package cli provides a command line interface client.
|
||||
package cli
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
2
bootcfg/client/doc.go
Normal file
2
bootcfg/client/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package client provides the bootcfg gRPC client.
|
||||
package client
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"testing"
|
||||
2
bootcfg/http/doc.go
Normal file
2
bootcfg/http/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package http provides the bootcfg HTTP server
|
||||
package http
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package api
|
||||
package http
|
||||
|
||||
import (
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/storage/storagepb"
|
||||
2
bootcfg/rpc/doc.go
Normal file
2
bootcfg/rpc/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package rpc provides the bootcfg gRPC server
|
||||
package rpc
|
||||
2
bootcfg/server/doc.go
Normal file
2
bootcfg/server/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package server is a bootcfg library package for implementing servers.
|
||||
package server
|
||||
2
bootcfg/sign/doc.go
Normal file
2
bootcfg/sign/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package sign adds signatures to bootcfg responses.
|
||||
package sign
|
||||
2
bootcfg/storage/doc.go
Normal file
2
bootcfg/storage/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package storage defines bootcfg's storage and object types.
|
||||
package storage
|
||||
@@ -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 {
|
||||
|
||||
@@ -3,5 +3,5 @@ package main
|
||||
import "github.com/coreos/coreos-baremetal/bootcfg/cli"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
cli.Execute()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user