Documentation
¶
Index ¶
- Constants
- Variables
- func ActualLRPInstanceKeyFromContainer(container executor.Container, cellID string) (*models.ActualLRPInstanceKey, error)
- func ActualLRPKeyFromTags(tags executor.Tags) (*models.ActualLRPKey, error)
- func ActualLRPNetInfoFromContainer(container executor.Container) (*models.ActualLRPNetInfo, error)
- func ConvertCachedDependencies(modelDeps []*models.CachedDependency) []executor.CachedDependency
- func ConvertCachedDependency(modelDep *models.CachedDependency) executor.CachedDependency
- func ConvertPortMappings(containerPorts []uint32) []executor.PortMapping
- func ConvertPreloadedRootFS(rootFS string, imageLayers []*models.ImageLayer, layeringMode string) (string, []*models.ImageLayer)
- func InternalRoutesToInternalRoutes(routes InternalRoutes) internalroutes.InternalRoutes
- func LRPContainerGuid(processGuid, instanceGuid string) string
- func NewRoutes(networkAccessible bool) rata.Routes
- type ArbitraryRootFSProvider
- type CellState
- type Client
- type ClientFactory
- type ContainerMetricsCollection
- type ContainerMetricsProvider
- type FixedSetRootFSProvider
- type InsufficientResourcesError
- type InternalRoute
- type InternalRoutes
- type LRP
- type LRPMetric
- type LRPUpdate
- type PlacementConstraint
- type Resource
- type Resources
- type RootFSProvider
- type RootFSProviderType
- type RootFSProviders
- type RunRequestConversionHelper
- func (rrch RunRequestConversionHelper) NewRunRequestFromDesiredLRP(containerGuid string, desiredLRP *models.DesiredLRP, ...) (executor.RunRequest, error)
- func (rrch RunRequestConversionHelper) NewRunRequestFromTask(task *models.Task, stackPathMap StackPathMap, layeringMode string) (executor.RunRequest, error)
- type SimClient
- type StackPathMap
- type StringSet
- type TLSConfig
- type Task
- type TaskMetric
- type Work
Constants ¶
const ( LifecycleTag = "lifecycle" ResultFileTag = "result-file" DomainTag = "domain" TaskLifecycle = "task" LRPLifecycle = "lrp" ProcessGuidTag = "process-guid" InstanceGuidTag = "instance-guid" ProcessIndexTag = "process-index" VolumeDriversTag = "volume-drivers" PlacementTagsTag = "placement-tags" )
const ( LayeringModeSingleLayer = "single-layer" LayeringModeTwoLayer = "two-layer" )
const ( RootFSProviderTypeArbitrary = bbsmodels.RootFSProviderTypeArbitrary RootFSProviderTypeFixedSet = bbsmodels.RootFSProviderTypeFixedSet )
const ( StateRoute = "STATE" ContainerMetricsRoute = "ContainerMetrics" PerformRoute = "PERFORM" UpdateLRPInstanceRoute = "UpdateLRPInstance" UpdateLRPInstanceRoute_r0 = "UpdateLRPInstance_r0" StopLRPInstanceRoute = "StopLRPInstance" CancelTaskRoute = "CancelTask" SimResetRoute = "RESET" PingRoute = "Ping" EvacuateRoute = "Evacuate" )
const StackVersionFile = bbsmodels.StackVersionFile
Variables ¶
var ( ErrContainerMissingTags = errors.New("container is missing tags") ErrInvalidProcessIndex = errors.New("container does not have a valid process index") ErrIntergerOverflow = errors.New("integer overflow") )
var ErrPreloadedRootFSNotFound = fmt.Errorf("preloaded rootfs path not found")
ErrPreloadedRootFSNotFound is returned when the given hostname of the rootFS could not be resolved if the scheme is the PreloadedRootFSScheme or the PreloadedOCIRootFSScheme.
var ErrorIncompatibleRootfs = bbsmodels.ErrorIncompatibleRootfs
var NewCellState = bbsmodels.NewCellState
var NewFixedSetRootFSProvider = bbsmodels.NewFixedSetRootFSProvider
var NewLRP = bbsmodels.NewSchedulingLRP
var NewLRPUpdate = bbsmodels.NewLRPUpdate
var NewPlacementConstraint = bbsmodels.NewPlacementConstraint
var NewResource = bbsmodels.NewResource
var NewResources = bbsmodels.NewResources
var NewStringSet = bbsmodels.NewStringSet
var NewTask = bbsmodels.NewSchedulingTask
var Routes = append(RoutesLocalhostOnly, RoutesNetworkAccessible...)
var RoutesLocalhostOnly = NewRoutes(false)
var RoutesNetworkAccessible = NewRoutes(true)
Functions ¶
func ActualLRPKeyFromTags ¶
func ActualLRPKeyFromTags(tags executor.Tags) (*models.ActualLRPKey, error)
func ActualLRPNetInfoFromContainer ¶
func ActualLRPNetInfoFromContainer(container executor.Container) (*models.ActualLRPNetInfo, error)
func ConvertCachedDependencies ¶
func ConvertCachedDependencies(modelDeps []*models.CachedDependency) []executor.CachedDependency
func ConvertCachedDependency ¶
func ConvertCachedDependency(modelDep *models.CachedDependency) executor.CachedDependency
func ConvertPortMappings ¶
func ConvertPortMappings(containerPorts []uint32) []executor.PortMapping
func ConvertPreloadedRootFS ¶
func ConvertPreloadedRootFS(rootFS string, imageLayers []*models.ImageLayer, layeringMode string) (string, []*models.ImageLayer)
ConvertPreloadedRootFS takes in a rootFS URL and a list of image layers and in most cases just returns the same rootFS URL and list of image layers.
In the case where all of the following are true:
- layeringMode == LayeringModeTwoLayer
- the rootfs URL has a `preloaded` scheme
- the list of image layers contains at least one image layer that has an `exclusive` layer type, `tgz` media type, and a `sha256` digest algorithm.
then the rootfs URL will be converted to have a `preloaded+layer` scheme and a query string that references the first image layer that matches all of those restrictions. This image layer will also be removed from the list.
func InternalRoutesToInternalRoutes ¶
func InternalRoutesToInternalRoutes(routes InternalRoutes) internalroutes.InternalRoutes
InternalRoutesToInternalRoutes converts bbs/models.InternalRoutes to routing-info.InternalRoutes. This conversion is necessary because both types have the same structure but are distinct types in Go.
func LRPContainerGuid ¶
Types ¶
type ArbitraryRootFSProvider ¶
type ArbitraryRootFSProvider = bbsmodels.ArbitraryRootFSProvider
type Client ¶
Client is the rep client interface. Also available as code.cloudfoundry.org/bbs/models.RepClient.
type ClientFactory ¶
type ClientFactory = models.RepClientFactory
ClientFactory is the rep client factory interface. Also available as code.cloudfoundry.org/bbs/models.RepClientFactory.
func NewClientFactory ¶
func NewClientFactory(httpClient, stateClient *http.Client, tlsConfig *TLSConfig) (ClientFactory, error)
type ContainerMetricsCollection ¶
type ContainerMetricsCollection struct {
CellID string `json:"cell_id"`
LRPs []LRPMetric `json:"lrps"`
Tasks []TaskMetric `json:"tasks"`
}
type ContainerMetricsProvider ¶
type ContainerMetricsProvider interface {
Metrics() map[string]*containermetrics.CachedContainerMetrics
}
type FixedSetRootFSProvider ¶
type FixedSetRootFSProvider = bbsmodels.FixedSetRootFSProvider
type InsufficientResourcesError ¶
type InsufficientResourcesError = bbsmodels.InsufficientResourcesError
type InternalRoute ¶
type InternalRoute = bbsmodels.InternalRoute
type InternalRoutes ¶
type InternalRoutes = bbsmodels.InternalRoutes
type LRP ¶
type LRP = bbsmodels.SchedulingLRP
type LRPMetric ¶
type LRPMetric struct {
InstanceGUID string `json:"instance_guid"`
ProcessGUID string `json:"process_guid"`
Index int32 `json:"index"`
containermetrics.CachedContainerMetrics
}
type PlacementConstraint ¶
type PlacementConstraint = bbsmodels.PlacementConstraint
type RootFSProvider ¶
type RootFSProvider = bbsmodels.RootFSProvider
type RootFSProviderType ¶
type RootFSProviderType = bbsmodels.RootFSProviderType
type RootFSProviders ¶
type RootFSProviders = bbsmodels.RootFSProviders
type RunRequestConversionHelper ¶
func (RunRequestConversionHelper) NewRunRequestFromDesiredLRP ¶
func (rrch RunRequestConversionHelper) NewRunRequestFromDesiredLRP( containerGuid string, desiredLRP *models.DesiredLRP, lrpKey *models.ActualLRPKey, lrpInstanceKey *models.ActualLRPInstanceKey, stackPathMap StackPathMap, layeringMode string, ) (executor.RunRequest, error)
func (RunRequestConversionHelper) NewRunRequestFromTask ¶
func (rrch RunRequestConversionHelper) NewRunRequestFromTask(task *models.Task, stackPathMap StackPathMap, layeringMode string) (executor.RunRequest, error)
type SimClient ¶
type SimClient = models.RepSimClient
SimClient extends Client with simulation capabilities. Also available as code.cloudfoundry.org/bbs/models.RepSimClient.
type StackPathMap ¶
StackPathMap maps aliases to rootFS paths on the system.
func (StackPathMap) PathForRootFS ¶
func (m StackPathMap) PathForRootFS(rootFS string) (string, error)
PathForRootFS resolves the hostname portion of the RootFS URL to the actual path to the preloaded rootFS on the system according to the StackPathMap.
func (StackPathMap) StackVersionList ¶
func (m StackPathMap) StackVersionList() []string
type TLSConfig ¶
type TLSConfig struct {
RequireTLS bool
CertFile, KeyFile, CaCertFile string
ClientCacheSize int // the tls client cache size, 0 means use golang default value
}
capture the behavior described in the comment of this story https://www.pivotaltracker.com/story/show/130664747/comments/152863773
type Task ¶
type Task = bbsmodels.SchedulingTask
type TaskMetric ¶
type TaskMetric struct {
TaskGUID string `json:"task_guid"`
containermetrics.CachedContainerMetrics
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
auctioncellrepfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
cmd
|
|
|
gocurl
command
|
|
|
rep
command
|
|
|
evacuation_context/fake_evacuation_context
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
generator creates operations for container processing
|
generator creates operations for container processing |
|
fake_generator
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
internal/fake_internal
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
handlersfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |