connectorartifacts

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package connectorartifacts owns operator access to same-repository connector builds and the cross-replica retention sweep for their object storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactSet

type ArtifactSet struct {
	ID                  uuid.UUID
	BuildID             uuid.UUID
	ConnectorSlug       string
	SourceRef           string
	Kind                string
	ContractID          string
	Name                string
	Description         string
	ArtifactVersion     string
	ArtifactDigest      string
	ProtocolMajor       int32
	ProtocolMinor       int32
	Features            []string
	ServiceMode         string
	InterfaceDescriptor []byte
	InterfaceHash       string
	SettingsSchema      []byte
	CreatedAt           time.Time
	Files               []File
}

type Download

type Download struct {
	URL       string
	Filename  string
	Digest    string
	SizeBytes int64
	ExpiresAt time.Time
}

type File

type File struct {
	ID               uuid.UUID
	Platform         string
	Filename         string
	Digest           string
	SizeBytes        int64
	NoticesDigest    string
	NoticesSizeBytes int64
}

type Service

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

func New

func New(database *db.DB, store objectStore, logger *zap.Logger) *Service

func (*Service) DownloadURL

func (s *Service) DownloadURL(ctx context.Context, principal authz.Principal, agentID uuid.UUID, needSlug string, artifactFileID uuid.UUID, notices bool) (Download, error)

DownloadURL authorizes the need and artifact relationship before issuing a short-lived URL. notices selects the platform-specific dependency notice.

func (*Service) List

func (s *Service) List(ctx context.Context, principal authz.Principal, agentID uuid.UUID, needSlug string) ([]ArtifactSet, error)

List returns successful, retained artifact sets that fully satisfy the named connector need. Agent-admin authorization applies before discovery.

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

func (*Service) Sweep

func (s *Service) Sweep(ctx context.Context) error

Sweep applies retention and removes expired, unreferenced digest objects. A session advisory lock makes concurrent replicas collapse to one sweep.

Jump to

Keyboard shortcuts

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