GoogleCloudPlatform/kubernetes — pull request #1937 by derekwaynecarr (2014-10-21 21:28:08+00:00)
Title: WIP: Rework client.Interface

Fixes #1708

This is a WIP proposal for how we could have an alternate client pattern.

Goals:

1. Keep client stateless
2. Make client operate in a Noun -> Verb style
3. Make code clear when client namespace switches

Sample Code:
```
client := ...

// list pods across all namespaces
pods, err := client.Pods("*").List(selector)
// list pods in the default namespace
pods, err := client.Pods("default").List(selector)
// create a pod in default namespace
pod, err := client.Pods("default").Create(pod)

// work with services
services, err := client.Services("*").List(selector)
services, err := client.Services("default").List(selector)
...

// work with minions
minions, err := client.Minions().List()
```

Please provide feedback, as I will not make rest of this change until we agree on pattern.