kubernetes: github.com/bboreham/kubernetes/pkg/client/unversioned/testclient Index | Files | Directories

package testclient

import "github.com/bboreham/kubernetes/pkg/client/unversioned/testclient"

Index

Package Files

actions.go fake_componentstatuses.go fake_configmaps.go fake_daemon_sets.go fake_deployments.go fake_endpoints.go fake_events.go fake_horizontal_pod_autoscalers.go fake_ingress.go fake_jobs.go fake_limit_ranges.go fake_namespaces.go fake_nodes.go fake_persistent_volume_claims.go fake_persistent_volumes.go fake_pod_templates.go fake_pods.go fake_replication_controllers.go fake_resource_quotas.go fake_scales.go fake_secrets.go fake_service_accounts.go fake_services.go fake_thirdpartyresources.go fixture.go testclient.go

func AddObjectsFromPath Uses

func AddObjectsFromPath(path string, o ObjectRetriever, decoder runtime.Decoder) error

AddObjectsFromPath loads the JSON or YAML file containing Kubernetes API resources and adds them to the provided ObjectRetriever.

type Action Uses

type Action interface {
    GetNamespace() string
    GetVerb() string
    GetResource() string
    GetSubresource() string
    Matches(verb, resource string) bool
}

type ActionImpl Uses

type ActionImpl struct {
    Namespace   string
    Verb        string
    Resource    string
    Subresource string
}

func (ActionImpl) GetNamespace Uses

func (a ActionImpl) GetNamespace() string

func (ActionImpl) GetResource Uses

func (a ActionImpl) GetResource() string

func (ActionImpl) GetSubresource Uses

func (a ActionImpl) GetSubresource() string

func (ActionImpl) GetVerb Uses

func (a ActionImpl) GetVerb() string

func (ActionImpl) Matches Uses

func (a ActionImpl) Matches(verb, resource string) bool

type CreateAction Uses

type CreateAction interface {
    Action
    GetObject() runtime.Object
}

type CreateActionImpl Uses

type CreateActionImpl struct {
    ActionImpl
    Object runtime.Object
}

func NewCreateAction Uses

func NewCreateAction(resource, namespace string, object runtime.Object) CreateActionImpl

func NewRootCreateAction Uses

func NewRootCreateAction(resource string, object runtime.Object) CreateActionImpl

func (CreateActionImpl) GetObject Uses

func (a CreateActionImpl) GetObject() runtime.Object

type DeleteAction Uses

type DeleteAction interface {
    Action
    GetName() string
}

type DeleteActionImpl Uses

type DeleteActionImpl struct {
    ActionImpl
    Name string
}

func NewDeleteAction Uses

func NewDeleteAction(resource, namespace, name string) DeleteActionImpl

func NewRootDeleteAction Uses

func NewRootDeleteAction(resource, name string) DeleteActionImpl

func (DeleteActionImpl) GetName Uses

func (a DeleteActionImpl) GetName() string

type DeleteCollectionActionImpl Uses

type DeleteCollectionActionImpl struct {
    ActionImpl
    ListRestrictions ListRestrictions
}

func NewDeleteCollectionAction Uses

func NewDeleteCollectionAction(resource, namespace string, opts api.ListOptions) DeleteCollectionActionImpl

func NewRootDeleteCollectionAction Uses

func NewRootDeleteCollectionAction(resource string, opts api.ListOptions) DeleteCollectionActionImpl

func (DeleteCollectionActionImpl) GetListRestrictions Uses

func (a DeleteCollectionActionImpl) GetListRestrictions() ListRestrictions

type Fake Uses

type Fake struct {
    sync.RWMutex

    // ReactionChain is the list of reactors that will be attempted for every request in the order they are tried
    ReactionChain []Reactor
    // WatchReactionChain is the list of watch reactors that will be attempted for every request in the order they are tried
    WatchReactionChain []WatchReactor
    // ProxyReactionChain is the list of proxy reactors that will be attempted for every request in the order they are tried
    ProxyReactionChain []ProxyReactor

    Resources map[string]*unversioned.APIResourceList
    // contains filtered or unexported fields
}

Fake implements client.Interface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func NewSimpleFake Uses

func NewSimpleFake(objects ...runtime.Object) *Fake

NewSimpleFake returns a client that will respond with the provided objects

func (*Fake) Actions Uses

func (c *Fake) Actions() []Action

Actions returns a chronologically ordered slice fake actions called on the fake client

func (*Fake) AddProxyReactor Uses

func (c *Fake) AddProxyReactor(resource string, reaction ProxyReactionFunc)

AddProxyReactor appends a reactor to the end of the chain

func (*Fake) AddReactor Uses

func (c *Fake) AddReactor(verb, resource string, reaction ReactionFunc)

AddReactor appends a reactor to the end of the chain

func (*Fake) AddWatchReactor Uses

func (c *Fake) AddWatchReactor(resource string, reaction WatchReactionFunc)

AddWatchReactor appends a reactor to the end of the chain

func (*Fake) ClearActions Uses

func (c *Fake) ClearActions()

ClearActions clears the history of actions called on the fake client

func (*Fake) ComponentStatuses Uses

