Documentation
¶
Index ¶
- func NewHandler(server server.ServerView) func(http.ResponseWriter, *http.Request)
- func NewUCANServer(storageService Service) (server.ServerView, error)
- type AllocatedMemoryNotWrittenError
- type BlobSizeLimitExceededError
- type Option
- func WithAllocationDatastore(dstore datastore.Datastore) Option
- func WithBlobstore(blobStore blobstore.Blobstore) Option
- func WithClaimDatastore(dstore datastore.Datastore) Option
- func WithIdentity(signer principal.Signer) Option
- func WithLogLevel(name string, level string) Option
- func WithPublicURL(url url.URL) Option
- func WithPublisherDatastore(dstore datastore.Datastore) Option
- func WithPublisherDirectAnnounce(announceURLs ...url.URL) Option
- func WithPublisherIndexingService(conn client.Connection) Option
- func WithPublisherIndexingServiceConfig(serviceDID ucan.Principal, serviceURL url.URL) Option
- func WithPublisherIndexingServiceProof(proof ...delegation.Proof) Option
- type Server
- type Service
- type StorageService
- type UnsupportedCapabilityError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(server server.ServerView) func(http.ResponseWriter, *http.Request)
func NewUCANServer ¶
func NewUCANServer(storageService Service) (server.ServerView, error)
Types ¶
type AllocatedMemoryNotWrittenError ¶
type AllocatedMemoryNotWrittenError struct{}
func NewAllocatedMemoryNotWrittenError ¶
func NewAllocatedMemoryNotWrittenError() AllocatedMemoryNotWrittenError
func (AllocatedMemoryNotWrittenError) Error ¶
func (ae AllocatedMemoryNotWrittenError) Error() string
func (AllocatedMemoryNotWrittenError) Name ¶
func (ae AllocatedMemoryNotWrittenError) Name() string
type BlobSizeLimitExceededError ¶
type BlobSizeLimitExceededError struct {
// contains filtered or unexported fields
}
func NewBlobSizeLimitExceededError ¶
func NewBlobSizeLimitExceededError(size uint64, max uint64) BlobSizeLimitExceededError
func (BlobSizeLimitExceededError) Error ¶
func (be BlobSizeLimitExceededError) Error() string
func (BlobSizeLimitExceededError) Name ¶
func (be BlobSizeLimitExceededError) Name() string
type Option ¶
type Option func(*config) error
func WithAllocationDatastore ¶
func WithAllocationDatastore(dstore datastore.Datastore) Option
WithAllocationDatastore configures the underlying datastore to use for storing allocation records. Note: the datastore MUST have efficient support for prefix queries.
func WithBlobstore ¶
WithBlobstore configures the blob storage to use.
func WithClaimDatastore ¶
func WithClaimDatastore(dstore datastore.Datastore) Option
WithClaimDatastore configures the underlying datastore to use for storing content claims made by this node.
func WithIdentity ¶
WithIdentity configures the storage service identity, used to sign UCAN invocations and receipts.
func WithLogLevel ¶
WithLogLevel changes the log level of a specific subsystem name=="*" changes all subsystems.
func WithPublicURL ¶
WithPublicURL configures the URL this storage node will be publically accessible from.
func WithPublisherDatastore ¶
func WithPublisherDatastore(dstore datastore.Datastore) Option
WithPublisherDatastore configures the underlying datastore to use for storing IPNI advertisements and their entries.
func WithPublisherDirectAnnounce ¶
WithPublisherDirectAnnounce sets IPNI node URLs to send direct HTTP announcements to.
func WithPublisherIndexingService ¶
func WithPublisherIndexingService(conn client.Connection) Option
WithPublisherIndexingService sets the client connection to the indexing UCAN service.
func WithPublisherIndexingServiceConfig ¶
WithPublisherIndexingServiceConfig configures UCAN service invocation details for communicating with the indexing service.
func WithPublisherIndexingServiceProof ¶
func WithPublisherIndexingServiceProof(proof ...delegation.Proof) Option
WithPublisherIndexingServiceProof configures proofs for UCAN invocations to the indexing service.
type StorageService ¶
func New ¶
func New(opts ...Option) (*StorageService, error)
func (*StorageService) Blobs ¶
func (s *StorageService) Blobs() blobs.Blobs
func (*StorageService) Claims ¶
func (s *StorageService) Claims() claims.Claims
func (*StorageService) Close ¶
func (s *StorageService) Close() error
func (*StorageService) ID ¶
func (s *StorageService) ID() principal.Signer
type UnsupportedCapabilityError ¶
type UnsupportedCapabilityError[C any] struct { // contains filtered or unexported fields }
func NewUnsupportedCapabilityError ¶
func NewUnsupportedCapabilityError[C any](capability ucan.Capability[C]) UnsupportedCapabilityError[C]
func (UnsupportedCapabilityError[C]) Capability ¶
func (ue UnsupportedCapabilityError[C]) Capability() ucan.Capability[C]
func (UnsupportedCapabilityError[C]) Error ¶
func (ue UnsupportedCapabilityError[C]) Error() string
func (UnsupportedCapabilityError[C]) Name ¶
func (ue UnsupportedCapabilityError[C]) Name() string