errorreporting

package
v0.0.0-...-0848a1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

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

Examples

Constants

This section is empty.

Variables

View Source
var Done = errors.New("iterator done")

Done is returned by iterators on successful completion.

Functions

func ErrorGroupGroupPath

func ErrorGroupGroupPath(project string, group string) string

GroupPath returns the path for the group resource.

func ErrorStatsProjectPath

func ErrorStatsProjectPath(project string) string

ProjectPath returns the path for the project resource.

func ReportErrorsProjectPath

func ReportErrorsProjectPath(project string) string

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

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

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

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

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

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

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

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

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL