Documentation ¶
Index ¶
- Constants
- Variables
- func Construct(cfg Config) (types.Service, error)
- type CachingQueueMessage
- type Config
- type DynamoContentToClaimsMapper
- type DynamoProviderBlockIndexTable
- 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 IAMAuthTokenRequest
- type S3Store
- type SNSRemoteSyncMessage
- type SNSRemoteSyncNotifier
- type SQSCachingDecoder
- type SQSCachingQueue
Constants ¶
const ( REQUEST_PROTOCOL = "http://" PARAM_ACTION = "Action" PARAM_USER = "User" ACTION_NAME = "connect" SERVICE_NAME = "elasticache" PARAM_EXPIRES = "X-Amz-Expires" TOKEN_EXPIRY_SECONDS = 899 EMPTY_BODY_SHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // the hex encoded SHA-256 of an empty string )
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 ErrNoPrivateKey = errors.New("no value for private key")
ErrNoPrivateKey means that the value returned from Secrets was empty
Functions ¶
Types ¶
type CachingQueueMessage ¶
type CachingQueueMessage struct { JobID uuid.UUID `json:"JobID,omitempty"` Provider model.ProviderResult `json:"Provider,omitempty"` }
CachingQueueMessage is the struct that is serialized onto an SQS message queue in JSON
type Config ¶
type Config struct { construct.ServiceConfig aws.Config SQSCachingQueueURL string CachingBucket string ChunkLinksTableName string MetadataTableName string IPNIStoreBucket string IPNIStorePrefix string NotifierHeadBucket string NotifierTopicArn string ClaimStoreBucket string ClaimStorePrefix string LegacyClaimsTableName string LegacyClaimsBucket string LegacyBlockIndexTableName string LegacyDataBucketURL string principal.Signer }
Config describes all the values required to setup AWS from the environment
type DynamoContentToClaimsMapper ¶
type DynamoContentToClaimsMapper struct {
// contains filtered or unexported fields
}
DynamoContentToClaimsMapper uses a DynamoDB table to map content hashes to the corresponding claims
func NewDynamoContentToClaimsMapper ¶
func NewDynamoContentToClaimsMapper(queryClient dynamodb.QueryAPIClient, tableName string) DynamoContentToClaimsMapper
type DynamoProviderBlockIndexTable ¶
type DynamoProviderBlockIndexTable struct {
// contains filtered or unexported fields
}
func NewDynamoProviderBlockIndexTable ¶
func NewDynamoProviderBlockIndexTable(client dynamodb.QueryAPIClient, tableName string) *DynamoProviderBlockIndexTable
func (*DynamoProviderBlockIndexTable) Query ¶
func (d *DynamoProviderBlockIndexTable) Query(ctx context.Context, digest multihash.Multihash) ([]legacy.BlockIndexRecord, error)
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) *DynamoProviderContextTable
NewDynamoProviderContextTable returns a ProviderContextTable connected to a AWS DynamoDB table
type IAMAuthTokenRequest ¶
type IAMAuthTokenRequest struct {
// contains filtered or unexported fields
}
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store implements the store.Store interface on S3
type SNSRemoteSyncMessage ¶
type SNSRemoteSyncNotifier ¶
type SNSRemoteSyncNotifier struct {
// contains filtered or unexported fields
}
func NewSNSRemoteSyncNotifier ¶
func NewSNSRemoteSyncNotifier(config aws.Config, topicArn string) *SNSRemoteSyncNotifier
func (*SNSRemoteSyncNotifier) NotifyRemoteSync ¶
func (s *SNSRemoteSyncNotifier) NotifyRemoteSync(ctx context.Context, head, prev ipld.Link)
type SQSCachingDecoder ¶
type SQSCachingDecoder struct {
// contains filtered or unexported fields
}
SQSCachingDecoder provides interfaces for working with caching jobs received over SQS
func NewSQSCachingDecoder ¶
func NewSQSCachingDecoder(cfg aws.Config, bucket string) *SQSCachingDecoder
NewSQSCachingDecoder returns a new decoder for the given AWS config
func (*SQSCachingDecoder) CleanupMessage ¶
func (s *SQSCachingDecoder) CleanupMessage(ctx context.Context, messageBody string) error
CleanupMessage removes stored information in the s3 bucket
func (*SQSCachingDecoder) DecodeMessage ¶
func (s *SQSCachingDecoder) DecodeMessage(ctx context.Context, messageBody string) (providercacher.ProviderCachingJob, error)
DecodeMessage decodes a provider caching job from the SQS message body, reading the stored index from S3
type SQSCachingQueue ¶
type SQSCachingQueue struct {
// contains filtered or unexported fields
}
SQSCachingQueue implements the providercacher.CachingQueue interface using SQS
func NewSQSCachingQueue ¶
func NewSQSCachingQueue(cfg aws.Config, queurURL string, bucket string) *SQSCachingQueue
NewSQSCachingQueue returns a new SQSCachingQueue for the given aws config
func (*SQSCachingQueue) Queue ¶
func (s *SQSCachingQueue) Queue(ctx context.Context, job providercacher.ProviderCachingJob) error
Queue implements blobindexlookup.CachingQueue.