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 GetAllFunc ¶
GetAllFunc callback function used for StateManager.GetAll(). This function is called with ID, for each entry found in the state.
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 all entries found in the state, foreach functions is // called with id for every entry found in the state, and entry data is filled in dataPtr. // the caller has to copy the data if needed. GetAll(dataPtr interface{}, foreach GetAllFunc) 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. Returns error, if fails to create the direcotry incase of not pre-existing.
Click to show internal directories.
Click to hide internal directories.