Documentation ¶
Overview ¶
A client for the Kubernetes cluster management API There are three fundamental objects
Task - A single running container TaskForce - A set of co-scheduled Task(s) ReplicationController - A manager for replicating TaskForces
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) CreateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
- func (client Client) CreateService(svc api.Service) (api.Service, error)
- func (client Client) CreateTask(task api.Task) (api.Task, error)
- func (client Client) DeleteReplicationController(name string) error
- func (client Client) DeleteService(name string) error
- func (client Client) DeleteTask(name string) error
- func (client Client) GetReplicationController(name string) (api.ReplicationController, error)
- func (client Client) GetService(name string) (api.Service, error)
- func (client Client) GetTask(name string) (api.Task, error)
- func (client Client) ListTasks(labelQuery map[string]string) (api.TaskList, error)
- func (client Client) UpdateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
- func (client Client) UpdateService(svc api.Service) (api.Service, error)
- func (client Client) UpdateTask(task api.Task) (api.Task, 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) 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) CreateTask ¶
CreateTask takes the representation of a task. Returns the server's representation of the task, and an error, if it occurs
func (Client) DeleteReplicationController ¶
func (Client) DeleteService ¶
func (Client) DeleteTask ¶
DeleteTask takes the name of the task, and returns an error if one 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) GetTask ¶
GetTask takes the name of the task, and returns the corresponding Task object, and an error if it occurs
func (Client) ListTasks ¶
ListTasks takes a label query, and returns the list of tasks that match that query
func (Client) UpdateReplicationController ¶
func (client Client) UpdateReplicationController(controller api.ReplicationController) (api.ReplicationController, error)
UpdateReplicationController updates an existing replication controller
func (Client) UpdateService ¶
UpdateReplicationController updates an existing replication controller
type ClientInterface ¶
type ClientInterface interface { ListTasks(labelQuery map[string]string) (api.TaskList, error) GetTask(name string) (api.Task, error) DeleteTask(name string) error CreateTask(api.Task) (api.Task, error) UpdateTask(api.Task) (api.Task, 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)