Documentation ¶
Index ¶
- type Engine
- func (e *Engine) CreateDirectory(target string) error
- func (e *Engine) CreateKey(target string, contents []byte) error
- func (e *Engine) CurrentSchemaVersion() int64
- func (e *Engine) DeleteDirectory(target string) error
- func (e *Engine) DeleteKey(target string) error
- func (e *Engine) Name() string
- func (e *Engine) UpdateSchemaVersion(newVersion int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is a migration engine for an etcd v2 datastore.
func (*Engine) CreateDirectory ¶
CreateDirectory creates a directory at the target path.
func (*Engine) CurrentSchemaVersion ¶
CurrentSchemaVersion returns the version of the last migration which was successfully run. If no previous migrations have been run, the schema version is 0. If there's any error besides "key doesn't exist", execution is aborted.
func (*Engine) DeleteDirectory ¶
DeleteDirectory will recursively delete a target directory.
func (*Engine) UpdateSchemaVersion ¶
UpdateSchemaVersion records the version number of the latest migration which successfully ran. If the new version number is <= the current version number, it will log a fatal error.
Click to show internal directories.
Click to hide internal directories.