func (c *Fake) ComponentStatuses() client.ComponentStatusInterface

func (*Fake) Discovery Uses

func (c *Fake) Discovery() client.DiscoveryInterface

func (*Fake) Endpoints Uses

func (c *Fake) Endpoints(namespace string) client.EndpointsInterface

func (*Fake) Events Uses

func (c *Fake) Events(namespace string) client.EventInterface

func (*Fake) Extensions Uses

func (c *Fake) Extensions() client.ExtensionsInterface

func (*Fake) Invokes Uses

func (c *Fake) Invokes(action Action, defaultReturnObj runtime.Object) (runtime.Object, error)

Invokes records the provided Action and then invokes the ReactFn (if provided). defaultReturnObj is expected to be of the same type a normal call would return.

func (*Fake) InvokesProxy Uses

func (c *Fake) InvokesProxy(action Action) client.ResponseWrapper

InvokesProxy records the provided Action and then invokes the ReactFn (if provided).

func (*Fake) InvokesWatch Uses

func (c *Fake) InvokesWatch(action Action) (watch.Interface, error)

InvokesWatch records the provided Action and then invokes the ReactFn (if provided).

func (*Fake) LimitRanges Uses

func (c *Fake) LimitRanges(namespace string) client.LimitRangeInterface

func (*Fake) Namespaces Uses

func (c *Fake) Namespaces() client.NamespaceInterface

func (*Fake) Nodes Uses

func (c *Fake) Nodes() client.NodeInterface

func (*Fake) PersistentVolumeClaims Uses

func (c *Fake) PersistentVolumeClaims(namespace string) client.PersistentVolumeClaimInterface

func (*Fake) PersistentVolumes Uses

func (c *Fake) PersistentVolumes() client.PersistentVolumeInterface

func (*Fake) PodTemplates Uses

func (c *Fake) PodTemplates(namespace string) client.PodTemplateInterface

func (*Fake) Pods Uses

func (c *Fake) Pods(namespace string) client.PodInterface

func (*Fake) PrependProxyReactor Uses

func (c *Fake) PrependProxyReactor(resource string, reaction ProxyReactionFunc)

PrependProxyReactor adds a reactor to the beginning of the chain

func (*Fake) PrependReactor Uses

func (c *Fake) PrependReactor(verb, resource string, reaction ReactionFunc)

PrependReactor adds a reactor to the beginning of the chain

func (*Fake) PrependWatchReactor Uses

func (c *Fake) PrependWatchReactor(resource string, reaction WatchReactionFunc)

PrependWatchReactor adds a reactor to the beginning of the chain

func (*Fake) ReplicationControllers Uses

func (c *Fake) ReplicationControllers(namespace string) client.ReplicationControllerInterface

func (*Fake) ResourceQuotas Uses

func (c *Fake) ResourceQuotas(namespace string) client.ResourceQuotaInterface

func (*Fake) Secrets Uses

func (c *Fake) Secrets(namespace string) client.SecretsInterface

func (*Fake) ServerAPIVersions Uses

func (c *Fake) ServerAPIVersions() (*unversioned.APIVersions, error)

func (*Fake) ServerVersion Uses

func (c *Fake) ServerVersion() (*version.Info, error)

func (*Fake) ServiceAccounts Uses

func (c *Fake) ServiceAccounts(namespace string) client.ServiceAccountsInterface

func (*Fake) Services Uses

func (c *Fake) Services(namespace string) client.ServiceInterface

func (*Fake) SwaggerSchema Uses

func (c *Fake) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error)

SwaggerSchema returns an empty swagger.ApiDeclaration for testing

type FakeComponentStatuses Uses

type FakeComponentStatuses struct {
    Fake *Fake
}

Fake implements ComponentStatusInterface.

func (*FakeComponentStatuses) Get Uses

func (c *FakeComponentStatuses) Get(name string) (*api.ComponentStatus, error)

func (*FakeComponentStatuses) List Uses

func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error)

type FakeConfigMaps Uses

type FakeConfigMaps struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeConfigMaps implements ConfigMapInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeConfigMaps) Create Uses

func (c *FakeConfigMaps) Create(cfg *extensions.ConfigMap) (*extensions.ConfigMap, error)

func (*FakeConfigMaps) Delete Uses

func (c *FakeConfigMaps) Delete(name string) error

func (*FakeConfigMaps) Get Uses

func (c *FakeConfigMaps) Get(name string) (*extensions.ConfigMap, error)

func (*FakeConfigMaps) List Uses

func (c *FakeConfigMaps) List(opts api.ListOptions) (*extensions.ConfigMapList, error)

func (*FakeConfigMaps) Update Uses

func (c *FakeConfigMaps) Update(cfg *extensions.ConfigMap) (*extensions.ConfigMap, error)

func (*FakeConfigMaps) Watch Uses

func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeDaemonSets Uses

type FakeDaemonSets struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeDaemonSet implements DaemonInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeDaemonSets) Create Uses

func (c *FakeDaemonSets) Create(daemon *extensions.DaemonSet) (*extensions.DaemonSet, error)

func (*FakeDaemonSets) Delete Uses

func (c *FakeDaemonSets) Delete(name string) error

