Documentation ¶
Index ¶
- func ContainerStoppedEvent(name string) events.Message
- func CreatedContainerSpec(name string) types.ContainerJSON
- func DeadContainerSpec(name string) types.ContainerJSON
- func ExitedContainerSpec(name string, exitCode int) types.ContainerJSON
- func PausedContainerSpec(name string) types.ContainerJSON
- func RemovingContainerSpec(name string) types.ContainerJSON
- func RestartingContainerSpec(name string) types.ContainerJSON
- func RunningWithHealthcheckContainerSpec(name string, status string) types.ContainerJSON
- func RunningWithoutHealthcheckContainerSpec(name string) types.ContainerJSON
- func ServiceGlobal(name string) swarm.Service
- func ServiceNotReadyReplicated(name string, runningTasks uint64, desiredTasks uint64) swarm.Service
- func ServiceRemovedEvent(name string) events.Message
- func ServiceReplicated(name string, replicas uint64) swarm.Service
- func ServiceScaledEvent(name string, oldReplicas string, newReplicas string) events.Message
- func V1Deployment(replicas int, readyReplicas int) *appsv1.Deployment
- func V1Scale(replicas int) *autoscalingv1.Scale
- func V1StatefulSet(replicas int, readyReplicas int) *appsv1.StatefulSet
- type AppsV1InterfaceMock
- type DeploymentMock
- func (d *DeploymentMock) Get(ctx context.Context, workloadName string, options metav1.GetOptions) (*appsv1.Deployment, error)
- func (d *DeploymentMock) GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
- func (d *DeploymentMock) UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, ...) (*autoscalingv1.Scale, error)
- type DockerAPIClientMock
- func (client *DockerAPIClientMock) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error)
- func (client *DockerAPIClientMock) ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error
- func (client *DockerAPIClientMock) ContainerStop(ctx context.Context, container string, options container.StopOptions) error
- func (client *DockerAPIClientMock) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error)
- func (client *DockerAPIClientMock) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)
- func (client *DockerAPIClientMock) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, ...) (types.ServiceUpdateResponse, error)
- type KubernetesAPIClientMock
- type StatefulSetsMock
- func (ss *StatefulSetsMock) Get(ctx context.Context, workloadName string, options metav1.GetOptions) (*appsv1.StatefulSet, error)
- func (ss *StatefulSetsMock) GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
- func (ss *StatefulSetsMock) UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, ...) (*autoscalingv1.Scale, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerStoppedEvent ¶
func CreatedContainerSpec ¶
func CreatedContainerSpec(name string) types.ContainerJSON
func DeadContainerSpec ¶
func DeadContainerSpec(name string) types.ContainerJSON
func ExitedContainerSpec ¶
func ExitedContainerSpec(name string, exitCode int) types.ContainerJSON
func PausedContainerSpec ¶
func PausedContainerSpec(name string) types.ContainerJSON
func RemovingContainerSpec ¶
func RemovingContainerSpec(name string) types.ContainerJSON
func RestartingContainerSpec ¶
func RestartingContainerSpec(name string) types.ContainerJSON
func RunningWithHealthcheckContainerSpec ¶
func RunningWithHealthcheckContainerSpec(name string, status string) types.ContainerJSON
RunningWithHealthcheckContainerSpec Status can be "starting", "healthy" or "unhealthy"
func RunningWithoutHealthcheckContainerSpec ¶
func RunningWithoutHealthcheckContainerSpec(name string) types.ContainerJSON
func ServiceGlobal ¶
func ServiceRemovedEvent ¶
func ServiceScaledEvent ¶
func V1Deployment ¶
func V1Deployment(replicas int, readyReplicas int) *appsv1.Deployment
func V1Scale ¶
func V1Scale(replicas int) *autoscalingv1.Scale
func V1StatefulSet ¶
func V1StatefulSet(replicas int, readyReplicas int) *appsv1.StatefulSet
Types ¶
type AppsV1InterfaceMock ¶
type AppsV1InterfaceMock struct { v1.AppsV1Interface // contains filtered or unexported fields }
func (AppsV1InterfaceMock) Deployments ¶
func (api AppsV1InterfaceMock) Deployments(namespace string) v1.DeploymentInterface
func (AppsV1InterfaceMock) StatefulSets ¶
func (api AppsV1InterfaceMock) StatefulSets(namespace string) v1.StatefulSetInterface
type DeploymentMock ¶
type DeploymentMock struct { v1.DeploymentInterface mock.Mock }
func (*DeploymentMock) Get ¶
func (d *DeploymentMock) Get(ctx context.Context, workloadName string, options metav1.GetOptions) (*appsv1.Deployment, error)
func (*DeploymentMock) GetScale ¶
func (d *DeploymentMock) GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
func (*DeploymentMock) UpdateScale ¶
func (d *DeploymentMock) UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error)
type DockerAPIClientMock ¶
type DockerAPIClientMock struct { client.APIClient mock.Mock // contains filtered or unexported fields }
func NewDockerAPIClientMock ¶
func NewDockerAPIClientMock() *DockerAPIClientMock
func NewDockerAPIClientMockWithEvents ¶
func NewDockerAPIClientMockWithEvents(messages []events.Message, errors []error) *DockerAPIClientMock
func (*DockerAPIClientMock) ContainerInspect ¶
func (client *DockerAPIClientMock) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error)
func (*DockerAPIClientMock) ContainerStart ¶
func (client *DockerAPIClientMock) ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error
func (*DockerAPIClientMock) ContainerStop ¶
func (client *DockerAPIClientMock) ContainerStop(ctx context.Context, container string, options container.StopOptions) error
func (*DockerAPIClientMock) Events ¶
func (client *DockerAPIClientMock) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error)
func (*DockerAPIClientMock) ServiceList ¶
func (client *DockerAPIClientMock) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)
func (*DockerAPIClientMock) ServiceUpdate ¶
func (client *DockerAPIClientMock) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error)
type KubernetesAPIClientMock ¶
type KubernetesAPIClientMock struct { kubernetes.Clientset // contains filtered or unexported fields }
func NewKubernetesAPIClientMock ¶
func NewKubernetesAPIClientMock(deployments *DeploymentMock, statefulsets *StatefulSetsMock) *KubernetesAPIClientMock
func (*KubernetesAPIClientMock) AppsV1 ¶
func (c *KubernetesAPIClientMock) AppsV1() v1.AppsV1Interface
type StatefulSetsMock ¶
type StatefulSetsMock struct { v1.StatefulSetInterface mock.Mock }
func (*StatefulSetsMock) Get ¶
func (ss *StatefulSetsMock) Get(ctx context.Context, workloadName string, options metav1.GetOptions) (*appsv1.StatefulSet, error)
func (*StatefulSetsMock) GetScale ¶
func (ss *StatefulSetsMock) GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
func (*StatefulSetsMock) UpdateScale ¶
func (ss *StatefulSetsMock) UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error)
Click to show internal directories.
Click to hide internal directories.