Documentation ¶
Index ¶
- func Deserialize(raw []byte, doc any) error
- func Serialize(doc *Document) ([]byte, error)
- func SerializeDocV1(doc *DocumentV1) ([]byte, error)
- type Address
- type DDLWorkload
- type Document
- type DocumentV1
- type DropCreateWriteWorkload
- type IDocument
- type InsertOnlyWorkload
- type Nested
- type Queue
- type QueueDocuments
- type ReplaceOnlyWorkload
- type SearchOnlyWorkload
- type SmallConciseWorkload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func SerializeDocV1 ¶
func SerializeDocV1(doc *DocumentV1) ([]byte, error)
Types ¶
type DDLWorkload ¶
func (*DDLWorkload) Type ¶
func (w *DDLWorkload) Type() string
type Document ¶
func NewDocument ¶
type DocumentV1 ¶
type DocumentV1 struct { Id int64 `json:"id"` Cars []string `json:"cars" fake:"{carmaker}" fakesize:"2"` CreatedAt time.Time `json:"created_at" fake:"{date}"` UpdatedAt time.Time `json:"updated_at" fake:"{date}"` Nested *Nested `json:"nested"` }
func NewDocumentV1 ¶
func NewDocumentV1(id int64) *DocumentV1
func (*DocumentV1) ID ¶
func (d *DocumentV1) ID() int64
type DropCreateWriteWorkload ¶
type DropCreateWriteWorkload struct { Threads int16 Database string Collections []string Schemas [][]byte Records int64 }
func (*DropCreateWriteWorkload) Check ¶
func (w *DropCreateWriteWorkload) Check(_ driver.Driver) (bool, error)
func (*DropCreateWriteWorkload) Setup ¶
func (w *DropCreateWriteWorkload) Setup(client driver.Driver) error
func (*DropCreateWriteWorkload) Start ¶
func (w *DropCreateWriteWorkload) Start(client driver.Driver) (int64, error)
func (*DropCreateWriteWorkload) Type ¶
func (w *DropCreateWriteWorkload) Type() string
type InsertOnlyWorkload ¶
type InsertOnlyWorkload struct { Threads int16 Records int64 Database string Collections []string Schemas [][]byte WorkloadData *Queue }
func (*InsertOnlyWorkload) Check ¶
func (w *InsertOnlyWorkload) Check(client driver.Driver) (bool, error)
func (*InsertOnlyWorkload) Start ¶
func (w *InsertOnlyWorkload) Start(client driver.Driver) (int64, error)
func (*InsertOnlyWorkload) Type ¶
func (w *InsertOnlyWorkload) Type() string
type Nested ¶
type Nested struct { Timestamp int64 `json:"timestamp" fake:"{nanosecond}"` Random string `json:"random" fake:"{sentence:10}"` Name string `json:"name" fake:"{firstname}"` URL string `json:"url" fake:"{url}"` Domain string `json:"domain" fake:"{domainname}"` Sentence string `json:"sentence" fake:"{sentence:3}"` Company string `json:"company" fake:"{company}"` Labels []string `json:"labels" fakesize:"2"` Address Address `json:"address"` NestedId string `json:"nested_id" fake:"{uuid}"` }
type QueueDocuments ¶
func NewQueueDocuments ¶
func NewQueueDocuments(collection string) *QueueDocuments
func (*QueueDocuments) Add ¶
func (q *QueueDocuments) Add(doc IDocument)
type ReplaceOnlyWorkload ¶
type ReplaceOnlyWorkload struct { Threads int16 Records int64 Database string Collections []string Schemas [][]byte WorkloadData *Queue }
func (*ReplaceOnlyWorkload) Check ¶
func (w *ReplaceOnlyWorkload) Check(client driver.Driver) (bool, error)
func (*ReplaceOnlyWorkload) Start ¶
func (w *ReplaceOnlyWorkload) Start(client driver.Driver) (int64, error)
func (*ReplaceOnlyWorkload) Type ¶
func (w *ReplaceOnlyWorkload) Type() string
type SearchOnlyWorkload ¶
type SearchOnlyWorkload struct { Threads int16 Records int64 Project string Index string Schema []byte WorkloadData *Queue }
func (*SearchOnlyWorkload) Check ¶
func (w *SearchOnlyWorkload) Check(client driver.Driver) (bool, error)
func (*SearchOnlyWorkload) Start ¶
func (w *SearchOnlyWorkload) Start(client driver.Driver) (int64, error)
func (*SearchOnlyWorkload) Type ¶
func (w *SearchOnlyWorkload) Type() string
type SmallConciseWorkload ¶
type SmallConciseWorkload struct { Threads int16 Records int64 Database string Collections []string Schemas [][]byte WorkloadData *Queue }
func (*SmallConciseWorkload) Check ¶
func (w *SmallConciseWorkload) Check(client driver.Driver) (bool, error)
func (*SmallConciseWorkload) Setup ¶
func (w *SmallConciseWorkload) Setup(client driver.Driver) error
func (*SmallConciseWorkload) Start ¶
func (w *SmallConciseWorkload) Start(client driver.Driver) (int64, error)
func (*SmallConciseWorkload) Type ¶
func (w *SmallConciseWorkload) Type() string
Click to show internal directories.
Click to hide internal directories.