Documentation
¶
Index ¶
- Constants
- type ByAccessTime
- type ByAccessTimeOptimized
- type ImageManager
- type Instance
- type OptimizedGroup
- type OptimizedTraceItem
- type ReceivedFile
- type StarlightFsNode
- func (n *StarlightFsNode) Fsync(ctx context.Context, f fs.FileHandle, flags uint32) syscall.Errno
- func (n *StarlightFsNode) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *StarlightFsNode) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)
- func (n *StarlightFsNode) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errno)
- func (n *StarlightFsNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *StarlightFsNode) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno)
- func (n *StarlightFsNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (n *StarlightFsNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)
- type TraceCollection
- type TraceItem
- type Tracer
Constants ¶
View Source
const (
DebugTrace = false
)
View Source
const (
UnmountFlag = syscall.MNT_FORCE | syscall.MNT_DETACH
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByAccessTime ¶
type ByAccessTime []*TraceItem
func (ByAccessTime) Len ¶
func (b ByAccessTime) Len() int
func (ByAccessTime) Less ¶
func (b ByAccessTime) Less(i, j int) bool
func (ByAccessTime) Swap ¶
func (b ByAccessTime) Swap(i, j int)
type ByAccessTimeOptimized ¶
type ByAccessTimeOptimized []*OptimizedTraceItem
func (ByAccessTimeOptimized) Len ¶
func (bo ByAccessTimeOptimized) Len() int
func (ByAccessTimeOptimized) Less ¶
func (bo ByAccessTimeOptimized) Less(i, j int) bool
func (ByAccessTimeOptimized) Swap ¶
func (bo ByAccessTimeOptimized) Swap(i, j int)
type ImageManager ¶
type Instance ¶
type Instance struct {
Root ReceivedFile
// contains filtered or unexported fields
}
Instance should be created using
func NewInstance ¶
func (*Instance) GetMountPoint ¶
type OptimizedGroup ¶
type OptimizedGroup struct {
History []*OptimizedTraceItem `json:"h"`
Images []string `json:"i"`
}
type OptimizedTraceItem ¶
OptimizedTraceItem with ranking
func (OptimizedTraceItem) Key ¶
func (oti OptimizedTraceItem) Key() string
type ReceivedFile ¶
type ReceivedFile interface {
GetChildren() []ReceivedFile
AppendChild(children ReceivedFile)
IsReady() bool
GetAttr(out *fuse.Attr) syscall.Errno
GetXAttrs() map[string][]byte
GetName() string
GetStableAttr() *fs.StableAttr
GetLinkName() string
GetRealPath() string
WaitForReady()
// IsReferencingRequestedImage returns stack number where the actual content located
// if the file is available in the local filesystem then yes is false
IsReferencingRequestedImage() (stack int64, yes bool)
// IsReferencingLocalFilesystem can not return true if IsReferencingRequestedImage returns true
IsReferencingLocalFilesystem() (serial int64, yes bool)
}
type StarlightFsNode ¶
type StarlightFsNode struct {
fs.Inode
ReceivedFile
// contains filtered or unexported fields
}
func (*StarlightFsNode) Fsync ¶
func (n *StarlightFsNode) Fsync(ctx context.Context, f fs.FileHandle, flags uint32) syscall.Errno
func (*StarlightFsNode) Getattr ¶
func (n *StarlightFsNode) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
func (*StarlightFsNode) Open ¶
func (n *StarlightFsNode) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno)
type TraceCollection ¶
type TraceCollection struct {
Groups []*OptimizedGroup
// contains filtered or unexported fields
}
func NewTraceCollection ¶
func NewTraceCollection(ctx context.Context, p string) (*TraceCollection, error)
NewTraceCollection create a new trace collection with multiple optimize groups
func NewTraceCollectionFromBuffer ¶
func NewTraceCollectionFromBuffer(buf io.ReadCloser) (*TraceCollection, error)
func (TraceCollection) ToJSONBuffer ¶
func (tc TraceCollection) ToJSONBuffer() []byte
type Tracer ¶
type Tracer struct {
// label could be the name of the application or the workload.
// Different workload might have
OptimizeGroup string `json:"group"`
Image string `json:"image"`
StartTime time.Time `json:"start"`
EndTime time.Time `json:"end"`
Seq []*TraceItem `json:"seq"`
// contains filtered or unexported fields
}
Tracer collects filesystem access traces. It should belongs to a manager.
Click to show internal directories.
Click to hide internal directories.