artifactstore

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AF_BUCKETNAME_RESULTS = "mrvabucket"
	AF_BUCKETNAME_PACKS   = "mrvabucket"
)

Restrict the keys / values for ArtifactLocation and centralize the common ones here

Functions

This section is empty.

Types

type ArtifactLocation

type ArtifactLocation struct {
	Key    string // location in bucket OR full location for file paths
	Bucket string // which bucket: packs or results
}

type InMemoryArtifactStore

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

InMemoryArtifactStore is an in-memory implementation of the ArtifactStore interface

func NewInMemoryArtifactStore

func NewInMemoryArtifactStore() *InMemoryArtifactStore

func (*InMemoryArtifactStore) GetQueryPack

func (store *InMemoryArtifactStore) GetQueryPack(location ArtifactLocation) ([]byte, error)

GetQueryPack retrieves the query pack from the specified location

func (*InMemoryArtifactStore) GetResult

func (store *InMemoryArtifactStore) GetResult(location ArtifactLocation) ([]byte, error)

GetResult retrieves the result from the specified location

func (*InMemoryArtifactStore) GetResultSize

func (store *InMemoryArtifactStore) GetResultSize(location ArtifactLocation) (int, error)

GetResultSize retrieves the size of the result from the specified location

func (*InMemoryArtifactStore) SaveQueryPack

func (store *InMemoryArtifactStore) SaveQueryPack(sessionId int, data []byte) (ArtifactLocation, error)

SaveQueryPack saves the query pack using the session ID and returns the artifact location

func (*InMemoryArtifactStore) SaveResult

func (store *InMemoryArtifactStore) SaveResult(jobSpec common.JobSpec, data []byte) (ArtifactLocation, error)

SaveResult saves the result using the JobSpec and returns the artifact location

type MinIOArtifactStore

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

func NewMinIOArtifactStore

func NewMinIOArtifactStore(endpoint, id, secret string, lookup minio.BucketLookupType) (*MinIOArtifactStore, error)

func (*MinIOArtifactStore) GetQueryPack

func (store *MinIOArtifactStore) GetQueryPack(location ArtifactLocation) ([]byte, error)

func (*MinIOArtifactStore) GetResult

func (store *MinIOArtifactStore) GetResult(location ArtifactLocation) ([]byte, error)

func (*MinIOArtifactStore) GetResultSize

func (store *MinIOArtifactStore) GetResultSize(location ArtifactLocation) (int, error)

func (*MinIOArtifactStore) SaveQueryPack

func (store *MinIOArtifactStore) SaveQueryPack(jobId int, data []byte) (ArtifactLocation, error)

func (*MinIOArtifactStore) SaveResult

func (store *MinIOArtifactStore) SaveResult(jobSpec common.JobSpec, data []byte) (ArtifactLocation, error)

type Store

type Store interface {
	// GetQueryPack retrieves the query pack from the specified location.
	GetQueryPack(location ArtifactLocation) ([]byte, error)

	// SaveQueryPack saves the query pack using the session ID and returns the artifact location.
	SaveQueryPack(sessionId int, data []byte) (ArtifactLocation, error)

	// GetResult retrieves the result from the specified location.
	GetResult(location ArtifactLocation) ([]byte, error)

	// GetResultSize retrieves the size of the result from the specified location.
	GetResultSize(location ArtifactLocation) (int, error)

	// SaveResult saves the result using the JobSpec and returns the artifact location.
	SaveResult(jobSpec common.JobSpec, data []byte) (ArtifactLocation, error)
}

Jump to

Keyboard shortcuts

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