Reduced exposed interfaces
This commit is contained in:
parent
47ec84e8ba
commit
f006f0c407
4
File.go
4
File.go
@ -18,12 +18,12 @@ const (
|
||||
)
|
||||
|
||||
type File[T any] struct {
|
||||
collection StorageData
|
||||
collection storageData
|
||||
dirty atomic.Uint32
|
||||
sync chan struct{}
|
||||
}
|
||||
|
||||
func (fs *File[T]) Init(c StorageData) error {
|
||||
func (fs *File[T]) Init(c storageData) error {
|
||||
fs.collection = c
|
||||
fs.sync = make(chan struct{})
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package ocean
|
||||
|
||||
type Storage[T any] interface {
|
||||
Init(data StorageData) error
|
||||
Init(data storageData) error
|
||||
Delete(key string) error
|
||||
Set(key string, value *T) error
|
||||
Sync()
|
||||
|
@ -2,7 +2,7 @@ package ocean
|
||||
|
||||
import "sync"
|
||||
|
||||
type StorageData interface {
|
||||
type storageData interface {
|
||||
Data() *sync.Map
|
||||
Name() string
|
||||
Root() string
|
Loading…
Reference in New Issue
Block a user