You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli"
|
|
|
|
"github.com/deis/tiller/cmd/tiller/environment"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
// rootServer is the root gRPC server.
|
|
|
|
//
|
|
|
|
// Each gRPC service registers itself to this server during init().
|
|
|
|
var rootServer *grpc.Server = grpc.NewServer()
|
|
|
|
var env = environment.New()
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := cli.NewApp()
|
|
|
|
app.Name = "tiller"
|
|
|
|
app.Usage = `The Helm server.`
|
|
|
|
app.Action = start
|
|
|
|
|
|
|
|
app.Run(os.Args)
|
|
|
|
}
|
|
|
|
|
|
|
|
func start(c *cli.Context) {
|
|
|
|
addr := ":44134"
|
|
|
|
lstn, err := net.Listen("tcp", addr)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintf(os.Stderr, "Server died: %s\n", err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Printf("Tiller is running on %s\n", addr)
|
|
|
|
|
|
|
|
if err := rootServer.Serve(lstn); err != nil {
|
|
|
|
fmt.Fprintf(os.Stderr, "Server died: %s\n", err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|