Documentation ¶
Overview ¶
Copyright © 2021 Rasa Technologies GmbH
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.
Copyright © 2021 Rasa Technologies GmbH ¶
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 SkipVersionConstrainsCheck() bool
- func VersionConstrains(dockerVersion string) error
- type Docker
- func (d *Docker) CreateKindNode(hostname string) (container.ContainerCreateCreatedBody, error)
- func (d *Docker) DeleteKindNode(hostname string) error
- func (d *Docker) GetKind() KindSpec
- func (d *Docker) GetKindNetworkGatewayAddress() (string, error)
- func (d *Docker) GetServerVersion() (string, error)
- func (d *Docker) SetKind(kind KindSpec)
- func (d *Docker) SetNamespace(name string)
- func (d *Docker) SetProjectPath(path string)
- func (d *Docker) StartKindNode(hostname string) error
- func (d *Docker) StopKindNode(hostname string) error
- type Interface
- type KindSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SkipVersionConstrainsCheck ¶
func SkipVersionConstrainsCheck() bool
SkipVersionConstrainsCheck skips Docker version check if the `RASACTL_SKIP_DOCKER_VERSION_CHECK` environment variable is set to `true`.
func VersionConstrains ¶
DockerVersionConstrains checks if the Docker CLI version is within constrains boundaries.
Types ¶
type Docker ¶
type Docker struct { Client *client.Client Ctx context.Context Namespace string Log logr.Logger Spinner *status.SpinnerMessage ProjectPath string Kind KindSpec Flags *rtypes.RasaCtlFlags // contains filtered or unexported fields }
Docker represents a Docker client.
func (*Docker) CreateKindNode ¶
func (d *Docker) CreateKindNode(hostname string) (container.ContainerCreateCreatedBody, error)
CreateKindNode creates a new container that is used as a kind node.
func (*Docker) DeleteKindNode ¶
DeleteKindNode deletes a kind node.
func (*Docker) GetKindNetworkGatewayAddress ¶
GetKindNetworkGatewayAddress returns a gateway address of the KinD network.
func (*Docker) GetServerVersion ¶
func (*Docker) SetNamespace ¶
SetNamespace sets the Docker.Namespace field.
func (*Docker) SetProjectPath ¶
SetProjectPath sets the Docker.ProjectPath field.
func (*Docker) StartKindNode ¶
StartKindNode starts a kind node that was previously stopped.
func (*Docker) StopKindNode ¶
StopKindNode stops a container that is used as a kind node. In case the container fails to stop gracefully within a minute, it is forcefully terminated (killed).
type Interface ¶
type Interface interface { CreateKindNode(hostname string) (container.ContainerCreateCreatedBody, error) StopKindNode(hostname string) error StartKindNode(hostname string) error DeleteKindNode(hostname string) error SetNamespace(name string) GetKind() KindSpec SetKind(kind KindSpec) SetProjectPath(path string) GetKindNetworkGatewayAddress() (string, error) GetServerVersion() (string, error) }