Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) Close() error
- func (c *Cluster) DeleteBLOB(hash string) error
- func (c *Cluster) GetBLOBEnvelope(hash string) (*blob.Envelope, error)
- func (c *Cluster) GetBLOBs() ([]string, error)
- func (c *Cluster) OpenBLOB(hash string) (blob.ReadSeekCloser, error)
- func (c *Cluster) Start()
- func (c *Cluster) WriteBLOB(data io.Reader) (*blob.Envelope, error)
- type Config
- type GetPeer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { logrus.FieldLogger Config // contains filtered or unexported fields }
Cluster is the distributed blob storage
func New ¶
New returns cluster BLOB storage that takes care of replication of BLOBs across cluster of nodes. It is designed for small clusters O(10) and small amount of objects managed O(100)
func (*Cluster) DeleteBLOB ¶
DeleteBLOB deletes BLOB from the storage
func (*Cluster) GetBLOBEnvelope ¶
GetBLOBEnvelope returns the blob envelope for the given hash
type Config ¶
type Config struct { // Local is a local BLOB storage managed by this peer Local blob.Objects // Backend is a discovery and metadata backend Backend storage.Backend // GetPeer returns new peer client based on ID GetPeer GetPeer // WriteFactor defines how many peer writes should be acknowledged // before write is considered successful WriteFactor int // ID is a peer local ID ID string // AdvertiseAddr is peer advertise address AdvertiseAddr string // Clock is clock interface, used in tests Clock clockwork.Clock // HeartbeatPeriod defines the period between heartbeats HeartbeatPeriod time.Duration // MissedHeartbeats is how many heartbeats the peer // should miss before we consider it closed MissedHeartbeats int // GracePeriod is a period for GC not to delete undetected files // to prevent accidental deletion. Defaults to 1 hour GracePeriod time.Duration }
Config is a cluster BLOB storage configuration
Click to show internal directories.
Click to hide internal directories.