Involved Source Filesconfig_client.go
Package logging is an auto-generated package for the
Stackdriver Logging API.
NOTE: This package is in alpha. It is not stable, and is likely to change.
Writes log entries and manages your Logging configuration.
Use of Context
The ctx passed to NewClient is used for authentication requests and
for creating the underlying connection, but is not used for subsequent calls.
Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more
please visit godoc.org/cloud.google.com/go.
Use the client at cloud.google.com/go/logging in preference to this.
logging_client.gometrics_client.gopath_funcs.go
Package-Level Type Names (total 12, all are exported)
Client is a client for interacting with Stackdriver Logging API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The call options for this service.
The gRPC API client.
The connection to the service.
The x-goog-* metadata to be sent with each request.
Close closes the connection to the API service. The user should invoke this when
the client is no longer required.
Connection returns the client's connection to the API service.
DeleteLog deletes all the log entries in a log.
The log reappears if it receives new entries.
Log entries written shortly before the delete operation might not be
deleted.
ListLogEntries lists log entries. Use this method to retrieve log entries from
Logging. For ways to export log entries, see
Exporting Logs (at /logging/docs/export).
ListLogs lists the logs in projects, organizations, folders, or billing accounts.
Only logs that have entries are listed.
ListMonitoredResourceDescriptors lists the descriptors for monitored resource types used by Logging.
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.
WriteLogEntries writes log entries to Logging. This API method is the
only way to send log entries to Logging. This method
is used, directly or indirectly, by the Logging agent
(fluentd) and all logging libraries configured to use Logging.
A single request may contain log entries for a maximum of 1000
different resources (projects, organizations, billing accounts or
folders)
*T : io.Closer
func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)
ConfigClient is a client for interacting with Stackdriver Logging API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The call options for this service.
The gRPC API client.
The connection to the service.
The x-goog-* metadata to be sent with each request.
Close closes the connection to the API service. The user should invoke this when
the client is no longer required.
Connection returns the client's connection to the API service.
CreateExclusion creates a new exclusion in a specified parent resource.
Only log entries belonging to that resource can be excluded.
You can have up to 10 exclusions in a resource.
CreateSink creates a sink that exports specified log entries to a destination. The
export of newly-ingested log entries begins immediately, unless the sink's
writer_identity is not permitted to write to the destination. A sink can
export log entries only from the resource owning the sink.
DeleteExclusion deletes an exclusion.
DeleteSink deletes a sink. If the sink has a unique writer_identity, then that
service account is also deleted.
GetExclusion gets the description of an exclusion.
GetSink gets a sink.
ListExclusions lists all the exclusions in a parent resource.
ListSinks lists sinks.
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.
UpdateExclusion changes one or more properties of an existing exclusion.
UpdateSink updates a sink. This method replaces the following fields in the existing
sink with values from the new sink: destination, and filter.
The updated sink might also have a new writer_identity; see the
unique_writer_identity field.
*T : io.Closer
func NewConfigClient(ctx context.Context, opts ...option.ClientOption) (*ConfigClient, error)
LogEntryIterator manages a stream of *loggingpb.LogEntry.
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.
items[]*loggingpb.LogEntrynextFuncfunc() errorpageInfo*iterator.PageInfo
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.
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
(*T) bufLen() int(*T) takeBuf() interface{}
*T : google.golang.org/api/iterator.Pageable
func (*Client).ListLogEntries(ctx context.Context, req *loggingpb.ListLogEntriesRequest, opts ...gax.CallOption) *LogEntryIterator
LogExclusionIterator manages a stream of *loggingpb.LogExclusion.
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.
items[]*loggingpb.LogExclusionnextFuncfunc() errorpageInfo*iterator.PageInfo
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.
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
(*T) bufLen() int(*T) takeBuf() interface{}
*T : google.golang.org/api/iterator.Pageable
func (*ConfigClient).ListExclusions(ctx context.Context, req *loggingpb.ListExclusionsRequest, opts ...gax.CallOption) *LogExclusionIterator
LogMetricIterator manages a stream of *loggingpb.LogMetric.
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.
items[]*loggingpb.LogMetricnextFuncfunc() errorpageInfo*iterator.PageInfo
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.
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
(*T) bufLen() int(*T) takeBuf() interface{}
*T : google.golang.org/api/iterator.Pageable
func (*MetricsClient).ListLogMetrics(ctx context.Context, req *loggingpb.ListLogMetricsRequest, opts ...gax.CallOption) *LogMetricIterator
LogSinkIterator manages a stream of *loggingpb.LogSink.
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.
items[]*loggingpb.LogSinknextFuncfunc() errorpageInfo*iterator.PageInfo
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.
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
(*T) bufLen() int(*T) takeBuf() interface{}
*T : google.golang.org/api/iterator.Pageable
func (*ConfigClient).ListSinks(ctx context.Context, req *loggingpb.ListSinksRequest, opts ...gax.CallOption) *LogSinkIterator
MetricsClient is a client for interacting with Stackdriver Logging API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The call options for this service.
The connection to the service.
The gRPC API client.
The x-goog-* metadata to be sent with each request.
Close closes the connection to the API service. The user should invoke this when
the client is no longer required.
Connection returns the client's connection to the API service.
CreateLogMetric creates a logs-based metric.
DeleteLogMetric deletes a logs-based metric.
GetLogMetric gets a logs-based metric.
ListLogMetrics lists logs-based metrics.
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.
UpdateLogMetric creates or updates a logs-based metric.
*T : io.Closer
func NewMetricsClient(ctx context.Context, opts ...option.ClientOption) (*MetricsClient, error)
MonitoredResourceDescriptorIterator manages a stream of *monitoredrespb.MonitoredResourceDescriptor.
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.
items[]*monitoredrespb.MonitoredResourceDescriptornextFuncfunc() errorpageInfo*iterator.PageInfo
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.
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
(*T) bufLen() int(*T) takeBuf() interface{}
*T : google.golang.org/api/iterator.Pageable
func (*Client).ListMonitoredResourceDescriptors(ctx context.Context, req *loggingpb.ListMonitoredResourceDescriptorsRequest, opts ...gax.CallOption) *MonitoredResourceDescriptorIterator
StringIterator manages a stream of string.
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.
items[]stringnextFuncfunc() errorpageInfo*iterator.PageInfo
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.
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
(*T) bufLen() int(*T) takeBuf() interface{}
*T : google.golang.org/api/iterator.Pageable
func (*Client).ListLogs(ctx context.Context, req *loggingpb.ListLogsRequest, opts ...gax.CallOption) *StringIterator
Package-Level Functions (total 19, in which 11 are exported)
ConfigExclusionPath returns the path for the exclusion resource.
Deprecated: Use
fmt.Sprintf("projects/%s/exclusions/%s", project, exclusion)
instead.
ConfigProjectPath returns the path for the project resource.
Deprecated: Use
fmt.Sprintf("projects/%s", project)
instead.
ConfigSinkPath returns the path for the sink resource.
Deprecated: Use
fmt.Sprintf("projects/%s/sinks/%s", project, sink)
instead.
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
LogPath returns the path for the log resource.
Deprecated: Use
fmt.Sprintf("projects/%s/logs/%s", project, log)
instead.
MetricsMetricPath returns the path for the metric resource.
Deprecated: Use
fmt.Sprintf("projects/%s/metrics/%s", project, metric)
instead.
MetricsProjectPath returns the path for the project resource.
Deprecated: Use
fmt.Sprintf("projects/%s", project)
instead.
NewClient creates a new logging service v2 client.
Service for ingesting and querying logs.
NewConfigClient creates a new config service v2 client.
Service for configuring sinks used to export log entries out of
Logging.
NewMetricsClient creates a new metrics service v2 client.
Service for configuring logs-based metrics.
ProjectPath returns the path for the project resource.
Deprecated: Use
fmt.Sprintf("projects/%s", project)
instead.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.