Back to godoc.org

Package cc_messages

v0.0.0-...-c38d8be
Latest Go to latest

The highest tagged major version is .

Published: Jun 22, 2018 | License: Apache-2.0 | Module: code.cloudfoundry.org/runtimeschema

Index

Constants

const (
	TaskStatePending   = "PENDING"
	TaskStateRunning   = "RUNNING"
	TaskStateCanceling = "CANCELING"
	TaskStateSucceeded = "SUCCEEDED"
)
const AppLRPDomain = "cf-apps"
const CC_HTTP_ROUTES = "http_routes"
const CC_TCP_ROUTES = "tcp_routes"
const CUSTOM_BUILDPACK = "custom"
const CcBuildArtifactsUploadUriKey = "cc-build-artifacts-upload-uri"
const CcDropletUploadUriKey = "cc-droplet-upload-uri"
const CcTimeoutKey = "timeout"
const RunningTaskDomain = "cf-tasks"
const StagingTaskDomain = "cf-app-staging"

type AppCrashedRequest

type AppCrashedRequest struct {
	Instance        string `json:"instance"`
	Index           int    `json:"index"`
	CellID          string `json:"cell_id"`
	Reason          string `json:"reason"`
	ExitStatus      int    `json:"exit_status,omitempty"`
	ExitDescription string `json:"exit_description,omitempty"`
	CrashCount      int    `json:"crash_count"`
	CrashTimestamp  int64  `json:"crash_timestamp"`
}

type Buildpack

type Buildpack struct {
	Name       string `json:"name"`
	Key        string `json:"key"`
	Url        string `json:"url"`
	SkipDetect bool   `json:"skip_detect"`
}

type BuildpackStagingData

type BuildpackStagingData struct {
	AppBitsDownloadUri             string      `json:"app_bits_download_uri"`
	BuildArtifactsCacheDownloadUri string      `json:"build_artifacts_cache_download_uri,omitempty"`
	BuildArtifactsCacheUploadUri   string      `json:"build_artifacts_cache_upload_uri"`
	Buildpacks                     []Buildpack `json:"buildpacks"`
	DropletUploadUri               string      `json:"droplet_upload_uri"`
	Stack                          string      `json:"stack"`
}

type CCBulkToken

type CCBulkToken struct {
	Id int `json:"id"`
}

type CCDesiredAppFingerprint

type CCDesiredAppFingerprint struct {
	ProcessGuid string `json:"process_guid"`
	ETag        string `json:"etag"`
}

type CCDesiredStateFingerprintResponse

type CCDesiredStateFingerprintResponse struct {
	Fingerprints []CCDesiredAppFingerprint `json:"fingerprints"`
	CCBulkToken  *json.RawMessage          `json:"token"`
}

type CCDesiredStateServerResponse

type CCDesiredStateServerResponse struct {
	Apps        []DesireAppRequestFromCC `json:"apps"`
	CCBulkToken *json.RawMessage         `json:"token"`
}

type CCHTTPRoute

type CCHTTPRoute struct {
	Hostname        string `json:"hostname"`
	RouteServiceUrl string `json:"route_service_url,omitempty"`
	Port            uint32 `json:"port,omitempty"`
}

type CCHTTPRoutes

type CCHTTPRoutes []CCHTTPRoute

func (CCHTTPRoutes) CCRouteInfo

func (r CCHTTPRoutes) CCRouteInfo() (CCRouteInfo, error)

type CCRouteInfo

type CCRouteInfo map[string]*json.RawMessage

type CCTCPRoute

type CCTCPRoute struct {
	RouterGroupGuid string `json:"router_group_guid"`
	ExternalPort    uint32 `json:"external_port,omitempty"`
	ContainerPort   uint32 `json:"container_port,omitempty"`
}

type CCTCPRoutes

type CCTCPRoutes []CCTCPRoute

func (CCTCPRoutes) CCRouteInfo

func (r CCTCPRoutes) CCRouteInfo() (CCRouteInfo, error)

type CCTaskState

type CCTaskState struct {
	TaskGuid              string `json:"task_guid"`
	State                 string `json:"state"`
	CompletionCallbackUrl string `json:"completion_callback"`
}