func (*FakeDaemonSets) Get Uses

func (c *FakeDaemonSets) Get(name string) (*extensions.DaemonSet, error)

func (*FakeDaemonSets) List Uses

func (c *FakeDaemonSets) List(opts api.ListOptions) (*extensions.DaemonSetList, error)

func (*FakeDaemonSets) Update Uses

func (c *FakeDaemonSets) Update(daemon *extensions.DaemonSet) (*extensions.DaemonSet, error)

func (*FakeDaemonSets) UpdateStatus Uses

func (c *FakeDaemonSets) UpdateStatus(daemon *extensions.DaemonSet) (*extensions.DaemonSet, error)

func (*FakeDaemonSets) Watch Uses

func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeDeployments Uses

type FakeDeployments struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeDeployments implements DeploymentsInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeDeployments) Create Uses

func (c *FakeDeployments) Create(deployment *extensions.Deployment) (*extensions.Deployment, error)

func (*FakeDeployments) Delete Uses

func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error

func (*FakeDeployments) Get Uses

func (c *FakeDeployments) Get(name string) (*extensions.Deployment, error)

func (*FakeDeployments) List Uses

func (c *FakeDeployments) List(opts api.ListOptions) (*extensions.DeploymentList, error)

func (*FakeDeployments) Update Uses

func (c *FakeDeployments) Update(deployment *extensions.Deployment) (*extensions.Deployment, error)

func (*FakeDeployments) UpdateStatus Uses

func (c *FakeDeployments) UpdateStatus(deployment *extensions.Deployment) (*extensions.Deployment, error)

func (*FakeDeployments) Watch Uses

func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeDiscovery Uses

type FakeDiscovery struct {
    *Fake
}

func (*FakeDiscovery) ServerGroups Uses

func (c *FakeDiscovery) ServerGroups() (*unversioned.APIGroupList, error)

func (*FakeDiscovery) ServerResources Uses

func (c *FakeDiscovery) ServerResources() (map[string]*unversioned.APIResourceList, error)

func (*FakeDiscovery) ServerResourcesForGroupVersion Uses

func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error)

type FakeEndpoints Uses

type FakeEndpoints struct {
    Fake      *Fake
    Namespace string
}

FakeEndpoints implements EndpointInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeEndpoints) Create Uses

func (c *FakeEndpoints) Create(endpoints *api.Endpoints) (*api.Endpoints, error)

func (*FakeEndpoints) Delete Uses

func (c *FakeEndpoints) Delete(name string) error

func (*FakeEndpoints) Get Uses

func (c *FakeEndpoints) Get(name string) (*api.Endpoints, error)

func (*FakeEndpoints) List Uses

func (c *FakeEndpoints) List(opts api.ListOptions) (*api.EndpointsList, error)

func (*FakeEndpoints) Update Uses

func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (*api.Endpoints, error)

func (*FakeEndpoints) Watch Uses

func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeEvents Uses

type FakeEvents struct {
    Fake      *Fake
    Namespace string
}

FakeEvents implements EventInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeEvents) Create Uses

func (c *FakeEvents) Create(event *api.Event) (*api.Event, error)

Create makes a new event. Returns the copy of the event the server returns, or an error.

func (*FakeEvents) Delete Uses

func (c *FakeEvents) Delete(name string) error

func (*FakeEvents) DeleteCollection Uses

func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error

func (*FakeEvents) Get Uses

func (c *FakeEvents) Get(name string) (*api.Event, error)

Get returns the given event, or an error.

func (*FakeEvents) GetFieldSelector Uses

func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector

func (*FakeEvents) List Uses

func (c *FakeEvents) List(opts api.ListOptions) (*api.EventList, error)

List returns a list of events matching the selectors.

func (*FakeEvents) Patch Uses

func (c *FakeEvents) Patch(event *api.Event, data []byte) (*api.Event, error)

Patch patches an existing event. Returns the copy of the event the server returns, or an error.

func (*FakeEvents) Search Uses

func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error)

Search returns a list of events matching the specified object.

func (*FakeEvents) Update Uses

func (c *FakeEvents) Update(event *api.Event) (*api.Event, error)

Update replaces an existing event. Returns the copy of the event the server returns, or an error.

func (*FakeEvents) Watch Uses

func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error)

Watch starts watching for events matching the given selectors.

type FakeExperimental Uses

type FakeExperimental struct {
    *Fake
}

func NewSimpleFakeExp Uses

func NewSimpleFakeExp(objects ...runtime.Object) *FakeExperimental

NewSimpleFakeExp returns a client that will respond with the provided objects

func (*FakeExperimental) ConfigMaps Uses

func (c *FakeExperimental) ConfigMaps(namespace string) client.ConfigMapsInterface

func (*FakeExperimental) DaemonSets Uses

func (c *FakeExperimental) DaemonSets(namespace string) client.DaemonSetInterface

func (*FakeExperimental) Deployments Uses

func (c *FakeExperimental) Deployments(namespace string) client.DeploymentInterface

func (*FakeExperimental) HorizontalPodAutoscalers Uses

func (c *FakeExperimental) HorizontalPodAutoscalers(namespace string) client.HorizontalPodAutoscalerInterface

