package schedule
import "golang.org/x/build/internal/coordinator/schedule"
Index ¶
- type Fake
- func NewFake() *Fake
- func (f *Fake) GetBuildlet(ctx context.Context, si *queue.SchedItem) (buildlet.Client, error)
- func (f *Fake) State() (st SchedulerState)
- func (f *Fake) WaiterState(waiter *queue.SchedItem) (ws types.BuildletWaitStatus)
- type Scheduler
- func NewScheduler() *Scheduler
- func (s *Scheduler) GetBuildlet(ctx context.Context, si *queue.SchedItem) (buildlet.Client, error)
- func (s *Scheduler) State() (st SchedulerState)
- func (s *Scheduler) WaiterState(waiter *queue.SchedItem) (ws types.BuildletWaitStatus)
- type SchedulerHostState
- type SchedulerState
- type SchedulerWaitingState
- type Span
- func CreateSpan(el pool.EventTimeLogger, event string, optText ...string) *Span
- func (s *Span) Done(err error) error
- func (s *Span) End() time.Time
- func (s *Span) Event() string
- func (s *Span) OptText() string
- func (s *Span) Start() time.Time
- type Spanner
Types ¶
type Fake ¶
type Fake struct {
// contains filtered or unexported fields
}
Fake is a fake scheduler.
func NewFake ¶
func NewFake() *Fake
NewFake returns a fake scheduler.
func (*Fake) GetBuildlet ¶
GetBuildlet returns a fake buildlet client for the requested buildlet.
func (*Fake) State ¶
func (f *Fake) State() (st SchedulerState)
State returns the state of the fake scheduler.
func (*Fake) WaiterState ¶
func (f *Fake) WaiterState(waiter *queue.SchedItem) (ws types.BuildletWaitStatus)
WaiterState is the waiter state of the fake scheduler.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
The Scheduler prioritizes access to buidlets. It accepts requests for buildlets, starts the creation of buildlets from BuildletPools, and prioritizes which callers gets them first when they're ready.
func NewScheduler ¶
func NewScheduler() *Scheduler
NewScheduler returns a new scheduler.
func (*Scheduler) GetBuildlet ¶
GetBuildlet requests a buildlet with the parameters described in si.
The provided si must be newly allocated; ownership passes to the scheduler.
func (*Scheduler) State ¶
func (s *Scheduler) State() (st SchedulerState)
func (*Scheduler) WaiterState ¶
func (s *Scheduler) WaiterState(waiter *queue.SchedItem) (ws types.BuildletWaitStatus)
WaiterState returns tells waiter how many callers are on the line in front of them.
type SchedulerHostState ¶
type SchedulerHostState struct { HostType string LastProgress time.Duration Total SchedulerWaitingState Gomote SchedulerWaitingState Try SchedulerWaitingState Regular SchedulerWaitingState }
type SchedulerState ¶
type SchedulerState struct { HostTypes []SchedulerHostState }
type SchedulerWaitingState ¶
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span is an event covering a region of time. A Span ultimately ends in an error or success, and will eventually be visualized and logged.
func CreateSpan ¶
func CreateSpan(el pool.EventTimeLogger, event string, optText ...string) *Span
CreateSpan creates a span with the appropriate metadata. It also starts the span.
func (*Span) Done ¶
Done ends a span. It is legal to call Done multiple times. Only the first call logs. Done always returns its input argument.
func (*Span) End ¶
End is the end time for an span.
func (*Span) Event ¶
Event is the span's event.
func (*Span) OptText ¶
OptText is the optional text for a span.
func (*Span) Start ¶
Start is the start time for the span.
type Spanner ¶
type Spanner interface { SpanRecord(*Span, error) *types.SpanRecord }
Source Files ¶
fake_schedule.go schedule.go span.go
- Version
- v0.0.0-20250421191922-3619c213cff3 (latest)
- Published
- Apr 21, 2025
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 2 months ago –
Tools for package owners.