api

package
v0.0.0-...-db62745 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunningState            = "RUNNING"
	PendingState            = "CLAIMED"
	ErrorState              = "UNCLAIMED"
	CrashedState            = "CRASHED"
	UnknownState            = "UNKNOWN"
	InsufficientMemoryError = "Insufficient resources: memory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Healthcheck

type Healthcheck struct {
	Type      string
	Port      int32
	Endpoint  string
	TimeoutMs uint
}

type Instance

type Instance struct {
	Index          int
	Since          int64
	State          string
	PlacementError string
}

type LRP

type LRP struct {
	LRPIdentifier
	ProcessType            string
	AppName                string
	AppGUID                string
	OrgName                string
	OrgGUID                string
	SpaceName              string
	SpaceGUID              string
	Image                  string
	Command                []string
	Sidecars               []Sidecar
	PrivateRegistry        *PrivateRegistry
	Env                    map[string]string
	Health                 Healthcheck
	Ports                  []int32
	TargetInstances        int
	RunningInstances       int
	MemoryMB               int64
	DiskMB                 int64
	CPUWeight              uint8
	VolumeMounts           []VolumeMount
	LRP                    string
	LastUpdated            string
	UserDefinedAnnotations map[string]string
}

An LRP, or long-running-process, is a stateless process where the scheduler should attempt to keep N copies running, killing and recreating as needed to maintain that guarantee.

type LRPIdentifier

type LRPIdentifier struct {
	GUID, Version string
}

func (*LRPIdentifier) ProcessGUID

func (i *LRPIdentifier) ProcessGUID() string

type PrivateRegistry

type PrivateRegistry struct {
	Server   string
	Username string
	Password string
}

type Sidecar

type Sidecar struct {
	Name     string
	Command  []string
	MemoryMB int64
	Env      map[string]string
}

type Task

type Task struct {
	GUID               string
	Name               string
	Image              string
	CompletionCallback string
	PrivateRegistry    *PrivateRegistry
	Env                map[string]string
	Command            []string
	AppName            string
	AppGUID            string
	OrgName            string
	OrgGUID            string
	SpaceName          string
	SpaceGUID          string
	MemoryMB           int64
	DiskMB             int64
	CPUWeight          uint8
}

A Task is a one-off process that is run exactly once and returns a result.

type VolumeMount

type VolumeMount struct {
	MountPath string
	ClaimName string
}

Jump to

Keyboard shortcuts

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