Documentation ¶
Index ¶
- Constants
- func CountMachinesPerTemplateAndEnvironment(vmLister hfListers.VirtualMachineLister, template string, enviroment string) (int, error)
- func CountMachinesPerTemplateAndEnvironmentAndScheduledEvent(vmLister hfListers.VirtualMachineLister, template string, enviroment string, ...) (int, error)
- func EnsureVMNotReady(hfClientset hfClientset.Interface, vmLister hfListers.VirtualMachineLister, ...) error
- func GenKeyPair() (string, string, error)
- func GenerateResourceName(prefix string, input string, hashlength int) string
- func GetHTTPErrorCode(httpStatus int) string
- func GetLock(lockName string, cfg *rest.Config) (resourcelock.Interface, error)
- func GetProtoMarshaller() protojson.MarshalOptions
- func GetReleaseNamespace() string
- func GetVMConfig(env *hfv1.Environment, vmt *hfv1.VirtualMachineTemplate) map[string]string
- func Max(x, y int) int
- func RandStringRunes(n int) string
- func ResourceVersionAtLeast(curr, min string) bool
- func ReturnHTTPContent(w http.ResponseWriter, r *http.Request, httpStatus int, messageType string, ...)
- func ReturnHTTPMessage(w http.ResponseWriter, r *http.Request, httpStatus int, messageType string, ...)
- func ReturnHTTPRaw(w http.ResponseWriter, r *http.Request, content string)
- func StringInSlice(a string, list []string) bool
- func StringPtr(s string) *string
- func UniqueStringSlice(stringSlice []string) []string
- func VerifySession(sLister hfListers.SessionLister, s *hfv1.Session) error
- func VerifyVM(vmLister hfListers.VirtualMachineLister, vm *hfv1.VirtualMachine) error
- func VerifyVMClaim(vmClaimLister hfListers.VirtualMachineClaimLister, ...) error
- func VerifyVMDeleted(vmLister hfListers.VirtualMachineLister, vm *hfv1.VirtualMachine) error
- func VerifyVMSet(vmSetLister hfListers.VirtualMachineSetLister, vms *hfv1.VirtualMachineSet) error
- func VirtualMachinesUsedDuringPeriod(hfClientset hfClientset.Interface, environment string, startString string, ...) (map[time.Time]map[string]int, map[string]int, error)
- type ByTime
- type HTTPContent
- type HTTPMessage
- type Maximus
- type Range
Constants ¶
View Source
const ( AccessCodeLabel = "hobbyfarm.io/accesscode" OneTimeAccessCodeLabel = "hobbyfarm.io/otac" ScheduledEventLabel = "hobbyfarm.io/scheduledevent" SessionLabel = "hobbyfarm.io/session" UserLabel = "hobbyfarm.io/user" RBACManagedLabel = "rbac.hobbyfarm.io/managed" EnvironmentLabel = "hobbyfarm.io/environment" VirtualMachineTemplate = "hobbyfarm.io/virtualmachinetemplate" )
Variables ¶
This section is empty.
Functions ¶
func EnsureVMNotReady ¶
func EnsureVMNotReady(hfClientset hfClientset.Interface, vmLister hfListers.VirtualMachineLister, vmName string, ctx context.Context) error
func GenKeyPair ¶
func GenerateResourceName ¶
func GetHTTPErrorCode ¶
func GetProtoMarshaller ¶
func GetProtoMarshaller() protojson.MarshalOptions
func GetReleaseNamespace ¶
func GetReleaseNamespace() string
func GetVMConfig ¶
func GetVMConfig(env *hfv1.Environment, vmt *hfv1.VirtualMachineTemplate) map[string]string
func RandStringRunes ¶
func ResourceVersionAtLeast ¶
borrowed from longhorn
func ReturnHTTPContent ¶
func ReturnHTTPMessage ¶
func ReturnHTTPRaw ¶
func ReturnHTTPRaw(w http.ResponseWriter, r *http.Request, content string)
func StringInSlice ¶
func UniqueStringSlice ¶
func VerifySession ¶
func VerifySession(sLister hfListers.SessionLister, s *hfv1.Session) error
func VerifyVM ¶
func VerifyVM(vmLister hfListers.VirtualMachineLister, vm *hfv1.VirtualMachine) error
func VerifyVMClaim ¶
func VerifyVMClaim(vmClaimLister hfListers.VirtualMachineClaimLister, vmc *hfv1.VirtualMachineClaim) error
func VerifyVMDeleted ¶
func VerifyVMDeleted(vmLister hfListers.VirtualMachineLister, vm *hfv1.VirtualMachine) error
func VerifyVMSet ¶
func VerifyVMSet(vmSetLister hfListers.VirtualMachineSetLister, vms *hfv1.VirtualMachineSet) error
func VirtualMachinesUsedDuringPeriod ¶
func VirtualMachinesUsedDuringPeriod(hfClientset hfClientset.Interface, environment string, startString string, endString string, ctx context.Context) (map[time.Time]map[string]int, map[string]int, error)
Calculates available virtualMachineTemplates for a given period (startString, endString) and environment Returns a map with timestamps and corresponding availability of virtualmachines. Also returns the maximum available count of virtualmachinetemplates over the whole duration.
Types ¶
type HTTPContent ¶
type HTTPMessage ¶
Click to show internal directories.
Click to hide internal directories.