Documentation
¶
Overview ¶
Package storage contains all function related to local and cloud storage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalStoreClient ¶ added in v1.1.6
type LocalStoreClient struct{}
LocalStoreClient stores file on the local filesystem
func (*LocalStoreClient) WriteToBinFile ¶ added in v1.1.6
func (client *LocalStoreClient) WriteToBinFile(path, objectName string, object []byte) error
WriteToBinFile writes to binary file in given path
type Manager ¶ added in v1.1.6
type Manager struct { StorageConfig *config.StorageConfig GcpStore *gcp.Client LocalStore *LocalStoreClient IpfsStore *pinner.PinnerNode // contains filtered or unexported fields }
Manager composes of all the different storage types supported by the agent
func NewStorageManager ¶ added in v1.1.6
func NewStorageManager(conf *config.StorageConfig) (*Manager, error)
NewStorageManager creates and sets up a new storage manager with given config
func (*Manager) Close ¶ added in v1.1.6
func (manager *Manager) Close()
Close the stores which compose the manager
func (*Manager) GenerateLocation ¶ added in v1.1.6
func (manager *Manager) GenerateLocation(ctx context.Context, segmentName string, replicaSegmentAvro []byte) (string, cid.Cid)
GenerateLocation calculates the non-local location (gcp or ipfs) for the given segment and data, cid is returned in case of ipfs
Click to show internal directories.
Click to hide internal directories.