Documentation ¶
Overview ¶
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Package service manages the main logic of benchmark job.
Index ¶
- Constants
- type Job
- type Option
- func WithBeforeJobDuration(dur string) Option
- func WithBeforeJobName(bjn string) Option
- func WithBeforeJobNamespace(bjns string) Option
- func WithConcurencyLimit(limit int) Option
- func WithDataset(d *config.BenchmarkDataset) Option
- func WithErrGroup(eg errgroup.Group) Option
- func WithHdf5(d hdf5.Data) Option
- func WithInsertConfig(c *config.InsertConfig) Option
- func WithJobFunc(jf func(context.Context, chan error) error) Option
- func WithJobType(jt jobType) Option
- func WithJobTypeByString(t string) Option
- func WithK8sClient(cli client.Client) Option
- func WithObjectConfig(c *config.ObjectConfig) Option
- func WithRPS(rps int) Option
- func WithRemoveConfig(c *config.RemoveConfig) Option
- func WithSearchConfig(c *config.SearchConfig) Option
- func WithUpdateConfig(c *config.UpdateConfig) Option
- func WithUpsertConfig(c *config.UpsertConfig) Option
- func WithValdClient(c vald.Client) Option
Constants ¶
const ( USERDEFINED jobType = iota INSERT SEARCH UPDATE UPSERT REMOVE GETOBJECT EXISTS )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Option ¶
type Option func(j *job) error
func WithBeforeJobDuration ¶
WithBeforeJobDuration sets the duration for watching beforeJobName's status.
func WithBeforeJobName ¶
WithBeforeJobName sets the beforeJobName which we should wait for until finish before running job.
func WithBeforeJobNamespace ¶
WithBeforeJobNamespace sets the beforeJobNamespace of the beforeJobName which we should wait for until finish before running job.
func WithConcurencyLimit ¶
WithConcurencyLimit sets the goroutine limit for sending request to the target cluster.
func WithDataset ¶
func WithDataset(d *config.BenchmarkDataset) Option
WithDataset sets the config.BenchmarkDataset including benchmark dataset name, group name of hdf5.Data, the number of index, start range and end range, and original URL which is used for download user defined hdf5.
func WithErrGroup ¶
WithErrGroup sets the errgroup to the job struct to handle errors.
func WithInsertConfig ¶
func WithInsertConfig(c *config.InsertConfig) Option
WithInsertConfig sets the insert API config for running insert request job.
func WithJobFunc ¶
WithJobFunc sets the job function.
func WithJobType ¶
func WithJobType(jt jobType) Option
WithJobType sets the jobType for running benchmark job.
func WithJobTypeByString ¶
WithJobTypeByString converts given string to JobType.
func WithK8sClient ¶
WithK8sClient binds the k8s client to the job struct which is used for get BenchmarkJobResource from Kubernetes API server.
func WithObjectConfig ¶
func WithObjectConfig(c *config.ObjectConfig) Option
WithObjectConfig sets the get object API config for running get object request job.
func WithRemoveConfig ¶
func WithRemoveConfig(c *config.RemoveConfig) Option
WithRemoveConfig sets the remove API config for running remove request job.
func WithSearchConfig ¶
func WithSearchConfig(c *config.SearchConfig) Option
WithSearchConfig sets the search API config for running search request job.
func WithUpdateConfig ¶
func WithUpdateConfig(c *config.UpdateConfig) Option
WithUpdateConfig sets the update API config for running update request job.
func WithUpsertConfig ¶
func WithUpsertConfig(c *config.UpsertConfig) Option
WithUpsertConfig sets the upsert API config for running upsert request job.
func WithValdClient ¶
WithValdClient sets the Vald client for sending request to the target Vald cluster.