...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package monitoring_test
18
19 import (
20 "context"
21
22 monitoring "cloud.google.com/go/monitoring/apiv3"
23 "cloud.google.com/go/monitoring/apiv3/v2/monitoringpb"
24 "google.golang.org/api/iterator"
25 )
26
27 func ExampleNewUptimeCheckClient() {
28 ctx := context.Background()
29 c, err := monitoring.NewUptimeCheckClient(ctx)
30 if err != nil {
31
32 }
33
34 _ = c
35 }
36
37 func ExampleUptimeCheckClient_ListUptimeCheckConfigs() {
38
39
40
41 ctx := context.Background()
42 c, err := monitoring.NewUptimeCheckClient(ctx)
43 if err != nil {
44
45 }
46
47 req := &monitoringpb.ListUptimeCheckConfigsRequest{
48
49 }
50 it := c.ListUptimeCheckConfigs(ctx, req)
51 for {
52 resp, err := it.Next()
53 if err == iterator.Done {
54 break
55 }
56 if err != nil {
57
58 }
59
60 _ = resp
61 }
62 }
63
64 func ExampleUptimeCheckClient_GetUptimeCheckConfig() {
65
66
67 ctx := context.Background()
68 c, err := monitoring.NewUptimeCheckClient(ctx)
69 if err != nil {
70
71 }
72
73 req := &monitoringpb.GetUptimeCheckConfigRequest{
74
75 }
76 resp, err := c.GetUptimeCheckConfig(ctx, req)
77 if err != nil {
78
79 }
80
81 _ = resp
82 }
83
84 func ExampleUptimeCheckClient_CreateUptimeCheckConfig() {
85
86
87 ctx := context.Background()
88 c, err := monitoring.NewUptimeCheckClient(ctx)
89 if err != nil {
90
91 }
92
93 req := &monitoringpb.CreateUptimeCheckConfigRequest{
94
95 }
96 resp, err := c.CreateUptimeCheckConfig(ctx, req)
97 if err != nil {
98
99 }
100
101 _ = resp
102 }
103
104 func ExampleUptimeCheckClient_UpdateUptimeCheckConfig() {
105
106
107 ctx := context.Background()
108 c, err := monitoring.NewUptimeCheckClient(ctx)
109 if err != nil {
110
111 }
112
113 req := &monitoringpb.UpdateUptimeCheckConfigRequest{
114
115 }
116 resp, err := c.UpdateUptimeCheckConfig(ctx, req)
117 if err != nil {
118
119 }
120
121 _ = resp
122 }
123
124 func ExampleUptimeCheckClient_DeleteUptimeCheckConfig() {
125 ctx := context.Background()
126 c, err := monitoring.NewUptimeCheckClient(ctx)
127 if err != nil {
128
129 }
130
131 req := &monitoringpb.DeleteUptimeCheckConfigRequest{
132
133 }
134 err = c.DeleteUptimeCheckConfig(ctx, req)
135 if err != nil {
136
137 }
138 }
139
140 func ExampleUptimeCheckClient_ListUptimeCheckIps() {
141
142
143
144 ctx := context.Background()
145 c, err := monitoring.NewUptimeCheckClient(ctx)
146 if err != nil {
147
148 }
149
150 req := &monitoringpb.ListUptimeCheckIpsRequest{
151
152 }
153 it := c.ListUptimeCheckIps(ctx, req)
154 for {
155 resp, err := it.Next()
156 if err == iterator.Done {
157 break
158 }
159 if err != nil {
160
161 }
162
163 _ = resp
164 }
165 }
166
View as plain text