Exemplo n.º 1
0
func NewStorage(s storage.Interface) ContainerStorage {
	rcRegistry := controller.NewRegistry(etcd.NewREST(s))

	return ContainerStorage{
		ReplicationController: &RcREST{},
		Scale: &ScaleREST{registry: &rcRegistry},
	}
}
Exemplo n.º 2
0
func NewStorage(opts generic.RESTOptions) ControllerStorage {
	controllerREST, statusREST := NewREST(opts)
	controllerRegistry := controller.NewRegistry(controllerREST)

	return ControllerStorage{
		Controller: controllerREST,
		Status:     statusREST,
		Scale:      &ScaleREST{registry: controllerRegistry},
	}
}
Exemplo n.º 3
0
func NewStorage(s storage.Interface) ContainerStorage {
	// scale does not set status, only updates spec so we ignore the status
	controllerREST, _ := etcd.NewREST(s)
	rcRegistry := controller.NewRegistry(controllerREST)

	return ContainerStorage{
		ReplicationController: &RcREST{},
		Scale: &ScaleREST{registry: &rcRegistry},
	}
}