Documentation
¶
Index ¶
Constants ¶
const DownloadPath = "/download/{digest}"
i.e /download/sha256:1234567890abcdef
Variables ¶
var ProviderSet = wire.NewSet(NewByteStreamService, NewResourceService, NewDownloadService)
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 ¶
func (s *ByteStreamService) Read(req *bytestream.ReadRequest, stream bytestream.ByteStream_ReadServer) error
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 ¶
func (s *ByteStreamService) Write(stream bytestream.ByteStream_WriteServer) error
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 WithStagingDir ¶ added in v1.110.0
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 ¶
func (s *ResourceService) Describe(ctx context.Context, req *v1.ResourceServiceDescribeRequest) (*v1.ResourceServiceDescribeResponse, error)
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 (s *StatusService) Infoz(_ context.Context, _ *pb.InfozRequest) (*pb.InfozResponse, error)
func (*StatusService) Statusz ¶
func (s *StatusService) Statusz(_ context.Context, _ *pb.StatuszRequest) (*pb.StatuszResponse, error)