Documentation
¶
Overview ¶
Package storage defines bootcfg's storage and object types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGroupNotFound = errors.New("storage: No Group found") ErrProfileNotFound = errors.New("storage: No Profile found") )
Storage errors
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir string
Dir implements access to a collection of named files, restricted to a specific directory tree. It is very similar to net/http.Dir, but provides write access and some io/ioutil utilities. An empty directory is treated as ".".
type Store ¶
type Store interface { // GroupPut creates or updates a Group. GroupPut(group *storagepb.Group) error // GroupGet returns a machine Group by id. GroupGet(id string) (*storagepb.Group, error) // GroupList lists all machine Groups. GroupList() ([]*storagepb.Group, error) // ProfilePut creates or updates a Profile. ProfilePut(profile *storagepb.Profile) error // ProfileGet gets a profile by id. ProfileGet(id string) (*storagepb.Profile, error) // ProfileList lists all profiles. ProfileList() ([]*storagepb.Profile, error) // IgnitionPut creates or updates an Ignition template. IgnitionPut(name string, config []byte) error // IgnitionGet gets an Ignition template by name. IgnitionGet(name string) (string, error) // CloudGet gets a Cloud-Config template by name. CloudGet(name string) (string, error) // GenericGet gets a generic template by name. GenericGet(name string) (string, error) }
A Store stores machine Groups, Profiles, and Configs.
func NewFileStore ¶
NewFileStore returns a new memory-backed Store.
Directories
¶
Path | Synopsis |
---|---|
Package storagepb provides storage protobuf client and server interfaces.
|
Package storagepb provides storage protobuf client and server interfaces. |
Package testfakes provides shared storage implementations for testing.
|
Package testfakes provides shared storage implementations for testing. |
Click to show internal directories.
Click to hide internal directories.