mirror of
https://github.com/restic/restic.git
synced 2025-08-23 16:17:53 +00:00
Update dependencies
This commit is contained in:
44
vendor/cloud.google.com/go/logging/apiv2/config_client.go
generated
vendored
44
vendor/cloud.google.com/go/logging/apiv2/config_client.go
generated
vendored
@@ -31,11 +31,6 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
var (
|
||||
configProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
|
||||
configSinkPathTemplate = gax.MustCompilePathTemplate("projects/{project}/sinks/{sink}")
|
||||
)
|
||||
|
||||
// ConfigCallOptions contains the retry settings for each method of ConfigClient.
|
||||
type ConfigCallOptions struct {
|
||||
ListSinks []gax.CallOption
|
||||
@@ -133,25 +128,20 @@ func (c *ConfigClient) SetGoogleClientInfo(keyval ...string) {
|
||||
|
||||
// ConfigProjectPath returns the path for the project resource.
|
||||
func ConfigProjectPath(project string) string {
|
||||
path, err := configProjectPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
""
|
||||
}
|
||||
|
||||
// ConfigSinkPath returns the path for the sink resource.
|
||||
func ConfigSinkPath(project, sink string) string {
|
||||
path, err := configSinkPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
"sink": sink,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
"/sinks/" +
|
||||
sink +
|
||||
""
|
||||
}
|
||||
|
||||
// ListSinks lists sinks.
|
||||
@@ -208,7 +198,7 @@ func (c *ConfigClient) GetSink(ctx context.Context, req *loggingpb.GetSinkReques
|
||||
// CreateSink creates a sink that exports specified log entries to a destination. The
|
||||
// export of newly-ingested log entries begins immediately, unless the current
|
||||
// time is outside the sink's start and end times or the sink's
|
||||
// `writer_identity` is not permitted to write to the destination. A sink can
|
||||
// writer_identity is not permitted to write to the destination. A sink can
|
||||
// export log entries only from the resource owning the sink.
|
||||
func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
@@ -227,12 +217,12 @@ func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSink
|
||||
|
||||
// UpdateSink updates a sink. If the named sink doesn't exist, then this method is
|
||||
// identical to
|
||||
// [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create).
|
||||
// sinks.create (at /logging/docs/api/reference/rest/v2/projects.sinks/create).
|
||||
// If the named sink does exist, then this method replaces the following
|
||||
// fields in the existing sink with values from the new sink: `destination`,
|
||||
// `filter`, `output_version_format`, `start_time`, and `end_time`.
|
||||
// The updated filter might also have a new `writer_identity`; see the
|
||||
// `unique_writer_identity` field.
|
||||
// fields in the existing sink with values from the new sink: destination,
|
||||
// filter, output_version_format, start_time, and end_time.
|
||||
// The updated filter might also have a new writer_identity; see the
|
||||
// unique_writer_identity field.
|
||||
func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.UpdateSink[0:len(c.CallOptions.UpdateSink):len(c.CallOptions.UpdateSink)], opts...)
|
||||
@@ -248,7 +238,7 @@ func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSink
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// DeleteSink deletes a sink. If the sink has a unique `writer_identity`, then that
|
||||
// DeleteSink deletes a sink. If the sink has a unique writer_identity, then that
|
||||
// service account is also deleted.
|
||||
func (c *ConfigClient) DeleteSink(ctx context.Context, req *loggingpb.DeleteSinkRequest, opts ...gax.CallOption) error {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
|
3
vendor/cloud.google.com/go/logging/apiv2/doc.go
generated
vendored
3
vendor/cloud.google.com/go/logging/apiv2/doc.go
generated
vendored
@@ -35,8 +35,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context {
|
||||
return metadata.NewOutgoingContext(ctx, md)
|
||||
}
|
||||
|
||||
// DefaultAuthScopes reports the authentication scopes required
|
||||
// by this package.
|
||||
// DefaultAuthScopes reports the default set of authentication scopes to use with this package.
|
||||
func DefaultAuthScopes() []string {
|
||||
return []string{
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
|
32
vendor/cloud.google.com/go/logging/apiv2/logging_client.go
generated
vendored
32
vendor/cloud.google.com/go/logging/apiv2/logging_client.go
generated
vendored
@@ -32,11 +32,6 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
var (
|
||||
loggingProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
|
||||
loggingLogPathTemplate = gax.MustCompilePathTemplate("projects/{project}/logs/{log}")
|
||||
)
|
||||
|
||||
// CallOptions contains the retry settings for each method of Client.
|
||||
type CallOptions struct {
|
||||
DeleteLog []gax.CallOption
|
||||
@@ -146,25 +141,20 @@ func (c *Client) SetGoogleClientInfo(keyval ...string) {
|
||||
|
||||
// ProjectPath returns the path for the project resource.
|
||||
func ProjectPath(project string) string {
|
||||
path, err := loggingProjectPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
""
|
||||
}
|
||||
|
||||
// LogPath returns the path for the log resource.
|
||||
func LogPath(project, log string) string {
|
||||
path, err := loggingLogPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
"log": log,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
"/logs/" +
|
||||
log +
|
||||
""
|
||||
}
|
||||
|
||||
// DeleteLog deletes all the log entries in a log.
|
||||
@@ -200,7 +190,7 @@ func (c *Client) WriteLogEntries(ctx context.Context, req *loggingpb.WriteLogEnt
|
||||
|
||||
// ListLogEntries lists log entries. Use this method to retrieve log entries from
|
||||
// Stackdriver Logging. For ways to export log entries, see
|
||||
// [Exporting Logs](/logging/docs/export).
|
||||
// Exporting Logs (at /logging/docs/export).
|
||||
func (c *Client) ListLogEntries(ctx context.Context, req *loggingpb.ListLogEntriesRequest, opts ...gax.CallOption) *LogEntryIterator {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.ListLogEntries[0:len(c.CallOptions.ListLogEntries):len(c.CallOptions.ListLogEntries)], opts...)
|
||||
|
30
vendor/cloud.google.com/go/logging/apiv2/metrics_client.go
generated
vendored
30
vendor/cloud.google.com/go/logging/apiv2/metrics_client.go
generated
vendored
@@ -31,11 +31,6 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
var (
|
||||
metricsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
|
||||
metricsMetricPathTemplate = gax.MustCompilePathTemplate("projects/{project}/metrics/{metric}")
|
||||
)
|
||||
|
||||
// MetricsCallOptions contains the retry settings for each method of MetricsClient.
|
||||
type MetricsCallOptions struct {
|
||||
ListLogMetrics []gax.CallOption
|
||||
@@ -132,25 +127,20 @@ func (c *MetricsClient) SetGoogleClientInfo(keyval ...string) {
|
||||
|
||||
// MetricsProjectPath returns the path for the project resource.
|
||||
func MetricsProjectPath(project string) string {
|
||||
path, err := metricsProjectPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
""
|
||||
}
|
||||
|
||||
// MetricsMetricPath returns the path for the metric resource.
|
||||
func MetricsMetricPath(project, metric string) string {
|
||||
path, err := metricsMetricPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
"metric": metric,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
"/metrics/" +
|
||||
metric +
|
||||
""
|
||||
}
|
||||
|
||||
// ListLogMetrics lists logs-based metrics.
|
||||
|
2
vendor/cloud.google.com/go/logging/logadmin/logadmin.go
generated
vendored
2
vendor/cloud.google.com/go/logging/logadmin/logadmin.go
generated
vendored
@@ -46,7 +46,9 @@ import (
|
||||
logtypepb "google.golang.org/genproto/googleapis/logging/type"
|
||||
logpb "google.golang.org/genproto/googleapis/logging/v2"
|
||||
"google.golang.org/grpc/codes"
|
||||
|
||||
// Import the following so EntryIterator can unmarshal log protos.
|
||||
_ "google.golang.org/genproto/googleapis/appengine/logging/v1"
|
||||
_ "google.golang.org/genproto/googleapis/cloud/audit"
|
||||
)
|
||||
|
||||
|
3
vendor/cloud.google.com/go/logging/logadmin/sinks.go
generated
vendored
3
vendor/cloud.google.com/go/logging/logadmin/sinks.go
generated
vendored
@@ -87,8 +87,7 @@ func (c *Client) Sink(ctx context.Context, sinkID string) (*Sink, error) {
|
||||
return fromLogSink(ls), nil
|
||||
}
|
||||
|
||||
// UpdateSink updates an existing Sink, or creates a new one if the Sink doesn't exist.
|
||||
// Requires AdminScope.
|
||||
// UpdateSink updates an existing Sink. Requires AdminScope.
|
||||
func (c *Client) UpdateSink(ctx context.Context, sink *Sink) (*Sink, error) {
|
||||
ls, err := c.sClient.UpdateSink(ctx, &logpb.UpdateSinkRequest{
|
||||
SinkName: c.sinkPath(sink.ID),
|
||||
|
4
vendor/cloud.google.com/go/logging/logadmin/sinks_test.go
generated
vendored
4
vendor/cloud.google.com/go/logging/logadmin/sinks_test.go
generated
vendored
@@ -152,7 +152,9 @@ func TestUpdateSink(t *testing.T) {
|
||||
Filter: testFilter,
|
||||
}
|
||||
|
||||
// Updating a non-existent sink creates a new one.
|
||||
if _, err := client.CreateSink(ctx, sink); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, err := client.UpdateSink(ctx, sink)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
14
vendor/cloud.google.com/go/logging/logging.go
generated
vendored
14
vendor/cloud.google.com/go/logging/logging.go
generated
vendored
@@ -86,7 +86,11 @@ var now = time.Now
|
||||
|
||||
// ErrOverflow signals that the number of buffered entries for a Logger
|
||||
// exceeds its BufferLimit.
|
||||
var ErrOverflow = errors.New("logging: log entry overflowed buffer limits")
|
||||
var ErrOverflow = bundler.ErrOverflow
|
||||
|
||||
// ErrOversizedEntry signals that an entry's size exceeds the maximum number of
|
||||
// bytes that will be sent in a single call to the logging service.
|
||||
var ErrOversizedEntry = bundler.ErrOversizedItem
|
||||
|
||||
// Client is a Logging client. A Client is associated with a single Cloud project.
|
||||
type Client struct {
|
||||
@@ -331,10 +335,10 @@ type entryByteThreshold int
|
||||
func (e entryByteThreshold) set(l *Logger) { l.bundler.BundleByteThreshold = int(e) }
|
||||
|
||||
// EntryByteLimit is the maximum number of bytes of entries that will be sent
|
||||
// in a single call to the logging service. This option limits the size of a
|
||||
// single RPC payload, to account for network or service issues with large
|
||||
// RPCs. If EntryByteLimit is smaller than EntryByteThreshold, the latter has
|
||||
// no effect.
|
||||
// in a single call to the logging service. ErrOversizedEntry is returned if an
|
||||
// entry exceeds EntryByteLimit. This option limits the size of a single RPC
|
||||
// payload, to account for network or service issues with large RPCs. If
|
||||
// EntryByteLimit is smaller than EntryByteThreshold, the latter has no effect.
|
||||
// The default is zero, meaning there is no limit.
|
||||
func EntryByteLimit(n int) LoggerOption { return entryByteLimit(n) }
|
||||
|
||||
|
Reference in New Issue
Block a user