sysboxMgrGrpc

package
v0.0.0-...-f05151f Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChownClonedRootfs

func ChownClonedRootfs(id string, uidOffset, gidOffset int32) error

ChownClonedRootfs requests the sysbox-mgr to chown a cloned rootfs.

func Pause

func Pause(id string) error

Pause notifies the sysbox-mgr that the container has been paused. 'id' is the containers id

func PrepMounts

func PrepMounts(id string, uid, gid uint32, prepList []ipcLib.MountPrepInfo) error

PrepMounts requests sysbox-mgr to prepare a mount source for use by a sys container.

func Register

func Register(regInfo *ipcLib.RegistrationInfo) (*ipcLib.ContainerConfig, error)

Registers a container with sysbox-mgr

func ReqCloneRootfs

func ReqCloneRootfs(id string) (string, error)

ReqCloneRootfs requests the sysbox-mgr to clone the container's rootfs. It returns the path to the new rootfs.

func ReqFsState

func ReqFsState(id, rootfs string) ([]configs.FsEntry, error)

ReqFsState inquires sysbox-mgr for state to be written into container's rootfs.

func ReqMounts

func ReqMounts(id string, rootfsUidShiftType idShiftUtils.IDShiftType, reqList []ipcLib.MountReqInfo) ([]specs.Mount, error)

ReqMounts requests the sysbox-mgr to setup sys container special mounts

func ReqShiftfsMark

func ReqShiftfsMark(id string, mounts []shiftfs.MountPoint) ([]shiftfs.MountPoint, error)

ReqShiftfsMark requests sysbox-mgr to perform shiftfs marking on the container's rootfs and the given mount list. Returns a list of paths where the shiftfs marks where actually placed (need not be the same as the given mount list). Refer to the sysbox-mgr shiftfs manager for more info.

func Resume

func Resume(id string) error

Resume notifies the sysbox-mgr that the container has been resumed. 'id' is the containers id

func RevertClonedRootfsChown

func RevertClonedRootfsChown(id string) error

RevertClonedRootfsChown requests the sysbox-mgr to revert the chown of a cloned rootfs.

func SubidAlloc

func SubidAlloc(id string, size uint64) (uint32, uint32, error)

SubidAlloc requests sysbox-mgr to allocate a range of 'size' subuids and subgids.

func Unregister

func Unregister(id string) error

Unregisters a container with sysbox-mgr

func Update

func Update(updateInfo *ipcLib.UpdateInfo) error

Update a container info with sysbox-mgr

Types

type ServerCallbacks

type ServerCallbacks struct {
	Register                func(regInfo *ipcLib.RegistrationInfo) (*ipcLib.ContainerConfig, error)
	Update                  func(updateInfo *ipcLib.UpdateInfo) error
	Unregister              func(id string) error
	SubidAlloc              func(id string, size uint64) (uint32, uint32, error)
	ReqMounts               func(id string, rootfsUidShiftType idShiftUtils.IDShiftType, reqList []ipcLib.MountReqInfo) ([]specs.Mount, error)
	PrepMounts              func(id string, uid, gid uint32, prepList []ipcLib.MountPrepInfo) error
	ReqShiftfsMark          func(id string, mounts []shiftfs.MountPoint) ([]shiftfs.MountPoint, error)
	ReqFsState              func(id string, rootfs string) ([]configs.FsEntry, error)
	Pause                   func(id string) error
	Resume                  func(id string) error
	CloneRootfs             func(id string) (string, error)
	ChownClonedRootfs       func(id string, uidOffset, gidOffset int32) error
	RevertClonedRootfsChown func(id string) error
}

type ServerStub

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

func NewServerStub

func NewServerStub(cb *ServerCallbacks) *ServerStub

func (*ServerStub) ChownClonedRootfs

func (s *ServerStub) ChownClonedRootfs(ctx context.Context, req *pb.ChownClonedRootfsReq) (*pb.ChownClonedRootfsResp, error)

func (*ServerStub) GetAddr

func (s *ServerStub) GetAddr() string

func (*ServerStub) Init

func (s *ServerStub) Init() error

func (*ServerStub) Pause

func (s *ServerStub) Pause(ctx context.Context, req *pb.PauseReq) (*pb.PauseResp, error)

func (*ServerStub) PrepMounts

func (s *ServerStub) PrepMounts(ctx context.Context, req *pb.MountPrepReq) (*pb.MountPrepResp, error)

func (*ServerStub) Register

func (s *ServerStub) Register(ctx context.Context, req *pb.RegisterReq) (*pb.RegisterResp, error)

func (*ServerStub) ReqCloneRootfs

func (s *ServerStub) ReqCloneRootfs(ctx context.Context, req *pb.CloneRootfsReq) (*pb.CloneRootfsResp, error)

func (*ServerStub) ReqFsState

func (s *ServerStub) ReqFsState(
	ctx context.Context,
	req *pb.FsStateReq) (*pb.FsStateResp, error)

func (*ServerStub) ReqMounts

func (s *ServerStub) ReqMounts(ctx context.Context, req *pb.MountReq) (*pb.MountResp, error)

func (*ServerStub) ReqShiftfsMark

func (s *ServerStub) ReqShiftfsMark(ctx context.Context, req *pb.ShiftfsMarkReq) (*pb.ShiftfsMarkResp, error)

func (*ServerStub) Resume

func (s *ServerStub) Resume(ctx context.Context, req *pb.ResumeReq) (*pb.ResumeResp, error)

func (*ServerStub) RevertClonedRootfsChown

func (s *ServerStub) RevertClonedRootfsChown(ctx context.Context, req *pb.RevertClonedRootfsChownReq) (*pb.RevertClonedRootfsChownResp, error)

func (*ServerStub) SubidAlloc

func (s *ServerStub) SubidAlloc(ctx context.Context, req *pb.SubidAllocReq) (*pb.SubidAllocResp, error)

func (*ServerStub) Unregister

func (s *ServerStub) Unregister(ctx context.Context, req *pb.UnregisterReq) (*pb.UnregisterResp, error)

func (*ServerStub) Update

func (s *ServerStub) Update(ctx context.Context, req *pb.UpdateReq) (*pb.UpdateResp, error)

Jump to

Keyboard shortcuts

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