writestrategies

package
v74.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2017 License: Apache-2.0, BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BurstParameters

type BurstParameters struct {
	Minimum   int
	Maximum   int
	Frequency time.Duration
}

type BurstWriteStrategy

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

func NewBurstWriteStrategy

func NewBurstWriteStrategy(generator MessageGenerator, writer MessageWriter, params BurstParameters) *BurstWriteStrategy

func (*BurstWriteStrategy) StartWriter

func (s *BurstWriteStrategy) StartWriter()

func (*BurstWriteStrategy) Stop

func (s *BurstWriteStrategy) Stop()

type ConstantWriteStrategy

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

func NewConstantWriteStrategy

func NewConstantWriteStrategy(generator MessageGenerator, writer MessageWriter, writeRate int) *ConstantWriteStrategy

func (*ConstantWriteStrategy) StartWriter

func (s *ConstantWriteStrategy) StartWriter()

func (*ConstantWriteStrategy) Stop

func (s *ConstantWriteStrategy) Stop()

type MessageGenerator

type MessageGenerator interface {
	Generate() []byte
}

type MessageWriter

type MessageWriter interface {
	Write([]byte)
}

Jump to

Keyboard shortcuts

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