storage

package
v2.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStorageUser

func RegisterStorageUser(user StorageUser)

Types

type ForEachContainerTemplateCB

type ForEachContainerTemplateCB func(job maestroSpecs.ContainerTemplate)

type ForEachJobCB

type ForEachJobCB func(job maestroSpecs.JobDefinition)

type MaestroDBInstance

type MaestroDBInstance struct {
	//	db *leveldb.DB
	Db *bolt.DB
	// contains filtered or unexported fields
}

func GetStorage

func GetStorage() (ret *MaestroDBInstance)

func InitStorage

func InitStorage(path string) (ret *MaestroDBInstance, err error)

func (*MaestroDBInstance) Close

func (this *MaestroDBInstance) Close()

func (*MaestroDBInstance) DeleteContainerTemplate

func (this *MaestroDBInstance) DeleteContainerTemplate(byname string) error

func (*MaestroDBInstance) DeleteJob

func (this *MaestroDBInstance) DeleteJob(byname string) error

func (*MaestroDBInstance) ForEachContainerTemplate

func (this *MaestroDBInstance) ForEachContainerTemplate(cb ForEachContainerTemplateCB) error

func (*MaestroDBInstance) ForEachJob

func (this *MaestroDBInstance) ForEachJob(cb ForEachJobCB) error

func (*MaestroDBInstance) GetContainerTemplateByName

func (this *MaestroDBInstance) GetContainerTemplateByName(byname string) (templ maestroSpecs.ContainerTemplate, err error)

func (*MaestroDBInstance) GetDb

func (this *MaestroDBInstance) GetDb() *bolt.DB

func (*MaestroDBInstance) GetDbName

func (this *MaestroDBInstance) GetDbName() string

func (*MaestroDBInstance) GetJobByName

func (this *MaestroDBInstance) GetJobByName(byname string) (job maestroSpecs.JobDefinition, err error)

func (*MaestroDBInstance) GetStatsConfig

func (this *MaestroDBInstance) GetStatsConfig() (ret maestroSpecs.StatsConfig, err error)

func (*MaestroDBInstance) SetStatsConfig

func (this *MaestroDBInstance) SetStatsConfig(obj maestroSpecs.StatsConfig) error

func (*MaestroDBInstance) UpsertContainerTemplate

func (this *MaestroDBInstance) UpsertContainerTemplate(obj maestroSpecs.ContainerTemplate) error

func (*MaestroDBInstance) UpsertJob

func (this *MaestroDBInstance) UpsertJob(obj maestroSpecs.JobDefinition) error

func (*MaestroDBInstance) UpsertJobAsPayload

func (this *MaestroDBInstance) UpsertJobAsPayload(obj *maestroSpecs.JobDefinitionPayload) error

type MaestroDBStorageInterface

type MaestroDBStorageInterface interface {
	GetDb() *bolt.DB
	GetDbName() string
}

type StorageReadyCB

type StorageReadyCB func(instance *MaestroDBInstance)

type StorageUser

type StorageUser interface {
	// called when the DB is open and ready
	StorageReady(instance MaestroDBStorageInterface)
	// called when the DB is initialized
	StorageInit(instance MaestroDBStorageInterface)
	// called when storage is closed
	StorageClosed(instance MaestroDBStorageInterface)
}
type StorageUser interface {
	// called when the DB is open and ready
	StorageReady(instance *MaestroDBInstance)
	// called when the DB is initialized
	StorageInit(instance *MaestroDBInstance)
	// called when storage is closed
	StorageClosed(instance *MaestroDBInstance)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL