Documentation ¶
Index ¶
- Variables
- type BoltStorage
- func (b *BoltStorage) Add(twin uint32, deployment uint64, workload gridtypes.Workload) error
- func (b *BoltStorage) ByTwin(twin uint32) ([]uint64, error)
- func (b *BoltStorage) Capacity() (cap gridtypes.Capacity, err error)
- func (b *BoltStorage) Changes(twin uint32, deployment uint64) (changes []gridtypes.Workload, err error)
- func (b *BoltStorage) Close() error
- func (b *BoltStorage) Create(deployment gridtypes.Deployment) error
- func (b *BoltStorage) Current(twin uint32, deployment uint64, name gridtypes.Name) (gridtypes.Workload, error)
- func (b *BoltStorage) Delete(twin uint32, deployment uint64) error
- func (b *BoltStorage) Error(twinID uint32, dl uint64, e error) error
- func (b *BoltStorage) Get(twin uint32, deployment uint64) (dl gridtypes.Deployment, err error)
- func (b BoltStorage) Migration() MigrationStorage
- func (b *BoltStorage) Remove(twin uint32, deployment uint64, name gridtypes.Name) error
- func (b *BoltStorage) Transaction(twin uint32, deployment uint64, workload gridtypes.Workload) error
- func (b *BoltStorage) Twins() ([]uint32, error)
- func (b *BoltStorage) Update(twin uint32, deployment uint64, field ...provision.Field) error
- type MigrationStorage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTransactionNotExist = fmt.Errorf("no transaction found") ErrInvalidWorkloadType = fmt.Errorf("invalid workload type") )
Functions ¶
This section is empty.
Types ¶
type BoltStorage ¶
type BoltStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New(path string) (*BoltStorage, error)
func (*BoltStorage) Close ¶
func (b *BoltStorage) Close() error
func (*BoltStorage) Create ¶
func (b *BoltStorage) Create(deployment gridtypes.Deployment) error
func (*BoltStorage) Get ¶
func (b *BoltStorage) Get(twin uint32, deployment uint64) (dl gridtypes.Deployment, err error)
func (BoltStorage) Migration ¶
func (b BoltStorage) Migration() MigrationStorage
func (*BoltStorage) Transaction ¶
func (*BoltStorage) Twins ¶
func (b *BoltStorage) Twins() ([]uint32, error)
type MigrationStorage ¶
type MigrationStorage struct {
// contains filtered or unexported fields
}
func (*MigrationStorage) Migrate ¶
func (b *MigrationStorage) Migrate(dl gridtypes.Deployment) error
Migrate deployment creates an exact copy of dl in this storage. usually used to copy deployment from older storage
Click to show internal directories.
Click to hide internal directories.