Documentation ¶
Overview ¶
Package logging is an experimental, auto-generated package for the logging API.
The Google Cloud Logging API lets you write log entries and manage your logs, log sinks and logs-based metrics.
Index ¶
- Variables
- func ConfigProjectPath(project string) string
- func ConfigSinkPath(project string, sink string) string
- func LoggingLogPath(project string, log string) string
- func LoggingProjectPath(project string) string
- func MetricsMetricPath(project string, metric string) string
- func MetricsProjectPath(project string) string
- type CallOptions
- type Client
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConn
- func (c *Client) DeleteLog(ctx context.Context, req *loggingpb.DeleteLogRequest) error
- func (c *Client) ListLogEntries(ctx context.Context, req *loggingpb.ListLogEntriesRequest) *LogEntryIterator
- func (c *Client) ListMonitoredResourceDescriptors(ctx context.Context, req *loggingpb.ListMonitoredResourceDescriptorsRequest) *MonitoredResourceDescriptorIterator
- func (c *Client) SetGoogleClientInfo(name, version string)
- func (c *Client) WriteLogEntries(ctx context.Context, req *loggingpb.WriteLogEntriesRequest) (*loggingpb.WriteLogEntriesResponse, error)
- type ConfigCallOptions
- type ConfigClient
- func (c *ConfigClient) Close() error
- func (c *ConfigClient) Connection() *grpc.ClientConn
- func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSinkRequest) (*loggingpb.LogSink, error)
- func (c *ConfigClient) DeleteSink(ctx context.Context, req *loggingpb.DeleteSinkRequest) error
- func (c *ConfigClient) GetSink(ctx context.Context, req *loggingpb.GetSinkRequest) (*loggingpb.LogSink, error)
- func (c *ConfigClient) ListSinks(ctx context.Context, req *loggingpb.ListSinksRequest) *LogSinkIterator
- func (c *ConfigClient) SetGoogleClientInfo(name, version string)
- func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSinkRequest) (*loggingpb.LogSink, error)
- type LogEntryIterator
- func (it *LogEntryIterator) Next() (*loggingpb.LogEntry, error)
- func (it *LogEntryIterator) NextPage() ([]*loggingpb.LogEntry, error)
- func (it *LogEntryIterator) NextPageToken() string
- func (it *LogEntryIterator) PageSize() int
- func (it *LogEntryIterator) SetPageSize(pageSize int)
- func (it *LogEntryIterator) SetPageToken(token string)
- type LogMetricIterator
- func (it *LogMetricIterator) Next() (*loggingpb.LogMetric, error)
- func (it *LogMetricIterator) NextPage() ([]*loggingpb.LogMetric, error)
- func (it *LogMetricIterator) NextPageToken() string
- func (it *LogMetricIterator) PageSize() int
- func (it *LogMetricIterator) SetPageSize(pageSize int)
- func (it *LogMetricIterator) SetPageToken(token string)
- type LogSinkIterator
- func (it *LogSinkIterator) Next() (*loggingpb.LogSink, error)
- func (it *LogSinkIterator) NextPage() ([]*loggingpb.LogSink, error)
- func (it *LogSinkIterator) NextPageToken() string
- func (it *LogSinkIterator) PageSize() int
- func (it *LogSinkIterator) SetPageSize(pageSize int)
- func (it *LogSinkIterator) SetPageToken(token string)
- type MetricsCallOptions
- type MetricsClient
- func (c *MetricsClient) Close() error
- func (c *MetricsClient) Connection() *grpc.ClientConn
- func (c *MetricsClient) CreateLogMetric(ctx context.Context, req *loggingpb.CreateLogMetricRequest) (*loggingpb.LogMetric, error)
- func (c *MetricsClient) DeleteLogMetric(ctx context.Context, req *loggingpb.DeleteLogMetricRequest) error
- func (c *MetricsClient) GetLogMetric(ctx context.Context, req *loggingpb.GetLogMetricRequest) (*loggingpb.LogMetric, error)
- func (c *MetricsClient) ListLogMetrics(ctx context.Context, req *loggingpb.ListLogMetricsRequest) *LogMetricIterator
- func (c *MetricsClient) SetGoogleClientInfo(name, version string)
- func (c *MetricsClient) UpdateLogMetric(ctx context.Context, req *loggingpb.UpdateLogMetricRequest) (*loggingpb.LogMetric, error)
- type MonitoredResourceDescriptorIterator
- func (it *MonitoredResourceDescriptorIterator) Next() (*monitoredrespb.MonitoredResourceDescriptor, error)
- func (it *MonitoredResourceDescriptorIterator) NextPage() ([]*monitoredrespb.MonitoredResourceDescriptor, error)
- func (it *MonitoredResourceDescriptorIterator) NextPageToken() string
- func (it *MonitoredResourceDescriptorIterator) PageSize() int
- func (it *MonitoredResourceDescriptorIterator) SetPageSize(pageSize int)
- func (it *MonitoredResourceDescriptorIterator) SetPageToken(token string)
Examples ¶
- Client.DeleteLog
- Client.ListLogEntries
- Client.ListMonitoredResourceDescriptors
- Client.WriteLogEntries
- ConfigClient.CreateSink
- ConfigClient.DeleteSink
- ConfigClient.GetSink
- ConfigClient.ListSinks
- ConfigClient.UpdateSink
- MetricsClient.CreateLogMetric
- MetricsClient.DeleteLogMetric
- MetricsClient.GetLogMetric
- MetricsClient.ListLogMetrics
- MetricsClient.UpdateLogMetric
- NewClient
- NewConfigClient
- NewMetricsClient
Constants ¶
This section is empty.
Variables ¶
var Done = errors.New("iterator done")
Done is returned by iterators on successful completion.
Functions ¶
func ConfigProjectPath ¶
ProjectPath returns the path for the project resource.
func ConfigSinkPath ¶
SinkPath returns the path for the sink resource.
func LoggingLogPath ¶
LogPath returns the path for the log resource.
func LoggingProjectPath ¶
ProjectPath returns the path for the project resource.
func MetricsMetricPath ¶
MetricPath returns the path for the metric resource.
func MetricsProjectPath ¶
ProjectPath returns the path for the project resource.
Types ¶
type CallOptions ¶
type CallOptions struct { DeleteLog []gax.CallOption WriteLogEntries []gax.CallOption ListLogEntries []gax.CallOption ListMonitoredResourceDescriptors []gax.CallOption }
CallOptions contains the retry settings for each method of this client.
type Client ¶
type Client struct { // The call options for this service. CallOptions *CallOptions // contains filtered or unexported fields }
Client is a client for interacting with LoggingServiceV2.
func NewClient ¶
NewClient creates a new logging service client.
Service for ingesting and querying logs.
Example ¶
ctx := context.Background() c, err := logging.NewClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection ¶
func (c *Client) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*Client) DeleteLog ¶
DeleteLog deletes a log and all its log entries. The log will reappear if it receives new entries.
Example ¶
ctx := context.Background() c, err := logging.NewClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.DeleteLogRequest{ // TODO: Fill request struct fields. } err = c.DeleteLog(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*Client) ListLogEntries ¶
func (c *Client) ListLogEntries(ctx context.Context, req *loggingpb.ListLogEntriesRequest) *LogEntryIterator
ListLogEntries lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to export log entries, see [Exporting Logs](/logging/docs/export).
Example ¶
ctx := context.Background() c, err := logging.NewClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.ListLogEntriesRequest{ // TODO: Fill request struct fields. } it := c.ListLogEntries(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListMonitoredResourceDescriptors ¶
func (c *Client) ListMonitoredResourceDescriptors(ctx context.Context, req *loggingpb.ListMonitoredResourceDescriptorsRequest) *MonitoredResourceDescriptorIterator
ListMonitoredResourceDescriptors lists the monitored resource descriptors used by Stackdriver Logging.
Example ¶
ctx := context.Background() c, err := logging.NewClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.ListMonitoredResourceDescriptorsRequest{ // TODO: Fill request struct fields. } it := c.ListMonitoredResourceDescriptors(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*Client) SetGoogleClientInfo ¶
SetGoogleClientInfo sets the name and version of the application in the `x-goog-api-client` header passed on each request. Intended for use by Google-written clients.
func (*Client) WriteLogEntries ¶
func (c *Client) WriteLogEntries(ctx context.Context, req *loggingpb.WriteLogEntriesRequest) (*loggingpb.WriteLogEntriesResponse, error)
WriteLogEntries writes log entries to Stackdriver Logging. All log entries are written by this method.
Example ¶
ctx := context.Background() c, err := logging.NewClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.WriteLogEntriesRequest{ // TODO: Fill request struct fields. } resp, err := c.WriteLogEntries(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
type ConfigCallOptions ¶
type ConfigCallOptions struct { ListSinks []gax.CallOption GetSink []gax.CallOption CreateSink []gax.CallOption UpdateSink []gax.CallOption DeleteSink []gax.CallOption }
ConfigCallOptions contains the retry settings for each method of this client.
type ConfigClient ¶
type ConfigClient struct { // The call options for this service. CallOptions *ConfigCallOptions // contains filtered or unexported fields }
ConfigClient is a client for interacting with ConfigServiceV2.
func NewConfigClient ¶
func NewConfigClient(ctx context.Context, opts ...option.ClientOption) (*ConfigClient, error)
NewConfigClient creates a new config service client.
Service for configuring sinks used to export log entries outside Stackdriver Logging.
Example ¶
ctx := context.Background() c, err := logging.NewConfigClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*ConfigClient) Close ¶
func (c *ConfigClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ConfigClient) Connection ¶
func (c *ConfigClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*ConfigClient) CreateSink ¶
func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSinkRequest) (*loggingpb.LogSink, error)
CreateSink creates a sink.
Example ¶
ctx := context.Background() c, err := logging.NewConfigClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.CreateSinkRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateSink(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*ConfigClient) DeleteSink ¶
func (c *ConfigClient) DeleteSink(ctx context.Context, req *loggingpb.DeleteSinkRequest) error
DeleteSink deletes a sink.
Example ¶
ctx := context.Background() c, err := logging.NewConfigClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.DeleteSinkRequest{ // TODO: Fill request struct fields. } err = c.DeleteSink(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*ConfigClient) GetSink ¶
func (c *ConfigClient) GetSink(ctx context.Context, req *loggingpb.GetSinkRequest) (*loggingpb.LogSink, error)
GetSink gets a sink.
Example ¶
ctx := context.Background() c, err := logging.NewConfigClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.GetSinkRequest{ // TODO: Fill request struct fields. } resp, err := c.GetSink(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*ConfigClient) ListSinks ¶
func (c *ConfigClient) ListSinks(ctx context.Context, req *loggingpb.ListSinksRequest) *LogSinkIterator
ListSinks lists sinks.
Example ¶
ctx := context.Background() c, err := logging.NewConfigClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.ListSinksRequest{ // TODO: Fill request struct fields. } it := c.ListSinks(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*ConfigClient) SetGoogleClientInfo ¶
func (c *ConfigClient) SetGoogleClientInfo(name, version string)
SetGoogleClientInfo sets the name and version of the application in the `x-goog-api-client` header passed on each request. Intended for use by Google-written clients.
func (*ConfigClient) UpdateSink ¶
func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSinkRequest) (*loggingpb.LogSink, error)
UpdateSink creates or updates a sink.
Example ¶
ctx := context.Background() c, err := logging.NewConfigClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.UpdateSinkRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateSink(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
type LogEntryIterator ¶
type LogEntryIterator struct {
// contains filtered or unexported fields
}
LogEntryIterator manages a stream of *loggingpb.LogEntry.
func (*LogEntryIterator) Next ¶
func (it *LogEntryIterator) Next() (*loggingpb.LogEntry, error)
Next returns the next result. Its second return value is Done if there are no more results. Once next returns Done, all subsequent calls will return Done.
Internally, Next retrieves results in bulk. You can call SetPageSize as a performance hint to affect how many results are retrieved in a single RPC.
SetPageToken should not be called when using Next.
Next and NextPage should not be used with the same iterator.
func (*LogEntryIterator) NextPage ¶
func (it *LogEntryIterator) NextPage() ([]*loggingpb.LogEntry, error)
NextPage returns the next page of results. It will return at most the number of results specified by the last call to SetPageSize. If SetPageSize was never called or was called with a value less than 1, the page size is determined by the underlying service.
NextPage may return a second return value of Done along with the last page of results. After NextPage returns Done, all subsequent calls to NextPage will return (nil, Done).
Next and NextPage should not be used with the same iterator.
func (*LogEntryIterator) NextPageToken ¶
func (it *LogEntryIterator) NextPageToken() string
NextPageToken returns a page token that can be used with SetPageToken to resume iteration from the next page. It returns the empty string if there are no more pages.
func (*LogEntryIterator) PageSize ¶
func (it *LogEntryIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*LogEntryIterator) SetPageSize ¶
func (it *LogEntryIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*LogEntryIterator) SetPageToken ¶
func (it *LogEntryIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type LogMetricIterator ¶
type LogMetricIterator struct {
// contains filtered or unexported fields
}
LogMetricIterator manages a stream of *loggingpb.LogMetric.
func (*LogMetricIterator) Next ¶
func (it *LogMetricIterator) Next() (*loggingpb.LogMetric, error)
Next returns the next result. Its second return value is Done if there are no more results. Once next returns Done, all subsequent calls will return Done.
Internally, Next retrieves results in bulk. You can call SetPageSize as a performance hint to affect how many results are retrieved in a single RPC.
SetPageToken should not be called when using Next.
Next and NextPage should not be used with the same iterator.
func (*LogMetricIterator) NextPage ¶
func (it *LogMetricIterator) NextPage() ([]*loggingpb.LogMetric, error)
NextPage returns the next page of results. It will return at most the number of results specified by the last call to SetPageSize. If SetPageSize was never called or was called with a value less than 1, the page size is determined by the underlying service.
NextPage may return a second return value of Done along with the last page of results. After NextPage returns Done, all subsequent calls to NextPage will return (nil, Done).
Next and NextPage should not be used with the same iterator.
func (*LogMetricIterator) NextPageToken ¶
func (it *LogMetricIterator) NextPageToken() string
NextPageToken returns a page token that can be used with SetPageToken to resume iteration from the next page. It returns the empty string if there are no more pages.
func (*LogMetricIterator) PageSize ¶
func (it *LogMetricIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*LogMetricIterator) SetPageSize ¶
func (it *LogMetricIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*LogMetricIterator) SetPageToken ¶
func (it *LogMetricIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type LogSinkIterator ¶
type LogSinkIterator struct {
// contains filtered or unexported fields
}
LogSinkIterator manages a stream of *loggingpb.LogSink.
func (*LogSinkIterator) Next ¶
func (it *LogSinkIterator) Next() (*loggingpb.LogSink, error)
Next returns the next result. Its second return value is Done if there are no more results. Once next returns Done, all subsequent calls will return Done.
Internally, Next retrieves results in bulk. You can call SetPageSize as a performance hint to affect how many results are retrieved in a single RPC.
SetPageToken should not be called when using Next.
Next and NextPage should not be used with the same iterator.
func (*LogSinkIterator) NextPage ¶
func (it *LogSinkIterator) NextPage() ([]*loggingpb.LogSink, error)
NextPage returns the next page of results. It will return at most the number of results specified by the last call to SetPageSize. If SetPageSize was never called or was called with a value less than 1, the page size is determined by the underlying service.
NextPage may return a second return value of Done along with the last page of results. After NextPage returns Done, all subsequent calls to NextPage will return (nil, Done).
Next and NextPage should not be used with the same iterator.
func (*LogSinkIterator) NextPageToken ¶
func (it *LogSinkIterator) NextPageToken() string
NextPageToken returns a page token that can be used with SetPageToken to resume iteration from the next page. It returns the empty string if there are no more pages.
func (*LogSinkIterator) PageSize ¶
func (it *LogSinkIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*LogSinkIterator) SetPageSize ¶
func (it *LogSinkIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*LogSinkIterator) SetPageToken ¶
func (it *LogSinkIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type MetricsCallOptions ¶
type MetricsCallOptions struct { ListLogMetrics []gax.CallOption GetLogMetric []gax.CallOption CreateLogMetric []gax.CallOption UpdateLogMetric []gax.CallOption DeleteLogMetric []gax.CallOption }
MetricsCallOptions contains the retry settings for each method of this client.
type MetricsClient ¶
type MetricsClient struct { // The call options for this service. CallOptions *MetricsCallOptions // contains filtered or unexported fields }
MetricsClient is a client for interacting with MetricsServiceV2.
func NewMetricsClient ¶
func NewMetricsClient(ctx context.Context, opts ...option.ClientOption) (*MetricsClient, error)
NewMetricsClient creates a new metrics service client.
Service for configuring logs-based metrics.
Example ¶
ctx := context.Background() c, err := logging.NewMetricsClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*MetricsClient) Close ¶
func (c *MetricsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*MetricsClient) Connection ¶
func (c *MetricsClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*MetricsClient) CreateLogMetric ¶
func (c *MetricsClient) CreateLogMetric(ctx context.Context, req *loggingpb.CreateLogMetricRequest) (*loggingpb.LogMetric, error)
CreateLogMetric creates a logs-based metric.
Example ¶
ctx := context.Background() c, err := logging.NewMetricsClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.CreateLogMetricRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateLogMetric(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*MetricsClient) DeleteLogMetric ¶
func (c *MetricsClient) DeleteLogMetric(ctx context.Context, req *loggingpb.DeleteLogMetricRequest) error
DeleteLogMetric deletes a logs-based metric.
Example ¶
ctx := context.Background() c, err := logging.NewMetricsClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.DeleteLogMetricRequest{ // TODO: Fill request struct fields. } err = c.DeleteLogMetric(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*MetricsClient) GetLogMetric ¶
func (c *MetricsClient) GetLogMetric(ctx context.Context, req *loggingpb.GetLogMetricRequest) (*loggingpb.LogMetric, error)
GetLogMetric gets a logs-based metric.
Example ¶
ctx := context.Background() c, err := logging.NewMetricsClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.GetLogMetricRequest{ // TODO: Fill request struct fields. } resp, err := c.GetLogMetric(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*MetricsClient) ListLogMetrics ¶
func (c *MetricsClient) ListLogMetrics(ctx context.Context, req *loggingpb.ListLogMetricsRequest) *LogMetricIterator
ListLogMetrics lists logs-based metrics.
Example ¶
ctx := context.Background() c, err := logging.NewMetricsClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.ListLogMetricsRequest{ // TODO: Fill request struct fields. } it := c.ListLogMetrics(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*MetricsClient) SetGoogleClientInfo ¶
func (c *MetricsClient) SetGoogleClientInfo(name, version string)
SetGoogleClientInfo sets the name and version of the application in the `x-goog-api-client` header passed on each request. Intended for use by Google-written clients.
func (*MetricsClient) UpdateLogMetric ¶
func (c *MetricsClient) UpdateLogMetric(ctx context.Context, req *loggingpb.UpdateLogMetricRequest) (*loggingpb.LogMetric, error)
UpdateLogMetric creates or updates a logs-based metric.
Example ¶
ctx := context.Background() c, err := logging.NewMetricsClient(ctx) if err != nil { // TODO: Handle error. } req := &loggingpb.UpdateLogMetricRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateLogMetric(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
type MonitoredResourceDescriptorIterator ¶
type MonitoredResourceDescriptorIterator struct {
// contains filtered or unexported fields
}
MonitoredResourceDescriptorIterator manages a stream of *monitoredrespb.MonitoredResourceDescriptor.
func (*MonitoredResourceDescriptorIterator) Next ¶
func (it *MonitoredResourceDescriptorIterator) Next() (*monitoredrespb.MonitoredResourceDescriptor, error)
Next returns the next result. Its second return value is Done if there are no more results. Once next returns Done, all subsequent calls will return Done.
Internally, Next retrieves results in bulk. You can call SetPageSize as a performance hint to affect how many results are retrieved in a single RPC.
SetPageToken should not be called when using Next.
Next and NextPage should not be used with the same iterator.
func (*MonitoredResourceDescriptorIterator) NextPage ¶
func (it *MonitoredResourceDescriptorIterator) NextPage() ([]*monitoredrespb.MonitoredResourceDescriptor, error)
NextPage returns the next page of results. It will return at most the number of results specified by the last call to SetPageSize. If SetPageSize was never called or was called with a value less than 1, the page size is determined by the underlying service.
NextPage may return a second return value of Done along with the last page of results. After NextPage returns Done, all subsequent calls to NextPage will return (nil, Done).
Next and NextPage should not be used with the same iterator.
func (*MonitoredResourceDescriptorIterator) NextPageToken ¶
func (it *MonitoredResourceDescriptorIterator) NextPageToken() string
NextPageToken returns a page token that can be used with SetPageToken to resume iteration from the next page. It returns the empty string if there are no more pages.
func (*MonitoredResourceDescriptorIterator) PageSize ¶
func (it *MonitoredResourceDescriptorIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*MonitoredResourceDescriptorIterator) SetPageSize ¶
func (it *MonitoredResourceDescriptorIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*MonitoredResourceDescriptorIterator) SetPageToken ¶
func (it *MonitoredResourceDescriptorIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.