Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PruneMessages ¶
func PruneMessages(dataAccessor storage.DataAccessor, config config.MessagePruningConfig) error
PruneMessages prunes messages older than the configured retention period. It retrieves messages, their associated jobs, archives them, and then deletes them from the database. The archiving process is currently a placeholder and needs to be implemented. dataAccessor: Accessor for database operations. config: Configuration for message pruning. Returns an error if any operation fails.
Types ¶
type ArchiveDirector ¶
type ArchiveDirector struct {
LocalArchiveManager *ArchiveWriteManager
RemoteArchiveManager *ArchiveWriteManager
}
func (*ArchiveDirector) Close ¶
func (director *ArchiveDirector) Close()
type ArchiveWriteManager ¶
type ArchiveWriteManager struct {
// contains filtered or unexported fields
}
ArchiveWriteManager handles file rotation for cloud storage.
func NewArchiveWriteManager ¶
func NewArchiveWriteManager(bucket Bucket, objectName string, maxSize int64) (*ArchiveWriteManager, error)
NewArchiveWriteManager creates a new RotationManager.
func (*ArchiveWriteManager) Close ¶
func (rm *ArchiveWriteManager) Close() error
Close closes the underlying writer.
type Bucket ¶
type Bucket interface {
NewReader(ctx context.Context, key string, opts *blob.ReaderOptions) (Reader, error)
NewWriter(ctx context.Context, key string, opts *blob.WriterOptions) (Writer, error)
Copy(ctx context.Context, dstKey, srcKey string, opts *blob.CopyOptions) error
Exists(ctx context.Context, key string) (bool, error)
}
Bucket defines the interface for cloud storage operations.
func NewBlobBucket ¶
NewBlobBucket creates a new Bucket using "gocloud.dev/blob".
type Reader ¶
type Reader interface {
io.ReadCloser
Size() int64
}
Reader defines the interface for reading from cloud storage objects.
type Writer ¶
type Writer interface {
io.WriteCloser
}
Writer defines the interface for writing to cloud storage objects.