type CCTaskStatesResponse

type CCTaskStatesResponse struct {
	TaskStates  []CCTaskState    `json:"task_states"`
	CCBulkToken *json.RawMessage `json:"token"`
}

type DesireAppRequestFromCC

type DesireAppRequestFromCC struct {
	ProcessGuid                 string                        `json:"process_guid"`
	DropletUri                  string                        `json:"droplet_uri"`
	DropletHash                 string                        `json:"droplet_hash"`
	DockerImageUrl              string                        `json:"docker_image"`
	DockerLoginServer           string                        `json:"docker_login_server,omitempty"`
	DockerUser                  string                        `json:"docker_user,omitempty"`
	DockerPassword              string                        `json:"docker_password,omitempty"`
	DockerEmail                 string                        `json:"docker_email,omitempty"`
	Stack                       string                        `json:"stack"`
	StartCommand                string                        `json:"start_command"`
	ExecutionMetadata           string                        `json:"execution_metadata"`
	Environment                 []*models.EnvironmentVariable `json:"environment"`
	MemoryMB                    int                           `json:"memory_mb"`
	DiskMB                      int                           `json:"disk_mb"`
	FileDescriptors             uint64                        `json:"file_descriptors"`
	NumInstances                int                           `json:"num_instances"`
	RoutingInfo                 CCRouteInfo                   `json:"routing_info"`
	AllowSSH                    bool                          `json:"allow_ssh"`
	LogGuid                     string                        `json:"log_guid"`
	HealthCheckType             HealthCheckType               `json:"health_check_type"`
	HealthCheckHTTPEndpoint     string                        `json:"health_check_http_endpoint"`
	HealthCheckTimeoutInSeconds uint                          `json:"health_check_timeout_in_seconds"`
	EgressRules                 []*models.SecurityGroupRule   `json:"egress_rules,omitempty"`
	ETag                        string                        `json:"etag"`
	Ports                       []uint32                      `json:"ports,omitempty"`
	LogSource                   string                        `json:"log_source,omitempty"`
	Network                     *models.Network               `json:"network,omitempty"`
	VolumeMounts                []*VolumeMount                `json:"volume_mounts"`
	IsolationSegment            string                        `json:"isolation_segment"`
}

type DockerStagingData

type DockerStagingData struct {
	DockerImageUrl    string `json:"docker_image"`
	DockerLoginServer string `json:"docker_login_server,omitempty"`
	DockerUser        string `json:"docker_user,omitempty"`
	DockerPassword    string `json:"docker_password,omitempty"`
	DockerEmail       string `json:"docker_email,omitempty"`
}

type HealthCheckType

type HealthCheckType string
const HTTPHealthCheckType HealthCheckType = "http"
const NoneHealthCheckType HealthCheckType = "none"
const PortHealthCheckType HealthCheckType = "port"
const UnspecifiedHealthCheckType HealthCheckType = "" // backwards-compatibility

type LRPInstance

type LRPInstance struct {
	ProcessGuid  string                  `json:"process_guid"`
	InstanceGuid string                  `json:"instance_guid"`
	Index        uint                    `json:"index"`
	State        LRPInstanceState        `json:"state"`
	Details      string                  `json:"details,omitempty"`
	Host         string                  `json:"host,omitempty"`
	Port         uint16                  `json:"port,omitempty"`
	NetInfo      models.ActualLRPNetInfo `json:"net_info"`
	Uptime       int64                   `json:"uptime"`
	Since        int64                   `json:"since"`
	Stats        *LRPInstanceStats       `json:"stats,omitempty"`
}

type LRPInstanceState

type LRPInstanceState string
const (
	LRPInstanceStateStarting LRPInstanceState = "STARTING"
	LRPInstanceStateRunning  LRPInstanceState = "RUNNING"
	LRPInstanceStateCrashed  LRPInstanceState = "CRASHED"
	LRPInstanceStateDown     LRPInstanceState = "DOWN"
	LRPInstanceStateUnknown  LRPInstanceState = "UNKNOWN"
)

type LRPInstanceStats

type LRPInstanceStats struct {
	Time          time.Time `json:"time"`
	CpuPercentage float64   `json:"cpu"`
	MemoryBytes   uint64    `json:"mem"`
	DiskBytes     uint64    `json:"disk"`
}

