Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions core/cfg/cache.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
package cfg

import blobcache "github.com/beam-cloud/blobcache-v2/pkg"

type ContentCache interface {
GetContent(hash string, offset int64, length int64, opts struct{ RoutingKey string }) ([]byte, error)
StoreContent(chunks chan []byte, hash string, opts struct{ RoutingKey string }) (string, error)
StoreContentFromS3(source struct {
Path string
BucketName string
Region string
EndpointURL string
AccessKey string
SecretKey string
}, opts struct {
RoutingKey string
Lock bool
}) (string, error)
StoreContentFromS3(source blobcache.ContentSourceS3, opts blobcache.StoreContentOptions) (string, error)
}
17 changes: 5 additions & 12 deletions core/goofys.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package core

import (
blobcache "github.com/beam-cloud/blobcache-v2/pkg"
"github.com/yandex-cloud/geesefs/core/cfg"

"context"
Expand Down Expand Up @@ -425,24 +426,16 @@ func (fs *Goofys) processCacheEvents() {
}

if inode.Attributes.Size > 0 {
hash, err := fs.flags.ExternalCacheClient.StoreContentFromS3(struct {
Path string
BucketName string
Region string
EndpointURL string
AccessKey string
SecretKey string
}{
hash, err := fs.flags.ExternalCacheClient.StoreContentFromS3(blobcache.ContentSourceS3{
Path: inode.FullName(),
BucketName: fs.bucket,
Region: s3.Region,
EndpointURL: flags.Endpoint,
AccessKey: s3.AccessKey,
SecretKey: s3.SecretKey,
}, struct {
RoutingKey string
Lock bool
}{RoutingKey: string(knownHash), Lock: true})
// This is how this option is set in the ToAWSConfig method (conf_s3.go)
ForcePathStyle: !s3.Subdomain,
}, blobcache.StoreContentOptions{RoutingKey: string(knownHash), Lock: true})
if err != nil {
log.Debugf("Failed to store content from source: %v", err)
} else if hash != string(knownHash) {
Expand Down
75 changes: 59 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/yandex-cloud/geesefs

go 1.21
go 1.22.10

toolchain go1.22.2
toolchain go1.23.5

require (
cloud.google.com/go/storage v1.16.0
Expand All @@ -14,25 +14,26 @@ require (
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2
github.com/aws/aws-sdk-go v1.38.7
github.com/beam-cloud/blobcache-v2 v0.0.0-20250425202639-4806ac69ec31
github.com/golang/protobuf v1.5.4
github.com/google/uuid v1.1.2
github.com/google/uuid v1.6.0
github.com/jacobsa/fuse v0.0.0-20230810134708-ab21db1af836
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/mitchellh/go-homedir v1.1.0
github.com/moby/sys/mountinfo v0.7.2
github.com/pkg/xattr v0.4.9
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/sevlyar/go-daemon v0.1.6
github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984
github.com/shirou/gopsutil v2.21.11+incompatible
github.com/sirupsen/logrus v1.8.1
github.com/tidwall/btree v1.7.0
github.com/urfave/cli v1.21.1-0.20190807111034-521735b7608a
github.com/winfsp/cgofuse v1.5.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.22.0
golang.org/x/sync v0.10.0
golang.org/x/sys v0.29.0
google.golang.org/api v0.49.0
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.35.1
google.golang.org/grpc v1.71.1
google.golang.org/protobuf v1.36.4
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/ini.v1 v1.46.0
)
Expand All @@ -45,35 +46,77 @@ require (
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/aws/aws-sdk-go-v2 v1.30.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.24 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.24 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.13 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/beam-cloud/rendezvous v0.0.0-20250415141250-2a0f81633db8 // indirect
github.com/beam-cloud/ristretto v0.0.0-20241013204426-d1403e359aa2 // indirect
github.com/bsm/redislock v0.9.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/dgraph-io/ristretto v1.0.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/djherbis/atime v1.1.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/gopherjs/gopherjs v0.0.0-20210202160940-bed99a852dfe // indirect
github.com/hanwen/go-fuse/v2 v2.5.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/jtolds/gls v4.2.0+incompatible // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/knadh/koanf/parsers/json v0.1.0 // indirect
github.com/knadh/koanf/parsers/yaml v0.1.0 // indirect
github.com/knadh/koanf/providers/file v0.1.0 // indirect
github.com/knadh/koanf/providers/rawbytes v0.1.0 // indirect
github.com/knadh/koanf/v2 v2.0.1 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/redis/go-redis/v9 v9.5.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/zerolog v1.33.0 // indirect
github.com/smartystreets/assertions v0.0.0-20160201214316-443d812296a8 // indirect
github.com/smartystreets/goconvey v1.6.1-0.20160119221636-995f5b2e021c // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.25.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210624174822-c5cf32407d0a // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/aws/aws-sdk-go => ./s3ext
Expand Down
Loading