Deleting the API objects related to /operations

This commit is contained in:
nikhiljindal
2015-02-04 20:50:45 -08:00
parent 5fb9009f89
commit 19f7ecf31b
9 changed files with 0 additions and 94 deletions

View File

@@ -17,7 +17,6 @@ limitations under the License.
package apiserver
import (
"sort"
"strconv"
"sync"
"sync/atomic"
@@ -79,23 +78,6 @@ func (ops *Operations) insert(op *Operation) {
ops.ops[op.ID] = op
}
// List lists operations for an API client.
func (ops *Operations) List() *api.OperationList {
ops.lock.Lock()
defer ops.lock.Unlock()
ids := []string{}
for id := range ops.ops {
ids = append(ids, id)
}
sort.StringSlice(ids).Sort()
ol := &api.OperationList{}
for _, id := range ids {
ol.Items = append(ol.Items, api.Operation{ObjectMeta: api.ObjectMeta{Name: id}})
}
return ol
}
// Get returns the operation with the given ID, or nil.
func (ops *Operations) Get(id string) *Operation {
ops.lock.Lock()