Documentation
¶
Index ¶
- Variables
- func Construct(cfg Config) (storage.Service, error)
- func DecodeLinkMessage(messageBody string) (datamodel.Link, error)
- func DecodePieceMessage(messageBody string) (piece.PieceLink, error)
- type AWSAggregator
- type Config
- type DynamoAllocationStore
- type DynamoProviderContextTable
- func (d *DynamoProviderContextTable) Delete(ctx context.Context, p peer.ID, contextID []byte) error
- func (d *DynamoProviderContextTable) Get(ctx context.Context, p peer.ID, contextID []byte) ([]byte, error)
- func (d *DynamoProviderContextTable) Put(ctx context.Context, p peer.ID, contextID []byte, data []byte) error
- type DynamoRanLinkIndex
- type KeyFormatterFunc
- type LinkMessage
- type PDP
- type PieceLinkMessage
- type S3BlobPresigner
- type S3BlobStore
- func (s *S3BlobStore) Get(ctx context.Context, digest multihash.Multihash, opts ...blobstore.GetOption) (blobstore.Object, error)
- func (s *S3BlobStore) PresignClient() presigner.RequestPresigner
- func (s *S3BlobStore) Put(ctx context.Context, digest multihash.Multihash, size uint64, body io.Reader) error
- type S3IndexerProofs
- type S3Store
- type SQSAggregateQueue
- type SQSPieceQueue
Constants ¶
This section is empty.
Variables ¶
var ErrDynamoRecordNotFound = errors.New("no record found in dynamo table")
ErrDynamoRecordNotFound is used when there is no record in a dynamo table (given that GetItem does not actually error)
var ErrIndexingServiceProofsMissing = errors.New("indexing service proofs are missing")
var ErrMissingSecret = errors.New("missing value for secret")
ErrMissingSecret means that the value returned from Secrets was empty
var PieceQueueMessageGroupID = "piece-queue"
Functions ¶
func DecodeLinkMessage ¶
DecodeLinkMessage extracts a link from an SQS queue messagebody
Types ¶
type AWSAggregator ¶
type AWSAggregator struct {
// contains filtered or unexported fields
}
func (*AWSAggregator) AggregatePiece ¶
AggregatePiece is the frontend to aggregation
type Config ¶
type Config struct {
Config aws.Config
S3Options []func(*s3.Options)
DynamoOptions []func(*dynamodb.Options)
SentryDSN string
SentryEnvironment string
AllocationsTableName string
BlobStoreBucketEndpoint string
BlobStoreBucketRegion string
BlobStoreBucketAccessKeyID string
BlobStoreBucketSecretAccessKey string
BlobStoreBucketKeyPattern string
BlobStoreBucket string
AggregatesBucket string
AggregatesPrefix string
BufferBucket string
BufferPrefix string
ChunkLinksTableName string
MetadataTableName string
IPNIStoreBucket string
IPNIStorePrefix string
IPNIAnnounceURLs []url.URL
ClaimStoreBucket string
ClaimStorePrefix string
PublicURL string
IndexingServiceDID string
IndexingServiceURL string
IndexingServiceProof string
IPNIPublisherAnnounceAddress string
BlobsPublicURL string
RanLinkIndexTableName string
ReceiptStoreBucket string
ReceiptStorePrefix string
SQSPDPPieceAggregatorURL string
SQSPDPAggregateSubmitterURL string
SQSPDPPieceAccepterURL string
PDPProofSet uint64
CurioURL string
PrincipalMapping map[string]string
principal.Signer
}
type DynamoAllocationStore ¶
type DynamoAllocationStore struct {
// contains filtered or unexported fields
}
DynamoAllocationStore implements the AllocationStore interface on dynamodb
func NewDynamoAllocationStore ¶
func NewDynamoAllocationStore(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoAllocationStore
NewDynamoAllocationStore returns an AllocationStore connected to a AWS DynamoDB table
func (*DynamoAllocationStore) List ¶
func (d *DynamoAllocationStore) List(ctx context.Context, mh multihash.Multihash) ([]allocation.Allocation, error)
List implements allocationstore.AllocationStore.
func (*DynamoAllocationStore) Put ¶
func (d *DynamoAllocationStore) Put(ctx context.Context, alloc allocation.Allocation) error
Put implements allocationstore.AllocationStore.
type DynamoProviderContextTable ¶
type DynamoProviderContextTable struct {
// contains filtered or unexported fields
}
DynamoProviderContextTable implements the store.ProviderContextTable interface on dynamodb
func NewDynamoProviderContextTable ¶
func NewDynamoProviderContextTable(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoProviderContextTable
NewDynamoProviderContextTable returns a ProviderContextTable connected to a AWS DynamoDB table
type DynamoRanLinkIndex ¶
type DynamoRanLinkIndex struct {
// contains filtered or unexported fields
}
DynamoRanLinkIndex implements the store.ProviderContextTable interface on dynamodb
func NewDynamoRanLinkIndex ¶
func NewDynamoRanLinkIndex(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoRanLinkIndex
NewDynamoRanLinkIndex returns a ProviderContextTable connected to a AWS DynamoDB table
type KeyFormatterFunc ¶
func NewPatternKeyFormatter ¶
func NewPatternKeyFormatter(pattern string) KeyFormatterFunc
NewPatternKeyFormatter creates a key formatter which replaces instances of "{blob}" in the provided pattern with the base58btc encoding of the multihash digest.
type LinkMessage ¶
type LinkMessage struct {
Link string `json:"link,omitempty"`
}
LinkMessage is a struct that is serialized onto an SQS message queue in JSON
type PDP ¶
type PDP struct {
// contains filtered or unexported fields
}
func (*PDP) Aggregator ¶
func (p *PDP) Aggregator() aggregator.Aggregator
Aggregator implements pdp.PDP.
func (*PDP) PieceAdder ¶
func (p *PDP) PieceAdder() pieceadder.PieceAdder
PieceAdder implements pdp.PDP.
func (*PDP) PieceFinder ¶
func (p *PDP) PieceFinder() piecefinder.PieceFinder
PieceFinder implements pdp.PDP.
type PieceLinkMessage ¶
type PieceLinkMessage struct {
Piece string `json:"piece,omitempty"`
}
PieceLinkMessage is the struct that is serialized onto an SQS message queue in JSON
type S3BlobPresigner ¶
type S3BlobPresigner struct {
// contains filtered or unexported fields
}
type S3BlobStore ¶
type S3BlobStore struct {
// contains filtered or unexported fields
}
S3BlobStore implements the blobstore.BlobStore interface on S3
func NewS3BlobStore ¶
func NewS3BlobStore(cfg aws.Config, bucket string, formatKey KeyFormatterFunc, opts ...func(*s3.Options)) *S3BlobStore
func (*S3BlobStore) Get ¶
func (s *S3BlobStore) Get(ctx context.Context, digest multihash.Multihash, opts ...blobstore.GetOption) (blobstore.Object, error)
Get implements blobstore.Blobstore.
func (*S3BlobStore) PresignClient ¶
func (s *S3BlobStore) PresignClient() presigner.RequestPresigner
type S3IndexerProofs ¶
type S3IndexerProofs struct {
// contains filtered or unexported fields
}
S3IndexerProofs returns delegation proofs for the indexer
func NewS3IndexerProofs ¶
func (*S3IndexerProofs) Get ¶
func (s *S3IndexerProofs) Get(ctx context.Context) ([]delegation.Proof, error)
Get implements store.Store.
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store implements the store.Store interface on S3
func NewS3Store ¶
type SQSAggregateQueue ¶
type SQSAggregateQueue struct {
// contains filtered or unexported fields
}
SQSAggregateQueue implements the providercacher.CachingQueue interface using SQS
func NewSQSAggregateQueue ¶
func NewSQSAggregateQueue(cfg aws.Config, queurURL string) *SQSAggregateQueue
NewSQSAggregateQueue returns a new SQSCachingQueue for the given aws config
type SQSPieceQueue ¶
type SQSPieceQueue struct {
// contains filtered or unexported fields
}
SQSPieceQueue implements the providercacher.CachingQueue interface using SQS
func NewSQSPieceQueue ¶
func NewSQSPieceQueue(cfg aws.Config, queurURL string) *SQSPieceQueue
NewSQSPieceQueue returns a new SQSCachingQueue for the given aws config