mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 00:37:24 +00:00
virtcontainers: fs_share: add Darwin skeleton
Fixes: #6002 As a first pass for testing, let's add a skeleton for filesystem sharing support on Darwin.. Signed-off-by: Eric Ernst <eric_ernst@apple.com> Signed-off-by: Danny Canter <danny@dcantah.dev>
This commit is contained in:
parent
2c10b37172
commit
d48b22bb13
58
src/runtime/virtcontainers/fs_share_darwin.go
Normal file
58
src/runtime/virtcontainers/fs_share_darwin.go
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
// Copyright (c) 2023 Apple Inc.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
package virtcontainers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"sync"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FilesystemShare struct {
|
||||||
|
sandbox *Sandbox
|
||||||
|
sync.Mutex
|
||||||
|
prepared bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFilesystemShare(s *Sandbox) (FilesystemSharer, error) {
|
||||||
|
return &FilesystemShare{
|
||||||
|
prepared: false,
|
||||||
|
sandbox: s,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Logger returns a logrus logger appropriate for logging Filesystem sharing messages
|
||||||
|
func (f *FilesystemShare) Logger() *logrus.Entry {
|
||||||
|
return virtLog.WithFields(logrus.Fields{
|
||||||
|
"subsystem": "filesystem share",
|
||||||
|
"sandbox": f.sandbox.ID(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *FilesystemShare) Prepare(ctx context.Context) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *FilesystemShare) Cleanup(ctx context.Context) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *FilesystemShare) ShareFile(ctx context.Context, c *Container, m *Mount) (*SharedFile, error) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *FilesystemShare) UnshareFile(ctx context.Context, c *Container, m *Mount) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *FilesystemShare) ShareRootFilesystem(ctx context.Context, c *Container) (*SharedFile, error) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *FilesystemShare) UnshareRootFilesystem(ctx context.Context, c *Container) error {
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user