Versions in this module Expand all Collapse all v1 v1.7.2 Aug 12, 2024 v1.7.1 Aug 11, 2024 Changes in this version + type AgentJob struct + type AgentJobRequest struct + func (r AgentJobRequest) Accept() + func (r AgentJobRequest) Reject() + type AgentWorker struct + AvailabilityRequests *utils.EventObserverList[*livekit.AvailabilityRequest] + JobAssignments *utils.EventObserverList[*livekit.JobAssignment] + JobTerminations *utils.EventObserverList[*livekit.JobTermination] + Name string + RegisterWorkerResponses *utils.EventObserverList[*livekit.RegisterWorkerResponse] + WorkerPongs *utils.EventObserverList[*livekit.WorkerPong] + func (w *AgentWorker) Close() error + func (w *AgentWorker) ReadWorkerMessage() (*livekit.WorkerMessage, int, error) + func (w *AgentWorker) Register(name string, namespace string, jobType livekit.JobType) + func (w *AgentWorker) SendAvailability(m *livekit.AvailabilityResponse) + func (w *AgentWorker) SendMigrateJob(m *livekit.MigrateJobRequest) + func (w *AgentWorker) SendPing(m *livekit.WorkerPing) + func (w *AgentWorker) SendRegister(m *livekit.RegisterWorkerRequest) + func (w *AgentWorker) SendSimulateJob(m *livekit.SimulateJobRequest) + func (w *AgentWorker) SendUpdateJob(m *livekit.UpdateJobStatus) + func (w *AgentWorker) SendUpdateWorker(m *livekit.UpdateWorkerStatus) + func (w *AgentWorker) SetReadDeadline(t time.Time) error + func (w *AgentWorker) SimulateRoomJob(roomName string) + func (w *AgentWorker) WriteServerMessage(m *livekit.ServerMessage) (int, error) + type JobLoad interface + Load func() float32 + func NewNormalRandomJobLoad(mean, stddev float64) JobLoad + func NewNormalRandomJobLoadWithRNG(mean, stddev float64, rng *rand.Rand) JobLoad + func NewPeriodicJobLoad(max float32, period time.Duration) JobLoad + func NewStableJobLoad(load float32) JobLoad + func NewUniformRandomJobLoad(min, max float32) JobLoad + func NewUniformRandomJobLoadWithRNG(min, max float32, rng *rand.Rand) JobLoad + type SimulatedWorkerOption func(*SimulatedWorkerOptions) + func WithDefaultWorkerLoad(load float32) SimulatedWorkerOption + func WithJobAssignmentHandler(h func(*livekit.Job) JobLoad) SimulatedWorkerOption + func WithJobAvailabilityHandler(h func(AgentJobRequest)) SimulatedWorkerOption + func WithJobLoad(l JobLoad) SimulatedWorkerOption + type SimulatedWorkerOptions struct + DefaultJobLoad float32 + DefaultWorkerLoad float32 + HandleAssignment func(*livekit.Job) JobLoad + HandleAvailability func(AgentJobRequest) + JobLoadThreshold float32 + SupportResume bool + type TestServer struct + func NewTestServer(bus psrpc.MessageBus) *TestServer + func (h *TestServer) Close() + func (h *TestServer) SimulateAgentWorker(opts ...SimulatedWorkerOption) *AgentWorker