file

package
v0.0.0-...-63ce7f8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package file holds file related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeFile

func AnalyzeFile(filepath string, fileInfo fs.FileInfo, checkLinkage bool) (*model.FileMetadata, error)

AnalyzeFile examines a file and returns its metadata

Types

type LRUCacheKey

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

LRUCacheKey is the structure used to access cached metadata

type Opt

type Opt struct {
	CgroupResolver *cgroup.Resolver
}

Opt defines options for resolvers

type Resolver

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

Resolver represents a cache for mountpoints and the corresponding file systems

func NewResolver

func NewResolver(cfg *config.RuntimeSecurityConfig, statsdClient statsd.ClientInterface, opt *Opt) (*Resolver, error)

NewResolver returns a new instance of the hash resolver

func (*Resolver) ResolveFileMetadata

func (r *Resolver) ResolveFileMetadata(event *model.Event, file *model.FileEvent) (*model.FileMetadata, error)

ResolveFileMetadata resolves file metadata

func (*Resolver) SendStats

func (r *Resolver) SendStats() error

SendStats sends the resolver metrics

Jump to

Keyboard shortcuts

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