Пример #1
0
func ExampleClient_DeleteLog() {
	ctx := context.Background()
	c, err := logging.NewClient(ctx)
	_ = err // Handle error.

	req := &google_logging_v2.DeleteLogRequest{ /* Data... */ }
	err = c.DeleteLog(ctx, req)
	_ = err // Handle error.
}
Пример #2
0
func ExampleClient_WriteLogEntries() {
	ctx := context.Background()
	c, err := logging.NewClient(ctx)
	_ = err // Handle error.

	req := &google_logging_v2.WriteLogEntriesRequest{ /* Data... */ }
	var resp *google_logging_v2.WriteLogEntriesResponse
	resp, err = c.WriteLogEntries(ctx, req)
	_, _ = resp, err // Handle error.
}
Пример #3
0
func ExampleClient_ListMonitoredResourceDescriptors() {
	ctx := context.Background()
	c, err := logging.NewClient(ctx)
	_ = err // Handle error.

	req := &google_logging_v2.ListMonitoredResourceDescriptorsRequest{ /* Data... */ }
	it := c.ListMonitoredResourceDescriptors(ctx, req)
	var resp *google_api.MonitoredResourceDescriptor
	for {
		resp, err = it.Next()
		if err != nil {
			break
		}
	}
	_ = resp
}
Пример #4
0
func ExampleClient_ListLogEntries() {
	ctx := context.Background()
	c, err := logging.NewClient(ctx)
	_ = err // Handle error.

	req := &google_logging_v2.ListLogEntriesRequest{ /* Data... */ }
	it := c.ListLogEntries(ctx, req)
	var resp *google_logging_v2.LogEntry
	for {
		resp, err = it.Next()
		if err != nil {
			break
		}
	}
	_ = resp
}
Пример #5
0
func ExampleNewClient() {
	ctx := context.Background()
	opts := []gax.ClientOption{ /* Optional client parameters. */ }
	c, err := logging.NewClient(ctx, opts...)
	_, _ = c, err // Handle error.
}