Documentation
¶
Index ¶
- func GetMountpoint() (string, error)
- func SendContainerPreRegistration(data *ContainerData) (err error)
- func SendContainerRegistration(data *ContainerData) (err error)
- func SendContainerUnregistration(data *ContainerData) (err error)
- func SendContainerUpdate(data *ContainerData) (err error)
- type Callback
- type CallbacksMap
- type ContainerData
- type MessageType
- type Server
- func (s *Server) CallbackRegister(c *Callback)
- func (s *Server) CallbackUnregister(c *Callback)
- func (s *Server) ContainerPreRegistration(ctx context.Context, data *pb.ContainerData) (*pb.Response, error)
- func (s *Server) ContainerRegistration(ctx context.Context, data *pb.ContainerData) (*pb.Response, error)
- func (s *Server) ContainerUnregistration(ctx context.Context, data *pb.ContainerData) (*pb.Response, error)
- func (s *Server) ContainerUpdate(ctx context.Context, data *pb.ContainerData) (*pb.Response, error)
- func (s *Server) GetAddr() string
- func (s *Server) GetMountpoint(ctx context.Context, req *pb.MountpointReq) (*pb.MountpointResp, error)
- func (s *Server) Init() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMountpoint ¶
func SendContainerPreRegistration ¶
func SendContainerPreRegistration(data *ContainerData) (err error)
Pre-registers container creation in sysbox-fs. Notice that this is a blocking call that can potentially have a minor impact on container's boot-up speed.
func SendContainerRegistration ¶
func SendContainerRegistration(data *ContainerData) (err error)
Registers container creation in sysbox-fs.
func SendContainerUnregistration ¶
func SendContainerUnregistration(data *ContainerData) (err error)
Unregisters container from sysbox-fs.
func SendContainerUpdate ¶
func SendContainerUpdate(data *ContainerData) (err error)
Sends a container-update message to sysbox-fs end. At this point, we are only utilizing this message for a particular case, update the container creation-time attribute, but this function can serve more general purposes in the future.
Types ¶
type Callback ¶
type Callback func(client interface{}, c *ContainerData) error
type CallbacksMap ¶
type CallbacksMap = map[MessageType]Callback
type ContainerData ¶
type ContainerData struct { Id string Netns string InitPid int32 Hostname string Ctime time.Time UidFirst int32 UidSize int32 GidFirst int32 GidSize int32 ProcRoPaths []string ProcMaskPaths []string }
Container info passed by the client to the server across the grpc channel
type MessageType ¶
type MessageType uint16
const ( Unknown MessageType = iota ContainerPreRegisterMessage ContainerRegisterMessage ContainerUnregisterMessage ContainerUpdateMessage GetMountpointMessage MaxSupportedMessage )
type Server ¶
type Server struct { Ctx interface{} Callbacks CallbacksMap FuseMp string }
func NewServer ¶
func NewServer(ctx interface{}, cb *CallbacksMap, fuseMp string) *Server
func (*Server) CallbackRegister ¶
TODO: To be implemented in the future if needed.
func (*Server) CallbackUnregister ¶
TODO: To be implemented in the future if needed.
func (*Server) ContainerPreRegistration ¶
func (*Server) ContainerRegistration ¶
func (*Server) ContainerUnregistration ¶
func (*Server) ContainerUpdate ¶
func (*Server) GetMountpoint ¶
func (s *Server) GetMountpoint( ctx context.Context, req *pb.MountpointReq) (*pb.MountpointResp, error)
Click to show internal directories.
Click to hide internal directories.