Help us shape the future of Go! Take the 2026 Go Developer Survey

packfile

package
v0.57.24 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const BloomFormatVersionV1 uint32 = 1

BloomFormatVersionV1 identifies the current serialized Hydra BloomFilter bytes carried in PackfileEntry.bloom_filter.

View Source
const TrashAge = 24 * time.Hour

TrashAge is how long a pack stays trash before a reclaim pass may retire it. A writer whose catalog view predates the trash mark has this long to commit the blocks it deduplicated against the pack, so the retiring pass sees them live and rescues them.

Variables

This section is empty.

Functions

func BlockKey

func BlockKey(h *hash.Hash) []byte

BlockKey returns the pack index key of a block: the protobuf encoding of its hash. Bloom filters hold the same keys.

func DecodeBlockValue

func DecodeBlockValue(key, value []byte) (*block.BlockRef, *block.StoredBlock, error)

DecodeBlockValue decodes a pack entry: the key is the BlockKey of the block hash and the value is the encoded block.BlockObject of the block's bytes and refs. It verifies the bytes against the key.

func ParseBlockKey

func ParseBlockKey(key []byte) (*hash.Hash, error)

ParseBlockKey parses a pack index key into the block hash it names.

func ReadIndex

func ReadIndex(ra io.ReaderAt, size uint64) ([]*kvfile.IndexEntry, error)

ReadIndex reads the key index of a packfile of size bytes from ra, without its block values. The entries are in key order.

Types

type CatalogPuller

type CatalogPuller interface {
	// SyncPull returns the catalog page after since. Since zero starts from the
	// beginning.
	SyncPull(ctx context.Context, resourceID string, since uint64) (*PullResponse, error)
}

CatalogPuller reads one page of a block store catalog after a cursor.

type PackReplacementEvent

type PackReplacementEvent struct {

	// Sequence is the monotonic cursor anchor assigned to the replacement event.
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// ReplacedPackIds is the set of packs removed from the active manifest.
	ReplacedPackIds []string `protobuf:"bytes,2,rep,name=replaced_pack_ids,json=replacedPackIds,proto3" json:"replacedPackIds,omitempty"`
	// ReplacementPackIds is the set of packs added by the same replacement.
	ReplacementPackIds []string `protobuf:"bytes,3,rep,name=replacement_pack_ids,json=replacementPackIds,proto3" json:"replacementPackIds,omitempty"`
	// contains filtered or unexported fields
}

PackReplacementEvent describes one atomic replacement sequence.

func (*PackReplacementEvent) CloneMessageVT

func (*PackReplacementEvent) CloneVT

func (*PackReplacementEvent) EqualMessageVT

func (this *PackReplacementEvent) EqualMessageVT(thatMsg any) bool

func (*PackReplacementEvent) EqualVT

func (this *PackReplacementEvent) EqualVT(that *PackReplacementEvent) bool

func (*PackReplacementEvent) GetReplacedPackIds

func (x *PackReplacementEvent) GetReplacedPackIds() []string

func (*PackReplacementEvent) GetReplacementPackIds

func (x *PackReplacementEvent) GetReplacementPackIds() []string

func (*PackReplacementEvent) GetSequence

func (x *PackReplacementEvent) GetSequence() uint64

func (*PackReplacementEvent) MarshalJSON

func (x *PackReplacementEvent) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PackReplacementEvent to JSON.

func (*PackReplacementEvent) MarshalProtoJSON

func (x *PackReplacementEvent) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PackReplacementEvent message to JSON.

func (*PackReplacementEvent) MarshalProtoText

func (x *PackReplacementEvent) MarshalProtoText() string

func (*PackReplacementEvent) MarshalToSizedBufferVT

func (m *PackReplacementEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PackReplacementEvent) MarshalToVT

func (m *PackReplacementEvent) MarshalToVT(dAtA []byte) (int, error)

func (*PackReplacementEvent) MarshalVT

func (m *PackReplacementEvent) MarshalVT() (dAtA []byte, err error)

func (*PackReplacementEvent) ProtoMessage

func (*PackReplacementEvent) ProtoMessage()

func (*PackReplacementEvent) Reset

func (x *PackReplacementEvent) Reset()

func (*PackReplacementEvent) SizeVT

func (m *PackReplacementEvent) SizeVT() (n int)

func (*PackReplacementEvent) String

func (x *PackReplacementEvent) String() string

func (*PackReplacementEvent) UnmarshalJSON

func (x *PackReplacementEvent) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PackReplacementEvent from JSON.

