Documentation
¶
Overview ¶
Package storage holds files related to storages for security profiles
Package storage holds files related to storages for security profiles ¶
Package storage holds files related to storages for security profiles
Index ¶
- type ActivityDumpRemoteStorageForwarder
- func (storage *ActivityDumpRemoteStorageForwarder) GetStorageType() config.StorageType
- func (storage *ActivityDumpRemoteStorageForwarder) Persist(request config.StorageRequest, p *profile.Profile, raw *bytes.Buffer) error
- func (storage *ActivityDumpRemoteStorageForwarder) SendTelemetry(_ statsd.ClientInterface)
- type ActivityDumpStorage
- type Directory
- func (d *Directory) GetStorageType() config.StorageType
- func (d *Directory) Load(wls *cgroupModel.WorkloadSelector, p *profile.Profile) (bool, error)
- func (d *Directory) Persist(request config.StorageRequest, p *profile.Profile, raw *bytes.Buffer) error
- func (d *Directory) SendTelemetry(sender statsd.ClientInterface)
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 ¶
func (storage *ActivityDumpRemoteStorageForwarder) Persist(request config.StorageRequest, p *profile.Profile, raw *bytes.Buffer) error
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 ¶
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 ¶
func (d *Directory) Load(wls *cgroupModel.WorkloadSelector, p *profile.Profile) (bool, error)
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