summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/config.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-09-07 12:27:44 -0700
committerShentubot <shentubot@google.com>2018-09-07 12:28:48 -0700
commitbc81f3fe4a042a15343d2eab44da32d818ac1ade (patch)
tree808e8e3ebfdf7e43b9f279032cd39e28fb75de98 /runsc/boot/config.go
parentf895cb4d8b4b37a563b7a5b9dc92eae552084b44 (diff)
Remove '--file-access=direct' option
It was used before gofer was implemented and it's not supported anymore. BREAKING CHANGE: proxy-shared and proxy-exclusive options are now: shared and exclusive. PiperOrigin-RevId: 212017643 Change-Id: If029d4073fe60583e5ca25f98abb2953de0d78fd
Diffstat (limited to 'runsc/boot/config.go')
-rw-r--r--runsc/boot/config.go31
1 files changed, 12 insertions, 19 deletions
diff --git a/runsc/boot/config.go b/runsc/boot/config.go
index 28a1600cd..01da535af 100644
--- a/runsc/boot/config.go
+++ b/runsc/boot/config.go
@@ -60,28 +60,23 @@ func (p PlatformType) String() string {
type FileAccessType int
const (
- // FileAccessProxy sends IO requests to a Gofer process that validates the
+ // FileAccessShared sends IO requests to a Gofer process that validates the
// requests and forwards them to the host.
- FileAccessProxy FileAccessType = iota
+ FileAccessShared FileAccessType = iota
- // FileAccessProxyExclusive is the same as FileAccessProxy, but enables
+ // FileAccessExclusive is the same as FileAccessShared, but enables
// extra caching for improved performance. It should only be used if
// the sandbox has exclusive access to the filesystem.
- FileAccessProxyExclusive
-
- // FileAccessDirect connects the sandbox directly to the host filesystem.
- FileAccessDirect
+ FileAccessExclusive
)
// MakeFileAccessType converts type from string.
func MakeFileAccessType(s string) (FileAccessType, error) {
switch s {
- case "proxy-shared":
- return FileAccessProxy, nil
- case "proxy-exclusive":
- return FileAccessProxyExclusive, nil
- case "direct":
- return FileAccessDirect, nil
+ case "shared":
+ return FileAccessShared, nil
+ case "exclusive":
+ return FileAccessExclusive, nil
default:
return 0, fmt.Errorf("invalid file access type %q", s)
}
@@ -89,12 +84,10 @@ func MakeFileAccessType(s string) (FileAccessType, error) {
func (f FileAccessType) String() string {
switch f {
- case FileAccessProxy:
- return "proxy-shared"
- case FileAccessProxyExclusive:
- return "proxy-exclusive"
- case FileAccessDirect:
- return "direct"
+ case FileAccessShared:
+ return "shared"
+ case FileAccessExclusive:
+ return "exclusive"
default:
return fmt.Sprintf("unknown(%d)", f)
}