type SharedDevice

type SharedDevice struct {
	VolumeId    string                 `json:"volume_id"`
	MountConfig map[string]interface{} `json:"mount_config,omitempty"`
}

type StagingError

type StagingError struct {
	Id      StagingErrorID `json:"id"`
	Message string         `json:"message"`
}

type StagingErrorID

type StagingErrorID string
const (
	STAGING_ERROR            StagingErrorID = "StagingError"
	INSUFFICIENT_RESOURCES   StagingErrorID = "InsufficientResources"
	NO_COMPATIBLE_CELL       StagingErrorID = "NoCompatibleCell"
	CELL_COMMUNICATION_ERROR StagingErrorID = "CellCommunicationError"
	BUILDPACK_DETECT_FAILED  StagingErrorID = "NoAppDetectedError"
	BUILDPACK_COMPILE_FAILED StagingErrorID = "BuildpackCompileFailed"
	BUILDPACK_RELEASE_FAILED StagingErrorID = "BuildpackReleaseFailed"
)

type StagingRequestFromCC

type StagingRequestFromCC struct {
	AppId              string                        `json:"app_id"`
	FileDescriptors    int                           `json:"file_descriptors"`
	MemoryMB           int                           `json:"memory_mb"`
	DiskMB             int                           `json:"disk_mb"`
	Environment        []*models.EnvironmentVariable `json:"environment"`
	EgressRules        []*models.SecurityGroupRule   `json:"egress_rules,omitempty"`
	Timeout            int                           `json:"timeout"`
	LogGuid            string                        `json:"log_guid"`
	Lifecycle          string                        `json:"lifecycle"`
	LifecycleData      *json.RawMessage              `json:"lifecycle_data,omitempty"`
	CompletionCallback string                        `json:"completion_callback"`
	IsolationSegment   string                        `json:"isolation_segment"`
}

type StagingResponseForCC

type StagingResponseForCC struct {
	Error  *StagingError    `json:"error,omitempty"`
	Result *json.RawMessage `json:"result,omitempty"`
}

type StagingTaskAnnotation

type StagingTaskAnnotation struct {
	Lifecycle          string `json:"lifecycle"`
	CompletionCallback string `json:"completion_callback"`
}

type TaskError

type TaskError struct {
	Id      TaskErrorID `json:"id"`
	Message string      `json:"message"`
}

type TaskErrorID

type TaskErrorID string

type TaskFailResponseForCC

type TaskFailResponseForCC struct {
	TaskGuid      string `json:"task_guid"`
	Failed        bool   `json:"failed"`
	FailureReason string `json:"failure_reason"`
}

type TaskRequestFromCC

type TaskRequestFromCC struct {
	TaskGuid              string                        `json:"task_guid"`
	LogGuid               string                        `json:"log_guid"`
	MemoryMb              int                           `json:"memory_mb"`
	DiskMb                int                           `json:"disk_mb"`
	Lifecycle             string                        `json:"lifecycle"`
	EnvironmentVariables  []*models.EnvironmentVariable `json:"environment"`
	EgressRules           []*models.SecurityGroupRule   `json:"egress_rules,omitempty"`
	DropletUri            string                        `json:"droplet_uri"`
	DropletHash           string                        `json:"droplet_hash"`
	DockerPath            string                        `json:"docker_path"`
	DockerUser            string                        `json:"docker_user,omitempty"`
	DockerPassword        string                        `json:"docker_password,omitempty"`
	RootFs                string                        `json:"rootfs"`
	CompletionCallbackUrl string                        `json:"completion_callback"`
	Command               string                        `json:"command"`
	LogSource             string                        `json:"log_source,omit_empty"`
	VolumeMounts          []*VolumeMount                `json:"volume_mounts"`
	IsolationSegment      string                        `json:"isolation_segment"`
}

type VolumeMount

type VolumeMount struct {
	Driver       string       `json:"driver"`
	ContainerDir string       `json:"container_dir"`
	Mode         string       `json:"mode"`
	DeviceType   string       `json:"device_type"`
	Device       SharedDevice `json:"device"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier