1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/filenode/fileservice/fileservice.go
Sergey Cherepanov 5d3e79e506
commonfile
2022-12-12 20:49:43 +03:00

36 lines
694 B
Go

package fileservice
import (
"context"
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
ipld "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-merkledag"
)
const CName = "filenode.fileservice"
type FileService interface {
app.ComponentRunnable
}
type fileService struct {
blockService *blockService
dagService ipld.DAGService
}
func (fs *fileService) Init(a *app.App) (err error) {
fs.dagService = merkledag.NewDAGService(fs.blockService)
return
}
func (fs *fileService) Name() string {
return CName
}
func (fs *fileService) Run(ctx context.Context) (err error) {
return
}
func (fs *fileService) Close(ctx context.Context) (err error) {
return
}