cockroach: github.com/cockroachdb/cockroach/pkg/workload/faker Index | Files

package faker

import "github.com/cockroachdb/cockroach/pkg/workload/faker"

Index

Package Files

address.go dict.go faker.go lorem.go name.go

type Faker Uses

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

Faker returns a generator for random data of various types: names, addresses, "lorem ipsum" placeholder text. Faker is safe for concurrent use.

func NewFaker Uses

func NewFaker() Faker

NewFaker returns a new Faker instance. This causes a good amount of allocations, so it's best to reuse these when possible.

func (*Faker) Name Uses

func (f *Faker) Name(rng *rand.Rand) string

Name returns a random en_US person name.

func (*Faker) Paragraph Uses

func (f *Faker) Paragraph(rng *rand.Rand) string

Paragraph returns a random en_US paragraph.

func (*Faker) Sentences Uses

func (f *Faker) Sentences(rng *rand.Rand, num int) []string

Sentences returns the requested number of random en_US sentences.

func (*Faker) StreetAddress Uses

func (f *Faker) StreetAddress(rng *rand.Rand) string

StreetAddress returns a random en_US street address.

func (*Faker) Words Uses

func (f *Faker) Words(rng *rand.Rand, num int) []string

Words returns the requested number of random en_US words.

Package faker imports 5 packages (graph) and is imported by 2 packages. Updated 2019-07-01. Refresh now. Tools for package owners.