Documentation ¶
Overview ¶
Package monitoring is an experimental, auto-generated package for the monitoring API.
Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.
Index ¶
- Variables
- func AgentTranslationProjectPath(project string) string
- func GroupGroupPath(project string, group string) string
- func GroupProjectPath(project string) string
- func MetricMetricDescriptorPathPath(project string, metricDescriptorPath string) string
- func MetricMonitoredResourceDescriptorPath(project string, monitoredResourceDescriptor string) string
- func MetricProjectPath(project string) string
- type AgentTranslationCallOptions
- type AgentTranslationClient
- func (c *AgentTranslationClient) Close() error
- func (c *AgentTranslationClient) Connection() *grpc.ClientConn
- func (c *AgentTranslationClient) CreateCollectdTimeSeries(ctx context.Context, req *monitoringpb.CreateCollectdTimeSeriesRequest) error
- func (c *AgentTranslationClient) SetGoogleClientInfo(name, version string)
- type GroupCallOptions
- type GroupClient
- func (c *GroupClient) Close() error
- func (c *GroupClient) Connection() *grpc.ClientConn
- func (c *GroupClient) CreateGroup(ctx context.Context, req *monitoringpb.CreateGroupRequest) (*monitoringpb.Group, error)
- func (c *GroupClient) DeleteGroup(ctx context.Context, req *monitoringpb.DeleteGroupRequest) error
- func (c *GroupClient) GetGroup(ctx context.Context, req *monitoringpb.GetGroupRequest) (*monitoringpb.Group, error)
- func (c *GroupClient) ListGroupMembers(ctx context.Context, req *monitoringpb.ListGroupMembersRequest) *MonitoredResourceIterator
- func (c *GroupClient) ListGroups(ctx context.Context, req *monitoringpb.ListGroupsRequest) *GroupIterator
- func (c *GroupClient) SetGoogleClientInfo(name, version string)
- func (c *GroupClient) UpdateGroup(ctx context.Context, req *monitoringpb.UpdateGroupRequest) (*monitoringpb.Group, error)
- type GroupIterator
- func (it *GroupIterator) Next() (*monitoringpb.Group, error)
- func (it *GroupIterator) NextPage() ([]*monitoringpb.Group, error)
- func (it *GroupIterator) NextPageToken() string
- func (it *GroupIterator) PageSize() int
- func (it *GroupIterator) SetPageSize(pageSize int)
- func (it *GroupIterator) SetPageToken(token string)
- type MetricCallOptions
- type MetricClient
- func (c *MetricClient) Close() error
- func (c *MetricClient) Connection() *grpc.ClientConn
- func (c *MetricClient) CreateMetricDescriptor(ctx context.Context, req *monitoringpb.CreateMetricDescriptorRequest) (*metricpb.MetricDescriptor, error)
- func (c *MetricClient) CreateTimeSeries(ctx context.Context, req *monitoringpb.CreateTimeSeriesRequest) error
- func (c *MetricClient) DeleteMetricDescriptor(ctx context.Context, req *monitoringpb.DeleteMetricDescriptorRequest) error
- func (c *MetricClient) GetMetricDescriptor(ctx context.Context, req *monitoringpb.GetMetricDescriptorRequest) (*metricpb.MetricDescriptor, error)
- func (c *MetricClient) GetMonitoredResourceDescriptor(ctx context.Context, req *monitoringpb.GetMonitoredResourceDescriptorRequest) (*monitoredrespb.MonitoredResourceDescriptor, error)
- func (c *MetricClient) ListMetricDescriptors(ctx context.Context, req *monitoringpb.ListMetricDescriptorsRequest) *MetricDescriptorIterator
- func (c *MetricClient) ListMonitoredResourceDescriptors(ctx context.Context, req *monitoringpb.ListMonitoredResourceDescriptorsRequest) *MonitoredResourceDescriptorIterator
- func (c *MetricClient) ListTimeSeries(ctx context.Context, req *monitoringpb.ListTimeSeriesRequest) *TimeSeriesIterator
- func (c *MetricClient) SetGoogleClientInfo(name, version string)
- type MetricDescriptorIterator
- func (it *MetricDescriptorIterator) Next() (*metricpb.MetricDescriptor, error)
- func (it *MetricDescriptorIterator) NextPage() ([]*metricpb.MetricDescriptor, error)
- func (it *MetricDescriptorIterator) NextPageToken() string
- func (it *MetricDescriptorIterator) PageSize() int
- func (it *MetricDescriptorIterator) SetPageSize(pageSize int)
- func (it *MetricDescriptorIterator) SetPageToken(token string)
- 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)
- type MonitoredResourceIterator
- func (it *MonitoredResourceIterator) Next() (*monitoredrespb.MonitoredResource, error)
- func (it *MonitoredResourceIterator) NextPage() ([]*monitoredrespb.MonitoredResource, error)
- func (it *MonitoredResourceIterator) NextPageToken() string
- func (it *MonitoredResourceIterator) PageSize() int
- func (it *MonitoredResourceIterator) SetPageSize(pageSize int)
- func (it *MonitoredResourceIterator) SetPageToken(token string)
- type TimeSeriesIterator
- func (it *TimeSeriesIterator) Next() (*monitoringpb.TimeSeries, error)
- func (it *TimeSeriesIterator) NextPage() ([]*monitoringpb.TimeSeries, error)
- func (it *TimeSeriesIterator) NextPageToken() string
- func (it *TimeSeriesIterator) PageSize() int
- func (it *TimeSeriesIterator) SetPageSize(pageSize int)
- func (it *TimeSeriesIterator) SetPageToken(token string)
Examples ¶
- AgentTranslationClient.CreateCollectdTimeSeries
- GroupClient.CreateGroup
- GroupClient.DeleteGroup
- GroupClient.GetGroup
- GroupClient.ListGroupMembers
- GroupClient.ListGroups
- GroupClient.UpdateGroup
- MetricClient.CreateMetricDescriptor
- MetricClient.CreateTimeSeries
- MetricClient.DeleteMetricDescriptor
- MetricClient.GetMetricDescriptor
- MetricClient.GetMonitoredResourceDescriptor
- MetricClient.ListMetricDescriptors
- MetricClient.ListMonitoredResourceDescriptors
- MetricClient.ListTimeSeries
- NewAgentTranslationClient
- NewGroupClient
- NewMetricClient
Constants ¶
This section is empty.
Variables ¶
var Done = errors.New("iterator done")
Done is returned by iterators on successful completion.
Functions ¶
func AgentTranslationProjectPath ¶
ProjectPath returns the path for the project resource.
func GroupGroupPath ¶
GroupPath returns the path for the group resource.
func GroupProjectPath ¶
ProjectPath returns the path for the project resource.
func MetricMetricDescriptorPathPath ¶
MetricDescriptorPathPath returns the path for the metric descriptor path resource.
func MetricMonitoredResourceDescriptorPath ¶
func MetricMonitoredResourceDescriptorPath(project string, monitoredResourceDescriptor string) string
MonitoredResourceDescriptorPath returns the path for the monitored resource descriptor resource.
func MetricProjectPath ¶
ProjectPath returns the path for the project resource.
Types ¶
type AgentTranslationCallOptions ¶
type AgentTranslationCallOptions struct {
CreateCollectdTimeSeries []gax.CallOption
}
AgentTranslationCallOptions contains the retry settings for each method of this client.
type AgentTranslationClient ¶
type AgentTranslationClient struct { // The call options for this service. CallOptions *AgentTranslationCallOptions // contains filtered or unexported fields }
AgentTranslationClient is a client for interacting with AgentTranslationService.
func NewAgentTranslationClient ¶
func NewAgentTranslationClient(ctx context.Context, opts ...option.ClientOption) (*AgentTranslationClient, error)
NewAgentTranslationClient creates a new agent_translation service client.
The AgentTranslation API allows `collectd`-based agents to write time series data to Cloud Monitoring. See [google.monitoring.v3.MetricService.CreateTimeSeries] instead.
Example ¶
ctx := context.Background() c, err := monitoring.NewAgentTranslationClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*AgentTranslationClient) Close ¶
func (c *AgentTranslationClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AgentTranslationClient) Connection ¶
func (c *AgentTranslationClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*AgentTranslationClient) CreateCollectdTimeSeries ¶
func (c *AgentTranslationClient) CreateCollectdTimeSeries(ctx context.Context, req *monitoringpb.CreateCollectdTimeSeriesRequest) error
**Stackdriver Monitoring Agent only:** Creates a new time series.
<aside class="caution">This method is only for use by the Google Monitoring Agent. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.</aside>
Example ¶
ctx := context.Background() c, err := monitoring.NewAgentTranslationClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.CreateCollectdTimeSeriesRequest{ // TODO: Fill request struct fields. } err = c.CreateCollectdTimeSeries(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*AgentTranslationClient) SetGoogleClientInfo ¶
func (c *AgentTranslationClient) 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.
type GroupCallOptions ¶
type GroupCallOptions struct { ListGroups []gax.CallOption GetGroup []gax.CallOption CreateGroup []gax.CallOption UpdateGroup []gax.CallOption DeleteGroup []gax.CallOption ListGroupMembers []gax.CallOption }
GroupCallOptions contains the retry settings for each method of this client.
type GroupClient ¶
type GroupClient struct { // The call options for this service. CallOptions *GroupCallOptions // contains filtered or unexported fields }
GroupClient is a client for interacting with GroupService.
func NewGroupClient ¶
func NewGroupClient(ctx context.Context, opts ...option.ClientOption) (*GroupClient, error)
NewGroupClient creates a new group service client.
The Group API lets you inspect and manage your [groups](google.monitoring.v3.Group).
A group is a named filter that is used to identify a collection of monitored resources. Groups are typically used to mirror the physical and/or logical topology of the environment. Because group membership is computed dynamically, monitored resources that are started in the future are automatically placed in matching groups. By using a group to name monitored resources in, for example, an alert policy, the target of that alert policy is updated automatically as monitored resources are added and removed from the infrastructure.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*GroupClient) Close ¶
func (c *GroupClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GroupClient) Connection ¶
func (c *GroupClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*GroupClient) CreateGroup ¶
func (c *GroupClient) CreateGroup(ctx context.Context, req *monitoringpb.CreateGroupRequest) (*monitoringpb.Group, error)
CreateGroup creates a new group. The project ID in the URL path must refer to a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.CreateGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateGroup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*GroupClient) DeleteGroup ¶
func (c *GroupClient) DeleteGroup(ctx context.Context, req *monitoringpb.DeleteGroupRequest) error
DeleteGroup deletes an existing group. The project ID in the URL path must refer to a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.DeleteGroupRequest{ // TODO: Fill request struct fields. } err = c.DeleteGroup(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*GroupClient) GetGroup ¶
func (c *GroupClient) GetGroup(ctx context.Context, req *monitoringpb.GetGroupRequest) (*monitoringpb.Group, error)
GetGroup gets a single group. The project ID in the URL path must refer to a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.GetGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.GetGroup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*GroupClient) ListGroupMembers ¶
func (c *GroupClient) ListGroupMembers(ctx context.Context, req *monitoringpb.ListGroupMembersRequest) *MonitoredResourceIterator
ListGroupMembers lists the monitored resources that are members of a group. The project ID in the URL path must refer to a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.ListGroupMembersRequest{ // TODO: Fill request struct fields. } it := c.ListGroupMembers(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*GroupClient) ListGroups ¶
func (c *GroupClient) ListGroups(ctx context.Context, req *monitoringpb.ListGroupsRequest) *GroupIterator
ListGroups lists the existing groups. The project ID in the URL path must refer to a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.ListGroupsRequest{ // TODO: Fill request struct fields. } it := c.ListGroups(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*GroupClient) SetGoogleClientInfo ¶
func (c *GroupClient) 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 (*GroupClient) UpdateGroup ¶
func (c *GroupClient) UpdateGroup(ctx context.Context, req *monitoringpb.UpdateGroupRequest) (*monitoringpb.Group, error)
UpdateGroup updates an existing group. You can change any group attributes except `name`. The project ID in the URL path must refer to a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.UpdateGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateGroup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
type GroupIterator ¶
type GroupIterator struct {
// contains filtered or unexported fields
}
GroupIterator manages a stream of *monitoringpb.Group.
func (*GroupIterator) Next ¶
func (it *GroupIterator) Next() (*monitoringpb.Group, 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 (*GroupIterator) NextPage ¶
func (it *GroupIterator) NextPage() ([]*monitoringpb.Group, 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 (*GroupIterator) NextPageToken ¶
func (it *GroupIterator) 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 (*GroupIterator) PageSize ¶
func (it *GroupIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*GroupIterator) SetPageSize ¶
func (it *GroupIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*GroupIterator) SetPageToken ¶
func (it *GroupIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type MetricCallOptions ¶
type MetricCallOptions struct { ListMonitoredResourceDescriptors []gax.CallOption GetMonitoredResourceDescriptor []gax.CallOption ListMetricDescriptors []gax.CallOption GetMetricDescriptor []gax.CallOption CreateMetricDescriptor []gax.CallOption DeleteMetricDescriptor []gax.CallOption ListTimeSeries []gax.CallOption CreateTimeSeries []gax.CallOption }
MetricCallOptions contains the retry settings for each method of this client.
type MetricClient ¶
type MetricClient struct { // The call options for this service. CallOptions *MetricCallOptions // contains filtered or unexported fields }
MetricClient is a client for interacting with MetricService.
func NewMetricClient ¶
func NewMetricClient(ctx context.Context, opts ...option.ClientOption) (*MetricClient, error)
NewMetricClient creates a new metric service client.
Manages metric descriptors, monitored resource descriptors, and time series data.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*MetricClient) Close ¶
func (c *MetricClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*MetricClient) Connection ¶
func (c *MetricClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*MetricClient) CreateMetricDescriptor ¶
func (c *MetricClient) CreateMetricDescriptor(ctx context.Context, req *monitoringpb.CreateMetricDescriptorRequest) (*metricpb.MetricDescriptor, error)
CreateMetricDescriptor creates a new metric descriptor. User-created metric descriptors define [custom metrics](/monitoring/custom-metrics).
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.CreateMetricDescriptorRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateMetricDescriptor(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*MetricClient) CreateTimeSeries ¶
func (c *MetricClient) CreateTimeSeries(ctx context.Context, req *monitoringpb.CreateTimeSeriesRequest) error
CreateTimeSeries creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.CreateTimeSeriesRequest{ // TODO: Fill request struct fields. } err = c.CreateTimeSeries(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*MetricClient) DeleteMetricDescriptor ¶
func (c *MetricClient) DeleteMetricDescriptor(ctx context.Context, req *monitoringpb.DeleteMetricDescriptorRequest) error
DeleteMetricDescriptor deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can be deleted.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.DeleteMetricDescriptorRequest{ // TODO: Fill request struct fields. } err = c.DeleteMetricDescriptor(ctx, req) if err != nil { // TODO: Handle error. }
Output:
func (*MetricClient) GetMetricDescriptor ¶
func (c *MetricClient) GetMetricDescriptor(ctx context.Context, req *monitoringpb.GetMetricDescriptorRequest) (*metricpb.MetricDescriptor, error)
GetMetricDescriptor gets a single metric descriptor. This method does not require a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.GetMetricDescriptorRequest{ // TODO: Fill request struct fields. } resp, err := c.GetMetricDescriptor(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*MetricClient) GetMonitoredResourceDescriptor ¶
func (c *MetricClient) GetMonitoredResourceDescriptor(ctx context.Context, req *monitoringpb.GetMonitoredResourceDescriptorRequest) (*monitoredrespb.MonitoredResourceDescriptor, error)
GetMonitoredResourceDescriptor gets a single monitored resource descriptor. This method does not require a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.GetMonitoredResourceDescriptorRequest{ // TODO: Fill request struct fields. } resp, err := c.GetMonitoredResourceDescriptor(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*MetricClient) ListMetricDescriptors ¶
func (c *MetricClient) ListMetricDescriptors(ctx context.Context, req *monitoringpb.ListMetricDescriptorsRequest) *MetricDescriptorIterator
ListMetricDescriptors lists metric descriptors that match a filter. This method does not require a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.ListMetricDescriptorsRequest{ // TODO: Fill request struct fields. } it := c.ListMetricDescriptors(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*MetricClient) ListMonitoredResourceDescriptors ¶
func (c *MetricClient) ListMonitoredResourceDescriptors(ctx context.Context, req *monitoringpb.ListMonitoredResourceDescriptorsRequest) *MonitoredResourceDescriptorIterator
ListMonitoredResourceDescriptors lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.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 (*MetricClient) ListTimeSeries ¶
func (c *MetricClient) ListTimeSeries(ctx context.Context, req *monitoringpb.ListTimeSeriesRequest) *TimeSeriesIterator
ListTimeSeries lists time series that match a filter. This method does not require a Stackdriver account.
Example ¶
ctx := context.Background() c, err := monitoring.NewMetricClient(ctx) if err != nil { // TODO: Handle error. } req := &monitoringpb.ListTimeSeriesRequest{ // TODO: Fill request struct fields. } it := c.ListTimeSeries(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*MetricClient) SetGoogleClientInfo ¶
func (c *MetricClient) 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.
type MetricDescriptorIterator ¶
type MetricDescriptorIterator struct {
// contains filtered or unexported fields
}
MetricDescriptorIterator manages a stream of *metricpb.MetricDescriptor.
func (*MetricDescriptorIterator) Next ¶
func (it *MetricDescriptorIterator) Next() (*metricpb.MetricDescriptor, 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 (*MetricDescriptorIterator) NextPage ¶
func (it *MetricDescriptorIterator) NextPage() ([]*metricpb.MetricDescriptor, 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 (*MetricDescriptorIterator) NextPageToken ¶
func (it *MetricDescriptorIterator) 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 (*MetricDescriptorIterator) PageSize ¶
func (it *MetricDescriptorIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*MetricDescriptorIterator) SetPageSize ¶
func (it *MetricDescriptorIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*MetricDescriptorIterator) SetPageToken ¶
func (it *MetricDescriptorIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
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.
type MonitoredResourceIterator ¶
type MonitoredResourceIterator struct {
// contains filtered or unexported fields
}
MonitoredResourceIterator manages a stream of *monitoredrespb.MonitoredResource.
func (*MonitoredResourceIterator) Next ¶
func (it *MonitoredResourceIterator) Next() (*monitoredrespb.MonitoredResource, 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 (*MonitoredResourceIterator) NextPage ¶
func (it *MonitoredResourceIterator) NextPage() ([]*monitoredrespb.MonitoredResource, 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 (*MonitoredResourceIterator) NextPageToken ¶
func (it *MonitoredResourceIterator) 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 (*MonitoredResourceIterator) PageSize ¶
func (it *MonitoredResourceIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*MonitoredResourceIterator) SetPageSize ¶
func (it *MonitoredResourceIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*MonitoredResourceIterator) SetPageToken ¶
func (it *MonitoredResourceIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type TimeSeriesIterator ¶
type TimeSeriesIterator struct {
// contains filtered or unexported fields
}
TimeSeriesIterator manages a stream of *monitoringpb.TimeSeries.
func (*TimeSeriesIterator) Next ¶
func (it *TimeSeriesIterator) Next() (*monitoringpb.TimeSeries, 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 (*TimeSeriesIterator) NextPage ¶
func (it *TimeSeriesIterator) NextPage() ([]*monitoringpb.TimeSeries, 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 (*TimeSeriesIterator) NextPageToken ¶
func (it *TimeSeriesIterator) 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 (*TimeSeriesIterator) PageSize ¶
func (it *TimeSeriesIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*TimeSeriesIterator) SetPageSize ¶
func (it *TimeSeriesIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*TimeSeriesIterator) SetPageToken ¶
func (it *TimeSeriesIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.