containerd

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 9 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Containerd

type Containerd struct{}

func (Containerd) CopyToNode

func (d Containerd) CopyToNode(ctx context.Context, src string, dest string, node *k3d.Node) error

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

func (d Containerd) CreateNode(ctx context.Context, node *k3d.Node) error

CreateNode creates a new k3d node

func (Containerd) CreateVolume

func (d Containerd) CreateVolume(ctx context.Context, name string, labels map[string]string) error

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

func (d Containerd) DeleteNode(ctx context.Context, node *k3d.Node) error

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

func (d Containerd) ExecInNode(ctx context.Context, node *k3d.Node, cmd []string) error

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) GetHostIP added in v3.1.0

func (d Containerd) GetHostIP(ctx context.Context, network string) (net.IP, error)

GetHostIP returns the IP of the containerd host

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) GetNode

func (d Containerd) GetNode(ctx context.Context, node *k3d.Node) (*k3d.Node, error)

GetNode tries to get a node container by its name

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

func (d Containerd) GetNodeStatus(ctx context.Context, node *k3d.Node) (bool, string, error)

GetNodeStatus returns the status of a node (Running, Started, etc.)

func (Containerd) GetNodesByLabel

func (d Containerd) GetNodesByLabel(ctx context.Context, labels map[string]string) ([]*k3d.Node, error)

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

func (Containerd) StartNode

func (d Containerd) StartNode(ctx context.Context, node *k3d.Node) error

StartNode starts an existing node

func (Containerd) StopNode

func (d Containerd) StopNode(ctx context.Context, node *k3d.Node) error

StopNode stops an existing node

Jump to

Keyboard shortcuts

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