mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Updated Customize Filer Store (markdown)
parent
0a80139120
commit
7d0573448a
|
@ -3,8 +3,8 @@ It is fairly easy if you need to store filer metadata with other data store.
|
||||||
Let's use "yourstore" as the chosen name.
|
Let's use "yourstore" as the chosen name.
|
||||||
|
|
||||||
Here are the steps:
|
Here are the steps:
|
||||||
1. add a package under github.com/chrislusf/seaweedfs/weed/filer2/yourstore
|
1. Add a package under github.com/chrislusf/seaweedfs/weed/filer2/yourstore
|
||||||
2. implement the filer2.FilerStore interface
|
2. Implement the filer2.FilerStore interface
|
||||||
```
|
```
|
||||||
package filer2
|
package filer2
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type FilerStore interface {
|
type FilerStore interface {
|
||||||
|
// GetName gets the name to locate the configuration in filer.toml file
|
||||||
GetName() string
|
GetName() string
|
||||||
// Initialize initializes the file store
|
// Initialize initializes the file store
|
||||||
Initialize(configuration Configuration) error
|
Initialize(configuration Configuration) error
|
||||||
|
@ -24,6 +25,7 @@ type FilerStore interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Remember to add yourstore to the list of supported stores
|
3. Remember to add yourstore to the list of supported stores
|
||||||
```
|
```
|
||||||
func init() {
|
func init() {
|
||||||
|
|
Loading…
Reference in a new issue