Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BlobCacheServiceConfig blobCacheServiceConfig = blobCacheServiceConfig{
Address: "0.0.0.0:2049",
PersistencePath: "/cache",
PageSize: 1 << 21,
CacheSize: 100000000,
}
Functions ¶
This section is empty.
Types ¶
type CacheService ¶
type CacheService struct { proto.UnimplementedBlobCacheServer // contains filtered or unexported fields }
func NewCacheService ¶
func NewCacheService(persistencePath string, cacheSize, pageSize int64) (*CacheService, error)
func (*CacheService) GetContent ¶
func (cs *CacheService) GetContent(ctx context.Context, req *proto.GetContentRequest) (*proto.GetContentResponse, error)
func (*CacheService) StartServer ¶
func (cs *CacheService) StartServer(addr string) error
func (*CacheService) StoreContent ¶
func (cs *CacheService) StoreContent(stream proto.BlobCache_StoreContentServer) error
type CacheServiceOpts ¶
type CacheServiceOpts struct {
Addr string
}
type ContentAddressableStorage ¶
type ContentAddressableStorage struct {
// contains filtered or unexported fields
}
func NewContentAddressableStorage ¶
func NewContentAddressableStorage(dir string, size int64, chunkSize int64) (*ContentAddressableStorage, error)
Click to show internal directories.
Click to hide internal directories.