opts

package
v0.0.0-...-f1bde72 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentConfig          = "stellarproject.io/orbit/container"
	LastConfig             = "stellarproject.io/orbit/container.last"
	IPLabel                = "stellarproject.io/orbit/container.ip"
	RestoreCheckpointLabel = "stellarproject.io/orbit/restore.checkpoint"
)

Variables

View Source
var ErrOldConfigFormat = errors.New("old config format on container")

Functions

func GetConfig

func GetConfig(ctx context.Context, container containerd.Container) (*v1.Container, error)

func GetConfigFromInfo

func GetConfigFromInfo(ctx context.Context, info containers.Container) (*v1.Container, error)

func GetRestoreDesc

func GetRestoreDesc(ctx context.Context, c containerd.Container) (*api.Descriptor, error)

func ParseISCSI

func ParseISCSI(s string) (string, string, error)

func UnmarshalConfig

func UnmarshalConfig(any *types.Any) (*v1.Container, error)

func WithContainerHostsFile

func WithContainerHostsFile(root string) oci.SpecOpts

func WithIP

WithIP sets the ip on the container

func WithISCSILogout

func WithISCSILogout(ctx context.Context, client *containerd.Client, c containers.Container) error

func WithOrbitConfig

func WithOrbitConfig(paths Paths, config *v1.Container, image containerd.Image) func(ctx context.Context, client *containerd.Client, c *containers.Container) error

WithOrbitConfig is a containerd.NewContainerOpts for spec and container configuration

func WithRollback

func WithRollback(ctx context.Context, client *containerd.Client, c *containers.Container) error

func WithSetPreviousConfig

func WithSetPreviousConfig(ctx context.Context, client *containerd.Client, c *containers.Container) error

func WithTaskRestore

func WithTaskRestore(desc *api.Descriptor) containerd.NewTaskOpts

func WithoutRestore

func WithoutRestore(ctx context.Context, client *containerd.Client, c *containers.Container) error

func WriteHostsFiles

func WriteHostsFiles(root, id string) (string, string, error)

Types

type Paths

type Paths struct {
	State   string
	Cluster string
}

func (Paths) ConfigPath

func (p Paths) ConfigPath(name string) string

func (Paths) NetworkPath

func (p Paths) NetworkPath(id string) string

Jump to

Keyboard shortcuts

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