Documentation ¶
Overview ¶
A client for the Kubernetes cluster management API There are three fundamental objects
Pod - A co-scheduled set of running containers ReplicationController - A manager for replicating Pods Service - A discoverable load balancer
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DecodeLabelQuery(labelQuery string) map[string]string
- func EncodeLabelQuery(labelQuery map[string]string) string
- type AuthInfo
- type Client
- func (client Client) CreatePod(pod api.Pod) (api.Pod, error)
- func (client Client) CreateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
- func (client Client) CreateService(svc api.Service) (api.Service, error)
- func (client Client) DeletePod(name string) error
- func (client Client) DeleteReplicationController(name string) error
- func (client Client) DeleteService(name string) error
- func (client Client) GetPod(name string) (api.Pod, error)
- func (client Client) GetReplicationController(name string) (api.ReplicationController, error)
- func (client Client) GetService(name string) (api.Service, error)
- func (client Client) ListPods(labelQuery map[string]string) (api.PodList, error)
- func (client Client) UpdatePod(pod api.Pod) (api.Pod, error)
- func (client Client) UpdateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
- func (client Client) UpdateService(svc api.Service) (api.Service, error)
- type ClientInterface
- type ContainerInfo
- type FakeContainerInfo
- type HTTPContainerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeLabelQuery ¶
func EncodeLabelQuery ¶
Types ¶
type Client ¶
Client is the actual implementation of a Kubernetes client. Host is the http://... base for the URL
func (Client) CreatePod ¶
CreatePod takes the representation of a pod. Returns the server's representation of the pod, and an error, if it occurs
func (Client) CreateReplicationController ¶
func (client Client) CreateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
CreateReplicationController creates a new replication controller
func (Client) CreateService ¶
CreateReplicationController creates a new replication controller
func (Client) DeleteReplicationController ¶
func (Client) DeleteService ¶
func (Client) GetPod ¶
GetPod takes the name of the pod, and returns the corresponding Pod object, and an error if it occurs
func (Client) GetReplicationController ¶
func (client Client) GetReplicationController(name string) (api.ReplicationController, error)
GetReplicationController returns information about a particular replication controller
func (Client) GetService ¶
GetReplicationController returns information about a particular replication controller
func (Client) ListPods ¶
ListPods takes a label query, and returns the list of pods that match that query
func (Client) UpdatePod ¶
UpdatePod takes the representation of a pod to update. Returns the server's representation of the pod, and an error, if it occurs
func (Client) UpdateReplicationController ¶
func (client Client) UpdateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
UpdateReplicationController updates an existing replication controller
type ClientInterface ¶
type ClientInterface interface { ListPods(labelQuery map[string]string) (api.PodList, error) GetPod(name string) (api.Pod, error) DeletePod(name string) error CreatePod(api.Pod) (api.Pod, error) UpdatePod(api.Pod) (api.Pod, error) GetReplicationController(name string) (api.ReplicationController, error) CreateReplicationController(api.ReplicationController) (api.ReplicationController, error) UpdateReplicationController(api.ReplicationController) (api.ReplicationController, error) DeleteReplicationController(string) error GetService(name string) (api.Service, error) CreateService(api.Service) (api.Service, error) UpdateService(api.Service) (api.Service, error) DeleteService(string) error }
ClientInterface holds the methods for clients of Kubenetes, an interface to allow mock testing
type ContainerInfo ¶
type FakeContainerInfo ¶
type FakeContainerInfo struct {
// contains filtered or unexported fields
}
Useful for testing.
func (*FakeContainerInfo) GetContainerInfo ¶
func (c *FakeContainerInfo) GetContainerInfo(host, name string) (interface{}, error)
type HTTPContainerInfo ¶
func (*HTTPContainerInfo) GetContainerInfo ¶
func (c *HTTPContainerInfo) GetContainerInfo(host, name string) (interface{}, error)