Documentation ¶
Overview ¶
Copyright 2019 Intel Corporation.
SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateManager ¶
type StateManager interface { // Create creates an entry in the state with given id and data Create(id string, data interface{}) error // Delete deletes an entry found with the id from the state Delete(id string) error // Get retrives the entry data into location pointed by dataPtr. Get(id string, dataPtr interface{}) error // GetAll retrieves ids of all entries found in the state GetAll() ([]string, error) }
StateManager manages the driver persistent state, i.e, volumes information
func NewFileState ¶
func NewFileState(directory string) (StateManager, error)
NewFileState instantiates the file state manager with given directory location. It ensures the provided directory exists. State entries are mapped to files with the .json suffix in that directory and vice versa. Other directory content is ignored, which makes it possible to use the directory also for other state information.
Click to show internal directories.
Click to hide internal directories.