Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIN_CT_INSTANCE_NUM = 1 MAX_CT_INSTANCE_NUM = 500 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CTAutoscaler ¶
type CTAutoscaler struct {
// contains filtered or unexported fields
}
The CTAutoscaler is a CT friendly wrapper around autoscaler.Autoscaller It does the following:
- Automatically brings up all CT GCE instances when a GCE task is registered and no other GCE tasks are running.
- Automatically brings down all CT GCE instances when there are no registered GCE tasks.
func NewCTAutoscaler ¶
func NewCTAutoscaler(ctx context.Context, local bool, getGCETasksCount func(ctx context.Context) (int, error)) (*CTAutoscaler, error)
NewCTAutoscaler returns a CT Autoscaler instance. getGCETasksCount refers to a function that returns the number of GCE CT tasks (not swarming tasks).
func (*CTAutoscaler) RegisterGCETask ¶
func (c *CTAutoscaler) RegisterGCETask(taskId string)
type ICTAutoscaler ¶
type ICTAutoscaler interface {
RegisterGCETask(taskId string)
}
Interface useful for mocking.
type MockCTAutoscaler ¶
type MockCTAutoscaler struct {
RegisterGCETaskTimesCalled int
}
func (*MockCTAutoscaler) RegisterGCETask ¶
func (m *MockCTAutoscaler) RegisterGCETask(taskId string)
Click to show internal directories.
Click to hide internal directories.