func (*FakeExperimental) Ingress Uses

func (c *FakeExperimental) Ingress(namespace string) client.IngressInterface

func (*FakeExperimental) Jobs Uses

func (c *FakeExperimental) Jobs(namespace string) client.JobInterface

func (*FakeExperimental) Scales Uses

func (c *FakeExperimental) Scales(namespace string) client.ScaleInterface

func (*FakeExperimental) ThirdPartyResources Uses

func (c *FakeExperimental) ThirdPartyResources(namespace string) client.ThirdPartyResourceInterface

type FakeHorizontalPodAutoscalers Uses

type FakeHorizontalPodAutoscalers struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeHorizontalPodAutoscalers) Create Uses

func (c *FakeHorizontalPodAutoscalers) Create(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)

func (*FakeHorizontalPodAutoscalers) Delete Uses

func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error

func (*FakeHorizontalPodAutoscalers) Get Uses

func (c *FakeHorizontalPodAutoscalers) Get(name string) (*extensions.HorizontalPodAutoscaler, error)

func (*FakeHorizontalPodAutoscalers) List Uses

func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error)

func (*FakeHorizontalPodAutoscalers) Update Uses

func (c *FakeHorizontalPodAutoscalers) Update(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)

func (*FakeHorizontalPodAutoscalers) UpdateStatus Uses

func (c *FakeHorizontalPodAutoscalers) UpdateStatus(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)

func (*FakeHorizontalPodAutoscalers) Watch Uses

func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeIngress Uses

type FakeIngress struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeIngress implements IngressInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeIngress) Create Uses

func (c *FakeIngress) Create(ingress *extensions.Ingress) (*extensions.Ingress, error)

func (*FakeIngress) Delete Uses

func (c *FakeIngress) Delete(name string, options *api.DeleteOptions) error

func (*FakeIngress) Get Uses

func (c *FakeIngress) Get(name string) (*extensions.Ingress, error)

func (*FakeIngress) List Uses

func (c *FakeIngress) List(opts api.ListOptions) (*extensions.IngressList, error)

func (*FakeIngress) Update Uses

func (c *FakeIngress) Update(ingress *extensions.Ingress) (*extensions.Ingress, error)

func (*FakeIngress) UpdateStatus Uses

func (c *FakeIngress) UpdateStatus(ingress *extensions.Ingress) (result *extensions.Ingress, err error)

func (*FakeIngress) Watch Uses

func (c *FakeIngress) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeJobs Uses

type FakeJobs struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeJobs implements JobInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeJobs) Create Uses

func (c *FakeJobs) Create(job *extensions.Job) (*extensions.Job, error)

func (*FakeJobs) Delete Uses

func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error

func (*FakeJobs) Get Uses

func (c *FakeJobs) Get(name string) (*extensions.Job, error)

func (*FakeJobs) List Uses

func (c *FakeJobs) List(opts api.ListOptions) (*extensions.JobList, error)

func (*FakeJobs) Update Uses

func (c *FakeJobs) Update(job *extensions.Job) (*extensions.Job, error)

func (*FakeJobs) UpdateStatus Uses

func (c *FakeJobs) UpdateStatus(job *extensions.Job) (result *extensions.Job, err error)

func (*FakeJobs) Watch Uses

func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeLimitRanges Uses

type FakeLimitRanges struct {
    Fake      *Fake
    Namespace string
}

FakeLimitRanges implements PodsInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeLimitRanges) Create Uses

func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (*api.LimitRange, error)

func (*FakeLimitRanges) Delete Uses

func (c *FakeLimitRanges) Delete(name string) error

func (*FakeLimitRanges) Get Uses

func (c *FakeLimitRanges) Get(name string) (*api.LimitRange, error)

func (*FakeLimitRanges) List Uses

func (c *FakeLimitRanges) List(opts api.ListOptions) (*api.LimitRangeList, error)

func (*FakeLimitRanges) Update Uses

func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (*api.LimitRange, error)

func (*FakeLimitRanges) Watch Uses

func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeNamespaces Uses

type FakeNamespaces struct {
    Fake *Fake
}

FakeNamespaces implements NamespacesInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeNamespaces) Create Uses

func (c *FakeNamespaces) Create(namespace *api.Namespace) (*api.Namespace, error)

func (*FakeNamespaces) Delete Uses

func (c *FakeNamespaces) Delete(name string) error

func (*FakeNamespaces) Finalize Uses

func (c *FakeNamespaces) Finalize(namespace *api.Namespace) (*api.Namespace, error)

func (*FakeNamespaces) Get Uses

func (c *FakeNamespaces) Get(name string) (*api.Namespace, error)

func (*FakeNamespaces) List Uses

func (c *FakeNamespaces) List(opts api.ListOptions) (*api.NamespaceList, error)

func (*FakeNamespaces) Status Uses

func (c *FakeNamespaces) Status(namespace *api.Namespace) (*api.Namespace, error)

func (*FakeNamespaces) Update Uses

func (c *FakeNamespaces) Update(namespace *api.Namespace) (*api.Namespace, error)

func (*FakeNamespaces) Watch Uses

func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeNodes Uses

type FakeNodes struct {
    Fake *Fake
}

