scoringmgr

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package scoringmgr provides the way to apply specific scoring method for each service application

Index

Constants

View Source
const (

	// InvalidScore is used to indicate 0.0 in case of error
	InvalidScore = 0.0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Scoring

type Scoring interface {
	GetScore(ID string) (scoreValue float64, err error)
	GetScoreWithResource(resource map[string]interface{}) (scoreValue float64, err error)
	GetResource(ID string) (resource map[string]interface{}, err error)
}

Scoring is the interface to apply application specific scoring functions

type ScoringImpl

type ScoringImpl struct{}

ScoringImpl structure

func GetInstance

func GetInstance() *ScoringImpl

GetInstance gives the ScoringImpl singletone instance

func (ScoringImpl) GetResource

func (ScoringImpl) GetResource(ID string) (resource map[string]interface{}, err error)

GetResource provides resource value for running applications on local device

func (ScoringImpl) GetScore

func (ScoringImpl) GetScore(ID string) (scoreValue float64, err error)

GetScore provides score value for specific application on local device

func (ScoringImpl) GetScoreWithResource

func (ScoringImpl) GetScoreWithResource(resource map[string]interface{}) (scoreValue float64, err error)

GetScoreWithResource provides score value of an edge device

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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