-
Notifications
You must be signed in to change notification settings - Fork 194
/
target.proto
78 lines (71 loc) · 3.12 KB
/
target.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
// Package target contains messages for defining a configuration of a caching
// collector to connect to multiple gNMI targets.
package target;
import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto";
option go_package = "github.com/openconfig/gnmi/proto/target";
// Configuration holds all information necessary for a caching gNMI collector
// to establish subscriptions to a list of gNMI targets.
message Configuration {
// Request is a keyed list of all SubscriptionRequests that can be sent
// to targets in the Configuration.
// The request must have at minimum a SubscriptionList with a prefix
// containing origin and one or more Subscriptions. Only the STREAM mode is
// supported.
map<string, gnmi.SubscribeRequest> request = 1;
// Target is the full list of targets connected to by a caching gNMI
// collector. The key of the map is a unique name to identify a target and
// is set in the prefix.target of a SubscriptionRequest message when
// connecting to each respective target.
map<string, Target> target = 2;
// Identifier for the caching collector.
string instance_id = 3;
// Additional config metadata.
map<string, string> meta = 4;
// Revision for this Configuration. Systems that non-atomically write
// configuration should populate and require revision, leveraging canonical
// protobuf serialization of fields in order. Presence of this field makes no
// guarantee. Consumers should account for atomicity constraints of their
// environment and any custom encoding.
int64 revision = 536870911;
}
// Target is the information necessary to establish a single gNMI Subscribe RPC
// to be collected and cached.
message Target {
// A list of address and port or name that resolves to an address and port.
repeated string addresses = 1;
// Credentials to use in metadata for authorization of the RPC
Credentials credentials = 2;
// The request to be sent to the target. The string supplied is looked up in
// the request map of the Configuration message.
string request = 3;
// Additional target metadata.
map<string, string> meta = 4;
// How should the target be dialed. This option allows for a custom
// implementation for how this target is to be reached. If unset the
// collector's default implementation will be used.
string dialer = 5;
}
// Credentials contains the fields necessary for authentication of the client to
// the target.
message Credentials {
string username = 1;
string password = 2;
// Password lookup ID.
string password_id = 3;
}