Skip to content

Commit bddebfd

Browse files
authored
Rename Constructor to Instance and instance_name to name. (#138)
1 parent 3a1b144 commit bddebfd

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

mixer/v1/config/cfg.proto

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ package istio.mixer.v1.config;
5656
// adapter: prometheus
5757
// params:
5858
//
59-
// constructors:
60-
// - instanceName: RequestCountByService
59+
// instances:
60+
// - name: RequestCountByService
6161
// template: istio.mixer.adapter.metric.Metric
6262
// params:
6363
// value: 1
@@ -79,8 +79,8 @@ message ServiceConfig {
7979
repeated AspectRule rules = 3 [deprecated = true];
8080

8181
// Under development, DO NOT USE
82-
// Optional. List of constructors that can be referenced from [actions][istio.mixer.v1.config.Action.instances]
83-
repeated Constructor constructors = 4;
82+
// Optional. List of instances that can be referenced from [actions][istio.mixer.v1.config.Action.instances]
83+
repeated Instance instances = 4;
8484

8585
// Under development, DO NOT USE
8686
// Optional. List of actions that apply for this service
@@ -301,7 +301,7 @@ message EmailAddress {
301301
// selector is `true`
302302
//
303303
// The following example instructs Mixer to invoke 'prometheus-handler' handler for all services and pass it the
304-
// instance constructed using the 'RequestCountByService' constructor.
304+
// instance constructed using the 'RequestCountByService' instance.
305305
//
306306
// ```yaml
307307
// actionRules:
@@ -336,7 +336,7 @@ message Rule {
336336
// Action describes which [Handler][istio.mixer.v1.config.Handler] to invoke and what data to pass to it for processing.
337337
//
338338
// The following example instructs Mixer to invoke 'prometheus-handler' handler and pass it the object
339-
// constructed using the constructor 'RequestCountByService'
339+
// constructed using the instance 'RequestCountByService'
340340
//
341341
// ```yaml
342342
// - handler: prometheus-handler
@@ -347,41 +347,41 @@ message Action {
347347
// Required. The handler to invoke. Must match the `name` of a [Handler][istio.mixer.v1.config.Handler.name] in scope.
348348
string handler = 2;
349349

350-
// Required. Each value must match the `instance_name` of the
351-
// [Constructor][istio.mixer.v1.config.Constructor.instance_name]s in scope.
352-
// Referenced constructors are evaluated by resolving the attributes/literals for all the fields.
350+
// Required. Each value must match the `name` of the
351+
// [Instance][istio.mixer.v1.config.Instance.name]s in scope.
352+
// Referenced instances are evaluated by resolving the attributes/literals for all the fields.
353353
// The constructed objects are then passed to the `handler` referenced within this action.
354354
repeated string instances = 3;
355355
}
356356

357-
// A Constructor tells Mixer how to create instances for particular template.
357+
// A Instance tells Mixer how to create instances for particular template.
358358
//
359-
// Constructor is defined by the operator. Constructor is defined relative to a known
359+
// Instance is defined by the operator. Instance is defined relative to a known
360360
// template. Their purpose is to tell Mixer how to use attributes or literals to produce
361361
// instances of the specified template at runtime.
362362
//
363363
// The following example instructs Mixer to construct an instance associated with template
364364
// 'istio.mixer.adapter.metric.Metric'. It provides a mapping from the template's fields to expressions.
365-
// Instances produced with this constructor can be referenced by [Actions][istio.mixer.v1.config.Action] using name
365+
// Instances produced with this instance can be referenced by [Actions][istio.mixer.v1.config.Action] using name
366366
// 'RequestCountByService'.
367367
//
368368
// ```yaml
369-
// - instanceName: RequestCountByService
369+
// - name: RequestCountByService
370370
// template: istio.mixer.adapter.metric.Metric
371371
// params:
372372
// value: 1
373373
// dimensions:
374374
// source: origin.service
375375
// target_ip: destination.ip
376376
// ```
377-
message Constructor {
378-
// Required. The name of this constructor
377+
message Instance {
378+
// Required. The name of this instance
379379
//
380-
// Must be unique amongst other Constructors in scope. Used by [Action][istio.mixer.v1.config.Action] to refer
381-
// to an instance produced by this constructor.
382-
string instance_name = 1;
380+
// Must be unique amongst other Instances in scope. Used by [Action][istio.mixer.v1.config.Action] to refer
381+
// to an instance produced by this instance.
382+
string name = 1;
383383

384-
// Required. The name of the template this constructor creates instances for.
384+
// Required. The name of the template this instance creates instances for.
385385
// The value must match the name of the available template in scope.
386386
string template = 2;
387387

@@ -393,8 +393,8 @@ message Constructor {
393393
// Handler allows the operator to configure a specific adapter implementation.
394394
// Each adapter implementation defines its own `params` proto.
395395
//
396-
// In the following example we define a `metrics` adapter using the Mixer's prepackaged
397-
// prometheus adapter. This adapter doesn't require any parameters.
396+
// In the following example we define a `metrics` handler using the Mixer's prepackaged
397+
// prometheus adapter. This handler doesn't require any parameters.
398398
//
399399
// ```yaml
400400
// name: prometheus-handler

0 commit comments

Comments
 (0)