services

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheService

type CacheService interface {
	AddCacheItem(key string, value interface{}, d time.Duration) error
	GetCacheItem(key string) (interface{}, error)
	GetAllComputeConfigurations() ([]ultron.ComputeConfiguration, error)
	GetEphemeralComputeConfigurations() ([]ultron.ComputeConfiguration, error)
	GetDurableComputeConfigurations() ([]ultron.ComputeConfiguration, error)
	GetWeightedNodes() ([]ultron.WeightedNode, error)
	GetWeightedInteruptionRates() ([]ultron.WeightedInteruptionRate, error)
	GetWeightedLatencyRates() ([]ultron.WeightedLatencyRate, error)
}

type ComputeService

type ComputeService interface {
	MatchPodSpec(pod *corev1.Pod) (*ultron.WeightedNode, error)
	MatchWeightedPodToComputeConfiguration(wPod ultron.WeightedPod) (*ultron.ComputeConfiguration, error)
	MatchWeightedNodeToComputeConfiguration(wNode ultron.WeightedNode) (*ultron.ComputeConfiguration, error)
	MatchWeightedPodToWeightedNode(wPod ultron.WeightedPod) (*ultron.WeightedNode, error)
	CalculateWeightedNodeMedianPrice(wNode ultron.WeightedNode) (float64, error)
	ComputeConfigurationMatchesWeightedNodeRequirements(computeConfiguration ultron.ComputeConfiguration, wNode ultron.WeightedNode) bool
	ComputeConfigurationMatchesWeightedPodRequirements(computeConfiguration ultron.ComputeConfiguration, wPod ultron.WeightedPod) bool
	ComputeInteruptionRateForWeightedNode(wNode ultron.WeightedNode) (*ultron.WeightedInteruptionRate, error)
	ComputeLatencyRateForWeightedNode(wNode ultron.WeightedNode) (*ultron.WeightedLatencyRate, error)
}

type ICacheService

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

func NewICacheService

func NewICacheService(innerCache *cache.Cache, redisClient *redis.Client) *ICacheService

func (*ICacheService) AddCacheItem

func (c *ICacheService) AddCacheItem(key string, value interface{}, d time.Duration) error

func (*ICacheService) GetAllComputeConfigurations

func (c *ICacheService) GetAllComputeConfigurations() ([]ultron.ComputeConfiguration, error)

func (*ICacheService) GetCacheItem

func (c *ICacheService) GetCacheItem(key string) (interface{}, error)

func (*ICacheService) GetDurableComputeConfigurations

func (c *ICacheService) GetDurableComputeConfigurations() ([]ultron.ComputeConfiguration, error)

func (*ICacheService) GetEphemeralComputeConfigurations

func (c *ICacheService) GetEphemeralComputeConfigurations() ([]ultron.ComputeConfiguration, error)

func (*ICacheService) GetWeightedInteruptionRates

func (c *ICacheService) GetWeightedInteruptionRates() ([]ultron.WeightedInteruptionRate, error)

func (*ICacheService) GetWeightedLatencyRates

func (c *ICacheService) GetWeightedLatencyRates() ([]ultron.WeightedLatencyRate, error)

func (*ICacheService) GetWeightedNodes

func (c *ICacheService) GetWeightedNodes() ([]ultron.WeightedNode, error)

type IComputeService

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

func NewIComputeService

func NewIComputeService(algorithm algorithm.Algorithm, cacheService CacheService, mapper mapper.Mapper) *IComputeService

func (IComputeService) CalculateWeightedNodeMedianPrice

func (cs IComputeService) CalculateWeightedNodeMedianPrice(wNode ultron.WeightedNode) (float64, error)

func (IComputeService) ComputeConfigurationMatchesWeightedNodeRequirements

func (cs IComputeService) ComputeConfigurationMatchesWeightedNodeRequirements(computeConfiguration ultron.ComputeConfiguration, wNode ultron.WeightedNode) bool

func (IComputeService) ComputeConfigurationMatchesWeightedPodRequirements

func (cs IComputeService) ComputeConfigurationMatchesWeightedPodRequirements(computeConfiguration ultron.ComputeConfiguration, wPod ultron.WeightedPod) bool

func (IComputeService) ComputeInteruptionRateForWeightedNode

func (cs IComputeService) ComputeInteruptionRateForWeightedNode(wNode ultron.WeightedNode) (match *ultron.WeightedInteruptionRate, err error)

func (IComputeService) ComputeLatencyRateForWeightedNode

func (cs IComputeService) ComputeLatencyRateForWeightedNode(wNode ultron.WeightedNode) (match *ultron.WeightedLatencyRate, err error)

func (IComputeService) MatchPodSpec

func (cs IComputeService) MatchPodSpec(pod *corev1.Pod) (*ultron.WeightedNode, error)

func (IComputeService) MatchWeightedNodeToComputeConfiguration

func (cs IComputeService) MatchWeightedNodeToComputeConfiguration(wNode ultron.WeightedNode) (*ultron.ComputeConfiguration, error)

func (IComputeService) MatchWeightedPodToComputeConfiguration

func (cs IComputeService) MatchWeightedPodToComputeConfiguration(wPod ultron.WeightedPod) (*ultron.ComputeConfiguration, error)

func (IComputeService) MatchWeightedPodToWeightedNode

func (cs IComputeService) MatchWeightedPodToWeightedNode(pod ultron.WeightedPod) (*ultron.WeightedNode, error)

Jump to

Keyboard shortcuts

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