FakeNodes implements NodeInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeNodes) Create Uses

func (c *FakeNodes) Create(node *api.Node) (*api.Node, error)

func (*FakeNodes) Delete Uses

func (c *FakeNodes) Delete(name string) error

func (*FakeNodes) Get Uses

func (c *FakeNodes) Get(name string) (*api.Node, error)

func (*FakeNodes) List Uses

func (c *FakeNodes) List(opts api.ListOptions) (*api.NodeList, error)

func (*FakeNodes) Update Uses

func (c *FakeNodes) Update(node *api.Node) (*api.Node, error)

func (*FakeNodes) UpdateStatus Uses

func (c *FakeNodes) UpdateStatus(node *api.Node) (*api.Node, error)

func (*FakeNodes) Watch Uses

func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error)

type FakePersistentVolumeClaims Uses

type FakePersistentVolumeClaims struct {
    Fake      *Fake
    Namespace string
}

func (*FakePersistentVolumeClaims) Create Uses

func (c *FakePersistentVolumeClaims) Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)

func (*FakePersistentVolumeClaims) Delete Uses

func (c *FakePersistentVolumeClaims) Delete(name string) error

func (*FakePersistentVolumeClaims) Get Uses

func (c *FakePersistentVolumeClaims) Get(name string) (*api.PersistentVolumeClaim, error)

func (*FakePersistentVolumeClaims) List Uses

func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error)

func (*FakePersistentVolumeClaims) Update Uses

func (c *FakePersistentVolumeClaims) Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)

func (*FakePersistentVolumeClaims) UpdateStatus Uses

func (c *FakePersistentVolumeClaims) UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)

func (*FakePersistentVolumeClaims) Watch Uses

func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error)

type FakePersistentVolumes Uses

type FakePersistentVolumes struct {
    Fake *Fake
}

func (*FakePersistentVolumes) Create Uses

func (c *FakePersistentVolumes) Create(pv *api.PersistentVolume) (*api.PersistentVolume, error)

func (*FakePersistentVolumes) Delete Uses

func (c *FakePersistentVolumes) Delete(name string) error

func (*FakePersistentVolumes) Get Uses

func (c *FakePersistentVolumes) Get(name string) (*api.PersistentVolume, error)

func (*FakePersistentVolumes) List Uses

func (c *FakePersistentVolumes) List(opts api.ListOptions) (*api.PersistentVolumeList, error)

func (*FakePersistentVolumes) Update Uses

func (c *FakePersistentVolumes) Update(pv *api.PersistentVolume) (*api.PersistentVolume, error)

func (*FakePersistentVolumes) UpdateStatus Uses

func (c *FakePersistentVolumes) UpdateStatus(pv *api.PersistentVolume) (*api.PersistentVolume, error)

func (*FakePersistentVolumes) Watch Uses

func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error)

type FakePodTemplates Uses

type FakePodTemplates struct {
    Fake      *Fake
    Namespace string
}

FakePodTemplates implements PodTemplatesInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakePodTemplates) Create Uses

func (c *FakePodTemplates) Create(pod *api.PodTemplate) (*api.PodTemplate, error)

func (*FakePodTemplates) Delete Uses

func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error

func (*FakePodTemplates) Get Uses

func (c *FakePodTemplates) Get(name string) (*api.PodTemplate, error)

func (*FakePodTemplates) List Uses

func (c *FakePodTemplates) List(opts api.ListOptions) (*api.PodTemplateList, error)

func (*FakePodTemplates) Update Uses

func (c *FakePodTemplates) Update(pod *api.PodTemplate) (*api.PodTemplate, error)

func (*FakePodTemplates) Watch Uses

func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error)

type FakePods Uses

type FakePods struct {
    Fake      *Fake
    Namespace string
}

FakePods implements PodsInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakePods) Bind Uses

func (c *FakePods) Bind(binding *api.Binding) error

func (*FakePods) Create Uses

func (c *FakePods) Create(pod *api.Pod) (*api.Pod, error)

func (*FakePods) Delete Uses

func (c *FakePods) Delete(name string, options *api.DeleteOptions) error

func (*FakePods) Get Uses

func (c *FakePods) Get(name string) (*api.Pod, error)

func (*FakePods) GetLogs Uses

func (c *FakePods) GetLogs(name string, opts *api.PodLogOptions) *client.Request

func (*FakePods) List Uses

func (c *FakePods) List(opts api.ListOptions) (*api.PodList, error)

func (*FakePods) Update Uses

func (c *FakePods) Update(pod *api.Pod) (*api.Pod, error)

func (*FakePods) UpdateStatus Uses

func (c *FakePods) UpdateStatus(pod *api.Pod) (*api.Pod, error)

func (*FakePods) Watch Uses

func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeReplicationControllers Uses

type FakeReplicationControllers struct {
    Fake      *Fake
    Namespace string
}

FakeReplicationControllers implements ReplicationControllerInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeReplicationControllers) Create Uses

func (c *FakeReplicationControllers) Create(controller *api.ReplicationController) (*api.ReplicationController, error)

func (*FakeReplicationControllers) Delete Uses

func (c *FakeReplicationControllers) Delete(name string) error

