Documentation ¶
Index ¶
- func NewCombined(ctx context.Context, addr, uiAddr, serverAddr string, wrk Workload, user User)
- func RunStandaloneWorker(profile, ver, desc string, args []*pb.ProfileArg, user User) error
- func UIServer(addr string, uiSrvr pb.ManagerUIServer)
- type Manager
- func (s *Manager) ListProfiles(ctx context.Context, req *pb.ListProfilesRequest) (*pb.ListProfilesResponse, error)
- func (s *Manager) RegisterProfile(req *pb.RegisterProfileRequest, stream pb.Manager_RegisterProfileServer) error
- func (m *Manager) RunJob(ctx context.Context, j *pb.StartJobRequest) (*pb.StartJobResponse, error)
- func (s *Manager) StartJob(ctx context.Context, j *pb.StartJobRequest) (*pb.StartJobResponse, error)
- func (s *Manager) StopJob(ctx context.Context, j *pb.StopJobRequest) (*pb.StopJobResponse, error)
- func (s *Manager) WatchActiveJobs(*pb.WatchActiveJobsRequest, pb.ManagerUI_WatchActiveJobsServer) error
- type Profile
- type ProfileKey
- type ProfileRegistration
- type ProfileRegistry
- func (pr *ProfileRegistry) ListProfiles(ctx context.Context, req *pb.ListProfilesRequest) (*pb.ListProfilesResponse, error)
- func (pr *ProfileRegistry) Register(req *pb.RegisterProfileRequest) (ProfileRegistration, error)
- func (pr *ProfileRegistry) Subscribe(profile, version string) ProfileSubscription
- func (pr *ProfileRegistry) Unregister(preg ProfileRegistration)
- func (pr *ProfileRegistry) Unsubscribe(s ProfileSubscription)
- type ProfileSubscription
- type ProfileWorker
- type Runner
- type RunnerFunc
- type User
- type UserFunc
- type Worker
- type Workload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCombined ¶
func RunStandaloneWorker ¶
func RunStandaloneWorker(profile, ver, desc string, args []*pb.ProfileArg, user User) error
func UIServer ¶
func UIServer(addr string, uiSrvr pb.ManagerUIServer)
Types ¶
type Manager ¶
type Manager struct { pb.UnimplementedManagerServer pb.UnimplementedManagerUIServer // contains filtered or unexported fields }
Manager implments the leaders service.
func NewManager ¶
func NewManager() *Manager
func (*Manager) ListProfiles ¶
func (s *Manager) ListProfiles(ctx context.Context, req *pb.ListProfilesRequest) (*pb.ListProfilesResponse, error)
func (*Manager) RegisterProfile ¶
func (s *Manager) RegisterProfile(req *pb.RegisterProfileRequest, stream pb.Manager_RegisterProfileServer) error
func (*Manager) RunJob ¶
func (m *Manager) RunJob(ctx context.Context, j *pb.StartJobRequest) (*pb.StartJobResponse, error)
func (*Manager) StartJob ¶
func (s *Manager) StartJob(ctx context.Context, j *pb.StartJobRequest) (*pb.StartJobResponse, error)
StartJob implements the UI StartJob method.
func (*Manager) StopJob ¶
func (s *Manager) StopJob(ctx context.Context, j *pb.StopJobRequest) (*pb.StopJobResponse, error)
func (*Manager) WatchActiveJobs ¶
func (s *Manager) WatchActiveJobs(*pb.WatchActiveJobsRequest, pb.ManagerUI_WatchActiveJobsServer) error
type Profile ¶
type Profile struct { FirstRegistration time.Time Spec *pb.ProfileSpec Workers map[ProfileRegistration]struct{} }
func (*Profile) GetActiveWorkers ¶
func (p *Profile) GetActiveWorkers() []*pb.WorkerDetails
type ProfileKey ¶
type ProfileRegistration ¶
type ProfileRegistration struct { ProfileKey ProfileWorker }
type ProfileRegistry ¶
type ProfileRegistry struct {
// contains filtered or unexported fields
}
func NewProfileRegistr ¶
func NewProfileRegistr() *ProfileRegistry
func (*ProfileRegistry) ListProfiles ¶
func (pr *ProfileRegistry) ListProfiles(ctx context.Context, req *pb.ListProfilesRequest) (*pb.ListProfilesResponse, error)
func (*ProfileRegistry) Register ¶
func (pr *ProfileRegistry) Register(req *pb.RegisterProfileRequest) (ProfileRegistration, error)
func (*ProfileRegistry) Subscribe ¶
func (pr *ProfileRegistry) Subscribe(profile, version string) ProfileSubscription
Subscrube subscribes to updates for the list of workers associated with a profile.
func (*ProfileRegistry) Unregister ¶
func (pr *ProfileRegistry) Unregister(preg ProfileRegistration)
func (*ProfileRegistry) Unsubscribe ¶
func (pr *ProfileRegistry) Unsubscribe(s ProfileSubscription)
Unsubscribe unsubscribes a given subscription, shut down the worker updates
type ProfileSubscription ¶
type ProfileSubscription struct { Args []*pb.ProfileArg // contains filtered or unexported fields }
func (*ProfileSubscription) ActiveWorkers ¶
func (s *ProfileSubscription) ActiveWorkers() []*pb.WorkerDetails
type ProfileWorker ¶
type ProfileWorker struct { *pb.WorkerDetails ID string }
type RunnerFunc ¶
func (RunnerFunc) Run ¶
func (f RunnerFunc) Run(args []*pb.JobArg)
type User ¶
type User interface {
Setup(reg prom.Registerer) Runner
}
type UserFunc ¶
type UserFunc func(reg prom.Registerer) Runner
type Worker ¶
type Worker struct { pb.UnimplementedWorkerServer // contains filtered or unexported fields }
func (*Worker) ReportLoad ¶
func (s *Worker) ReportLoad(req *pb.ReportLoadRequest, stream pb.Worker_ReportLoadServer) error
func (*Worker) RunProfile ¶
func (s *Worker) RunProfile(stream pb.Worker_RunProfileServer) error
RunProfile runs the given profile synchronous and streams the results back to the caller. The number of running users can be updated, changes to all the other request arguments are ignored.
type Workload ¶
type Workload struct {
Spec *pb.ProfileSpec
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.