Documentation
¶
Index ¶
- type ArtifactStorage
- func (s *ArtifactStorage) CleanupExpiredArtifacts(ctx context.Context, maxAge time.Duration) (int, error)
- func (s *ArtifactStorage) CleanupOldestArtifacts(ctx context.Context, maxCount int) (int, error)
- func (s *ArtifactStorage) Close() error
- func (s *ArtifactStorage) Delete(ctx context.Context, contextID string, artifactID string, filename string) error
- func (s *ArtifactStorage) Exists(ctx context.Context, contextID string, artifactID string, filename string) (bool, error)
- func (s *ArtifactStorage) GetURL(contextID string, artifactID string, filename string) string
- func (s *ArtifactStorage) Retrieve(ctx context.Context, contextID string, artifactID string, filename string) (io.ReadCloser, error)
- func (s *ArtifactStorage) Store(ctx context.Context, contextID string, artifactID string, filename string, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactStorage ¶
type ArtifactStorage struct {
// contains filtered or unexported fields
}
ArtifactStorage implements server.ArtifactStorageProvider using an S3-compatible object store such as RustFS, MinIO or AWS S3
func NewArtifactStorage ¶
func NewArtifactStorage(cfg *serverConfig.ArtifactsStorageConfig) (*ArtifactStorage, error)
NewArtifactStorage creates a new S3-based artifact storage provider
func (*ArtifactStorage) CleanupExpiredArtifacts ¶
func (s *ArtifactStorage) CleanupExpiredArtifacts(ctx context.Context, maxAge time.Duration) (int, error)
CleanupExpiredArtifacts removes artifacts older than maxAge
func (*ArtifactStorage) CleanupOldestArtifacts ¶
CleanupOldestArtifacts removes the oldest artifacts keeping only maxCount per context
func (*ArtifactStorage) Close ¶
func (s *ArtifactStorage) Close() error
Close closes the S3 connection
func (*ArtifactStorage) Delete ¶
func (s *ArtifactStorage) Delete(ctx context.Context, contextID string, artifactID string, filename string) error
Delete removes an artifact from S3 storage
func (*ArtifactStorage) Exists ¶
func (s *ArtifactStorage) Exists(ctx context.Context, contextID string, artifactID string, filename string) (bool, error)
Exists checks if an artifact exists in S3 storage
func (*ArtifactStorage) GetURL ¶
func (s *ArtifactStorage) GetURL(contextID string, artifactID string, filename string) string
GetURL returns the public URL for accessing an artifact