rate

package
v0.0.0-...-c28e036 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJobRunActive

func IsJobRunActive(jobrunRelRsrcName string) bool

IsJobRunActive returns a bool indicating if a job run is active (paused).

func NewRateLimitingReader

func NewRateLimitingReader(r io.Reader) io.Reader

NewRateLimitingReader returns a RateLimitingReader.

func ProcessJobRunBandwidths

func ProcessJobRunBandwidths(jobBWs []*controlpb.JobRunBandwidth, st *stats.Tracker)

ProcessJobRunBandwidths updates the jobRunBW mapping and projectBWLimiter given the values in the control message.

Types

type RateLimitingReader

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

RateLimitingReader is an io.Reader that wraps another io.Reader and enforces rate limiting during the Read function.

func (*RateLimitingReader) Read

func (rlr *RateLimitingReader) Read(buf []byte) (n int, err error)

Read implements the io.Reader interface.

Jump to

Keyboard shortcuts

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