service

package
v1.110.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DownloadPath = "/download/{digest}"

i.e /download/sha256:1234567890abcdef

Variables

ProviderSet is service providers.

Functions

This section is empty.

Types

type AuditDispatcher added in v1.100.4

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

AuditDispatcher publishes CAS audit events. It delegates the shared generate -> publish -> error-reporting flow to the control plane's auditor.Dispatcher and only owns the CAS-specific actor/org policy: unlike the control plane's biz.AuditorUseCase, the actor is always SYSTEM (CAS JWTs carry no user identity) and the org comes from the JWT claims instead of the request context.

func NewAuditDispatcher added in v1.100.4

func NewAuditDispatcher(publisher *auditor.AuditLogPublisher, logger log.Logger) *AuditDispatcher

func (*AuditDispatcher) Dispatch added in v1.100.4

func (d *AuditDispatcher) Dispatch(entry auditor.LogEntry, claims *casJWT.Claims)

Dispatch generates and publishes an audit event with a SYSTEM actor and the organization from the JWT claims. Best-effort: errors are logged, never returned. Internal control plane traffic (SourceInternal claim) emits no events.

type ByteStreamService

type ByteStreamService struct {
	*bytestream.UnimplementedByteStreamServer
	// contains filtered or unexported fields
}

Implements the bytestream interface https://github.com/googleapis/googleapis/blob/master/google/bytestream/bytestream.proto#L49 specifically both the write and the read methods

func NewByteStreamService

func NewByteStreamService(bp backend.Providers, opts ...NewOpt) *ByteStreamService

func (*ByteStreamService) Read

Server-side streaming RPC for reading blobs, implements the bytestream interface NOTE: the content is not piped straight from the backend to the client. It is staged on disk and verified first (see stageDownload), so the first byte only leaves once the whole artifact is known to hash to the requested digest. The client therefore sees no data until the backend fetch has completed.

func (*ByteStreamService) Write

Client-side streaming RPC for writing blobs. Iterate on the stream of file chunks, spill them to the staging disk, verify them against the declared digest, hand the verified file to the backend and return a response with the committedSize

type DownloadService added in v0.16.0

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

func NewDownloadService added in v0.16.0

func NewDownloadService(bp backend.Providers, opts ...NewOpt) *DownloadService

func (*DownloadService) ServeHTTP added in v0.16.0

func (s *DownloadService) ServeHTTP(w http.ResponseWriter, r *http.Request)

type NewOpt

type NewOpt func(s *commonService)

func WithAuditDispatcher added in v1.100.4

func WithAuditDispatcher(d *AuditDispatcher) NewOpt

func WithLogger

func WithLogger(logger log.Logger) NewOpt

func WithStagingDir added in v1.110.0

func WithStagingDir(dir string) NewOpt

WithStagingDir sets the local directory where uploads and downloads are spilled and verified before being forwarded. It must point at a writable volume dedicated to this pod; there is no default, so a transfer fails loudly rather than silently staging somewhere unintended.

type ResourceService

type ResourceService struct {
	v1.UnimplementedResourceServiceServer
	// contains filtered or unexported fields
}

func NewResourceService

func NewResourceService(bp backend.Providers, opts ...NewOpt) *ResourceService

func (*ResourceService) Describe

Return the metadata if an artifact referenced by its content digest

type StatusService

type StatusService struct {
	pb.UnimplementedStatusServiceServer
	// contains filtered or unexported fields
}

func NewStatusService

func NewStatusService(version string, providers backend.Providers) *StatusService

func (*StatusService) Infoz

func (*StatusService) Statusz

Jump to

Keyboard shortcuts

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