Skip to content

Commit

Permalink
expose NAS
Browse files Browse the repository at this point in the history
  • Loading branch information
peifan-tes committed Sep 3, 2020
1 parent 6235d1c commit 3a215b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/gateway-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ func StartGatewayWithRouter(router *mux.Router, gw Gateway) (http.Handler, Objec
// Set system resources to maximum.
logger.LogIf(context.Background(), setMaxResources())

initNSLock(false) // Enable local namespace lock.

// Currently only NAS and S3 gateway support encryption headers.
encryptionEnabled := gatewayName == "s3" || gatewayName == "nas"

Expand Down
4 changes: 4 additions & 0 deletions cmd/gateway/nas/gateway-nas.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ type NAS struct {
path string
}

func NewNAS(path string) *NAS {
return &NAS{path: path}
}

// Name implements Gateway interface.
func (g *NAS) Name() string {
return nasBackend
Expand Down

0 comments on commit 3a215b2

Please sign in to comment.