Breakup the registry package into separate packages.

Currently all registry implementations live in a single package,
which makes it bit harder to maintain. The different registry
implementations do not follow the same coding style and naming
conventions, which makes the code harder to read.

Breakup the registry package into smaller packages based on
the registry implementation. Refactor the registry packages
to follow a similar coding style and naming convention.

This patch does not introduce any changes in behavior.
This commit is contained in:
Kelsey Hightower
2014-08-11 00:34:59 -07:00
parent c6dcfd544f
commit c21a0ca39f
41 changed files with 1427 additions and 1334 deletions

View File

@@ -23,8 +23,9 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry"
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
)
@@ -32,7 +33,7 @@ import (
// that cache up to date.
type PodCache struct {
containerInfo client.PodInfoGetter
pods registry.PodRegistry
pods pod.Registry
// This is a map of pod id to a map of container name to the
podInfo map[string]api.PodInfo
period time.Duration
@@ -40,7 +41,7 @@ type PodCache struct {
}
// NewPodCache returns a new PodCache which watches container information registered in the given PodRegistry.
func NewPodCache(info client.PodInfoGetter, pods registry.PodRegistry, period time.Duration) *PodCache {
func NewPodCache(info client.PodInfoGetter, pods pod.Registry, period time.Duration) *PodCache {
return &PodCache{
containerInfo: info,
pods: pods,