Documentation ¶
Index ¶
- func ChownClonedRootfs(id string, uidOffset, gidOffset int32) error
- func Pause(id string) error
- func PrepMounts(id string, uid, gid uint32, prepList []ipcLib.MountPrepInfo) error
- func Register(regInfo *ipcLib.RegistrationInfo) (*ipcLib.ContainerConfig, error)
- func ReqCloneRootfs(id string) (string, error)
- func ReqFsState(id, rootfs string) ([]configs.FsEntry, error)
- func ReqMounts(id string, rootfsUidShiftType idShiftUtils.IDShiftType, ...) ([]specs.Mount, error)
- func ReqShiftfsMark(id string, mounts []shiftfs.MountPoint) ([]shiftfs.MountPoint, error)
- func Resume(id string) error
- func RevertClonedRootfsChown(id string) error
- func SubidAlloc(id string, size uint64) (uint32, uint32, error)
- func Unregister(id string) error
- func Update(updateInfo *ipcLib.UpdateInfo) error
- type ServerCallbacks
- type ServerStub
- func (s *ServerStub) ChownClonedRootfs(ctx context.Context, req *pb.ChownClonedRootfsReq) (*pb.ChownClonedRootfsResp, error)
- func (s *ServerStub) GetAddr() string
- func (s *ServerStub) Init() error
- func (s *ServerStub) Pause(ctx context.Context, req *pb.PauseReq) (*pb.PauseResp, error)
- func (s *ServerStub) PrepMounts(ctx context.Context, req *pb.MountPrepReq) (*pb.MountPrepResp, error)
- func (s *ServerStub) Register(ctx context.Context, req *pb.RegisterReq) (*pb.RegisterResp, error)
- func (s *ServerStub) ReqCloneRootfs(ctx context.Context, req *pb.CloneRootfsReq) (*pb.CloneRootfsResp, error)
- func (s *ServerStub) ReqFsState(ctx context.Context, req *pb.FsStateReq) (*pb.FsStateResp, error)
- func (s *ServerStub) ReqMounts(ctx context.Context, req *pb.MountReq) (*pb.MountResp, error)
- func (s *ServerStub) ReqShiftfsMark(ctx context.Context, req *pb.ShiftfsMarkReq) (*pb.ShiftfsMarkResp, error)
- func (s *ServerStub) Resume(ctx context.Context, req *pb.ResumeReq) (*pb.ResumeResp, error)
- func (s *ServerStub) RevertClonedRootfsChown(ctx context.Context, req *pb.RevertClonedRootfsChownReq) (*pb.RevertClonedRootfsChownResp, error)
- func (s *ServerStub) SubidAlloc(ctx context.Context, req *pb.SubidAllocReq) (*pb.SubidAllocResp, error)
- func (s *ServerStub) Unregister(ctx context.Context, req *pb.UnregisterReq) (*pb.UnregisterResp, error)
- func (s *ServerStub) Update(ctx context.Context, req *pb.UpdateReq) (*pb.UpdateResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChownClonedRootfs ¶
ChownClonedRootfs requests the sysbox-mgr to chown a cloned rootfs.
func Pause ¶
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 ¶
ReqCloneRootfs requests the sysbox-mgr to clone the container's rootfs. It returns the path to the new rootfs.
func ReqFsState ¶
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 ¶
Resume notifies the sysbox-mgr that the container has been resumed. 'id' is the containers id
func RevertClonedRootfsChown ¶
RevertClonedRootfsChown requests the sysbox-mgr to revert the chown of a cloned rootfs.
func SubidAlloc ¶
SubidAlloc requests sysbox-mgr to allocate a range of 'size' subuids and subgids.
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) 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) 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)