wasmercri

package module
v0.0.0-...-1e97fd4 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 19 Imported by: 0

README

wasmer-cri

Implementation of WebAssembly Runtime(wasmer-go) CRI for kubelet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Network string // unix
	Address string // /tmp/wasmshim.sock
}

Config of service

type ContainerStore

type ContainerStore struct {
	// contains filtered or unexported fields
}

ContainerStore store for pod sandbox

func NewContainerStore

func NewContainerStore() *ContainerStore

NewContainerStore create pod-sandbox store

func (*ContainerStore) Add

func (s *ContainerStore) Add(sb *pb.Container) error

Add a sandbox into the store.

func (*ContainerStore) Delete

func (s *ContainerStore) Delete(id string)

Delete deletes the sandbox with specified id.

func (*ContainerStore) Get

func (s *ContainerStore) Get(id string) (pb.Container, error)

Get returns the sandbox with specified id.

func (*ContainerStore) List

func (s *ContainerStore) List() []pb.Container

List lists all sandboxes.

type ImageServer

type ImageServer struct {
	pb.UnimplementedImageServiceServer
}

ImageServer is used to implement images

func NewImageServer

func NewImageServer() (*ImageServer, error)

NewImageServer create image server

func (*ImageServer) ImageFsInfo

ImageFsInfo get image file-system info

func (*ImageServer) ImageStatus

ImageStatus show status of image

func (*ImageServer) ListImages

ListImages list images

func (*ImageServer) PullImage

PullImage pull image

func (*ImageServer) RemoveImage

RemoveImage remove image

type ImageStore

type ImageStore struct {
	// contains filtered or unexported fields
}

ImageStore store for images

func NewImageStore

func NewImageStore() *ImageStore

NewImageStore creates an image store.

func (*ImageStore) Get

func (s *ImageStore) Get(id string) (*pb.Image, error)

Get get image by id

type PodSandboxStore

type PodSandboxStore struct {
	// contains filtered or unexported fields
}

PodSandboxStore store for pod sandbox

func NewPodSandboxStore

func NewPodSandboxStore() *PodSandboxStore

NewPodSandboxStore create pod-sandbox store

func (*PodSandboxStore) Add

func (s *PodSandboxStore) Add(sb *pb.PodSandbox) error

Add a sandbox into the store.

func (*PodSandboxStore) Delete

func (s *PodSandboxStore) Delete(id string)

Delete deletes the sandbox with specified id.

func (*PodSandboxStore) Get

func (s *PodSandboxStore) Get(id string) (pb.PodSandbox, error)

Get returns the sandbox with specified id.

func (*PodSandboxStore) List

func (s *PodSandboxStore) List() []pb.PodSandbox

List lists all sandboxes.

type RuntimeServer

type RuntimeServer struct {
	pb.UnimplementedRuntimeServiceServer
	// contains filtered or unexported fields
}

RuntimeServer is used to implement images

func NewRuntimeServer

func NewRuntimeServer() (*RuntimeServer, error)

NewRuntimeServer register image server

func (*RuntimeServer) Attach

Attach container

func (*RuntimeServer) ContainerStats

ContainerStats container

func (*RuntimeServer) ContainerStatus

ContainerStatus show container status

func (*RuntimeServer) CreateContainer

CreateContainer create container

func (*RuntimeServer) Exec

Exec container

func (*RuntimeServer) ExecSync

ExecSync container

func (*RuntimeServer) ListContainerStats

ListContainerStats container

func (*RuntimeServer) ListContainers

ListContainers list containers

func (*RuntimeServer) ListPodSandbox

ListPodSandbox pod

func (*RuntimeServer) PodSandboxStatus

PodSandboxStatus pod

func (*RuntimeServer) PortForward

PortForward container

func (*RuntimeServer) RemoveContainer

RemoveContainer remove container

func (*RuntimeServer) RemovePodSandbox

RemovePodSandbox pod

func (*RuntimeServer) ReopenContainerLog

ReopenContainerLog container

func (*RuntimeServer) RunPodSandbox

func (s *RuntimeServer) RunPodSandbox(ctx context.Context, in *pb.RunPodSandboxRequest) (_ *pb.RunPodSandboxResponse, retErr error)

RunPodSandbox run pod sandbox

func (*RuntimeServer) StartContainer

StartContainer start container

func (*RuntimeServer) Status

Status container

func (*RuntimeServer) StopContainer

StopContainer stop container

func (*RuntimeServer) StopPodSandbox

StopPodSandbox pod

func (*RuntimeServer) UpdateContainerResources

UpdateContainerResources update container resources

func (*RuntimeServer) UpdateRuntimeConfig

UpdateRuntimeConfig container

func (*RuntimeServer) Version

Version runtime version

type Service

type Service struct {
	Config     *Config
	GRPCServer *grpc.Server
}

Service to provide grpc server

func NewService

func NewService(config *Config) (*Service, error)

NewService create service

func (*Service) Listen

func (s *Service) Listen() error

Listen start unix socket

Directories

Path Synopsis
cri
Package docker provides a general type to represent any way of referencing images within the registry.
Package docker provides a general type to represent any way of referencing images within the registry.
pkg
cli
oci
Package truncindex provides a general 'index tree', used by Docker in order to be able to reference containers by only a few unambiguous characters of their id.
Package truncindex provides a general 'index tree', used by Docker in order to be able to reference containers by only a few unambiguous characters of their id.
wasmer

Jump to

Keyboard shortcuts

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