service: do not show pebble as an option on unsupported architectures
This commit is contained in:
parent
615162b739
commit
7c32a117f1
|
@ -37,7 +37,6 @@ const programName = "ipfs-cluster-service"
|
|||
const (
|
||||
defaultLogLevel = "info"
|
||||
defaultConsensus = "crdt"
|
||||
defaultDatastore = "badger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -274,7 +273,7 @@ the peer IDs in the given multiaddresses.
|
|||
},
|
||||
cli.StringFlag{
|
||||
Name: "datastore",
|
||||
Usage: "select datastore: 'badger', 'badger3', 'leveldb', 'pebble'",
|
||||
Usage: datastoreFlagUsage,
|
||||
Value: defaultDatastore,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
|
|
8
cmd/ipfs-cluster-service/pebble_disabled.go
Normal file
8
cmd/ipfs-cluster-service/pebble_disabled.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
//go:build arm || 386 || (openbsd && amd64)
|
||||
|
||||
package main
|
||||
|
||||
const (
|
||||
defaultDatastore = "badger"
|
||||
datastoreFlagUsage = "select datastore: 'badger', 'badger3' or 'leveldb'"
|
||||
)
|
8
cmd/ipfs-cluster-service/pebble_enabled.go
Normal file
8
cmd/ipfs-cluster-service/pebble_enabled.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
//go:build !arm && !386 && !(openbsd && amd64)
|
||||
|
||||
package main
|
||||
|
||||
const (
|
||||
defaultDatastore = "badger"
|
||||
datastoreFlagUsage = "select datastore: 'badger', 'badger3', 'leveldb' or 'pebble'"
|
||||
)
|
|
@ -51,7 +51,7 @@ func (cfg *Config) LoadJSON(raw []byte) error {
|
|||
// ToJSON generates a JSON-formatted human-friendly representation of this
|
||||
// Config.
|
||||
func (cfg *Config) ToJSON() (raw []byte, err error) {
|
||||
return []byte("{}"), nil
|
||||
return []byte("{}"), ErrUnsupported
|
||||
}
|
||||
|
||||
// GetFolder returns the Pebble folder.
|
||||
|
|
Loading…
Reference in New Issue
Block a user