diff options
author | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
---|---|---|
committer | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
commit | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/google.golang.org/grpc/naming/naming.go | |
parent | 07971ca38143c5faf951d152fba370ddcbe26ad5 (diff) | |
download | terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip |
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/google.golang.org/grpc/naming/naming.go')
-rw-r--r-- | vendor/google.golang.org/grpc/naming/naming.go | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/vendor/google.golang.org/grpc/naming/naming.go b/vendor/google.golang.org/grpc/naming/naming.go new file mode 100644 index 0000000..1af7e32 --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/naming.go | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright 2014 gRPC authors. | ||
4 | * | ||
5 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | * you may not use this file except in compliance with the License. | ||
7 | * You may obtain a copy of the License at | ||
8 | * | ||
9 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | * | ||
11 | * Unless required by applicable law or agreed to in writing, software | ||
12 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | * See the License for the specific language governing permissions and | ||
15 | * limitations under the License. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | // Package naming defines the naming API and related data structures for gRPC. | ||
20 | // The interface is EXPERIMENTAL and may be suject to change. | ||
21 | package naming | ||
22 | |||
23 | // Operation defines the corresponding operations for a name resolution change. | ||
24 | type Operation uint8 | ||
25 | |||
26 | const ( | ||
27 | // Add indicates a new address is added. | ||
28 | Add Operation = iota | ||
29 | // Delete indicates an exisiting address is deleted. | ||
30 | Delete | ||
31 | ) | ||
32 | |||
33 | // Update defines a name resolution update. Notice that it is not valid having both | ||
34 | // empty string Addr and nil Metadata in an Update. | ||
35 | type Update struct { | ||
36 | // Op indicates the operation of the update. | ||
37 | Op Operation | ||
38 | // Addr is the updated address. It is empty string if there is no address update. | ||
39 | Addr string | ||
40 | // Metadata is the updated metadata. It is nil if there is no metadata update. | ||
41 | // Metadata is not required for a custom naming implementation. | ||
42 | Metadata interface{} | ||
43 | } | ||
44 | |||
45 | // Resolver creates a Watcher for a target to track its resolution changes. | ||
46 | type Resolver interface { | ||
47 | // Resolve creates a Watcher for target. | ||
48 | Resolve(target string) (Watcher, error) | ||
49 | } | ||
50 | |||
51 | // Watcher watches for the updates on the specified target. | ||
52 | type Watcher interface { | ||
53 | // Next blocks until an update or error happens. It may return one or more | ||
54 | // updates. The first call should get the full set of the results. It should | ||
55 | // return an error if and only if Watcher cannot recover. | ||
56 | Next() ([]*Update, error) | ||
57 | // Close closes the Watcher. | ||
58 | Close() | ||
59 | } | ||