func (*PackReplacementEvent) UnmarshalProtoJSON

func (x *PackReplacementEvent) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PackReplacementEvent message from JSON.

func (*PackReplacementEvent) UnmarshalVT

func (m *PackReplacementEvent) UnmarshalVT(dAtA []byte) error

type PackfileEntry

type PackfileEntry struct {

	// Id is the v1 packfile identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// BloomFilter is the serialized bloom filter for the packfile.
	BloomFilter []byte `protobuf:"bytes,2,opt,name=bloom_filter,json=bloomFilter,proto3" json:"bloomFilter,omitempty"`
	// BlockCount is the number of blocks in the packfile.
	BlockCount uint64 `protobuf:"varint,3,opt,name=block_count,json=blockCount,proto3" json:"blockCount,omitempty"`
	// SizeBytes is the size of the packfile in bytes.
	SizeBytes uint64 `protobuf:"varint,4,opt,name=size_bytes,json=sizeBytes,proto3" json:"sizeBytes,omitempty"`
	// CreatedAt is the time the packfile was created.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"createdAt,omitempty"`
	// BloomFormatVersion is the encoding version of the bloom_filter bytes.
	// Version 1 means the current serialized Hydra BloomFilter bytes; future
	// bloom layouts add new versions, not mutations of v1. Required on every
	// entry; cloud rejects pushes whose advertised version is not in its
	// accepted-versions allowlist.
	BloomFormatVersion uint32 `protobuf:"varint,6,opt,name=bloom_format_version,json=bloomFormatVersion,proto3" json:"bloomFormatVersion,omitempty"`
	// Sequence is the monotonic cursor anchor the cloud catalog assigns when
	// it commits the pack or marks it as trash. Pull cursors advance over
	// sequence > since. Local entries not yet pushed carry 0.
	Sequence uint64 `protobuf:"varint,7,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// SupersededBy is the replacement packfile ID; empty when the row is
	// current or was retired from the trash without a replacement.
	SupersededBy string `protobuf:"bytes,8,opt,name=superseded_by,json=supersededBy,proto3" json:"supersededBy,omitempty"`
	// SupersededAt is the time supersession or retirement was recorded; absent
	// when the row is current.
	SupersededAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=superseded_at,json=supersededAt,proto3" json:"supersededAt,omitempty"`
	// TrashedAt is the time a reclaim pass marked the pack as trash; absent
	// when the pack is not trash. A trash pack stays readable, but new uploads
	// do not deduplicate against it, and a reclaim pass retires it once
	// TrashAge has passed.
	TrashedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=trashed_at,json=trashedAt,proto3" json:"trashedAt,omitempty"`
	// contains filtered or unexported fields
}

PackfileEntry describes a single packfile in the manifest.

func (*PackfileEntry) CloneMessageVT

func (m *PackfileEntry) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*PackfileEntry) CloneVT

func (m *PackfileEntry) CloneVT() *PackfileEntry

func (*PackfileEntry) EqualMessageVT

func (this *PackfileEntry) EqualMessageVT(thatMsg any) bool

func (*PackfileEntry) EqualVT

func (this *PackfileEntry) EqualVT(that *PackfileEntry) bool

func (*PackfileEntry) GetBlockCount

func (x *PackfileEntry) GetBlockCount() uint64

func (*PackfileEntry) GetBloomFilter

func (x *PackfileEntry) GetBloomFilter() []byte

func (*PackfileEntry) GetBloomFormatVersion

func (x *PackfileEntry) GetBloomFormatVersion() uint32

func (*PackfileEntry) GetCreatedAt

func (x *PackfileEntry) GetCreatedAt() *timestamppb.Timestamp

func (*PackfileEntry) GetId

func (x *PackfileEntry) GetId() string

func (*PackfileEntry) GetSequence

func (x *PackfileEntry) GetSequence() uint64

func (*PackfileEntry) GetSizeBytes

func (x *PackfileEntry) GetSizeBytes() uint64

func (*PackfileEntry) GetSupersededAt

func (x *PackfileEntry) GetSupersededAt() *timestamppb.Timestamp

func (*PackfileEntry) GetSupersededBy

func (x *PackfileEntry) GetSupersededBy() string

func (*PackfileEntry) GetTrashedAt

func (x *PackfileEntry) GetTrashedAt() *timestamppb.Timestamp

func (*PackfileEntry) IsSuperseded

func (e *PackfileEntry) IsSuperseded() bool

IsSuperseded reports that the pack left the catalog, either replaced by another pack or retired from the trash.

func (*PackfileEntry) IsTrash

func (e *PackfileEntry) IsTrash() bool

IsTrash reports that a reclaim pass marked the pack as trash.

func (*PackfileEntry) MarshalJSON

func (x *PackfileEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PackfileEntry to JSON.

func (*PackfileEntry) MarshalProtoJSON

func (x *PackfileEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PackfileEntry message to JSON.

func (*PackfileEntry) MarshalProtoText

func (x *PackfileEntry) MarshalProtoText() string

func (*PackfileEntry) MarshalToSizedBufferVT

func (m *PackfileEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PackfileEntry) MarshalToVT

func (m *PackfileEntry) MarshalToVT(dAtA []byte) (int, error)

func (*PackfileEntry) MarshalVT

func (m *PackfileEntry) MarshalVT() (dAtA []byte, err error)

func (*PackfileEntry) ProtoMessage

func (*PackfileEntry) ProtoMessage()

func (*PackfileEntry) Reset

func (x *PackfileEntry) Reset()

func (*PackfileEntry) SizeVT

func (m *PackfileEntry) SizeVT() (n int)

func (*PackfileEntry) String

func (x *PackfileEntry) String() string

func (*PackfileEntry) UnmarshalJSON

func (x *PackfileEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PackfileEntry from JSON.

func (*PackfileEntry) UnmarshalProtoJSON

func (x *PackfileEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PackfileEntry message from JSON.

func (*PackfileEntry) UnmarshalVT

func (m *PackfileEntry) UnmarshalVT(dAtA []byte) error

type PullResponse

type PullResponse struct {

	// Entries is the list of packfile entries.
	Entries []*PackfileEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// ReplacementEvents is the list of atomic replacement events.
	ReplacementEvents []*PackReplacementEvent `protobuf:"bytes,2,rep,name=replacement_events,json=replacementEvents,proto3" json:"replacementEvents,omitempty"`
	// LatestSequence is the current monotonic sequence head for the block store,
	// even when Entries and ReplacementEvents are empty for an up-to-date pull.
	LatestSequence uint64 `protobuf:"varint,3,opt,name=latest_sequence,json=latestSequence,proto3" json:"latestSequence,omitempty"`
	// More is set when entries or events after this page remain below
	// LatestSequence.
	More bool `protobuf:"varint,4,opt,name=more,proto3" json:"more,omitempty"`
	// Restart is set when the server no longer holds the history after the
	// requested cursor. The page then starts a full pull from sequence zero,
	// and the reader drops every pulled pack the full pull does not list.
	Restart bool `protobuf:"varint,5,opt,name=restart,proto3" json:"restart,omitempty"`
	// contains filtered or unexported fields
}

PullResponse is one page of a block store catalog pull. A page holds every entry and replacement event at each sequence it covers, so the greatest sequence on the page is the cursor for the next page.

func PullCatalog

func PullCatalog(ctx context.Context, puller CatalogPuller, resourceID string) (*PullResponse, error)

PullCatalog reads every page of a block store catalog from the beginning and returns the pages merged into one response. A restarted page discards the pages read before it.

func (*PullResponse) CloneMessageVT

func (m *PullResponse) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*PullResponse) CloneVT

func (m *PullResponse) CloneVT() *PullResponse

func (*PullResponse) EqualMessageVT

func (this *PullResponse) EqualMessageVT(thatMsg any) bool

func (*PullResponse) EqualVT

func (this *PullResponse) EqualVT(that *PullResponse) bool

func (*PullResponse) GetEntries

func (x *PullResponse) GetEntries() []*PackfileEntry

func (*PullResponse) GetLatestSequence

func (x *PullResponse) GetLatestSequence() uint64

func (*PullResponse) GetMore

func (x *PullResponse) GetMore() bool

func (*PullResponse) GetReplacementEvents

func (x *PullResponse) GetReplacementEvents() []*PackReplacementEvent

func (*PullResponse) GetRestart

func (x *PullResponse) GetRestart() bool

func (*PullResponse) MarshalJSON

func (x *PullResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PullResponse to JSON.

func (*PullResponse) MarshalProtoJSON

func (x *PullResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PullResponse message to JSON.

func (*PullResponse) MarshalProtoText

func (x *PullResponse) MarshalProtoText() string

func (*PullResponse) MarshalToSizedBufferVT

func (m *PullResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PullResponse) MarshalToVT

func (m *PullResponse) MarshalToVT(dAtA []byte) (int, error)

func (*PullResponse) MarshalVT

func (m *PullResponse) MarshalVT() (dAtA []byte, err error)

func (*PullResponse) NextCursor

func (r *PullResponse) NextCursor() uint64

NextCursor returns the cursor that continues a pull after this page: the greatest sequence on the page, or zero when the page is empty.

func (*PullResponse) ProtoMessage

func (*PullResponse) ProtoMessage()

func (*PullResponse) Reset

func (x *PullResponse) Reset()

func (*PullResponse) SizeVT

func (m *PullResponse) SizeVT() (n int)

func (*PullResponse) String

func (x *PullResponse) String() string

func (*PullResponse) UnmarshalJSON

func (x *PullResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PullResponse from JSON.

func (*PullResponse) UnmarshalProtoJSON

func (x *PullResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PullResponse message from JSON.

func (*PullResponse) UnmarshalVT

func (m *PullResponse) UnmarshalVT(dAtA []byte) error

type PushRequest

type PushRequest struct {

	// PackId is the packfile identifier.
	PackId string `protobuf:"bytes,1,opt,name=pack_id,json=packId,proto3" json:"packId,omitempty"`
	// BlockCount is the number of blocks in the packfile.
	BlockCount uint64 `protobuf:"varint,2,opt,name=block_count,json=blockCount,proto3" json:"blockCount,omitempty"`
	// BloomFilter is the serialized bloom filter for the packfile.
	BloomFilter []byte `protobuf:"bytes,3,opt,name=bloom_filter,json=bloomFilter,proto3" json:"bloomFilter,omitempty"`
	// BloomFormatVersion is the encoding version of the bloom_filter bytes.
	BloomFormatVersion uint32 `protobuf:"varint,4,opt,name=bloom_format_version,json=bloomFormatVersion,proto3" json:"bloomFormatVersion,omitempty"`
	// SizeBytes is the size of the packfile in bytes.
	SizeBytes uint64 `protobuf:"varint,5,opt,name=size_bytes,json=sizeBytes,proto3" json:"sizeBytes,omitempty"`
	// Sha256 is the SHA-256 digest of the packfile bytes.
	Sha256 []byte `protobuf:"bytes,6,opt,name=sha256,proto3" json:"sha256,omitempty"`
	// ReplacesPackIds are committed packfiles the packfile supersedes
	// atomically when it commits. Empty for an ordinary push.
	ReplacesPackIds []string `protobuf:"bytes,7,rep,name=replaces_pack_ids,json=replacesPackIds,proto3" json:"replacesPackIds,omitempty"`
	// contains filtered or unexported fields
}

PushRequest describes a packfile a client uploads to a block store. The server admits the upload and returns where to send the bytes; the packfile joins the catalog only when the client commits it and the stored bytes match SizeBytes and Sha256.

func (*PushRequest) CloneMessageVT

func (m *PushRequest) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*PushRequest) CloneVT

func (m *PushRequest) CloneVT() *PushRequest

func (*PushRequest) EqualMessageVT

func (this *PushRequest) EqualMessageVT(thatMsg any) bool

func (*PushRequest) EqualVT

func (this *PushRequest) EqualVT(that *PushRequest) bool

func (*PushRequest) GetBlockCount

func (x *PushRequest) GetBlockCount() uint64

func (*PushRequest) GetBloomFilter

func (x *PushRequest) GetBloomFilter() []byte

func (*PushRequest) GetBloomFormatVersion

func (x *PushRequest) GetBloomFormatVersion() uint32

func (*PushRequest) GetPackId

func (x *PushRequest) GetPackId() string

func (*PushRequest) GetReplacesPackIds

func (x *PushRequest) GetReplacesPackIds() []string

func (*PushRequest) GetSha256

func (x *PushRequest) GetSha256() []byte

func (*PushRequest) GetSizeBytes

func (x *PushRequest) GetSizeBytes() uint64

func (*PushRequest) MarshalJSON

func (x *PushRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PushRequest to JSON.

func (*PushRequest) MarshalProtoJSON

func (x *PushRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PushRequest message to JSON.

func (*PushRequest) MarshalProtoText

func (x *PushRequest) MarshalProtoText() string

func (*PushRequest) MarshalToSizedBufferVT

func (m *PushRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PushRequest) MarshalToVT

func (m *PushRequest) MarshalToVT(dAtA []byte) (int, error)

func (*PushRequest) MarshalVT

func (m *PushRequest) MarshalVT() (dAtA []byte, err error)

func (*PushRequest) ProtoMessage

func (*PushRequest) ProtoMessage()

func (*PushRequest) Reset

func (x *PushRequest) Reset()

func (*PushRequest) SizeVT

func (m *PushRequest) SizeVT() (n int)

func (*PushRequest) String

func (x *PushRequest) String() string

func (*PushRequest) UnmarshalJSON

func (x *PushRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PushRequest from JSON.

func (*PushRequest) UnmarshalProtoJSON

func (x *PushRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PushRequest message from JSON.

func (*PushRequest) UnmarshalVT

func (m *PushRequest) UnmarshalVT(dAtA []byte) error

type PushResponse

type PushResponse struct {

	// PackId is the packfile identifier.
	PackId string `protobuf:"bytes,1,opt,name=pack_id,json=packId,proto3" json:"packId,omitempty"`
	// AlreadyExists indicates the packfile already existed.
	AlreadyExists bool `protobuf:"varint,2,opt,name=already_exists,json=alreadyExists,proto3" json:"alreadyExists,omitempty"`
	// SizeBytes is the size of the packfile in bytes.
	SizeBytes uint64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes,proto3" json:"sizeBytes,omitempty"`
	// Upload is set when the client must upload the bytes and then commit the
	// push, and unset when the catalog holds the packfile.
	Upload *PushUpload `protobuf:"bytes,4,opt,name=upload,proto3" json:"upload,omitempty"`
	// contains filtered or unexported fields
}

PushResponse is the response to a push or commit request.

func (*PushResponse) CloneMessageVT

func (m *PushResponse) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*PushResponse) CloneVT

func (m *PushResponse) CloneVT() *PushResponse

func (*PushResponse) EqualMessageVT

func (this *PushResponse) EqualMessageVT(thatMsg any) bool

func (*PushResponse) EqualVT

func (this *PushResponse) EqualVT(that *PushResponse) bool

func (*PushResponse) GetAlreadyExists

func (x *PushResponse) GetAlreadyExists() bool

func (*PushResponse) GetPackId

func (x *PushResponse) GetPackId() string

func (*PushResponse) GetSizeBytes

func (x *PushResponse) GetSizeBytes() uint64

func (*PushResponse) GetUpload

func (x *PushResponse) GetUpload() *PushUpload

func (*PushResponse) MarshalJSON

func (x *PushResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PushResponse to JSON.

func (*PushResponse) MarshalProtoJSON

func (x *PushResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PushResponse message to JSON.

func (*PushResponse) MarshalProtoText

func (x *PushResponse) MarshalProtoText() string

func (*PushResponse) MarshalToSizedBufferVT

func (m *PushResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PushResponse) MarshalToVT

func (m *PushResponse) MarshalToVT(dAtA []byte) (int, error)

func (*PushResponse) MarshalVT

func (m *PushResponse) MarshalVT() (dAtA []byte, err error)

func (*PushResponse) ProtoMessage

func (*PushResponse) ProtoMessage()

func (*PushResponse) Reset

func (x *PushResponse) Reset()

func (*PushResponse) SizeVT

func (m *PushResponse) SizeVT() (n int)

func (*PushResponse) String

func (x *PushResponse) String() string

func (*PushResponse) UnmarshalJSON

func (x *PushResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PushResponse from JSON.

func (*PushResponse) UnmarshalProtoJSON

func (x *PushResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PushResponse message from JSON.

func (*PushResponse) UnmarshalVT

func (m *PushResponse) UnmarshalVT(dAtA []byte) error

type PushUpload

type PushUpload struct {

	// Url is the signed URL the client sends the packfile bytes to with PUT.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// Headers are the request headers the upload sends with exactly these
	// values. Storage refuses an upload that omits or changes one.
	Headers map[string]string `` /* 155-byte string literal not displayed */
	// ExpiresAt is when the URL stops admitting the upload and the server
	// forgets the uncommitted push.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expiresAt,omitempty"`
	// contains filtered or unexported fields
}

PushUpload authorizes one upload of a packfile's bytes straight to storage.

func (*PushUpload) CloneMessageVT

func (m *PushUpload) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*PushUpload) CloneVT

func (m *PushUpload) CloneVT() *PushUpload

func (*PushUpload) EqualMessageVT

func (this *PushUpload) EqualMessageVT(thatMsg any) bool

func (*PushUpload) EqualVT

func (this *PushUpload) EqualVT(that *PushUpload) bool

func (*PushUpload) GetExpiresAt

func (x *PushUpload) GetExpiresAt() *timestamppb.Timestamp

func (*PushUpload) GetHeaders

func (x *PushUpload) GetHeaders() map[string]string

func (*PushUpload) GetUrl

func (x *PushUpload) GetUrl() string

func (*PushUpload) MarshalJSON

func (x *PushUpload) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PushUpload to JSON.

func (*PushUpload) MarshalProtoJSON

func (x *PushUpload) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PushUpload message to JSON.

func (*PushUpload) MarshalProtoText

func (x *PushUpload) MarshalProtoText() string

func (*PushUpload) MarshalToSizedBufferVT

func (m *PushUpload) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PushUpload) MarshalToVT

func (m *PushUpload) MarshalToVT(dAtA []byte) (int, error)

func (*PushUpload) MarshalVT

func (m *PushUpload) MarshalVT() (dAtA []byte, err error)

func (*PushUpload) ProtoMessage

func (*PushUpload) ProtoMessage()

func (*PushUpload) Reset

func (x *PushUpload) Reset()

func (*PushUpload) SizeVT

func (m *PushUpload) SizeVT() (n int)

func (*PushUpload) String

func (x *PushUpload) String() string

func (*PushUpload) UnmarshalJSON

func (x *PushUpload) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PushUpload from JSON.

func (*PushUpload) UnmarshalProtoJSON

func (x *PushUpload) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PushUpload message from JSON.

func (*PushUpload) UnmarshalVT

func (m *PushUpload) UnmarshalVT(dAtA []byte) error

type PushUpload_HeadersEntry

type PushUpload_HeadersEntry struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*PushUpload_HeadersEntry) GetKey

func (x *PushUpload_HeadersEntry) GetKey() string

func (*PushUpload_HeadersEntry) GetValue

func (x *PushUpload_HeadersEntry) GetValue() string

func (*PushUpload_HeadersEntry) MarshalJSON

func (x *PushUpload_HeadersEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the PushUpload_HeadersEntry to JSON.

func (*PushUpload_HeadersEntry) MarshalProtoJSON

func (x *PushUpload_HeadersEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the PushUpload_HeadersEntry message to JSON.

func (*PushUpload_HeadersEntry) MarshalProtoText

func (x *PushUpload_HeadersEntry) MarshalProtoText() string

func (*PushUpload_HeadersEntry) ProtoMessage

func (*PushUpload_HeadersEntry) ProtoMessage()

func (*PushUpload_HeadersEntry) Reset

func (x *PushUpload_HeadersEntry) Reset()

func (*PushUpload_HeadersEntry) String

func (x *PushUpload_HeadersEntry) String() string

func (*PushUpload_HeadersEntry) UnmarshalJSON

func (x *PushUpload_HeadersEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the PushUpload_HeadersEntry from JSON.

func (*PushUpload_HeadersEntry) UnmarshalProtoJSON

func (x *PushUpload_HeadersEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the PushUpload_HeadersEntry message from JSON.

type ReadGrant

type ReadGrant struct {

	// PackId is the packfile identifier.
	PackId string `protobuf:"bytes,1,opt,name=pack_id,json=packId,proto3" json:"packId,omitempty"`
	// Url is the opaque URL the client reads the packfile from with GET and
	// Range requests. It sends no other credentials.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// ExpiresAt is when the URL stops admitting reads.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expiresAt,omitempty"`
	// contains filtered or unexported fields
}

ReadGrant authorizes reads of one packfile's bytes until it expires.

func (*ReadGrant) CloneMessageVT

func (m *ReadGrant) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ReadGrant) CloneVT

func (m *ReadGrant) CloneVT() *ReadGrant

func (*ReadGrant) EqualMessageVT

func (this *ReadGrant) EqualMessageVT(thatMsg any) bool

func (*ReadGrant) EqualVT

func (this *ReadGrant) EqualVT(that *ReadGrant) bool

func (*ReadGrant) GetExpiresAt

func (x *ReadGrant) GetExpiresAt() *timestamppb.Timestamp

func (*ReadGrant) GetPackId

func (x *ReadGrant) GetPackId() string

func (*ReadGrant) GetUrl

func (x *ReadGrant) GetUrl() string

func (*ReadGrant) MarshalJSON

func (x *ReadGrant) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ReadGrant to JSON.

func (*ReadGrant) MarshalProtoJSON

func (x *ReadGrant) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ReadGrant message to JSON.

func (*ReadGrant) MarshalProtoText

func (x *ReadGrant) MarshalProtoText() string

func (*ReadGrant) MarshalToSizedBufferVT

func (m *ReadGrant) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ReadGrant) MarshalToVT

func (m *ReadGrant) MarshalToVT(dAtA []byte) (int, error)

func (*ReadGrant) MarshalVT

func (m *ReadGrant) MarshalVT() (dAtA []byte, err error)

func (*ReadGrant) ProtoMessage

func (*ReadGrant) ProtoMessage()

func (*ReadGrant) Reset

func (x *ReadGrant) Reset()

func (*ReadGrant) SizeVT

func (m *ReadGrant) SizeVT() (n int)

func (*ReadGrant) String

func (x *ReadGrant) String() string

func (*ReadGrant) UnmarshalJSON

func (x *ReadGrant) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ReadGrant from JSON.

func (*ReadGrant) UnmarshalProtoJSON

func (x *ReadGrant) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ReadGrant message from JSON.

func (*ReadGrant) UnmarshalVT

func (m *ReadGrant) UnmarshalVT(dAtA []byte) error

type ReadRequest

type ReadRequest struct {

	// PackIds are the packfiles to read. Each must be in the store's catalog.
	PackIds []string `protobuf:"bytes,1,rep,name=pack_ids,json=packIds,proto3" json:"packIds,omitempty"`
	// contains filtered or unexported fields
}

ReadRequest asks for read URLs of packfiles in one block store.

func (*ReadRequest) CloneMessageVT

func (m *ReadRequest) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ReadRequest) CloneVT

func (m *ReadRequest) CloneVT() *ReadRequest

func (*ReadRequest) EqualMessageVT

func (this *ReadRequest) EqualMessageVT(thatMsg any) bool

func (*ReadRequest) EqualVT

func (this *ReadRequest) EqualVT(that *ReadRequest) bool

func (*ReadRequest) GetPackIds

func (x *ReadRequest) GetPackIds() []string

func (*ReadRequest) MarshalJSON

func (x *ReadRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ReadRequest to JSON.

func (*ReadRequest) MarshalProtoJSON

func (x *ReadRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ReadRequest message to JSON.

func (*ReadRequest) MarshalProtoText

func (x *ReadRequest) MarshalProtoText() string

func (*ReadRequest) MarshalToSizedBufferVT

func (m *ReadRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ReadRequest) MarshalToVT

func (m *ReadRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ReadRequest) MarshalVT

func (m *ReadRequest) MarshalVT() (dAtA []byte, err error)

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) SizeVT

func (m *ReadRequest) SizeVT() (n int)

func (*ReadRequest) String

func (x *ReadRequest) String() string

func (*ReadRequest) UnmarshalJSON

func (x *ReadRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ReadRequest from JSON.

func (*ReadRequest) UnmarshalProtoJSON

func (x *ReadRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ReadRequest message from JSON.

func (*ReadRequest) UnmarshalVT

func (m *ReadRequest) UnmarshalVT(dAtA []byte) error

type ReadResponse

type ReadResponse struct {

	// Grants holds one grant per requested packfile, in request order.
	Grants []*ReadGrant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
	// contains filtered or unexported fields
}

ReadResponse is the response to a read request.

func (*ReadResponse) CloneMessageVT

func (m *ReadResponse) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ReadResponse) CloneVT

func (m *ReadResponse) CloneVT() *ReadResponse

func (*ReadResponse) EqualMessageVT

func (this *ReadResponse) EqualMessageVT(thatMsg any) bool

func (*ReadResponse) EqualVT

func (this *ReadResponse) EqualVT(that *ReadResponse) bool

func (*ReadResponse) GetGrants

func (x *ReadResponse) GetGrants() []*ReadGrant

func (*ReadResponse) MarshalJSON

func (x *ReadResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ReadResponse to JSON.

func (*ReadResponse) MarshalProtoJSON

func (x *ReadResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ReadResponse message to JSON.

func (*ReadResponse) MarshalProtoText

func (x *ReadResponse) MarshalProtoText() string

func (*ReadResponse) MarshalToSizedBufferVT

func (m *ReadResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ReadResponse) MarshalToVT

func (m *ReadResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ReadResponse) MarshalVT

func (m *ReadResponse) MarshalVT() (dAtA []byte, err error)

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) SizeVT

func (m *ReadResponse) SizeVT() (n int)

func (*ReadResponse) String

func (x *ReadResponse) String() string

func (*ReadResponse) UnmarshalJSON

func (x *ReadResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ReadResponse from JSON.

func (*ReadResponse) UnmarshalProtoJSON

func (x *ReadResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ReadResponse message from JSON.

func (*ReadResponse) UnmarshalVT

func (m *ReadResponse) UnmarshalVT(dAtA []byte) error

type TrashRequest

type TrashRequest struct {

	// TrashPackIds are current packs to mark as trash.
	TrashPackIds []string `protobuf:"bytes,1,rep,name=trash_pack_ids,json=trashPackIds,proto3" json:"trashPackIds,omitempty"`
	// RetirePackIds are trash packs, marked at least TrashAge ago, to remove
	// from the catalog without a replacement.
	RetirePackIds []string `protobuf:"bytes,2,rep,name=retire_pack_ids,json=retirePackIds,proto3" json:"retirePackIds,omitempty"`
	// contains filtered or unexported fields
}

TrashRequest marks packs as trash and retires trash packs in one block store. Each list holds at most 32 packs.

func (*TrashRequest) CloneMessageVT

func (m *TrashRequest) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*TrashRequest) CloneVT

func (m *TrashRequest) CloneVT() *TrashRequest

func (*TrashRequest) EqualMessageVT

func (this *TrashRequest) EqualMessageVT(thatMsg any) bool

func (*TrashRequest) EqualVT

func (this *TrashRequest) EqualVT(that *TrashRequest) bool

func (*TrashRequest) GetRetirePackIds

func (x *TrashRequest) GetRetirePackIds() []string

func (*TrashRequest) GetTrashPackIds

func (x *TrashRequest) GetTrashPackIds() []string

func (*TrashRequest) MarshalJSON

func (x *TrashRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the TrashRequest to JSON.

func (*TrashRequest) MarshalProtoJSON

func (x *TrashRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the TrashRequest message to JSON.

func (*TrashRequest) MarshalProtoText

func (x *TrashRequest) MarshalProtoText() string

func (*TrashRequest) MarshalToSizedBufferVT

func (m *TrashRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TrashRequest) MarshalToVT

func (m *TrashRequest) MarshalToVT(dAtA []byte) (int, error)

func (*TrashRequest) MarshalVT

func (m *TrashRequest) MarshalVT() (dAtA []byte, err error)

func (*TrashRequest) ProtoMessage

func (*TrashRequest) ProtoMessage()

func (*TrashRequest) Reset

func (x *TrashRequest) Reset()

func (*TrashRequest) SizeVT

func (m *TrashRequest) SizeVT() (n int)

func (*TrashRequest) String

func (x *TrashRequest) String() string

func (*TrashRequest) UnmarshalJSON

func (x *TrashRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the TrashRequest from JSON.

func (*TrashRequest) UnmarshalProtoJSON

func (x *TrashRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the TrashRequest message from JSON.

func (*TrashRequest) UnmarshalVT

func (m *TrashRequest) UnmarshalVT(dAtA []byte) error

type TrashResponse

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

TrashResponse acknowledges a trash request.

func (*TrashResponse) CloneMessageVT

func (m *TrashResponse) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*TrashResponse) CloneVT

func (m *TrashResponse) CloneVT() *TrashResponse

func (*TrashResponse) EqualMessageVT

func (this *TrashResponse) EqualMessageVT(thatMsg any) bool

func (*TrashResponse) EqualVT

func (this *TrashResponse) EqualVT(that *TrashResponse) bool

func (*TrashResponse) MarshalJSON

func (x *TrashResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the TrashResponse to JSON.

func (*TrashResponse) MarshalProtoJSON

func (x *TrashResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the TrashResponse message to JSON.

func (*TrashResponse) MarshalProtoText

func (x *TrashResponse) MarshalProtoText() string

func (*TrashResponse) MarshalToSizedBufferVT

func (m *TrashResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TrashResponse) MarshalToVT

func (m *TrashResponse) MarshalToVT(dAtA []byte) (int, error)

func (*TrashResponse) MarshalVT

func (m *TrashResponse) MarshalVT() (dAtA []byte, err error)

func (*TrashResponse) ProtoMessage

func (*TrashResponse) ProtoMessage()

func (*TrashResponse) Reset

func (x *TrashResponse) Reset()

func (*TrashResponse) SizeVT

func (m *TrashResponse) SizeVT() (n int)

func (*TrashResponse) String

func (x *TrashResponse) String() string

func (*TrashResponse) UnmarshalJSON

func (x *TrashResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the TrashResponse from JSON.

func (*TrashResponse) UnmarshalProtoJSON

func (x *TrashResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the TrashResponse message from JSON.

func (*TrashResponse) UnmarshalVT

func (m *TrashResponse) UnmarshalVT(dAtA []byte) error

Directories

Path Synopsis
Package order groups related blocks for physical packfile locality.
Package order groups related blocks for physical packfile locality.

Jump to

Keyboard shortcuts

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