mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Readability improvements.
This commit is contained in:
parent
823d654523
commit
f3734260d5
@ -20,16 +20,17 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/coreos/go-etcd/etcd"
|
"github.com/coreos/go-etcd/etcd"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver"
|
||||||
kube_client "github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
)
|
)
|
||||||
@ -71,7 +72,7 @@ func main() {
|
|||||||
serviceRegistry = registry.MakeMemoryRegistry()
|
serviceRegistry = registry.MakeMemoryRegistry()
|
||||||
}
|
}
|
||||||
|
|
||||||
containerInfo := &kube_client.HTTPContainerInfo{
|
containerInfo := &client.HTTPContainerInfo{
|
||||||
Client: http.DefaultClient,
|
Client: http.DefaultClient,
|
||||||
Port: 10250,
|
Port: 10250,
|
||||||
}
|
}
|
||||||
@ -87,7 +88,7 @@ func main() {
|
|||||||
go util.Forever(func() { endpoints.SyncServiceEndpoints() }, time.Second*10)
|
go util.Forever(func() { endpoints.SyncServiceEndpoints() }, time.Second*10)
|
||||||
|
|
||||||
s := &http.Server{
|
s := &http.Server{
|
||||||
Addr: fmt.Sprintf("%s:%d", *address, *port),
|
Addr: net.JoinHostPort(*address, strconv.Itoa(int(*port))),
|
||||||
Handler: apiserver.New(storage, *apiPrefix),
|
Handler: apiserver.New(storage, *apiPrefix),
|
||||||
ReadTimeout: 10 * time.Second,
|
ReadTimeout: 10 * time.Second,
|
||||||
WriteTimeout: 10 * time.Second,
|
WriteTimeout: 10 * time.Second,
|
||||||
|
Loading…
Reference in New Issue
Block a user