Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// CacheDir is used By default for caching CNI network state
CacheDir = "/var/lib/cni/accelerated-bridge"
)
Functions ¶
This section is empty.
Types ¶
type FileSystemOps ¶
type FileSystemOps interface { // Eqivalent to ioutil.ReadFile(...) ReadFile(filename string) ([]byte, error) // Eqivalent to ioutil.WriteFile(...) WriteFile(filename string, data []byte, perm os.FileMode) error // Eqivalent to os.MkdirAll(...) MkdirAll(path string, perm os.FileMode) error // Equivalent to os.Remove(...) Remove(name string) error // Equvalent to os.Stat(...) Stat(name string) (os.FileInfo, error) }
interface consolidating all file system operations
type FsStateCache ¶
type FsStateCache struct {
// contains filtered or unexported fields
}
func (*FsStateCache) Delete ¶
func (sc *FsStateCache) Delete(ref StateRef) error
func (*FsStateCache) GetStateRef ¶
func (sc *FsStateCache) GetStateRef(network, cid, ifname string) StateRef
func (*FsStateCache) Load ¶
func (sc *FsStateCache) Load(ref StateRef, state interface{}) error
func (*FsStateCache) Save ¶
func (sc *FsStateCache) Save(ref StateRef, state interface{}) error
type StateCache ¶
type StateCache interface { // Get State reference identifier for <networkName, containerID, interfaceName> GetStateRef(network string, cid string, ifname string) StateRef // Save state to cache Save(ref StateRef, state interface{}) error // Load state from cache Load(ref StateRef, state interface{}) error // Delete state from cache Delete(ref StateRef) error }
func NewStateCache ¶
func NewStateCache() StateCache
Create a new state Cache that will Save/Load state
Click to show internal directories.
Click to hide internal directories.