storage

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStorage

type IStorage interface {
	Run() error
}

IStorage is the interface that defines the methods for storage implementations. Storage implementations should provide methods to store data, retrieve data, or both, implementing either IWStorage or IRStorage as needed. The implementation of IStorage is expected to be concurrency-safe and should run in a separate goroutine, implementing the Run() method to start the storage main loop.

type IWStorage

type IWStorage interface {
	IStorage
	Store(*types.ENOEXECInternalEvent) error
}

IWStorage is the interface that defines the methods for writeable storage implementations.

type IWStorageBase

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

type K8sENOExecEventStorage

type K8sENOExecEventStorage struct {
	*IWStorageBase
	// contains filtered or unexported fields
}

K8sENOExecEventStorage is a storage implementation that writes ENOExec events to Kubernetes.

func NewK8sENOExecEventStorage

func NewK8sENOExecEventStorage(ctx context.Context, limiter *rate.Limiter, ch chan *types.ENOEXECInternalEvent, nodeName, namespace string, timeout time.Duration) (*K8sENOExecEventStorage, error)

NewK8sENOExecEventStorage creates a new K8sENOExecEventStorage instance.

func (*K8sENOExecEventStorage) Run

func (s *K8sENOExecEventStorage) Run() error

Run starts the K8sENOExecEventStorage event loop.

It listens for ENOEXEC events on the internal channel, converts each event to a Kubernetes ENoExecEvent, and creates it in the cluster. This method is designed to run in a separate goroutine so that the responsibilities of catching ENOEXEC and notifying the controller pod are handled concurrently.

Jump to

Keyboard shortcuts

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