storage

package
v0.0.0-...-cad7f9d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package storage holds files related to storages for security profiles

Package storage holds files related to storages for security profiles

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityDumpRemoteStorageForwarder

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

ActivityDumpRemoteStorageForwarder is a remote storage that forwards dumps to the security-agent

func NewActivityDumpRemoteStorageForwarder

func NewActivityDumpRemoteStorageForwarder(handler backend.ActivityDumpHandler) (*ActivityDumpRemoteStorageForwarder, error)

NewActivityDumpRemoteStorageForwarder returns a new instance of ActivityDumpRemoteStorageForwarder

func (*ActivityDumpRemoteStorageForwarder) GetStorageType

func (storage *ActivityDumpRemoteStorageForwarder) GetStorageType() config.StorageType

GetStorageType returns the storage type of the ActivityDumpRemoteStorage

func (*ActivityDumpRemoteStorageForwarder) Persist

Persist saves the provided buffer to the persistent storage

func (*ActivityDumpRemoteStorageForwarder) SendTelemetry

func (storage *ActivityDumpRemoteStorageForwarder) SendTelemetry(_ statsd.ClientInterface)

SendTelemetry sends telemetry for the current storage

type ActivityDumpStorage

type ActivityDumpStorage interface {
	// GetStorageType returns the storage type
	GetStorageType() config.StorageType
	// Persist saves the provided buffer to the persistent storage
	Persist(request config.StorageRequest, p *profile.Profile, raw *bytes.Buffer) error
	// SendTelemetry sends metrics using the provided metrics sender
	SendTelemetry(sender statsd.ClientInterface)
}

ActivityDumpStorage defines the interface implemented by all activity dump storages

type Directory

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

Directory is a local storage for security profiles

func NewDirectory

func NewDirectory(directoryPath string, maxProfiles int) (*Directory, error)

NewDirectory creates a new Directory instance, loading the existing profiles from the provided directory path

func (*Directory) GetStorageType

func (d *Directory) GetStorageType() config.StorageType

GetStorageType returns the storage type

func (*Directory) Load

Load loads the profile for the provided selector if it exists

func (*Directory) Persist

func (d *Directory) Persist(request config.StorageRequest, p *profile.Profile, raw *bytes.Buffer) error

Persist persists the provided profile to the directory

func (*Directory) SendTelemetry

func (d *Directory) SendTelemetry(sender statsd.ClientInterface)

SendTelemetry sends telemetry for the current storage

Directories

Path Synopsis
Package backend holds files related to forwarder backends for security profiles
Package backend holds files related to forwarder backends for security profiles

Jump to

Keyboard shortcuts

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