blob: 2c470e0b22281579bf389ea4141e0c8dd6ba408d [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package naming
import "time"
// MountFlag is a bit mask of options to the mount call.
type MountFlag uint32
const (
Replace = MountFlag(1 << 0) // Replace means the mount should replace what is currently at the mount point
MT = MountFlag(1 << 1) // MT means that the target server is a mount table.
Leaf = MountFlag(1 << 2) // Leaf means that the target server is a leaf.
)
// MountedServer represents a server mounted on a specific name.
type MountedServer struct {
// Server is the OA that's mounted.
Server string
// Deadline before the mount entry expires.
Deadline time.WireDeadline
}
// MountEntry represents a given name mounted in the mounttable.
type MountEntry struct {
// Name is the mounted name.
Name string
// Servers (if present) specifies the mounted names.
Servers []MountedServer
// ServesMountTable is true if the servers represent mount tables.
ServesMountTable bool
// IsLeaf is true if this entry represents a leaf object.
IsLeaf bool
}
// GlobError is returned by namespace.Glob to indicate a subtree of the namespace
// that could not be traversed.
type GlobError struct {
// Root of the subtree.
Name string
// The error that occurred fulfilling the request.
Error error
}
// GlobReply is the data type returned by Glob__.
type GlobReply union {
Entry MountEntry
Error GlobError
}
// GlobChildrenReply is the data type returned by GlobChildren__.
type GlobChildrenReply union {
Name string
Error GlobError
}