Documentation ¶
Index ¶
- Variables
- type Client
- type ListItem
- type Metainfo
- func (metainfo *Metainfo) CommitSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, ...) (savedPointer *pb.Pointer, err error)
- func (metainfo *Metainfo) CreateSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, ...) (limits []*pb.AddressedOrderLimit, rootPieceID storj.PieceID, err error)
- func (metainfo *Metainfo) DeleteSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (limits []*pb.AddressedOrderLimit, err error)
- func (metainfo *Metainfo) ListSegments(ctx context.Context, bucket string, prefix, startAfter, endBefore storj.Path, ...) (items []ListItem, more bool, err error)
- func (metainfo *Metainfo) ReadSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (pointer *pb.Pointer, limits []*pb.AddressedOrderLimit, err error)
- func (metainfo *Metainfo) SegmentInfo(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (pointer *pb.Pointer, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error is the errs class of standard metainfo errors Error = errs.Class("metainfo error") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreateSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, redundancy *pb.RedundancyScheme, maxEncryptedSegmentSize int64, expiration time.Time) ([]*pb.AddressedOrderLimit, storj.PieceID, error) CommitSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, pointer *pb.Pointer, originalLimits []*pb.OrderLimit2) (*pb.Pointer, error) SegmentInfo(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (*pb.Pointer, error) ReadSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (*pb.Pointer, []*pb.AddressedOrderLimit, error) DeleteSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) ([]*pb.AddressedOrderLimit, error) ListSegments(ctx context.Context, bucket string, prefix, startAfter, endBefore storj.Path, recursive bool, limit int32, metaFlags uint32) (items []ListItem, more bool, err error) }
Client interface for the Metainfo service
type Metainfo ¶
type Metainfo struct {
// contains filtered or unexported fields
}
Metainfo creates a grpcClient
func NewClient ¶
func NewClient(ctx context.Context, tc transport.Client, address string, APIKey string) (*Metainfo, error)
NewClient initializes a new metainfo client
func (*Metainfo) CommitSegment ¶
func (metainfo *Metainfo) CommitSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, pointer *pb.Pointer, originalLimits []*pb.OrderLimit2) (savedPointer *pb.Pointer, err error)
CommitSegment requests to store the pointer for the segment
func (*Metainfo) CreateSegment ¶
func (metainfo *Metainfo) CreateSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64, redundancy *pb.RedundancyScheme, maxEncryptedSegmentSize int64, expiration time.Time) (limits []*pb.AddressedOrderLimit, rootPieceID storj.PieceID, err error)
CreateSegment requests the order limits for creating a new segment
func (*Metainfo) DeleteSegment ¶
func (metainfo *Metainfo) DeleteSegment(ctx context.Context, bucket string, path storj.Path, segmentIndex int64) (limits []*pb.AddressedOrderLimit, err error)
DeleteSegment requests the order limits for deleting a segment
func (*Metainfo) ListSegments ¶
func (metainfo *Metainfo) ListSegments(ctx context.Context, bucket string, prefix, startAfter, endBefore storj.Path, recursive bool, limit int32, metaFlags uint32) (items []ListItem, more bool, err error)
ListSegments lists the available segments
Click to show internal directories.
Click to hide internal directories.