Rename HTTP server method

This commit is contained in:
Armon Dadgar 2014-01-02 11:45:58 -08:00
parent 052ce19ddd
commit 1e035d5453
3 changed files with 4 additions and 4 deletions

View File

@ -137,7 +137,7 @@ func (c *Command) setupAgent(config *Config, logOutput io.Writer, logWriter *log
c.rpcServer = NewAgentRPC(agent, rpcListener, logOutput, logWriter)
if config.HTTPAddr != "" {
server, err := NewServer(agent, logOutput, config.HTTPAddr)
server, err := NewHTTPServer(agent, logOutput, config.HTTPAddr)
if err != nil {
agent.Shutdown()
c.Ui.Error(fmt.Sprintf("Error starting http server: %s", err))

View File

@ -19,9 +19,9 @@ type HTTPServer struct {
logger *log.Logger
}
// NewServer starts a new HTTP server to provide an interface to
// NewHTTPServer starts a new HTTP server to provide an interface to
// the agent.
func NewServer(agent *Agent, logOutput io.Writer, bind string) (*HTTPServer, error) {
func NewHTTPServer(agent *Agent, logOutput io.Writer, bind string) (*HTTPServer, error) {
// Create the mux
mux := http.NewServeMux()

View File

@ -11,7 +11,7 @@ import (
func makeHTTPServer(t *testing.T) (string, *HTTPServer) {
conf := nextConfig()
dir, agent := makeAgent(t, conf)
server, err := NewServer(agent, agent.logOutput, conf.HTTPAddr)
server, err := NewHTTPServer(agent, agent.logOutput, conf.HTTPAddr)
if err != nil {
t.Fatalf("err: %v", err)
}