Documentation ¶
Index ¶
- Constants
- func ConfigComponentIsInitialized(path string) bool
- func DatastoreComponentIsInitialized(dspath string) bool
- func EventlogComponentIsInitialized(path string) bool
- func InitConfigComponent(path string, conf *config.Config) error
- func InitDatastoreComponent(dspath string, conf *config.Config) error
- func InitEventlogComponent(repoPath string, conf *config.Config) error
- type Component
- type ConfigComponent
- func (c *ConfigComponent) Close() error
- func (c *ConfigComponent) Config() *config.Config
- func (c *ConfigComponent) GetConfigKey(key string) (interface{}, error)
- func (c *ConfigComponent) Open(_ *config.Config) error
- func (c *ConfigComponent) SetConfig(updated *config.Config) error
- func (c *ConfigComponent) SetConfigKey(key string, value interface{}) error
- func (c *ConfigComponent) SetPath(p string)
- type DatastoreComponent
- type EventlogComponent
- type InitializationChecker
- type Initializer
Constants ¶
const (
DefaultDataStoreDirectory = "datastore"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigComponentIsInitialized ¶
ConfigComponentIsInitialized returns true if the repo is initialized at provided |path|.
func DatastoreComponentIsInitialized ¶
DatastoreComponentIsInitialized returns true if the datastore dir exists.
func InitConfigComponent ¶
fsrepoConfigInit initializes the FSRepo's ConfigComponent.
Types ¶
type ConfigComponent ¶
type ConfigComponent struct {
// contains filtered or unexported fields
}
ConfigComponent abstracts the config component of the FSRepo. NB: create with makeConfigComponent function. NOT THREAD-SAFE
func (*ConfigComponent) Close ¶
func (c *ConfigComponent) Close() error
Close satisfies the fsrepoComponent interface.
func (*ConfigComponent) Config ¶
func (c *ConfigComponent) Config() *config.Config
func (*ConfigComponent) GetConfigKey ¶
func (c *ConfigComponent) GetConfigKey(key string) (interface{}, error)
GetConfigKey retrieves only the value of a particular key.
func (*ConfigComponent) Open ¶
func (c *ConfigComponent) Open(_ *config.Config) error
Open returns an error if the config file is not present. This component is always called with a nil config parameter. Other components rely on the config, to keep the interface uniform, it is special-cased.
func (*ConfigComponent) SetConfig ¶
func (c *ConfigComponent) SetConfig(updated *config.Config) error
SetConfig updates the config file.
func (*ConfigComponent) SetConfigKey ¶
func (c *ConfigComponent) SetConfigKey(key string, value interface{}) error
SetConfigKey writes the value of a particular key.
func (*ConfigComponent) SetPath ¶
func (c *ConfigComponent) SetPath(p string)
type DatastoreComponent ¶
type DatastoreComponent struct {
// contains filtered or unexported fields
}
DatastoreComponent abstracts the datastore component of the FSRepo.
func (*DatastoreComponent) Close ¶
func (dsc *DatastoreComponent) Close() error
func (*DatastoreComponent) Datastore ¶
func (dsc *DatastoreComponent) Datastore() datastore.ThreadSafeDatastore
func (*DatastoreComponent) Open ¶
func (dsc *DatastoreComponent) Open(*config.Config) error
Open returns an error if the config file is not present.
func (*DatastoreComponent) SetPath ¶
func (dsc *DatastoreComponent) SetPath(p string)
type EventlogComponent ¶
type EventlogComponent struct {
// contains filtered or unexported fields
}
func (*EventlogComponent) Close ¶
func (c *EventlogComponent) Close() error
func (*EventlogComponent) SetPath ¶
func (c *EventlogComponent) SetPath(path string)