func (*FakeReplicationControllers) Get Uses

func (c *FakeReplicationControllers) Get(name string) (*api.ReplicationController, error)

func (*FakeReplicationControllers) List Uses

func (c *FakeReplicationControllers) List(opts api.ListOptions) (*api.ReplicationControllerList, error)

func (*FakeReplicationControllers) Update Uses

func (c *FakeReplicationControllers) Update(controller *api.ReplicationController) (*api.ReplicationController, error)

func (*FakeReplicationControllers) UpdateStatus Uses

func (c *FakeReplicationControllers) UpdateStatus(controller *api.ReplicationController) (*api.ReplicationController, error)

func (*FakeReplicationControllers) Watch Uses

func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeResourceQuotas Uses

type FakeResourceQuotas struct {
    Fake      *Fake
    Namespace string
}

FakeResourceQuotas implements ResourceQuotaInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeResourceQuotas) Create Uses

func (c *FakeResourceQuotas) Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)

func (*FakeResourceQuotas) Delete Uses

func (c *FakeResourceQuotas) Delete(name string) error

func (*FakeResourceQuotas) Get Uses

func (c *FakeResourceQuotas) Get(name string) (*api.ResourceQuota, error)

func (*FakeResourceQuotas) List Uses

func (c *FakeResourceQuotas) List(opts api.ListOptions) (*api.ResourceQuotaList, error)

func (*FakeResourceQuotas) Update Uses

func (c *FakeResourceQuotas) Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)

func (*FakeResourceQuotas) UpdateStatus Uses

func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)

func (*FakeResourceQuotas) Watch Uses

func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeScales Uses

type FakeScales struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeScales implements ScaleInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeScales) Get Uses

func (c *FakeScales) Get(kind string, name string) (result *extensions.Scale, err error)

func (*FakeScales) Update Uses

func (c *FakeScales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error)

type FakeSecrets Uses

type FakeSecrets struct {
    Fake      *Fake
    Namespace string
}

Fake implements SecretInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeSecrets) Create Uses

func (c *FakeSecrets) Create(secret *api.Secret) (*api.Secret, error)

func (*FakeSecrets) Delete Uses

func (c *FakeSecrets) Delete(name string) error

func (*FakeSecrets) Get Uses

func (c *FakeSecrets) Get(name string) (*api.Secret, error)

func (*FakeSecrets) List Uses

func (c *FakeSecrets) List(opts api.ListOptions) (*api.SecretList, error)

func (*FakeSecrets) Update Uses

func (c *FakeSecrets) Update(secret *api.Secret) (*api.Secret, error)

func (*FakeSecrets) Watch Uses

func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeServiceAccounts Uses

type FakeServiceAccounts struct {
    Fake      *Fake
    Namespace string
}

FakeServiceAccounts implements ServiceAccountsInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeServiceAccounts) Create Uses

func (c *FakeServiceAccounts) Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)

func (*FakeServiceAccounts) Delete Uses

func (c *FakeServiceAccounts) Delete(name string) error

func (*FakeServiceAccounts) Get Uses

func (c *FakeServiceAccounts) Get(name string) (*api.ServiceAccount, error)

func (*FakeServiceAccounts) List Uses

func (c *FakeServiceAccounts) List(opts api.ListOptions) (*api.ServiceAccountList, error)

func (*FakeServiceAccounts) Update Uses

func (c *FakeServiceAccounts) Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)

func (*FakeServiceAccounts) Watch Uses

func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeServices Uses

type FakeServices struct {
    Fake      *Fake
    Namespace string
}

Fake implements ServiceInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeServices) Create Uses

func (c *FakeServices) Create(service *api.Service) (*api.Service, error)

func (*FakeServices) Delete Uses

func (c *FakeServices) Delete(name string) error

func (*FakeServices) Get Uses

func (c *FakeServices) Get(name string) (*api.Service, error)

func (*FakeServices) List Uses

func (c *FakeServices) List(opts api.ListOptions) (*api.ServiceList, error)

func (*FakeServices) ProxyGet Uses

func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) client.ResponseWrapper

func (*FakeServices) Update Uses

func (c *FakeServices) Update(service *api.Service) (*api.Service, error)

func (*FakeServices) Watch Uses

func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error)

type FakeThirdPartyResources Uses

type FakeThirdPartyResources struct {
    Fake      *FakeExperimental
    Namespace string
}

FakeThirdPartyResources implements ThirdPartyResourceInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*FakeThirdPartyResources) Create Uses

func (c *FakeThirdPartyResources) Create(daemon *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)

func (*FakeThirdPartyResources) Delete Uses

func (c *FakeThirdPartyResources) Delete(name string) error

func (*FakeThirdPartyResources) Get Uses

func (c *FakeThirdPartyResources) Get(name string) (*extensions.ThirdPartyResource, error)

func (*FakeThirdPartyResources) List Uses

func (c *FakeThirdPartyResources) List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error)

func (*FakeThirdPartyResources) Update Uses

func (c *FakeThirdPartyResources) Update(daemon *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)

func (*FakeThirdPartyResources) UpdateStatus Uses

func (c *FakeThirdPartyResources) UpdateStatus(daemon *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)

