store

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SolverStoreMemory

type SolverStoreMemory struct {
	// contains filtered or unexported fields
}

func NewSolverStoreMemory

func NewSolverStoreMemory() (*SolverStoreMemory, error)

func (*SolverStoreMemory) AddAllowedResourceProvider

func (store *SolverStoreMemory) AddAllowedResourceProvider(resourceProvider string) (string, error)

func (*SolverStoreMemory) AddBulkMatchDecisions added in v2.22.0

func (s *SolverStoreMemory) AddBulkMatchDecisions(records []data.MatchDecision) error

* Note: This is being added here as a formaility to statisfy the interface definition. Since this is an in-memory map we don't have the bottle neck of database writes, thus can loop through and add the records one by one

func (*SolverStoreMemory) AddDeal

func (*SolverStoreMemory) AddJobOffer

func (s *SolverStoreMemory) AddJobOffer(jobOffer data.JobOfferContainer) (*data.JobOfferContainer, error)

func (*SolverStoreMemory) AddMatchDecision

func (s *SolverStoreMemory) AddMatchDecision(resourceOffer string, jobOffer string, deal string, result bool) (*data.MatchDecision, error)

func (*SolverStoreMemory) AddResourceOffer

func (s *SolverStoreMemory) AddResourceOffer(resourceOffer data.ResourceOfferContainer) (*data.ResourceOfferContainer, error)

func (*SolverStoreMemory) AddResult

func (s *SolverStoreMemory) AddResult(result data.Result) (*data.Result, error)

func (*SolverStoreMemory) GetAllowedResourceProviders

func (store *SolverStoreMemory) GetAllowedResourceProviders() ([]string, error)

func (*SolverStoreMemory) GetDeal

func (s *SolverStoreMemory) GetDeal(id string) (*data.DealContainer, error)

func (*SolverStoreMemory) GetDeals

func (s *SolverStoreMemory) GetDeals(query store.GetDealsQuery) ([]data.DealContainer, error)

func (*SolverStoreMemory) GetDealsAll

func (s *SolverStoreMemory) GetDealsAll() ([]data.DealContainer, error)

func (*SolverStoreMemory) GetJobOffer

func (s *SolverStoreMemory) GetJobOffer(id string) (*data.JobOfferContainer, error)

func (*SolverStoreMemory) GetJobOffers

func (*SolverStoreMemory) GetMatchDecision

func (s *SolverStoreMemory) GetMatchDecision(resourceOffer string, jobOffer string) (*data.MatchDecision, error)

func (*SolverStoreMemory) GetMatchDecisions

func (s *SolverStoreMemory) GetMatchDecisions() ([]data.MatchDecision, error)

func (*SolverStoreMemory) GetResourceOffer

func (s *SolverStoreMemory) GetResourceOffer(id string) (*data.ResourceOfferContainer, error)

func (*SolverStoreMemory) GetResourceOffers

func (*SolverStoreMemory) GetResult

func (s *SolverStoreMemory) GetResult(id string) (*data.Result, error)

func (*SolverStoreMemory) GetResults

func (s *SolverStoreMemory) GetResults() ([]data.Result, error)

func (*SolverStoreMemory) RemoveAllowedResourceProvider

func (store *SolverStoreMemory) RemoveAllowedResourceProvider(resourceProvider string) error

func (*SolverStoreMemory) RemoveDeal

func (s *SolverStoreMemory) RemoveDeal(id string) error

func (*SolverStoreMemory) RemoveJobOffer

func (s *SolverStoreMemory) RemoveJobOffer(id string) error

func (*SolverStoreMemory) RemoveMatchDecision

func (s *SolverStoreMemory) RemoveMatchDecision(resourceOffer string, jobOffer string) error

func (*SolverStoreMemory) RemoveResourceOffer

func (s *SolverStoreMemory) RemoveResourceOffer(id string) error

func (*SolverStoreMemory) RemoveResult

func (s *SolverStoreMemory) RemoveResult(id string) error

func (*SolverStoreMemory) UpdateDealDownloadTime

func (s *SolverStoreMemory) UpdateDealDownloadTime(id string, timestamp int) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateDealMediator

func (s *SolverStoreMemory) UpdateDealMediator(id string, mediator string) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateDealState

func (s *SolverStoreMemory) UpdateDealState(id string, state uint8) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateDealTransactionsJobCreator

func (s *SolverStoreMemory) UpdateDealTransactionsJobCreator(id string, data data.DealTransactionsJobCreator) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateDealTransactionsMediator

func (s *SolverStoreMemory) UpdateDealTransactionsMediator(id string, data data.DealTransactionsMediator) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateDealTransactionsResourceProvider

func (s *SolverStoreMemory) UpdateDealTransactionsResourceProvider(id string, data data.DealTransactionsResourceProvider) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateDealUploadTime

func (s *SolverStoreMemory) UpdateDealUploadTime(id string, timestamp int) (*data.DealContainer, error)

func (*SolverStoreMemory) UpdateJobOfferState

func (s *SolverStoreMemory) UpdateJobOfferState(id string, dealID string, state uint8) (*data.JobOfferContainer, error)

func (*SolverStoreMemory) UpdateResourceOfferState

func (s *SolverStoreMemory) UpdateResourceOfferState(id string, dealID string, state uint8) (*data.ResourceOfferContainer, error)

Jump to

Keyboard shortcuts

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