Documentation
¶
Index ¶
- Constants
- func BaseURL() string
- func CopyV86ImageFromCdn(ctx context.Context, src, dst world.WorldState, ...) error
- func CopyV86ImageFromCdnWithProgress(ctx context.Context, src, dst world.WorldState, ...) error
- func SpaceID() string
- type CdnRootPointer
- func (m *CdnRootPointer) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *CdnRootPointer) CloneVT() *CdnRootPointer
- func (this *CdnRootPointer) EqualMessageVT(thatMsg any) bool
- func (this *CdnRootPointer) EqualVT(that *CdnRootPointer) bool
- func (x *CdnRootPointer) GetConfigChainHash() []byte
- func (x *CdnRootPointer) GetConfigChainSeqno() uint64
- func (x *CdnRootPointer) GetCreatedAtMs() int64
- func (x *CdnRootPointer) GetPacks() []*packfile.PackfileEntry
- func (x *CdnRootPointer) GetRoot() *sobject.SORoot
- func (x *CdnRootPointer) GetSpaceId() string
- func (x *CdnRootPointer) MarshalJSON() ([]byte, error)
- func (x *CdnRootPointer) MarshalProtoJSON(s *json.MarshalState)
- func (x *CdnRootPointer) MarshalProtoText() string
- func (m *CdnRootPointer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CdnRootPointer) MarshalToVT(dAtA []byte) (int, error)
- func (m *CdnRootPointer) MarshalVT() (dAtA []byte, err error)
- func (*CdnRootPointer) ProtoMessage()
- func (x *CdnRootPointer) Reset()
- func (m *CdnRootPointer) SizeVT() (n int)
- func (x *CdnRootPointer) String() string
- func (x *CdnRootPointer) UnmarshalJSON(b []byte) error
- func (x *CdnRootPointer) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *CdnRootPointer) UnmarshalVT(dAtA []byte) error
- type V86ImageCopyProgressFunc
Constants ¶
const DefaultBaseURL = "https://cdn.spacewave.app"
DefaultBaseURL is the production Spacewave CDN origin. The dev build variant in =base-url-dev.go= honors =SPACEWAVE_CDN_BASE_URL= to point at staging / local mirrors.
const ProvisionedSpaceID = "01kpn3x0y79yr94ps1yae206vp"
ProvisionedSpaceID is the canonical ULID of the mounted public CDN Space on production. It always refers to the public destination Space that clients auto-mount, never to the private authoring Space. Dev builds may override =SpaceID()= via =SPACEWAVE_CDN_SPACE_ID= to point at the staging public CDN Space =01kpfs6hyxeamz1a5hwwqph291= (or any other test public Space).
Variables ¶
This section is empty.
Functions ¶
func BaseURL ¶
func BaseURL() string
BaseURL returns the CDN origin used for anonymous read artifacts. Prod builds always return =DefaultBaseURL=; the env-var override ships only with dev builds (see =base-url-dev.go=).
func CopyV86ImageFromCdn ¶ added in v0.51.0
func CopyV86ImageFromCdn(ctx context.Context, src, dst world.WorldState, srcObjectKey, dstObjectKey string) error
CopyV86ImageFromCdn copies image metadata and referenced assets into a writable World.
func CopyV86ImageFromCdnWithProgress ¶ added in v0.56.1
func CopyV86ImageFromCdnWithProgress(ctx context.Context, src, dst world.WorldState, srcObjectKey, dstObjectKey string, progress V86ImageCopyProgressFunc) error
CopyV86ImageFromCdnWithProgress reports cumulative progress while copying an image. GoScript loads the image implementation when the copy is requested.
Types ¶
type CdnRootPointer ¶
type CdnRootPointer struct {
// SpaceId is the SharedObject ULID for this Space.
SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"spaceId,omitempty"`
// Root is the signed SORoot for the Space at the time of publication.
// Clients verify it against the config chain's validator peers.
Root *sobject.SORoot `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
// ConfigChainHash is the hash of the current config chain head.
ConfigChainHash []byte `protobuf:"bytes,3,opt,name=config_chain_hash,json=configChainHash,proto3" json:"configChainHash,omitempty"`
// ConfigChainSeqno is the seqno of the current config chain head.
ConfigChainSeqno uint64 `protobuf:"varint,4,opt,name=config_chain_seqno,json=configChainSeqno,proto3" json:"configChainSeqno,omitempty"`
// Packs is the list of packfile entries currently published to the CDN for
// this Space. Each pack lives at
// cdn.spacewave.app/{spaceId}/packs/{shard}/{id}.kvf. Bloom filters are
// included so clients can skip packs that don't contain blocks they need.
Packs []*packfile.PackfileEntry `protobuf:"bytes,5,rep,name=packs,proto3" json:"packs,omitempty"`
// CreatedAtMs is when this root pointer was regenerated, expressed as unix
// epoch milliseconds. Informational only; does not affect verification.
CreatedAtMs int64 `protobuf:"varint,6,opt,name=created_at_ms,json=createdAtMs,proto3" json:"createdAtMs,omitempty"`
// contains filtered or unexported fields
}
CdnRootPointer is the top-level CDN artifact for a public_read Space. The Worker writes it at cdn.spacewave.app/{spaceId}/root.packedmsg as a packedmsg-encoded blob (see repos/bldr/util/packedmsg) on every successful sync/push for a public_read Space. Anonymous clients fetch and decode this blob to discover the current signed root and the set of packs they need to reconstruct Space state; no Worker round-trip is required on the read path.
func (*CdnRootPointer) CloneMessageVT ¶
func (m *CdnRootPointer) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*CdnRootPointer) CloneVT ¶
func (m *CdnRootPointer) CloneVT() *CdnRootPointer
func (*CdnRootPointer) EqualMessageVT ¶
func (this *CdnRootPointer) EqualMessageVT(thatMsg any) bool
func (*CdnRootPointer) EqualVT ¶
func (this *CdnRootPointer) EqualVT(that *CdnRootPointer) bool
func (*CdnRootPointer) GetConfigChainHash ¶
func (x *CdnRootPointer) GetConfigChainHash() []byte
func (*CdnRootPointer) GetConfigChainSeqno ¶
func (x *CdnRootPointer) GetConfigChainSeqno() uint64
func (*CdnRootPointer) GetCreatedAtMs ¶
func (x *CdnRootPointer) GetCreatedAtMs() int64
func (*CdnRootPointer) GetPacks ¶
func (x *CdnRootPointer) GetPacks() []*packfile.PackfileEntry
func (*CdnRootPointer) GetRoot ¶
func (x *CdnRootPointer) GetRoot() *sobject.SORoot
func (*CdnRootPointer) GetSpaceId ¶
func (x *CdnRootPointer) GetSpaceId() string
func (*CdnRootPointer) MarshalJSON ¶
func (x *CdnRootPointer) MarshalJSON() ([]byte, error)
MarshalJSON marshals the CdnRootPointer to JSON.
func (*CdnRootPointer) MarshalProtoJSON ¶
func (x *CdnRootPointer) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the CdnRootPointer message to JSON.
func (*CdnRootPointer) MarshalProtoText ¶
func (x *CdnRootPointer) MarshalProtoText() string
func (*CdnRootPointer) MarshalToSizedBufferVT ¶
func (m *CdnRootPointer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*CdnRootPointer) MarshalToVT ¶
func (m *CdnRootPointer) MarshalToVT(dAtA []byte) (int, error)
func (*CdnRootPointer) MarshalVT ¶
func (m *CdnRootPointer) MarshalVT() (dAtA []byte, err error)
func (*CdnRootPointer) ProtoMessage ¶
func (*CdnRootPointer) ProtoMessage()
func (*CdnRootPointer) Reset ¶
func (x *CdnRootPointer) Reset()
func (*CdnRootPointer) SizeVT ¶
func (m *CdnRootPointer) SizeVT() (n int)
func (*CdnRootPointer) String ¶
func (x *CdnRootPointer) String() string
func (*CdnRootPointer) UnmarshalJSON ¶
func (x *CdnRootPointer) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the CdnRootPointer from JSON.
func (*CdnRootPointer) UnmarshalProtoJSON ¶
func (x *CdnRootPointer) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the CdnRootPointer message from JSON.
func (*CdnRootPointer) UnmarshalVT ¶
func (m *CdnRootPointer) UnmarshalVT(dAtA []byte) error
type V86ImageCopyProgressFunc ¶ added in v0.56.1
type V86ImageCopyProgressFunc func(bucket_lookup.ObjectCopyStats) error
V86ImageCopyProgressFunc receives cumulative block-copy progress.