-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathrequest_source_plugin.proto
53 lines (48 loc) · 2.74 KB
/
request_source_plugin.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Config protos for the Request Source Plugin Config Factories.
syntax = "proto3";
package nighthawk.request_source;
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
import "api/client/options.proto";
// Configuration for OptionsListFromFileRequestSourceFactory (plugin name:
// "nighthawk.file-options-list-request-source-plugin")
// The factory will load the RequestOptionsList from the file, and then passes it to the
// requestSource it generates. The resulting request source will loop over the RequestOptionsList it
// is passed.
message FileBasedOptionsListRequestSourceConfig {
// The file_path is the path to a file that contains a RequestOptionList in json or yaml format.
// This field is required.
string file_path = 1;
// The pluginfactory makes requestSources that will generate requests from the RequestOptionList
// up to num_requests number of times. If num_requests exceeds the number of RequestOptions in the
// RequestOptionList located in the file at file_path, it will loop. num_requests = 0 means it
// will loop indefinitely, though it will still terminate by normal mechanisms.
uint32 num_requests = 2;
// The pluginfactory will load the file located in file_path as long as it is below max_file_size
// in bytes, if it's too large it will throw an error. This field is optional with a default of
// 1000000.
google.protobuf.UInt32Value max_file_size = 3 [(validate.rules).uint32 = {lte: 1000000}];
}
// Configuration for OptionsListFromProtoRequestSourceFactory (plugin name:
// "nighthawk.in-line-options-list-request-source-plugin")
// The resulting request source will loop over the RequestOptionsList it
// is passed.
message InLineOptionsListRequestSourceConfig {
// The options_list will be used to generate Requests in the RequestSource. This field is
// required.
nighthawk.client.RequestOptionsList options_list = 1;
// The pluginfactory makes requestSources that will generate requests from the RequestOptionList
// up to num_requests number of times. If num_requests exceeds the number of RequestOptions in the
// options_list, it will loop. num_requests = 0 means it will loop indefinitely, though it will
// still terminate by normal mechanisms.
uint32 num_requests = 2;
}
// Configuration for StubPluginRequestSource (plugin name: "nighthawk.stub-request-source-plugin")
// The plugin does nothing. This is for testing and comparison of the Request Source Plugin Factory
// mechanism using a minimal version of plugin that does not require a more complicated proto or
// file reading.
message StubPluginConfig {
// test input value which is the only output value in the headers produced from the
// requestGenerator for the StubRequestSource.
google.protobuf.DoubleValue test_value = 1;
}