Documentation ¶
Overview ¶
Package errorreporting is an experimental, auto-generated package for the errorreporting API.
Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors.
Index ¶
- Variables
- func ErrorGroupGroupPath(project string, group string) string
- func ErrorStatsProjectPath(project string) string
- func ReportErrorsProjectPath(project string) string
- type ErrorEventIterator
- func (it *ErrorEventIterator) Next() (*clouderrorreportingpb.ErrorEvent, error)
- func (it *ErrorEventIterator) NextPage() ([]*clouderrorreportingpb.ErrorEvent, error)
- func (it *ErrorEventIterator) NextPageToken() string
- func (it *ErrorEventIterator) PageSize() int
- func (it *ErrorEventIterator) SetPageSize(pageSize int)
- func (it *ErrorEventIterator) SetPageToken(token string)
- type ErrorGroupCallOptions
- type ErrorGroupClient
- func (c *ErrorGroupClient) Close() error
- func (c *ErrorGroupClient) Connection() *grpc.ClientConn
- func (c *ErrorGroupClient) GetGroup(ctx context.Context, req *clouderrorreportingpb.GetGroupRequest) (*clouderrorreportingpb.ErrorGroup, error)
- func (c *ErrorGroupClient) SetGoogleClientInfo(name, version string)
- func (c *ErrorGroupClient) UpdateGroup(ctx context.Context, req *clouderrorreportingpb.UpdateGroupRequest) (*clouderrorreportingpb.ErrorGroup, error)
- type ErrorGroupStatsIterator
- func (it *ErrorGroupStatsIterator) Next() (*clouderrorreportingpb.ErrorGroupStats, error)
- func (it *ErrorGroupStatsIterator) NextPage() ([]*clouderrorreportingpb.ErrorGroupStats, error)
- func (it *ErrorGroupStatsIterator) NextPageToken() string
- func (it *ErrorGroupStatsIterator) PageSize() int
- func (it *ErrorGroupStatsIterator) SetPageSize(pageSize int)
- func (it *ErrorGroupStatsIterator) SetPageToken(token string)
- type ErrorStatsCallOptions
- type ErrorStatsClient
- func (c *ErrorStatsClient) Close() error
- func (c *ErrorStatsClient) Connection() *grpc.ClientConn
- func (c *ErrorStatsClient) DeleteEvents(ctx context.Context, req *clouderrorreportingpb.DeleteEventsRequest) (*clouderrorreportingpb.DeleteEventsResponse, error)
- func (c *ErrorStatsClient) ListEvents(ctx context.Context, req *clouderrorreportingpb.ListEventsRequest) *ErrorEventIterator
- func (c *ErrorStatsClient) ListGroupStats(ctx context.Context, req *clouderrorreportingpb.ListGroupStatsRequest) *ErrorGroupStatsIterator
- func (c *ErrorStatsClient) SetGoogleClientInfo(name, version string)
- type ReportErrorsCallOptions
- type ReportErrorsClient
- func (c *ReportErrorsClient) Close() error
- func (c *ReportErrorsClient) Connection() *grpc.ClientConn
- func (c *ReportErrorsClient) ReportErrorEvent(ctx context.Context, req *clouderrorreportingpb.ReportErrorEventRequest) (*clouderrorreportingpb.ReportErrorEventResponse, error)
- func (c *ReportErrorsClient) SetGoogleClientInfo(name, version string)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var Done = errors.New("iterator done")
Done is returned by iterators on successful completion.
Functions ¶
func ErrorGroupGroupPath ¶
GroupPath returns the path for the group resource.
func ErrorStatsProjectPath ¶
ProjectPath returns the path for the project resource.
func ReportErrorsProjectPath ¶
ProjectPath returns the path for the project resource.
Types ¶
type ErrorEventIterator ¶
type ErrorEventIterator struct {
// contains filtered or unexported fields
}
ErrorEventIterator manages a stream of *clouderrorreportingpb.ErrorEvent.
func (*ErrorEventIterator) Next ¶
func (it *ErrorEventIterator) Next() (*clouderrorreportingpb.ErrorEvent, 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 (*ErrorEventIterator) NextPage ¶
func (it *ErrorEventIterator) NextPage() ([]*clouderrorreportingpb.ErrorEvent, 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 (*ErrorEventIterator) NextPageToken ¶
func (it *ErrorEventIterator) 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 (*ErrorEventIterator) PageSize ¶
func (it *ErrorEventIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*ErrorEventIterator) SetPageSize ¶
func (it *ErrorEventIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*ErrorEventIterator) SetPageToken ¶
func (it *ErrorEventIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type ErrorGroupCallOptions ¶
type ErrorGroupCallOptions struct { GetGroup []gax.CallOption UpdateGroup []gax.CallOption }
ErrorGroupCallOptions contains the retry settings for each method of this client.
type ErrorGroupClient ¶
type ErrorGroupClient struct { // The call options for this service. CallOptions *ErrorGroupCallOptions // contains filtered or unexported fields }
ErrorGroupClient is a client for interacting with ErrorGroupService.
func NewErrorGroupClient ¶
func NewErrorGroupClient(ctx context.Context, opts ...option.ClientOption) (*ErrorGroupClient, error)
NewErrorGroupClient creates a new error_group service client.
Service for retrieving and updating individual error groups.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorGroupClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*ErrorGroupClient) Close ¶
func (c *ErrorGroupClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ErrorGroupClient) Connection ¶
func (c *ErrorGroupClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*ErrorGroupClient) GetGroup ¶
func (c *ErrorGroupClient) GetGroup(ctx context.Context, req *clouderrorreportingpb.GetGroupRequest) (*clouderrorreportingpb.ErrorGroup, error)
GetGroup get the specified group.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &clouderrorreportingpb.GetGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.GetGroup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*ErrorGroupClient) SetGoogleClientInfo ¶
func (c *ErrorGroupClient) 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 (*ErrorGroupClient) UpdateGroup ¶
func (c *ErrorGroupClient) UpdateGroup(ctx context.Context, req *clouderrorreportingpb.UpdateGroupRequest) (*clouderrorreportingpb.ErrorGroup, error)
UpdateGroup replace the data for the specified group. Fails if the group does not exist.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorGroupClient(ctx) if err != nil { // TODO: Handle error. } req := &clouderrorreportingpb.UpdateGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateGroup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
type ErrorGroupStatsIterator ¶
type ErrorGroupStatsIterator struct {
// contains filtered or unexported fields
}
ErrorGroupStatsIterator manages a stream of *clouderrorreportingpb.ErrorGroupStats.
func (*ErrorGroupStatsIterator) Next ¶
func (it *ErrorGroupStatsIterator) Next() (*clouderrorreportingpb.ErrorGroupStats, 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 (*ErrorGroupStatsIterator) NextPage ¶
func (it *ErrorGroupStatsIterator) NextPage() ([]*clouderrorreportingpb.ErrorGroupStats, 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 (*ErrorGroupStatsIterator) NextPageToken ¶
func (it *ErrorGroupStatsIterator) 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 (*ErrorGroupStatsIterator) PageSize ¶
func (it *ErrorGroupStatsIterator) PageSize() int
PageSize returns the page size for all subsequent calls to NextPage.
func (*ErrorGroupStatsIterator) SetPageSize ¶
func (it *ErrorGroupStatsIterator) SetPageSize(pageSize int)
SetPageSize sets the page size for all subsequent calls to NextPage.
func (*ErrorGroupStatsIterator) SetPageToken ¶
func (it *ErrorGroupStatsIterator) SetPageToken(token string)
SetPageToken sets the page token for the next call to NextPage, to resume the iteration from a previous point.
type ErrorStatsCallOptions ¶
type ErrorStatsCallOptions struct { ListGroupStats []gax.CallOption ListEvents []gax.CallOption DeleteEvents []gax.CallOption }
ErrorStatsCallOptions contains the retry settings for each method of this client.
type ErrorStatsClient ¶
type ErrorStatsClient struct { // The call options for this service. CallOptions *ErrorStatsCallOptions // contains filtered or unexported fields }
ErrorStatsClient is a client for interacting with ErrorStatsService.
func NewErrorStatsClient ¶
func NewErrorStatsClient(ctx context.Context, opts ...option.ClientOption) (*ErrorStatsClient, error)
NewErrorStatsClient creates a new error_stats service client.
An API for retrieving and managing error statistics as well as data for individual events.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorStatsClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*ErrorStatsClient) Close ¶
func (c *ErrorStatsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ErrorStatsClient) Connection ¶
func (c *ErrorStatsClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*ErrorStatsClient) DeleteEvents ¶
func (c *ErrorStatsClient) DeleteEvents(ctx context.Context, req *clouderrorreportingpb.DeleteEventsRequest) (*clouderrorreportingpb.DeleteEventsResponse, error)
DeleteEvents deletes all error events of a given project.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorStatsClient(ctx) if err != nil { // TODO: Handle error. } req := &clouderrorreportingpb.DeleteEventsRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteEvents(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*ErrorStatsClient) ListEvents ¶
func (c *ErrorStatsClient) ListEvents(ctx context.Context, req *clouderrorreportingpb.ListEventsRequest) *ErrorEventIterator
ListEvents lists the specified events.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorStatsClient(ctx) if err != nil { // TODO: Handle error. } req := &clouderrorreportingpb.ListEventsRequest{ // TODO: Fill request struct fields. } it := c.ListEvents(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*ErrorStatsClient) ListGroupStats ¶
func (c *ErrorStatsClient) ListGroupStats(ctx context.Context, req *clouderrorreportingpb.ListGroupStatsRequest) *ErrorGroupStatsIterator
ListGroupStats lists the specified groups.
Example ¶
ctx := context.Background() c, err := errorreporting.NewErrorStatsClient(ctx) if err != nil { // TODO: Handle error. } req := &clouderrorreportingpb.ListGroupStatsRequest{ // TODO: Fill request struct fields. } it := c.ListGroupStats(ctx, req) for { resp, err := it.Next() if err != nil { // TODO: Handle error. break } // TODO: Use resp. _ = resp }
Output:
func (*ErrorStatsClient) SetGoogleClientInfo ¶
func (c *ErrorStatsClient) 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 ReportErrorsCallOptions ¶
type ReportErrorsCallOptions struct {
ReportErrorEvent []gax.CallOption
}
ReportErrorsCallOptions contains the retry settings for each method of this client.
type ReportErrorsClient ¶
type ReportErrorsClient struct { // The call options for this service. CallOptions *ReportErrorsCallOptions // contains filtered or unexported fields }
ReportErrorsClient is a client for interacting with ReportErrorsService.
func NewReportErrorsClient ¶
func NewReportErrorsClient(ctx context.Context, opts ...option.ClientOption) (*ReportErrorsClient, error)
NewReportErrorsClient creates a new report_errors service client.
An API for reporting error events.
Example ¶
ctx := context.Background() c, err := errorreporting.NewReportErrorsClient(ctx) if err != nil { // TODO: Handle error. } // TODO: Use client. _ = c
Output:
func (*ReportErrorsClient) Close ¶
func (c *ReportErrorsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ReportErrorsClient) Connection ¶
func (c *ReportErrorsClient) Connection() *grpc.ClientConn
Connection returns the client's connection to the API service.
func (*ReportErrorsClient) ReportErrorEvent ¶
func (c *ReportErrorsClient) ReportErrorEvent(ctx context.Context, req *clouderrorreportingpb.ReportErrorEventRequest) (*clouderrorreportingpb.ReportErrorEventResponse, error)
ReportErrorEvent report an individual error event.
This endpoint accepts <strong>either</strong> an OAuth token, <strong>or</strong> an <a href="https://support.google.com/cloud/answer/6158862">API key</a> for authentication. To use an API key, append it to the URL as the value of a `key` parameter. For example: <pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
Example ¶
ctx := context.Background() c, err := errorreporting.NewReportErrorsClient(ctx) if err != nil { // TODO: Handle error. } req := &clouderrorreportingpb.ReportErrorEventRequest{ // TODO: Fill request struct fields. } resp, err := c.ReportErrorEvent(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Output:
func (*ReportErrorsClient) SetGoogleClientInfo ¶
func (c *ReportErrorsClient) 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.