camlistore.org: camlistore.org/pkg/blobserver/stats Index | Files

package stats

import "camlistore.org/pkg/blobserver/stats"

Package stats contains an in-memory StatReceiver that only stores sizes of received blobs but not their contents.

Index

Package Files

statreceiver.go

type Receiver Uses

type Receiver struct {
    sync.Mutex // guards Have
    Have       map[blob.Ref]int64
}

Receiver is a dummy blobserver.StatReceiver that doesn't store anything; it just collects statistics.

TODO: we have another copy of this same type in camput/files.go. move them to a common place? well, the camput one is probably going away at some point.

func (*Receiver) EnumerateBlobs Uses

func (sr *Receiver) EnumerateBlobs(ctx context.Context, dest chan<- blob.SizedRef, after string, limit int) error

func (*Receiver) NumBlobs Uses

func (sr *Receiver) NumBlobs() int

func (*Receiver) ReceiveBlob Uses

func (sr *Receiver) ReceiveBlob(br blob.Ref, source io.Reader) (sb blob.SizedRef, err error)

func (*Receiver) ReceiveRef Uses

func (sr *Receiver) ReceiveRef(br blob.Ref, size int64) (sb blob.SizedRef, err error)

func (*Receiver) RemoveBlobs Uses

func (sr *Receiver) RemoveBlobs(blobs []blob.Ref) error

func (*Receiver) Sizes Uses

func (sr *Receiver) Sizes() []int

Sizes returns the sorted blob sizes.

func (*Receiver) StatBlobs Uses

func (sr *Receiver) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) error

func (*Receiver) SumBlobSize Uses

func (sr *Receiver) SumBlobSize() int64

Package stats imports 6 packages (graph) and is imported by 3 packages. Updated 2018-01-17. Refresh now. Tools for package owners.