scenario

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package scenario defines types and utils used in the scenario

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInBytes

func GetInBytes(unit string, unitName string) (int64, error)

GetInBytes takes in a formatted size string and returns the size specified by this string in bytes. It errors if the size is below zero.

Types

type NodeResources

type NodeResources struct {
	// The UUID of the node
	UUID uuid.UUID

	// The amount of bytes of memory
	Memory int64

	// The amount of milli CPUs in Kubernetes
	CPU int64

	// The amount of bytes of storage
	Storage int64

	// The amount of bytes of ephemeral storage
	EphemeralStorage int64

	// The max amount of pods in Kubernetes
	MaxPods int64

	// Identifier for type of node
	Label string
}

NodeResources describe the resources of a single node, including the UUID of that node

type PodStatus

type PodStatus int

PodStatus specifies the pod status

const (
	// PodStatusUnset means there is no status set, used as a default
	PodStatusUnset PodStatus = iota
	// PodStatusPending means the pod is in the pending state
	PodStatusPending
	// PodStatusRunning means the pod is in the running state
	PodStatusRunning
	// PodStatusSucceeded means the pod is in the succeeded state
	PodStatusSucceeded
	// PodStatusFailed means the pod is in the failed state
	PodStatusFailed
	// PodStatusUnknown means the pod is in an unknown state
	PodStatusUnknown
)

type Response

type Response int

Response specifies the response type

const (
	// ResponseUnset No response
	ResponseUnset Response = iota
	// ResponseNormal will respond normally to the request
	ResponseNormal
	// ResponseTimeout will timeout any request
	ResponseTimeout
	// ResponseError will error on any request
	ResponseError
)

Directories

Path Synopsis
Package events lists all the events supported by the Apatelet
Package events lists all the events supported by the Apatelet

Jump to

Keyboard shortcuts

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