Documentation ¶
Index ¶
- Constants
- Variables
- func CreatePath(ctx context.Context, projectID uuid.UUID, segmentIndex int64, ...) (_ storj.Path, err error)
- func NewStore(logger *zap.Logger, dbURLString string) (db storage.KeyValueStore, err error)
- type APIKeys
- type Config
- type Containment
- type Endpoint
- func (endpoint *Endpoint) Close() error
- func (endpoint *Endpoint) CommitSegment(ctx context.Context, req *pb.SegmentCommitRequest) (resp *pb.SegmentCommitResponse, err error)
- func (endpoint *Endpoint) CreateSegment(ctx context.Context, req *pb.SegmentWriteRequest) (resp *pb.SegmentWriteResponse, err error)
- func (endpoint *Endpoint) DeleteSegment(ctx context.Context, req *pb.SegmentDeleteRequest) (resp *pb.SegmentDeleteResponse, err error)
- func (endpoint *Endpoint) DownloadSegment(ctx context.Context, req *pb.SegmentDownloadRequest) (resp *pb.SegmentDownloadResponse, err error)
- func (endpoint *Endpoint) ListSegments(ctx context.Context, req *pb.ListSegmentsRequest) (resp *pb.ListSegmentsResponse, err error)
- func (endpoint *Endpoint) ProjectInfo(ctx context.Context, req *pb.ProjectInfoRequest) (_ *pb.ProjectInfoResponse, err error)
- func (endpoint *Endpoint) SegmentInfo(ctx context.Context, req *pb.SegmentInfoRequest) (resp *pb.SegmentInfoResponse, err error)
- func (endpoint *Endpoint) SetAttribution(ctx context.Context, req *pb.SetAttributionRequest) (_ *pb.SetAttributionResponse, err error)
- type RSConfig
- type Revocations
- type Service
- func (s *Service) Delete(ctx context.Context, path string) (err error)
- func (s *Service) Get(ctx context.Context, path string) (pointer *pb.Pointer, err error)
- func (s *Service) Iterate(ctx context.Context, prefix string, first string, recurse bool, reverse bool, ...) (err error)
- func (s *Service) List(ctx context.Context, prefix string, startAfter string, endBefore string, ...) (items []*pb.ListResponse_Item, more bool, err error)
- func (s *Service) Put(ctx context.Context, path string, pointer *pb.Pointer) (err error)
- type TTLItem
Constants ¶
const (
// BoltPointerBucket is the string representing the bucket used for `PointerEntries` in BoltDB
BoltPointerBucket = "pointers"
)
const ( // BucketNameRestricted feature flag to toggle bucket name validation BucketNameRestricted = false )
Variables ¶
var ( // Error general metainfo error Error = errs.Class("metainfo error") )
Functions ¶
Types ¶
type Config ¶ added in v0.11.0
type Config struct { DatabaseURL string `help:"the database connection string to use" releaseDefault:"postgres://" devDefault:"bolt://$CONFDIR/pointerdb.db"` MinRemoteSegmentSize memory.Size `default:"1240" help:"minimum remote segment size"` MaxInlineSegmentSize memory.Size `default:"8000" help:"maximum inline segment size"` Overlay bool `default:"true" help:"toggle flag if overlay is enabled"` BwExpiration int `default:"45" help:"lifespan of bandwidth agreements in days"` RS RSConfig `help:"redundancy scheme configuration"` }
Config is a configuration struct that is everything you need to start a metainfo
type Containment ¶ added in v0.12.0
Containment is a copy/paste of containment interface to avoid import cycle error
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint metainfo endpoint
func NewEndpoint ¶
func NewEndpoint(log *zap.Logger, metainfo *Service, orders *orders.Service, cache *overlay.Cache, partnerinfo attribution.DB, containment Containment, apiKeys APIKeys, projectUsage *accounting.ProjectUsage, rsConfig RSConfig) *Endpoint
NewEndpoint creates new metainfo endpoint instance
func (*Endpoint) CommitSegment ¶
func (endpoint *Endpoint) CommitSegment(ctx context.Context, req *pb.SegmentCommitRequest) (resp *pb.SegmentCommitResponse, err error)
CommitSegment commits segment metadata
func (*Endpoint) CreateSegment ¶
func (endpoint *Endpoint) CreateSegment(ctx context.Context, req *pb.SegmentWriteRequest) (resp *pb.SegmentWriteResponse, err error)
CreateSegment will generate requested number of OrderLimit with coresponding node addresses for them
func (*Endpoint) DeleteSegment ¶
func (endpoint *Endpoint) DeleteSegment(ctx context.Context, req *pb.SegmentDeleteRequest) (resp *pb.SegmentDeleteResponse, err error)
DeleteSegment deletes segment metadata from satellite and returns OrderLimit array to remove them from storage node
func (*Endpoint) DownloadSegment ¶
func (endpoint *Endpoint) DownloadSegment(ctx context.Context, req *pb.SegmentDownloadRequest) (resp *pb.SegmentDownloadResponse, err error)
DownloadSegment gets Pointer incase of INLINE data or list of OrderLimit necessary to download remote data
func (*Endpoint) ListSegments ¶
func (endpoint *Endpoint) ListSegments(ctx context.Context, req *pb.ListSegmentsRequest) (resp *pb.ListSegmentsResponse, err error)
ListSegments returns all Path keys in the Pointers bucket
func (*Endpoint) ProjectInfo ¶ added in v0.14.0
func (endpoint *Endpoint) ProjectInfo(ctx context.Context, req *pb.ProjectInfoRequest) (_ *pb.ProjectInfoResponse, err error)
ProjectInfo returns allowed ProjectInfo for the provided API key
func (*Endpoint) SegmentInfo ¶
func (endpoint *Endpoint) SegmentInfo(ctx context.Context, req *pb.SegmentInfoRequest) (resp *pb.SegmentInfoResponse, err error)
SegmentInfo returns segment metadata info
func (*Endpoint) SetAttribution ¶ added in v0.14.0
func (endpoint *Endpoint) SetAttribution(ctx context.Context, req *pb.SetAttributionRequest) (_ *pb.SetAttributionResponse, err error)
SetAttribution tries to add attribution to the bucket.
type RSConfig ¶ added in v0.14.0
type RSConfig struct { MaxBufferMem memory.Size `help:"maximum buffer memory (in bytes) to be allocated for read buffers" default:"4MiB"` MinThreshold int `help:"the minimum pieces required to recover a segment. k." releaseDefault:"29" devDefault:"4"` RepairThreshold int `help:"the minimum safe pieces before a repair is triggered. m." releaseDefault:"35" devDefault:"6"` SuccessThreshold int `help:"the desired total pieces for a segment. o." releaseDefault:"80" devDefault:"8"` MaxThreshold int `help:"the largest amount of pieces to encode to. n." releaseDefault:"130" devDefault:"10"` Validate bool `help:"validate redundancy scheme configuration" releaseDefault:"true" devDefault:"false"` }
RSConfig is a configuration struct that keeps details about default redundancy strategy information
type Revocations ¶ added in v0.12.0
type Revocations interface {
GetByProjectID(ctx context.Context, projectID uuid.UUID) ([][]byte, error)
}
Revocations is the revocations store methods used by the endpoint
type Service ¶ added in v0.11.0
type Service struct { DB storage.KeyValueStore // contains filtered or unexported fields }
Service structure
func NewService ¶ added in v0.11.0
func NewService(logger *zap.Logger, db storage.KeyValueStore) *Service
NewService creates new metainfo service
func (*Service) Iterate ¶ added in v0.11.0
func (s *Service) Iterate(ctx context.Context, prefix string, first string, recurse bool, reverse bool, f func(context.Context, storage.Iterator) error) (err error)
Iterate iterates over items in db