simulator

package
v0.0.0-...-7bde1eb Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptJobID

func OptJobID(id string) func(*simJob) error

OptJobID sets the job id

func OptJobMaxFileCount

func OptJobMaxFileCount(count int) func(*simJob) error

OptJobMaxFileCount sets the maximum file count for the job

func OptJobMaxFileSize

func OptJobMaxFileSize(size int64) func(*simJob) error

OptJobMaxFileSize sets the maximum file size for the job

func OptJobMaxFilesPerDirectory

func OptJobMaxFilesPerDirectory(count int) func(*simJob) error

OptJobMaxFilesPerDirectory sets the maximum file count per directory for the job

func OptJobMinFileCount

func OptJobMinFileCount(count int) func(*simJob) error

OptJobMinFileCount sets the minimum file count for the job

func OptJobMinFileSize

func OptJobMinFileSize(size int64) func(*simJob) error

OptJobMinFileSize sets the minimum file size for the job

func OptJobMinFilesPerDirectory

func OptJobMinFilesPerDirectory(count int) func(*simJob) error

OptJobMinFilesPerDirectory sets the minimum file count per directory for the job

Types

type Simulator

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

Simulator implements a changelog simulator

func New

func New(options ...simulatorOption) (*Simulator, error)

New returns a newly-initialized simulator

func (*Simulator) AddJob

func (s *Simulator) AddJob(options ...simJobOption) error

AddJob creates a new job and adds it to the simulator

func (*Simulator) GetHandle

func (s *Simulator) GetHandle() changelog.Handle

GetHandle returns a changelog.Handle

func (*Simulator) NextRecord

func (s *Simulator) NextRecord() (changelog.Record, error)

NextRecord returns the next simulated record

func (*Simulator) Start

func (s *Simulator) Start()

Start indicates that the simulator should start collecting records

func (*Simulator) Stats

func (s *Simulator) Stats() string

Stats returns a string of simulator stats

func (*Simulator) Stop

func (s *Simulator) Stop()

Stop indicates that the simulator should shut down

Jump to

Keyboard shortcuts

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