func (*FakeThirdPartyResources) Watch Uses

func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error)

type GenericAction Uses

type GenericAction interface {
    Action
    GetValue() interface{}
}

type GenericActionImpl Uses

type GenericActionImpl struct {
    ActionImpl
    Value interface{}
}

func (GenericActionImpl) GetValue Uses

func (a GenericActionImpl) GetValue() interface{}

type GetAction Uses

type GetAction interface {
    Action
    GetName() string
}

type GetActionImpl Uses

type GetActionImpl struct {
    ActionImpl
    Name string
}

func NewGetAction Uses

func NewGetAction(resource, namespace, name string) GetActionImpl

func NewRootGetAction Uses

func NewRootGetAction(resource, name string) GetActionImpl

func (GetActionImpl) GetName Uses

func (a GetActionImpl) GetName() string

type ListAction Uses

type ListAction interface {
    Action
    GetListRestrictions() ListRestrictions
}

type ListActionImpl Uses

type ListActionImpl struct {
    ActionImpl
    ListRestrictions ListRestrictions
}

func NewListAction Uses

func NewListAction(resource, namespace string, opts api.ListOptions) ListActionImpl

func NewRootListAction Uses

func NewRootListAction(resource string, opts api.ListOptions) ListActionImpl

func (ListActionImpl) GetListRestrictions Uses

func (a ListActionImpl) GetListRestrictions() ListRestrictions

type ListRestrictions Uses

type ListRestrictions struct {
    Labels labels.Selector
    Fields fields.Selector
}

type ObjectRetriever Uses

type ObjectRetriever interface {
    // Kind should return a resource or a list of resources (depending on the provided kind and
    // name). It should return an error if the caller should communicate an error to the server.
    Kind(gvk unversioned.GroupVersionKind, name string) (runtime.Object, error)
    // Add adds a runtime object for test purposes into this object.
    Add(runtime.Object) error
}

ObjectRetriever abstracts the implementation for retrieving or setting generic objects. It is intended to be used to fake calls to a server by returning objects based on their kind and name.

func NewObjects Uses

func NewObjects(scheme ObjectScheme, decoder runtime.ObjectDecoder) ObjectRetriever

NewObjects implements the ObjectRetriever interface by introspecting the objects provided to Add() and returning them when the Kind method is invoked. If an api.List object is provided to Add(), each child item is added. If an object is added that is itself a list (PodList, ServiceList) then that is added to the "PodList" kind. If no PodList is added, the retriever will take any loaded Pods and return them in a list. If an api.Status is added, and the Details.Kind field is set, that status will be returned instead (as an error if Status != Success, or as a runtime.Object if Status == Success). If multiple PodLists are provided, they will be returned in order by the Kind call, and the last PodList will be reused for subsequent calls.

type ObjectScheme Uses

type ObjectScheme interface {
    runtime.ObjectCreater
    runtime.ObjectCopier
    runtime.ObjectTyper
}

ObjectScheme abstracts the implementation of common operations on objects.

type PatchActionImpl Uses

type PatchActionImpl struct {
    ActionImpl
    Object runtime.Object
}

func NewPatchAction Uses

func NewPatchAction(resource, namespace string, object runtime.Object) PatchActionImpl

func NewRootPatchAction Uses

func NewRootPatchAction(resource string, object runtime.Object) PatchActionImpl

func (PatchActionImpl) GetObject Uses

func (a PatchActionImpl) GetObject() runtime.Object

type ProxyGetAction Uses

type ProxyGetAction interface {
    Action
    GetScheme() string
    GetName() string
    GetPort() string
    GetPath() string
    GetParams() map[string]string
}

type ProxyGetActionImpl Uses

type ProxyGetActionImpl struct {
    ActionImpl
    Scheme string
    Name   string
    Port   string
    Path   string
    Params map[string]string
}

func NewProxyGetAction Uses

func NewProxyGetAction(resource, namespace, scheme, name, port, path string, params map[string]string) ProxyGetActionImpl

func (ProxyGetActionImpl) GetName Uses

func (a ProxyGetActionImpl) GetName() string

func (ProxyGetActionImpl) GetParams Uses

func (a ProxyGetActionImpl) GetParams() map[string]string

func (ProxyGetActionImpl) GetPath Uses

func (a ProxyGetActionImpl) GetPath() string

func (ProxyGetActionImpl) GetPort Uses

func (a ProxyGetActionImpl) GetPort() string

func (ProxyGetActionImpl) GetScheme Uses

func (a ProxyGetActionImpl) GetScheme() string

type ProxyReactionFunc Uses

type ProxyReactionFunc func(action Action) (handled bool, ret client.ResponseWrapper, err error)

ProxyReactionFunc is a function that returns a ResponseWrapper interface for a given Action. If "handled" is false, then the test client will continue ignore the results and continue to the next ProxyReactionFunc

type ProxyReactor Uses

type ProxyReactor interface {
    // Handles indicates whether or not this Reactor deals with a given action
    Handles(action Action) bool
    // React handles a watch action and returns results.  It may choose to delegate by indicated handled=false
    React(action Action) (handled bool, ret client.ResponseWrapper, err error)
}

