Documentation
¶
Overview ¶
Package payload provides large-payload stores for Durable Task Scheduler.
AzureBlobStore is the production interoperable implementation for application payloads. The separate exporthistory.AzureBlobHistoryStore writes exported history objects. MemoryStore is process-local and non-durable, while FileStore requires every client and worker to share the same durable filesystem.
Index ¶
- type AzureBlobStore
- func (*AzureBlobStore) IsLargePayloadToken(value string) bool
- func (s *AzureBlobStore) LargePayloadDefaults() (thresholdBytes, maxPayloadBytes int)
- func (s *AzureBlobStore) Resolve(ctx context.Context, location string) ([]byte, error)
- func (s *AzureBlobStore) ResolveToken(ctx context.Context, token string) ([]byte, error)
- func (s *AzureBlobStore) Store(ctx context.Context, payload []byte) (string, error)
- func (s *AzureBlobStore) StoreToken(ctx context.Context, payload []byte) (string, error)
- func (*AzureBlobStore) UsesInclusiveLargePayloadThreshold() bool
- func (s *AzureBlobStore) ValidateLargePayloadOptions(thresholdBytes, maxPayloadBytes int) error
- func (s *AzureBlobStore) ValidateLargePayloadToken(token string) error
- type AzureBlobStoreOptions
- type FileStore
- type MemoryStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureBlobStore ¶
type AzureBlobStore struct {
// contains filtered or unexported fields
}
AzureBlobStore stores payloads in Azure Blob Storage using .NET-compatible blob:v2 tokens. It also resolves .NET's legacy blob:v1 tokens.
func NewAzureBlobStore ¶
func NewAzureBlobStore(options AzureBlobStoreOptions) (*AzureBlobStore, error)
NewAzureBlobStore constructs a production Azure Blob Storage payload store.
func (*AzureBlobStore) IsLargePayloadToken ¶
func (*AzureBlobStore) IsLargePayloadToken(value string) bool
IsLargePayloadToken recognizes both .NET Azure Blob token versions.
func (*AzureBlobStore) LargePayloadDefaults ¶
func (s *AzureBlobStore) LargePayloadDefaults() (thresholdBytes, maxPayloadBytes int)
LargePayloadDefaults supplies Azure Blob's .NET-compatible defaults.
func (*AzureBlobStore) ResolveToken ¶
ResolveToken resolves a .NET blob:v1 or blob:v2 token.
func (*AzureBlobStore) StoreToken ¶
StoreToken stores a payload and returns the unwrapped .NET blob:v2 token.
func (*AzureBlobStore) UsesInclusiveLargePayloadThreshold ¶
func (*AzureBlobStore) UsesInclusiveLargePayloadThreshold() bool
UsesInclusiveLargePayloadThreshold matches the .NET Azure Blob extension.
func (*AzureBlobStore) ValidateLargePayloadOptions ¶
func (s *AzureBlobStore) ValidateLargePayloadOptions(thresholdBytes, maxPayloadBytes int) error
ValidateLargePayloadOptions enforces the .NET Azure Blob extension's threshold limit and the store's configured payload cap.
func (*AzureBlobStore) ValidateLargePayloadToken ¶
func (s *AzureBlobStore) ValidateLargePayloadToken(token string) error
ValidateLargePayloadToken validates a recognized token without accessing the network.
type AzureBlobStoreOptions ¶
type AzureBlobStoreOptions struct {
ConnectionString string
AccountURL string
Credential azcore.TokenCredential
Container string
// CompressionEnabled defaults to true when nil.
CompressionEnabled *bool
// AllowedHosts explicitly permits cross-account blob:v2 reads with Credential.
// .NET-authored blobs on these hosts may not include Go integrity metadata;
// they remain bounded by MaxPayloadBytes.
AllowedHosts []string
AllowInsecureHTTP bool
MaxPayloadBytes int
}
AzureBlobStoreOptions configures AzureBlobStore. Exactly one authentication mode must be supplied: ConnectionString, or AccountURL with Credential.
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore stores large payloads beneath one filesystem root.
Every client and worker that may resolve its references must mount the same durable filesystem at the same path. Container-local and other ephemeral filesystems lose references on restart and are not suitable for production.
func NewFileStore ¶
NewFileStore creates a filesystem-backed store with an optional payload limit.
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is a process-local, non-durable large-payload store.
References become unreadable when the process restarts and cannot be resolved by clients or workers in another process. Use it only for tests and single-process experiments; use AzureBlobStore for production DTS workloads.
func NewMemoryStore ¶
func NewMemoryStore(maxBytes ...int) *MemoryStore
NewMemoryStore creates a process-local store with an optional payload limit.