Пример #1
0
func NewStorage(opts generic.RESTOptions) ContainerStorage {
	// scale does not set status, only updates spec so we ignore the status
	controllerREST, _ := etcd.NewREST(opts)
	rcRegistry := controller.NewRegistry(controllerREST)

	return ContainerStorage{
		ReplicationController: &RcREST{},
		Scale: &ScaleREST{registry: &rcRegistry},
	}
}
Пример #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},
	}
}