ProxyReactor is an interface to allow the composition of proxy get functions.

type ReactionFunc Uses

type ReactionFunc func(action Action) (handled bool, ret runtime.Object, err error)

ReactionFunc is a function that returns an object or error for a given Action. If "handled" is false, then the test client will continue ignore the results and continue to the next ReactionFunc

func ObjectReaction Uses

func ObjectReaction(o ObjectRetriever, mapper meta.RESTMapper) ReactionFunc

ObjectReaction returns a ReactionFunc that takes a generic action string of the form <verb>-<resource> or <verb>-<subresource>-<resource> and attempts to return a runtime Object or error that matches the requested action. For instance, list-replicationControllers should attempt to return a list of replication controllers. This method delegates to the ObjectRetriever interface to satisfy retrieval of lists or retrieval of single items. TODO: add support for sub resources

type Reactor Uses

type Reactor interface {
    // Handles indicates whether or not this Reactor deals with a given action
    Handles(action Action) bool
    // React handles the action and returns results.  It may choose to delegate by indicated handled=false
    React(action Action) (handled bool, ret runtime.Object, err error)
}

Reactor is an interface to allow the composition of reaction functions.

type SimpleProxyReactor Uses

type SimpleProxyReactor struct {
    Resource string

    Reaction ProxyReactionFunc
}

SimpleProxyReactor is a ProxyReactor. Each reaction function is attached to a given resource. "*" matches everything for that value. For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions.

func (*SimpleProxyReactor) Handles Uses

func (r *SimpleProxyReactor) Handles(action Action) bool

func (*SimpleProxyReactor) React Uses

func (r *SimpleProxyReactor) React(action Action) (bool, client.ResponseWrapper, error)

type SimpleReactor Uses

type SimpleReactor struct {
    Verb     string
    Resource string

    Reaction ReactionFunc
}

SimpleReactor is a Reactor. Each reaction function is attached to a given verb,resource tuple. "*" in either field matches everything for that value. For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions

func (*SimpleReactor) Handles Uses

func (r *SimpleReactor) Handles(action Action) bool

func (*SimpleReactor) React Uses

func (r *SimpleReactor) React(action Action) (bool, runtime.Object, error)

type SimpleWatchReactor Uses

type SimpleWatchReactor struct {
    Resource string

    Reaction WatchReactionFunc
}

SimpleWatchReactor is a WatchReactor. Each reaction function is attached to a given resource. "*" matches everything for that value. For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions

func (*SimpleWatchReactor) Handles Uses

func (r *SimpleWatchReactor) Handles(action Action) bool

func (*SimpleWatchReactor) React Uses

func (r *SimpleWatchReactor) React(action Action) (bool, watch.Interface, error)

type UpdateAction Uses

type UpdateAction interface {
    Action
    GetObject() runtime.Object
}

type UpdateActionImpl Uses

type UpdateActionImpl struct {
    ActionImpl
    Object runtime.Object
}

func NewRootUpdateAction Uses

func NewRootUpdateAction(resource string, object runtime.Object) UpdateActionImpl

func NewUpdateAction Uses

func NewUpdateAction(resource, namespace string, object runtime.Object) UpdateActionImpl

func NewUpdateSubresourceAction Uses

func NewUpdateSubresourceAction(resource, subresource, namespace string, object runtime.Object) UpdateActionImpl

func (UpdateActionImpl) GetObject Uses

func (a UpdateActionImpl) GetObject() runtime.Object

type WatchAction Uses

type WatchAction interface {
    Action
    GetWatchRestrictions() WatchRestrictions
}

type WatchActionImpl Uses

type WatchActionImpl struct {
    ActionImpl
    WatchRestrictions WatchRestrictions
}

func NewRootWatchAction Uses

func NewRootWatchAction(resource string, opts api.ListOptions) WatchActionImpl

func NewWatchAction Uses

func NewWatchAction(resource, namespace string, opts api.ListOptions) WatchActionImpl

func (WatchActionImpl) GetWatchRestrictions Uses

func (a WatchActionImpl) GetWatchRestrictions() WatchRestrictions

type WatchReactionFunc Uses

type WatchReactionFunc func(action Action) (handled bool, ret watch.Interface, err error)

WatchReactionFunc is a function that returns a watch interface. If "handled" is false, then the test client will continue ignore the results and continue to the next ReactionFunc

func DefaultWatchReactor Uses

func DefaultWatchReactor(watchInterface watch.Interface, err error) WatchReactionFunc

type WatchReactor Uses

type WatchReactor interface {
    // Handles indicates whether or not this Reactor deals with a given action
    Handles(action Action) bool
    // React handles a watch action and returns results.  It may choose to delegate by indicated handled=false
    React(action Action) (handled bool, ret watch.Interface, err error)
}

WatchReactor is an interface to allow the composition of watch functions.

type WatchRestrictions Uses

type WatchRestrictions struct {
    Labels          labels.Selector
    Fields          fields.Selector
    ResourceVersion string
}

Directories

PathSynopsis
simple

Package testclient imports 20 packages (graph). Updated 2017-07-25. Refresh now. Tools for package owners. This is a quick bug-fix fork (has fewer than three commits, and only during the week it was created).