Documentation ¶
Overview ¶
Copyright © 2020 The k3d Author(s)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 The k3d Author(s)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 The k3d Author(s)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 The k3d Author(s)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 The k3d Author(s)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- type Containerd
- func (d Containerd) CopyToNode(ctx context.Context, src string, dest string, node *k3d.Node) error
- func (d Containerd) CreateNetworkIfNotPresent(ctx context.Context, name string) (string, bool, error)
- func (d Containerd) CreateNode(ctx context.Context, node *k3d.Node) error
- func (d Containerd) CreateVolume(ctx context.Context, name string, labels map[string]string) error
- func (d Containerd) DeleteNetwork(ctx context.Context, ID string) error
- func (d Containerd) DeleteNode(ctx context.Context, node *k3d.Node) error
- func (d Containerd) DeleteVolume(ctx context.Context, name string) error
- func (d Containerd) ExecInNode(ctx context.Context, node *k3d.Node, cmd []string) error
- func (d Containerd) ExecInNodeGetLogs(ctx context.Context, node *k3d.Node, cmd []string) (*bufio.Reader, error)
- func (d Containerd) GetHostIP(ctx context.Context, network string) (net.IP, error)
- func (d Containerd) GetImages(ctx context.Context) ([]string, error)
- func (d Containerd) GetKubeconfig(ctx context.Context, node *k3d.Node) (io.ReadCloser, error)
- func (d Containerd) GetNode(ctx context.Context, node *k3d.Node) (*k3d.Node, error)
- func (d Containerd) GetNodeLogs(ctx context.Context, node *k3d.Node, since time.Time) (io.ReadCloser, error)
- func (d Containerd) GetNodeStatus(ctx context.Context, node *k3d.Node) (bool, string, error)
- func (d Containerd) GetNodesByLabel(ctx context.Context, labels map[string]string) ([]*k3d.Node, error)
- func (d Containerd) GetRuntimePath() string
- func (d Containerd) GetVolume(name string) (string, error)
- func (d Containerd) StartNode(ctx context.Context, node *k3d.Node) error
- func (d Containerd) StopNode(ctx context.Context, node *k3d.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Containerd ¶
type Containerd struct{}
func (Containerd) CopyToNode ¶
CopyToNode copies a file from the local FS to the selected node
func (Containerd) CreateNetworkIfNotPresent ¶
func (d Containerd) CreateNetworkIfNotPresent(ctx context.Context, name string) (string, bool, error)
CreateNetworkIfNotPresent creates a new docker network
func (Containerd) CreateNode ¶
CreateNode creates a new k3d node
func (Containerd) CreateVolume ¶
CreateVolume creates a new named volume
func (Containerd) DeleteNetwork ¶
func (d Containerd) DeleteNetwork(ctx context.Context, ID string) error
DeleteNetwork deletes a network
func (Containerd) DeleteNode ¶
DeleteNode deletes an existing k3d node
func (Containerd) DeleteVolume ¶
func (d Containerd) DeleteVolume(ctx context.Context, name string) error
DeleteVolume creates a new named volume
func (Containerd) ExecInNode ¶
ExecInNode execs a command inside a node
func (Containerd) ExecInNodeGetLogs ¶ added in v3.1.0
func (d Containerd) ExecInNodeGetLogs(ctx context.Context, node *k3d.Node, cmd []string) (*bufio.Reader, error)
ExecInNodeGetLogs execs a command inside a node and returns its logreader
func (Containerd) GetImages ¶
func (d Containerd) GetImages(ctx context.Context) ([]string, error)
GetImages returns a list of images present in the runtime
func (Containerd) GetKubeconfig ¶
func (d Containerd) GetKubeconfig(ctx context.Context, node *k3d.Node) (io.ReadCloser, error)
GetKubeconfig grabs the kubeconfig from inside a k3d node
func (Containerd) GetNodeLogs ¶
func (d Containerd) GetNodeLogs(ctx context.Context, node *k3d.Node, since time.Time) (io.ReadCloser, error)
GetNodeLogs returns the logs from a given node
func (Containerd) GetNodeStatus ¶ added in v3.4.0
GetNodeStatus returns the status of a node (Running, Started, etc.)
func (Containerd) GetNodesByLabel ¶
func (Containerd) GetRuntimePath ¶
func (d Containerd) GetRuntimePath() string
GetRuntimePath returns the path of the containerd socket
func (Containerd) GetVolume ¶
func (d Containerd) GetVolume(name string) (string, error)
GetVolume tries to get a named volume