Documentation ¶
Index ¶
- type DataGen
- func (dg *DataGen) FixedValue() string
- func (dg *DataGen) Key(n int) string
- func (dg *DataGen) LargeGrp(n int) string
- func (dg *DataGen) NumRecords() int
- func (dg *DataGen) RandomPayload() string
- func (dg *DataGen) Record(n int) *Record
- func (dg *DataGen) SmallGrp(n int) string
- func (dg *DataGen) Uniq(n int) string
- type Record
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataGen ¶
type DataGen struct {
// contains filtered or unexported fields
}
DataGen can generate a bunch of data of type Record
func NewDataGen ¶
func (*DataGen) FixedValue ¶
func (*DataGen) NumRecords ¶
func (*DataGen) RandomPayload ¶
type Record ¶
type Record struct { Pk string Uniq string SmallGrp string LargeGrp string FixedValue string SeqNum int64 TimeStamp int64 Payload string }
Record represents a single record with a fixed, well-defined set of fields
type Spec ¶
type Spec struct { SpecType string Version int RecordSize int KeyGenSpec *keygen.LeveledKeyGenSpec UniqTrSpec *strtr.Spec SmallGrpTrSpec *strtr.Spec LargeGrpTrSpec *strtr.Spec FixedValue string }
Spec is the specification for generating a DataGen for the following schema:
pk varchar, uniq varchar, small_grp varchar, large_grp varchar, same varchar, seq_num int , ts timestamp, payload varchar,
func LoadSpecFromFile ¶
func (*Spec) SaveToFile ¶
Click to show internal directories.
Click to hide internal directories.