Documentation
¶
Index ¶
- Constants
- Variables
- type ActualLRP
- type ActualLRPChange
- type ActualLRPState
- type Buildpack
- type CCBulkToken
- type CCDesiredStateServerResponse
- type CircusTailorConfig
- func (s CircusTailorConfig) AppDir() string
- func (s CircusTailorConfig) Args() []string
- func (s CircusTailorConfig) BuildArtifactsCacheDir() string
- func (s CircusTailorConfig) BuildpackOrder() []string
- func (s CircusTailorConfig) BuildpackPath(buildpackName string) string
- func (s CircusTailorConfig) BuildpacksDir() string
- func (s CircusTailorConfig) OutputDropletDir() string
- func (s CircusTailorConfig) OutputMetadataDir() string
- func (s CircusTailorConfig) OutputMetadataPath() string
- func (s CircusTailorConfig) Path() string
- func (s CircusTailorConfig) Validate() error
- type DesireAppRequestFromCC
- type DesiredLRP
- type DesiredLRPChange
- type DownloadAction
- type EmitProgressAction
- type EnvironmentVariable
- type ErrInvalidJSONMessage
- type ExecutorAction
- type ExecutorPresence
- type FetchResultAction
- type HealthRequest
- type LRPIdentifier
- type LRPStartAuction
- type LRPStartAuctionState
- type LRPStopAuction
- type LRPStopAuctionState
- type LogConfig
- type MonitorAction
- type ParallelAction
- type PortMapping
- type ResourceLimits
- type RunAction
- type ServiceRegistration
- type ServiceRegistrations
- type StagingInfo
- type StagingRequestFromCC
- type StagingResponseForCC
- type StagingTaskAnnotation
- type StopLRPInstance
- type Task
- type TaskState
- type TaskType
- type TryAction
- type UploadAction
Constants ¶
View Source
const ( ExecutorServiceName = "Executor" FileServerServiceName = "FileServer" )
Variables ¶
View Source
var InvalidActionConversion = errors.New("Invalid Action Conversion")
Functions ¶
This section is empty.
Types ¶
type ActualLRP ¶
type ActualLRP struct {
ProcessGuid string `json:"process_guid"`
InstanceGuid string `json:"instance_guid"`
ExecutorID string `json:"executor_id"`
Index int `json:"index"`
Host string `json:"host"`
Ports []PortMapping `json:"ports"`
State ActualLRPState `json:"state"`
Since int64 `json:"since"`
}
func NewActualLRPFromJSON ¶
type ActualLRPChange ¶
type ActualLRPState ¶
type ActualLRPState int
const ( ActualLRPStateInvalid ActualLRPState = iota ActualLRPStateStarting ActualLRPStateRunning )
type CCBulkToken ¶
type CCBulkToken struct {
Id int `json:"id"`
}
type CCDesiredStateServerResponse ¶
type CCDesiredStateServerResponse struct {
Apps []DesireAppRequestFromCC `json:"apps"`
CCBulkToken *json.RawMessage `json:"token"`
}
type CircusTailorConfig ¶
type CircusTailorConfig struct {
*flag.FlagSet
ExecutablePath string
// contains filtered or unexported fields
}
func NewCircusTailorConfig ¶
func NewCircusTailorConfig(buildpacks []string) CircusTailorConfig
func (CircusTailorConfig) AppDir ¶
func (s CircusTailorConfig) AppDir() string
func (CircusTailorConfig) Args ¶
func (s CircusTailorConfig) Args() []string
func (CircusTailorConfig) BuildArtifactsCacheDir ¶
func (s CircusTailorConfig) BuildArtifactsCacheDir() string
func (CircusTailorConfig) BuildpackOrder ¶
func (s CircusTailorConfig) BuildpackOrder() []string
func (CircusTailorConfig) BuildpackPath ¶
func (s CircusTailorConfig) BuildpackPath(buildpackName string) string
func (CircusTailorConfig) BuildpacksDir ¶
func (s CircusTailorConfig) BuildpacksDir() string
func (CircusTailorConfig) OutputDropletDir ¶
func (s CircusTailorConfig) OutputDropletDir() string
func (CircusTailorConfig) OutputMetadataDir ¶
func (s CircusTailorConfig) OutputMetadataDir() string
func (CircusTailorConfig) OutputMetadataPath ¶
func (s CircusTailorConfig) OutputMetadataPath() string
func (CircusTailorConfig) Path ¶
func (s CircusTailorConfig) Path() string
func (CircusTailorConfig) Validate ¶
func (s CircusTailorConfig) Validate() error
type DesireAppRequestFromCC ¶
type DesireAppRequestFromCC struct {
ProcessGuid string `json:"process_guid"`
DropletUri string `json:"droplet_uri"`
Stack string `json:"stack"`
StartCommand string `json:"start_command"`
Environment []EnvironmentVariable `json:"environment"`
MemoryMB int `json:"memory_mb"`
DiskMB int `json:"disk_mb"`
FileDescriptors uint64 `json:"file_descriptors"`
NumInstances int `json:"num_instances"`
Routes []string `json:"routes"`
LogGuid string `json:"log_guid"`
}
func (DesireAppRequestFromCC) ToJSON ¶
func (d DesireAppRequestFromCC) ToJSON() []byte
type DesiredLRP ¶
type DesiredLRP struct {
// required
ProcessGuid string `json:"process_guid"`
Source string `json:"source"`
Stack string `json:"stack"`
// optional
Instances int `json:"instances"`
MemoryMB int `json:"memory_mb"`
DiskMB int `json:"disk_mb"`
FileDescriptors uint64 `json:"file_descriptors"`
StartCommand string `json:"start_command"`
Environment []EnvironmentVariable `json:"environment"`
Routes []string `json:"routes"`
LogGuid string `json:"log_guid"`
}
func NewDesiredLRPFromJSON ¶
func NewDesiredLRPFromJSON(payload []byte) (DesiredLRP, error)
func (DesiredLRP) ToJSON ¶
func (desired DesiredLRP) ToJSON() []byte
type DesiredLRPChange ¶
type DesiredLRPChange struct {
Before *DesiredLRP
After *DesiredLRP
}
type DownloadAction ¶
type EmitProgressAction ¶
type EmitProgressAction struct {
Action ExecutorAction `json:"action"`
StartMessage string `json:"start_message"`
SuccessMessage string `json:"success_message"`
FailureMessage string `json:"failure_message"`
}
type EnvironmentVariable ¶
type ErrInvalidJSONMessage ¶
type ErrInvalidJSONMessage struct {
MissingField string
}
func (ErrInvalidJSONMessage) Error ¶
func (err ErrInvalidJSONMessage) Error() string
type ExecutorAction ¶
type ExecutorAction struct {
Action interface{} `json:"-"`
}
func EmitProgressFor ¶
func EmitProgressFor(action ExecutorAction, startMessage string, successMessage string, failureMessage string) ExecutorAction
func Parallel ¶
func Parallel(actions ...ExecutorAction) ExecutorAction
func Try ¶
func Try(action ExecutorAction) ExecutorAction
func (ExecutorAction) MarshalJSON ¶
func (a ExecutorAction) MarshalJSON() ([]byte, error)
func (*ExecutorAction) UnmarshalJSON ¶
func (a *ExecutorAction) UnmarshalJSON(bytes []byte) error
type ExecutorPresence ¶
func NewExecutorPresenceFromJSON ¶
func NewExecutorPresenceFromJSON(payload []byte) (ExecutorPresence, error)
func (ExecutorPresence) ToJSON ¶
func (presence ExecutorPresence) ToJSON() []byte
type FetchResultAction ¶
type FetchResultAction struct {
File string `json:"file"`
}
type HealthRequest ¶
type LRPIdentifier ¶
func LRPIdentifierFromOpaqueID ¶
func LRPIdentifierFromOpaqueID(opaqueID string) (LRPIdentifier, error)
func (LRPIdentifier) OpaqueID ¶
func (ids LRPIdentifier) OpaqueID() string
type LRPStartAuction ¶
type LRPStartAuction struct {
ProcessGuid string `json:"process_guid"`
InstanceGuid string `json:"instance_guid"`
Stack string `json:"stack"`
Actions []ExecutorAction `json:"actions"`
DiskMB int `json:"disk_mb"`
MemoryMB int `json:"memory_mb"`
Log LogConfig `json:"log"`
Ports []PortMapping `json:"ports"`
Index int `json:"index"`
State LRPStartAuctionState `json:"state"`
UpdatedAt int64 `json:"updated_at"`
}
func NewLRPStartAuctionFromJSON ¶
func NewLRPStartAuctionFromJSON(payload []byte) (LRPStartAuction, error)
func (LRPStartAuction) LRPIdentifier ¶
func (auction LRPStartAuction) LRPIdentifier() LRPIdentifier
func (LRPStartAuction) ToJSON ¶
func (auction LRPStartAuction) ToJSON() []byte
type LRPStartAuctionState ¶
type LRPStartAuctionState int
const ( LRPStartAuctionStateInvalid LRPStartAuctionState = iota LRPStartAuctionStatePending LRPStartAuctionStateClaimed )
type LRPStopAuction ¶
type LRPStopAuction struct {
ProcessGuid string `json:"process_guid"`
Index int `json:"index"`
State LRPStopAuctionState `json:"state"`
UpdatedAt int64 `json:"updated_at"`
}
func NewLRPStopAuctionFromJSON ¶
func NewLRPStopAuctionFromJSON(payload []byte) (LRPStopAuction, error)
func (LRPStopAuction) ToJSON ¶
func (auction LRPStopAuction) ToJSON() []byte
type LRPStopAuctionState ¶
type LRPStopAuctionState int
const ( LRPStopAuctionStateInvalid LRPStopAuctionState = iota LRPStopAuctionStatePending LRPStopAuctionStateClaimed )
type MonitorAction ¶
type MonitorAction struct {
Action ExecutorAction `json:"action"`
HealthyHook HealthRequest `json:"healthy_hook"`
UnhealthyHook HealthRequest `json:"unhealthy_hook"`
HealthyThreshold uint `json:"healthy_threshold"`
UnhealthyThreshold uint `json:"unhealthy_threshold"`
}
type ParallelAction ¶
type ParallelAction struct {
Actions []ExecutorAction `json:"actions"`
}
type PortMapping ¶
type ResourceLimits ¶
type ResourceLimits struct {
Nofile *uint64 `json:"nofile,omitempty"`
}
type RunAction ¶
type RunAction struct {
Path string `json:"path"`
Args []string `json:"args"`
Env []EnvironmentVariable `json:"env"`
Timeout time.Duration `json:"timeout"`
ResourceLimits ResourceLimits `json:"resource_limits"`
}
type ServiceRegistration ¶
type ServiceRegistrations ¶
type ServiceRegistrations []ServiceRegistration
func (ServiceRegistrations) FilterByName ¶
func (s ServiceRegistrations) FilterByName(serviceName string) ServiceRegistrations
type StagingInfo ¶
type StagingInfo struct {
// yaml keys matter here! they are used by the old DEA for staging_info.yml
BuildpackKey string `yaml:"-" json:"buildpack_key,omitempty"`
DetectedBuildpack string `yaml:"detected_buildpack" json:"detected_buildpack"`
// do not change to be consistent keys; look up 4 lines
DetectedStartCommand string `yaml:"start_command" json:"detected_start_command"`
}
type StagingRequestFromCC ¶
type StagingRequestFromCC struct {
AppId string `json:"app_id"`
TaskId string `json:"task_id"`
Stack string `json:"stack"`
AppBitsDownloadUri string `json:"app_bits_download_uri"`
BuildArtifactsCacheDownloadUri string `json:"build_artifacts_cache_download_uri,omitempty"`
FileDescriptors int `json:"file_descriptors"`
MemoryMB int `json:"memory_mb"`
DiskMB int `json:"disk_mb"`
Buildpacks []Buildpack `json:"buildpacks"`
Environment []EnvironmentVariable `json:"environment"`
}
type StagingResponseForCC ¶
type StagingResponseForCC struct {
AppId string `json:"app_id,omitempty"`
TaskId string `json:"task_id,omitempty"`
BuildpackKey string `json:"buildpack_key,omitempty"`
DetectedBuildpack string `json:"detected_buildpack,omitempty"`
DetectedStartCommand string `json:"detected_start_command,omitempty"`
Error string `json:"error,omitempty"`
}
type StagingTaskAnnotation ¶
type StopLRPInstance ¶
type StopLRPInstance struct {
ProcessGuid string `json:"process_guid"`
InstanceGuid string `json:"instance_guid"`
Index int `json:"index"`
}
func NewStopLRPInstanceFromJSON ¶
func NewStopLRPInstanceFromJSON(payload []byte) (StopLRPInstance, error)
func (StopLRPInstance) LRPIdentifier ¶
func (stop StopLRPInstance) LRPIdentifier() LRPIdentifier
func (StopLRPInstance) ToJSON ¶
func (stop StopLRPInstance) ToJSON() []byte
type Task ¶
type Task struct {
Guid string `json:"guid"`
Actions []ExecutorAction `json:"actions"`
Stack string `json:"stack"`
MemoryMB int `json:"memory_mb"`
DiskMB int `json:"disk_mb"`
CpuPercent float64 `json:"cpu_percent"`
Log LogConfig `json:"log"`
CreatedAt int64 `json:"created_at"` // the number of nanoseconds elapsed since January 1, 1970 UTC
UpdatedAt int64 `json:"updated_at"`
Type TaskType `json:"type"`
State TaskState `json:"state"`
ExecutorID string `json:"executor_id"`
ContainerHandle string `json:"container_handle"`
Result string `json:"result"`
Failed bool `json:"failed"`
FailureReason string `json:"failure_reason"`
Annotation string `json:"annotation,omitempty"`
}
func NewTaskFromJSON ¶
type TryAction ¶
type TryAction struct {
Action ExecutorAction `json:"action"`
}
type UploadAction ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.