kubernetesclient

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2016 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const NamespaceByNamePath string = "/api/v1/namespaces/%s"
View Source
const NamespacePath string = "/api/v1/namespaces/"
View Source
const NodeByNamePath string = "/api/v1/nodes/%s"
View Source
const NodePath string = "/api/v1/nodes"
View Source
const PodByNamePath string = "/api/v1/namespaces/%s/pods/%s"
View Source
const PodPath string = "/api/v1/namespaces/%s/pods"
View Source
const ReplicationControllerByNamePath string = "/api/v1/namespaces/%s/replicationcontrollers/%s"
View Source
const ReplicationControllerPath string = "/api/v1/namespaces/%s/replicationcontrollers"
View Source
const ServiceByNamePath string = "/api/v1/namespaces/%s/services/%s"
View Source
const ServicePath string = "/api/v1/namespaces/%s/services"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	StatusCode int
	Url        string
	Msg        string
	Status     string
	Body       string
}

func (ApiError) Error

func (e ApiError) Error() string

type Client

type Client struct {
	Pod                   PodOperations
	Namespace             NamespaceOperations
	ReplicationController ReplicationControllerOperations
	Service               ServiceOperations
	Node                  NodeOperations
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiURL string, debug bool) *Client

type NamespaceClient

type NamespaceClient struct {
	// contains filtered or unexported fields
}

func (*NamespaceClient) ByName

func (c *NamespaceClient) ByName(name string) (*model.Namespace, error)

func (*NamespaceClient) CreateNamespace

func (c *NamespaceClient) CreateNamespace(resource *model.Namespace) (*model.Namespace, error)

func (*NamespaceClient) ReplaceNamespace

func (c *NamespaceClient) ReplaceNamespace(name string, resource *model.Namespace) (*model.Namespace, error)

type NamespaceOperations

type NamespaceOperations interface {
	ByName(name string) (*model.Namespace, error)
	CreateNamespace(resource *model.Namespace) (*model.Namespace, error)
	ReplaceNamespace(namespace string, resource *model.Namespace) (*model.Namespace, error)
}

type NodeClient added in v0.3.0

type NodeClient struct {
	// contains filtered or unexported fields
}

func (*NodeClient) ByName added in v0.3.0

func (c *NodeClient) ByName(name string) (*model.Node, error)

func (*NodeClient) CreateNode added in v0.3.0

func (c *NodeClient) CreateNode(resource *model.Node) (*model.Node, error)

func (*NodeClient) DeleteNode added in v0.3.0

func (c *NodeClient) DeleteNode(name string) (*model.Status, error)

func (*NodeClient) ReplaceNode added in v0.3.0

func (c *NodeClient) ReplaceNode(resource *model.Node) (*model.Node, error)

type NodeOperations added in v0.3.0

type NodeOperations interface {
	ByName(name string) (*model.Node, error)
	CreateNode(resource *model.Node) (*model.Node, error)
	ReplaceNode(resource *model.Node) (*model.Node, error)
	DeleteNode(name string) (*model.Status, error)
}

type PodClient

type PodClient struct {
	// contains filtered or unexported fields
}

func (*PodClient) ByName

func (c *PodClient) ByName(namespace string, name string) (*model.Pod, error)

func (*PodClient) CreatePod

func (c *PodClient) CreatePod(namespace string, resource *model.Pod) (*model.Pod, error)

func (*PodClient) DeletePod

func (c *PodClient) DeletePod(namespace string, name string) (*model.Status, error)

func (*PodClient) ReplacePod

func (c *PodClient) ReplacePod(namespace string, resource *model.Pod) (*model.Pod, error)

type PodOperations

type PodOperations interface {
	ByName(namespace string, name string) (*model.Pod, error)
	CreatePod(namespace string, resource *model.Pod) (*model.Pod, error)
	ReplacePod(namespace string, resource *model.Pod) (*model.Pod, error)
	DeletePod(namespace string, name string) (*model.Status, error)
}

type ReplicationControllerClient

type ReplicationControllerClient struct {
	// contains filtered or unexported fields
}

func (*ReplicationControllerClient) ByName

func (*ReplicationControllerClient) CreateReplicationController

func (c *ReplicationControllerClient) CreateReplicationController(namespace string, resource *model.ReplicationController) (*model.ReplicationController, error)

func (*ReplicationControllerClient) DeleteReplicationController

func (c *ReplicationControllerClient) DeleteReplicationController(namespace string, name string) (*model.Status, error)

func (*ReplicationControllerClient) ReplaceReplicationController

func (c *ReplicationControllerClient) ReplaceReplicationController(namespace string, resource *model.ReplicationController) (*model.ReplicationController, error)

type ReplicationControllerOperations

type ReplicationControllerOperations interface {
	ByName(namespace string, name string) (*model.ReplicationController, error)
	CreateReplicationController(namespace string, resource *model.ReplicationController) (*model.ReplicationController, error)
	ReplaceReplicationController(namespace string, resource *model.ReplicationController) (*model.ReplicationController, error)
	DeleteReplicationController(namespace string, name string) (*model.Status, error)
}

type ServiceClient

type ServiceClient struct {
	// contains filtered or unexported fields
}

func (*ServiceClient) ByName

func (c *ServiceClient) ByName(namespace string, name string) (*model.Service, error)

func (*ServiceClient) CreateService

func (c *ServiceClient) CreateService(namespace string, resource *model.Service) (*model.Service, error)

func (*ServiceClient) DeleteService

func (c *ServiceClient) DeleteService(namespace string, name string) (*model.Status, error)

func (*ServiceClient) ReplaceService

func (c *ServiceClient) ReplaceService(namespace string, resource *model.Service) (*model.Service, error)

type ServiceOperations

type ServiceOperations interface {
	ByName(namespace string, name string) (*model.Service, error)
	CreateService(namespace string, resource *model.Service) (*model.Service, error)
	ReplaceService(namespace string, resource *model.Service) (*model.Service, error)
	DeleteService(namespace string, name string) (*model.Status, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL