From 105b37f1b4f77a50625dc997eaab9d71c52495df Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 31 Mar 2017 12:11:01 +0200 Subject: swarm/api: improve FUSE build constraints, logging and APIs (#3818) * swarm/api: fix build/tests on unsupported platforms Skip FUSE tests if FUSE is unavailable and change build constraints so the 'lesser' platforms aren't mentioned explicitly. The test are compiled on all platforms to prevent regressions in _fallback.go Also gofmt -w -s because why not. * internal/web3ext: fix swarmfs wrappers Remove inputFormatter specifications so users get an error when passing the wrong number of arguments. * swarm/api: improve FUSE-related logging and APIs The API now returns JSON objects instead of strings. Log messages for invalid arguments are removed. --- swarm/api/swarmfs.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'swarm/api/swarmfs.go') diff --git a/swarm/api/swarmfs.go b/swarm/api/swarmfs.go index 8427d3c5b..78a61cf9d 100644 --- a/swarm/api/swarmfs.go +++ b/swarm/api/swarmfs.go @@ -17,25 +17,22 @@ package api import ( - "time" "sync" + "time" ) const ( Swarmfs_Version = "0.1" - mountTimeout = time.Second * 5 - maxFuseMounts = 5 + mountTimeout = time.Second * 5 + maxFuseMounts = 5 ) - type SwarmFS struct { swarmApi *Api activeMounts map[string]*MountInfo activeLock *sync.RWMutex } - - func NewSwarmFS(api *Api) *SwarmFS { swarmfs := &SwarmFS{ swarmApi: api, @@ -44,5 +41,3 @@ func NewSwarmFS(api *Api) *SwarmFS { } return swarmfs } - - -- cgit v1.2.3