model

package
Version: v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AsyncEntryType string = "Async"
View Source
const SyncEntryType string = "Sync"

Variables

View Source
var TypeMismatchError = errors.New("QosEntry type mismatch")

Functions

This section is empty.

Types

type AsyncQosEndpoint

type AsyncQosEndpoint struct {
	Entries         []QosEntryModel `json:"entries"`
	FlavorReference FlavorReference `json:"flavorReference"`
}

type AsyncQosEntryModel

type AsyncQosEntryModel string

func (*AsyncQosEntryModel) MarshalJSON

func (a *AsyncQosEntryModel) MarshalJSON() ([]byte, error)

func (*AsyncQosEntryModel) UnmarshalJSON

func (a *AsyncQosEntryModel) UnmarshalJSON(data []byte) error

type AsyncQosRunResult

type AsyncQosRunResult QosRunResult

func NotFoundAsyncResult

func NotFoundAsyncResult(transactionId int64, statusMessage string) AsyncQosRunResult

func SuccessAsyncResult

func SuccessAsyncResult(transactionId int64, statusMessage string, result float64, entryName string) AsyncQosRunResult

type FlavorReference

type FlavorReference struct {
	Name          string `json:"name"`
	Principal     string `json:"principal"`
	Environment   string `json:"environment"`
	FlavorName    string `json:"flavorName"`
	FlavorVersion string `json:"flavorVersion"`
}

func CurrentFlavor

func CurrentFlavor() FlavorReference

type QosEntryModel

type QosEntryModel struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type QosRunResult

type QosRunResult struct {
	Id              int64           `json:"id"`
	ProducedOn      time.Time       `json:"producedOn"`
	Status          QosRunStatus    `json:"status"`
	StatusMessage   string          `json:"statusMessage"`
	Score           *float64        `json:"score"`
	QosEntry        *QosEntryModel  `json:"qosEntry"`
	FlavorReference FlavorReference `json:"flavorReference"`
}

type QosRunStatus

type QosRunStatus int
const (
	SUCCESS QosRunStatus = iota
	FAILED
	NOT_FOUND
	RUNNING
)

type SyncQosEndpoint

type SyncQosEndpoint struct {
	Entries         []QosEntryModel         `json:"entries"`
	FlavorReference FlavorReference         `json:"flavorReference"`
	PodReference    kubernetes.PodReference `json:"podReference"`
}

type SyncQosEntryModel

type SyncQosEntryModel string

func (*SyncQosEntryModel) MarshalJSON

func (s *SyncQosEntryModel) MarshalJSON() ([]byte, error)

func (*SyncQosEntryModel) UnmarshalJSON

func (s *SyncQosEntryModel) UnmarshalJSON(data []byte) error

type SyncQosRunResult

type SyncQosRunResult struct {
	QosRunResult `json:",inline"`
	PodReference kubernetes.PodReference `json:"podReference"`
}

func FailedSyncResult

func FailedSyncResult(transactionId int64, statusMessage string, entryName string) SyncQosRunResult

func NotFoundSyncResult

func NotFoundSyncResult(transactionId int64, statusMessage string) SyncQosRunResult

func SuccessSyncResult

func SuccessSyncResult(transactionId int64, statusMessage string, result float64, entryName string) SyncQosRunResult

Jump to

Keyboard shortcuts

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