random

package
v0.0.0-...-e7c6d99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandBool

func RandBool() bool

func RandChange

func RandChange(s *pb.SFUStatus) *pb.SFUStatus

func RandChangeForwardTrack

func RandChangeForwardTrack(track *pb.ForwardTrack)

RandChangeForwardTrack change a ForwardTrack

func RandChangeForwardTracks

func RandChangeForwardTracks(tracks []*pb.ForwardTrack) []*pb.ForwardTrack

RandChangeForwardTracks change a list of ForwardTrack

func RandChangeProceedTrack

func RandChangeProceedTrack(track *pb.ProceedTrack)

RandChangeProceedTrack change a ProceedTrack

func RandChangeProceedTracks

func RandChangeProceedTracks(tracks []*pb.ProceedTrack) []*pb.ProceedTrack

RandChangeProceedTracks change a list of ProceedTrack

func RandForwardTrack

func RandForwardTrack() *pb.ForwardTrack

RandForwardTrack Generate a ForwardTrack

func RandNode

func RandNode(nid string) *pb.Node

func RandProceedTrack

func RandProceedTrack() *pb.ProceedTrack

RandProceedTrack Generate a ProceedTrack

func RandomString

func RandomString(n int) string

Types

type RandComputationReport

type RandComputationReport struct {
	// contains filtered or unexported fields
}

func (*RandComputationReport) RandReport

func (r *RandComputationReport) RandReport() *pb.ComputationReport

type RandProcedure

type RandProcedure struct {
	Procedure string
}

type RandProceedTracks

type RandProceedTracks struct {
	// contains filtered or unexported fields
}

func (RandProceedTracks) RandTracks

func (r RandProceedTracks) RandTracks() []*pb.ProceedTrack

type RandReports

type RandReports struct {
	RandTransmissionReport
	RandComputationReport
}

func (*RandReports) RandReports

func (r *RandReports) RandReports() []*pb.QualityReport

type RandTransmissionReport

type RandTransmissionReport struct {
	// contains filtered or unexported fields
}

func (*RandTransmissionReport) RandReport

func (r *RandTransmissionReport) RandReport() *pb.TransmissionReport

type Random

type Random struct {
	RandomTrack bool
	// contains filtered or unexported fields
}

Random is a node selection algorithm, just for test

func (*Random) UpdateSFUStatus

func (r *Random) UpdateSFUStatus(current []*pb.SFUStatus, reports []*pb.QualityReport) (expected []*pb.SFUStatus)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL