path

package
v0.0.0-...-e999173 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package path holds path related files

Package path holds path related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrPathResolution

type ErrPathResolution struct {
	Err error
}

ErrPathResolution defines a non critical error

func (*ErrPathResolution) Error

func (e *ErrPathResolution) Error() string

Error implements the error interface

func (*ErrPathResolution) Unwrap

func (e *ErrPathResolution) Unwrap() error

Unwrap implements the error interface

type ErrPathResolutionNotCritical

type ErrPathResolutionNotCritical struct {
	Err error
}

ErrPathResolutionNotCritical defines a non critical error

func (*ErrPathResolutionNotCritical) Error

Error implements the error interface

func (*ErrPathResolutionNotCritical) Unwrap

func (e *ErrPathResolutionNotCritical) Unwrap() error

Unwrap implements the error interface

type NoOpResolver

type NoOpResolver struct {
}

NoOpResolver returns an empty resolver

func (*NoOpResolver) ResolveBasename

func (n *NoOpResolver) ResolveBasename(_ *model.FileFields) string

ResolveBasename resolves an inode/mount ID pair to a file basename

func (*NoOpResolver) ResolveFileFieldsPath

ResolveFileFieldsPath resolves an inode/mount ID pair to a full path along with its mount path

func (*NoOpResolver) ResolveFilePath

func (n *NoOpResolver) ResolveFilePath(_ *model.FileFields, _ *model.PIDContext, _ *model.ContainerContext) (string, error)

ResolveFilePath resolves an inode/mount ID pair to a full path

func (*NoOpResolver) ResolveMountPoint

func (n *NoOpResolver) ResolveMountPoint(_ *model.Event, _ *model.Mount) (string, error)

ResolveMountPoint resolves the mountpoint to a full path

func (*NoOpResolver) ResolveMountRoot

func (n *NoOpResolver) ResolveMountRoot(_ *model.Event, _ *model.Mount) (string, error)

ResolveMountRoot resolves the mountpoint to a full path

func (*NoOpResolver) SetMountPoint

func (n *NoOpResolver) SetMountPoint(_ *model.Event, _ *model.Mount) error

SetMountPoint set the mount point information

func (*NoOpResolver) SetMountRoot

func (n *NoOpResolver) SetMountRoot(_ *model.Event, _ *model.Mount) error

SetMountRoot set the mount point information

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver describes a resolvers for path and file names

func NewResolver

func NewResolver(dentryResolver *dentry.Resolver, mountResolver mount.ResolverInterface) *Resolver

NewResolver returns a new path resolver

func (*Resolver) ResolveBasename

func (r *Resolver) ResolveBasename(e *model.FileFields) string

ResolveBasename resolves an inode/mount ID pair to a file basename

func (*Resolver) ResolveFileFieldsPath

func (r *Resolver) ResolveFileFieldsPath(e *model.FileFields, pidCtx *model.PIDContext, ctrCtx *model.ContainerContext) (string, string, model.MountSource, model.MountOrigin, error)

ResolveFileFieldsPath resolves an inode/mount ID pair to a full path along with its mount path

func (*Resolver) ResolveFilePath

func (r *Resolver) ResolveFilePath(e *model.FileFields, _ *model.PIDContext, _ *model.ContainerContext) (string, error)

ResolveFilePath resolves an inode/mount ID pair to a full path

func (*Resolver) ResolveMountPoint

func (r *Resolver) ResolveMountPoint(ev *model.Event, e *model.Mount) (string, error)

ResolveMountPoint resolves the mountpoint to a full path

func (*Resolver) ResolveMountRoot

func (r *Resolver) ResolveMountRoot(ev *model.Event, e *model.Mount) (string, error)

ResolveMountRoot resolves the mountpoint to a full path

func (*Resolver) SetMountPoint

func (r *Resolver) SetMountPoint(_ *model.Event, e *model.Mount) error

SetMountPoint set the mount point information

func (*Resolver) SetMountRoot

func (r *Resolver) SetMountRoot(_ *model.Event, e *model.Mount) error

SetMountRoot set the mount point information

type ResolverInterface

type ResolverInterface interface {
	ResolveBasename(e *model.FileFields) string
	ResolveFilePath(e *model.FileFields, pidCtx *model.PIDContext, ctrCtx *model.ContainerContext) (string, error)
	ResolveFileFieldsPath(e *model.FileFields, pidCtx *model.PIDContext, ctrCtx *model.ContainerContext) (string, string, model.MountSource, model.MountOrigin, error)
	SetMountRoot(ev *model.Event, e *model.Mount) error
	ResolveMountRoot(ev *model.Event, e *model.Mount) (string, error)
	SetMountPoint(ev *model.Event, e *model.Mount) error
	ResolveMountPoint(ev *model.Event, e *model.Mount) (string, error)
}

ResolverInterface defines the resolver interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL