libcri

package
v0.0.0-...-4c2500c Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateContainerConfig

func GenerateContainerConfig(opts ...CRIOOpts) *pb.ContainerConfig

GenerateContainerConfig returns crio compaitable ContainerConfig

func GetNewCRIRuntime

func GetNewCRIRuntime(config libruntime.RuntimeConfig, startServer bool) (libruntime.Runtime, error)

func GetNewImageClient

func GetNewImageClient(socket string, timeout time.Duration) (*pb.ImageServiceClient, error)

func GetNewRuntimeClient

func GetNewRuntimeClient(socket string, timeout time.Duration) (*pb.RuntimeServiceClient, error)

Types

type CRIOOpts

type CRIOOpts func(s *pb.ContainerConfig) error

CRIOOpts sets spec specific information to a newly generated OCI spec

type CRIRuntime

type CRIRuntime struct {
	RuntimeClient *pb.RuntimeServiceClient
	ImageClient   *pb.ImageServiceClient
	RuntimeServer *pb.RuntimeServiceServer
}

func (*CRIRuntime) Create

func (cr *CRIRuntime) Create(ctx context.Context, containerName string, imageName string, OCISpecs *runtimespecs.Spec) (*libruntime.Container, error)

func (*CRIRuntime) CreateSandbox

func (cr *CRIRuntime) CreateSandbox(ctx context.Context, podName, podID, configFilePath string) (string, error)

func (*CRIRuntime) Delete

func (cr *CRIRuntime) Delete(ctx context.Context, ctr *libruntime.Container) error

func (*CRIRuntime) Exec

func (*CRIRuntime) GetContainer

func (cr *CRIRuntime) GetContainer(context.Context, string) (*libruntime.Container, error)

func (*CRIRuntime) Pull

func (cr *CRIRuntime) Pull(ctx context.Context, imageName string) (libruntime.Image, error)

func (*CRIRuntime) RemoveImage

func (cr *CRIRuntime) RemoveImage(ctx context.Context, imageName string) error

func (*CRIRuntime) RemovePodSandbox

func (cr *CRIRuntime) RemovePodSandbox(ctx context.Context, ID string) error

func (*CRIRuntime) Run

func (cr *CRIRuntime) Run(ctx context.Context, containerName string, imageName string, OCISpecs *runtimespecs.Spec) (<-chan interface{}, *libruntime.Container, error)

func (*CRIRuntime) Runnable

func (*CRIRuntime) Start

func (cr *CRIRuntime) Start(ctx context.Context, ctr *libruntime.Container) error

func (*CRIRuntime) Stop

func (cr *CRIRuntime) Stop(ctx context.Context, ctr *libruntime.Container) error

func (*CRIRuntime) StopPodSandbox

func (cr *CRIRuntime) StopPodSandbox(ctx context.Context, ID string) error

func (*CRIRuntime) Version

func (cr *CRIRuntime) Version(ctx context.Context) string

func (*CRIRuntime) Wait

func (cr *CRIRuntime) Wait(context.Context, *libruntime.Container) (<-chan interface{}, error)

Jump to

Keyboard shortcuts

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