package errorreporting
import "cloud.google.com/go/errorreporting/apiv1beta1"
Package errorreporting is an experimental, auto-generated package for the Stackdriver Error Reporting 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.
Use the client at cloud.google.com/go/errorreporting in preference to this.
Index ¶
- func DefaultAuthScopes() []string
- func ErrorGroupGroupPath(project, 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) PageInfo() *iterator.PageInfo
- type ErrorGroupCallOptions
- type ErrorGroupClient
- func NewErrorGroupClient(ctx context.Context, opts ...option.ClientOption) (*ErrorGroupClient, error)
- func (c *ErrorGroupClient) Close() error
- func (c *ErrorGroupClient) Connection() *grpc.ClientConn
- func (c *ErrorGroupClient) GetGroup(ctx context.Context, req *clouderrorreportingpb.GetGroupRequest, opts ...gax.CallOption) (*clouderrorreportingpb.ErrorGroup, error)
- func (c *ErrorGroupClient) SetGoogleClientInfo(keyval ...string)
- func (c *ErrorGroupClient) UpdateGroup(ctx context.Context, req *clouderrorreportingpb.UpdateGroupRequest, opts ...gax.CallOption) (*clouderrorreportingpb.ErrorGroup, error)
- type ErrorGroupStatsIterator
- func (it *ErrorGroupStatsIterator) Next() (*clouderrorreportingpb.ErrorGroupStats, error)
- func (it *ErrorGroupStatsIterator) PageInfo() *iterator.PageInfo
- type ErrorStatsCallOptions
- type ErrorStatsClient
- func NewErrorStatsClient(ctx context.Context, opts ...option.ClientOption) (*ErrorStatsClient, error)
- func (c *ErrorStatsClient) Close() error
- func (c *ErrorStatsClient) Connection() *grpc.ClientConn
- func (c *ErrorStatsClient) DeleteEvents(ctx context.Context, req *clouderrorreportingpb.DeleteEventsRequest, opts ...gax.CallOption) (*clouderrorreportingpb.DeleteEventsResponse, error)
- func (c *ErrorStatsClient) ListEvents(ctx context.Context, req *clouderrorreportingpb.ListEventsRequest, opts ...gax.CallOption) *ErrorEventIterator
- func (c *ErrorStatsClient) ListGroupStats(ctx context.Context, req *clouderrorreportingpb.ListGroupStatsRequest, opts ...gax.CallOption) *ErrorGroupStatsIterator
- func (c *ErrorStatsClient) SetGoogleClientInfo(keyval ...string)
- type ReportErrorsCallOptions
- type ReportErrorsClient
- func NewReportErrorsClient(ctx context.Context, opts ...option.ClientOption) (*ReportErrorsClient, error)
- func (c *ReportErrorsClient) Close() error
- func (c *ReportErrorsClient) Connection() *grpc.ClientConn
- func (c *ReportErrorsClient) ReportErrorEvent(ctx context.Context, req *clouderrorreportingpb.ReportErrorEventRequest, opts ...gax.CallOption) (*clouderrorreportingpb.ReportErrorEventResponse, error)
- func (c *ReportErrorsClient) SetGoogleClientInfo(keyval ...string)
Examples ¶
- ErrorGroupClient.GetGroup
- ErrorGroupClient.UpdateGroup
- ErrorStatsClient.DeleteEvents
- ErrorStatsClient.ListEvents
- ErrorStatsClient.ListGroupStats
- NewErrorGroupClient
- NewErrorStatsClient
- NewReportErrorsClient
- ReportErrorsClient.ReportErrorEvent
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
func ErrorGroupGroupPath ¶
ErrorGroupGroupPath returns the path for the group resource.
func ErrorStatsProjectPath ¶
ErrorStatsProjectPath returns the path for the project resource.
func ReportErrorsProjectPath ¶
ReportErrorsProjectPath returns the path for the project resource.
Types ¶
type ErrorEventIterator ¶
type ErrorEventIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*clouderrorreportingpb.ErrorEvent, nextPageToken string, err error) // 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 iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ErrorEventIterator) PageInfo ¶
func (it *ErrorEventIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ErrorGroupCallOptions ¶
type ErrorGroupCallOptions struct { GetGroup []gax.CallOption UpdateGroup []gax.CallOption }
ErrorGroupCallOptions contains the retry settings for each method of ErrorGroupClient.
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 Stackdriver Error Reporting API.
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.
Code:
Example¶
{
ctx := context.Background()
c, err := errorreporting.NewErrorGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use client.
_ = c
}
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, opts ...gax.CallOption) (*clouderrorreportingpb.ErrorGroup, error)
GetGroup get the specified group.
Code:
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
}
func (*ErrorGroupClient) SetGoogleClientInfo ¶
func (c *ErrorGroupClient) SetGoogleClientInfo(keyval ...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, opts ...gax.CallOption) (*clouderrorreportingpb.ErrorGroup, error)
UpdateGroup replace the data for the specified group.
Fails if the group does not exist.
Code:
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
}
type ErrorGroupStatsIterator ¶
type ErrorGroupStatsIterator struct { // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*clouderrorreportingpb.ErrorGroupStats, nextPageToken string, err error) // 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 iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ErrorGroupStatsIterator) PageInfo ¶
func (it *ErrorGroupStatsIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ErrorStatsCallOptions ¶
type ErrorStatsCallOptions struct { ListGroupStats []gax.CallOption ListEvents []gax.CallOption DeleteEvents []gax.CallOption }
ErrorStatsCallOptions contains the retry settings for each method of ErrorStatsClient.
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 Stackdriver Error Reporting API.
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.
Code:
Example¶
{
ctx := context.Background()
c, err := errorreporting.NewErrorStatsClient(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use client.
_ = c
}
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, opts ...gax.CallOption) (*clouderrorreportingpb.DeleteEventsResponse, error)
DeleteEvents deletes all error events of a given project.
Code:
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
}
func (*ErrorStatsClient) ListEvents ¶
func (c *ErrorStatsClient) ListEvents(ctx context.Context, req *clouderrorreportingpb.ListEventsRequest, opts ...gax.CallOption) *ErrorEventIterator
ListEvents lists the specified events.
Code:
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 == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*ErrorStatsClient) ListGroupStats ¶
func (c *ErrorStatsClient) ListGroupStats(ctx context.Context, req *clouderrorreportingpb.ListGroupStatsRequest, opts ...gax.CallOption) *ErrorGroupStatsIterator
ListGroupStats lists the specified groups.
Code:
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 == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*ErrorStatsClient) SetGoogleClientInfo ¶
func (c *ErrorStatsClient) SetGoogleClientInfo(keyval ...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 ReportErrorsClient.
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 Stackdriver Error Reporting API.
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.
Code:
Example¶
{
ctx := context.Background()
c, err := errorreporting.NewReportErrorsClient(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use client.
_ = c
}
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, opts ...gax.CallOption) (*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>
Code:
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
}
func (*ReportErrorsClient) SetGoogleClientInfo ¶
func (c *ReportErrorsClient) SetGoogleClientInfo(keyval ...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.
Source Files ¶
doc.go error_group_client.go error_stats_client.go report_errors_client.go
- Version
- v0.14.0
- Published
- Sep 27, 2017
- Platform
- windows/amd64
- Imports
- 12 packages
- Last checked
- 1 hour ago –
Tools for package owners.