Documentation ¶
Overview ¶
Package storage provides Instana tracing instrumentation for Google Cloud Storage clients that use cloud.google.com/go/storage
Index ¶
- type ACLHandle
- type BucketHandle
- func (b *BucketHandle) ACL() *ACLHandle
- func (b *BucketHandle) Attrs(ctx context.Context) (attrs *storage.BucketAttrs, err error)
- func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *storage.BucketAttrs) (err error)
- func (b *BucketHandle) DefaultObjectACL() *ACLHandle
- func (b *BucketHandle) Delete(ctx context.Context) (err error)
- func (b *BucketHandle) IAM() *iam.Handle
- func (b *BucketHandle) If(conds storage.BucketConditions) *BucketHandle
- func (b *BucketHandle) LockRetentionPolicy(ctx context.Context) (err error)
- func (b *BucketHandle) Object(name string) *ObjectHandle
- func (b *BucketHandle) Objects(ctx context.Context, q *storage.Query) *ObjectIterator
- func (b *BucketHandle) Update(ctx context.Context, uattrs storage.BucketAttrsToUpdate) (attrs *storage.BucketAttrs, err error)
- func (b *BucketHandle) UserProject(projectID string) *BucketHandle
- type BucketIterator
- type Client
- func (c *Client) Bucket(name string) *BucketHandle
- func (c *Client) Buckets(ctx context.Context, projectID string) *BucketIterator
- func (c *Client) CreateHMACKey(ctx context.Context, projectID, serviceAccountEmail string, ...) (hk *storage.HMACKey, err error)
- func (c *Client) HMACKeyHandle(projectID, accessID string) *HMACKeyHandle
- func (c *Client) ListHMACKeys(ctx context.Context, projectID string, opts ...storage.HMACKeyOption) *HMACKeysIterator
- func (c *Client) ServiceAccount(ctx context.Context, projectID string) (email string, err error)
- type Composer
- type Copier
- type HMACKeyHandle
- func (hkh *HMACKeyHandle) Delete(ctx context.Context, opts ...storage.HMACKeyOption) (err error)
- func (hkh *HMACKeyHandle) Get(ctx context.Context, opts ...storage.HMACKeyOption) (hk *storage.HMACKey, err error)
- func (hkh *HMACKeyHandle) Update(ctx context.Context, au storage.HMACKeyAttrsToUpdate, ...) (hk *storage.HMACKey, err error)
- type HMACKeysIterator
- type ObjectHandle
- func (o *ObjectHandle) ACL() *ACLHandle
- func (o *ObjectHandle) Attrs(ctx context.Context) (attrs *storage.ObjectAttrs, err error)
- func (o *ObjectHandle) ComposerFrom(srcs ...*ObjectHandle) *Composer
- func (o *ObjectHandle) CopierFrom(src *ObjectHandle) *Copier
- func (o *ObjectHandle) Delete(ctx context.Context) (err error)
- func (o *ObjectHandle) Generation(gen int64) *ObjectHandle
- func (o *ObjectHandle) If(conds storage.Conditions) *ObjectHandle
- func (o *ObjectHandle) Key(encryptionKey []byte) *ObjectHandle
- func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) (r *Reader, err error)
- func (o *ObjectHandle) NewReader(ctx context.Context) (*Reader, error)
- func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer
- func (o *ObjectHandle) ReadCompressed(compressed bool) *ObjectHandle
- func (o *ObjectHandle) Update(ctx context.Context, uattrs storage.ObjectAttrsToUpdate) (oa *storage.ObjectAttrs, err error)
- type ObjectIterator
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLHandle ¶
ACLHandle is an instrumented wrapper for cloud.google.com/go/storage.ACLHandle that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ACLHandle for further details on wrapped type.
func (*ACLHandle) Delete ¶
Delete calls and traces the Delete() method of the wrapped cloud.google.com/go/storage.ACLHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ACLHandle.Delete for further details on wrapped method.
func (*ACLHandle) List ¶
List calls and traces the List() method of the wrapped cloud.google.com/go/storage.ACLHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ACLHandle.List for further details on wrapped method.
func (*ACLHandle) Set ¶
func (a *ACLHandle) Set(ctx context.Context, entity storage.ACLEntity, role storage.ACLRole) (err error)
Set calls and traces the Set() method of the wrapped cloud.google.com/go/storage.ACLHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ACLHandle.Set for further details on wrapped method.
type BucketHandle ¶
type BucketHandle struct { *storage.BucketHandle Name string }
BucketHandle is an instrumented wrapper for cloud.google.com/go/storage.BucketHandle that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle for further details on wrapped type.
func (*BucketHandle) ACL ¶
func (b *BucketHandle) ACL() *ACLHandle
ACL returns an instrumented cloud.google.com/go/storage.ACLHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.ACL for further details on wrapped method.
func (*BucketHandle) Attrs ¶
func (b *BucketHandle) Attrs(ctx context.Context) (attrs *storage.BucketAttrs, err error)
Attrs calls and traces the Attrs() method of the wrapped cloud.google.com/go/storage.BucketHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.Attrs for further details on wrapped method.
func (*BucketHandle) Create ¶
func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *storage.BucketAttrs) (err error)
Create calls and traces the Create() method of the wrapped cloud.google.com/go/storage.BucketHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.Create for further details on wrapped method.
func (*BucketHandle) DefaultObjectACL ¶
func (b *BucketHandle) DefaultObjectACL() *ACLHandle
DefaultObjectACL returns an instrumented cloud.google.com/go/storage.ACLHandle, which provides access to the bucket's default object ACLs.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.DefaultObjectACL for further details on wrapped method.
func (*BucketHandle) Delete ¶
func (b *BucketHandle) Delete(ctx context.Context) (err error)
Delete calls and traces the Delete() method of the wrapped cloud.google.com/go/storage.BucketHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.Delete for further details on wrapped method.
func (*BucketHandle) IAM ¶
func (b *BucketHandle) IAM() *iam.Handle
IAM returns an instrumented wrapper for cloud.google.com/go/iam.Handle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.IAM for further details on wrapped method.
func (*BucketHandle) If ¶
func (b *BucketHandle) If(conds storage.BucketConditions) *BucketHandle
If returns an instrumented cloud.google.com/go/storage.BucketHandle that applies a set of preconditions.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.If for further details on wrapped method.
func (*BucketHandle) LockRetentionPolicy ¶
func (b *BucketHandle) LockRetentionPolicy(ctx context.Context) (err error)
LockRetentionPolicy calls and traces the LockRetentionPolicy() method of the wrapped cloud.google.com/go/storage.BucketHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.LockRetentionPolicy for further details on wrapped method.
func (*BucketHandle) Object ¶
func (b *BucketHandle) Object(name string) *ObjectHandle
Object returns an instrumented cloud.google.com/go/storage.ObjectHandle, which provides operations on the named object.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.Object for further details on wrapped method.
func (*BucketHandle) Objects ¶
func (b *BucketHandle) Objects(ctx context.Context, q *storage.Query) *ObjectIterator
Objects returns an instrumented object iterator that traces and proxies requests to the underlying cloud.google.com/go/storage.ObjectIterator.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.Objects for further details on wrapped method.
func (*BucketHandle) Update ¶
func (b *BucketHandle) Update(ctx context.Context, uattrs storage.BucketAttrsToUpdate) (attrs *storage.BucketAttrs, err error)
Update calls and traces the Update() method of the wrapped cloud.google.com/go/storage.BucketHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.Update for further details on wrapped method.
func (*BucketHandle) UserProject ¶
func (b *BucketHandle) UserProject(projectID string) *BucketHandle
UserProject returns an instrumented cloud.google.com/go/storage.BucketHandle that passes the project ID as the user project for all subsequent calls.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketHandle.UserProject for further details on wrapped method.
type BucketIterator ¶
type BucketIterator struct { *storage.BucketIterator // contains filtered or unexported fields }
BucketIterator is an instrumented wrapper for cloud.google.com/go/storage.BucketIterator.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketIterator for further details on wrapped type.
func (*BucketIterator) Next ¶
func (it *BucketIterator) Next() (attrs *storage.BucketAttrs, err error)
Next calls the Next() method of the wrapped iterator and creates a span for each call that results in an API request.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#BucketIterator.Next for further details on wrapped method.
type Client ¶
Client is an instrumented wrapper for cloud.google.com/go/storage.Client that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client for further details on wrapped type.
func NewClient ¶
NewClient returns a new wrapped cloud.google.com/go/storage.Client.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#NewClient for further details on wrapped method.
func (*Client) Bucket ¶
func (c *Client) Bucket(name string) *BucketHandle
Bucket returns an instrumented cloud.google.com/go/storage.BucketHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client.Bucket for further details on wrapped method.
func (*Client) Buckets ¶
func (c *Client) Buckets(ctx context.Context, projectID string) *BucketIterator
Buckets returns an instrumented bucket iterator that traces and proxies requests to the underlying cloud.google.com/go/storage.BucketIterator.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client.Buckets for further details on wrapped method.
func (*Client) CreateHMACKey ¶
func (c *Client) CreateHMACKey(ctx context.Context, projectID, serviceAccountEmail string, opts ...storage.HMACKeyOption) (hk *storage.HMACKey, err error)
CreateHMACKey calls and traces the CreateHMACKey() method of the wrapped cloud.google.com/go/storage.Client.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client.CreateHMACKey for further details on wrapped method.
func (*Client) HMACKeyHandle ¶
func (c *Client) HMACKeyHandle(projectID, accessID string) *HMACKeyHandle
HMACKeyHandle returns an instrumented cloud.google.com/go/storage.HMACKeyHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client.HMACKeyHandle for further details on wrapped method.
func (*Client) ListHMACKeys ¶
func (c *Client) ListHMACKeys(ctx context.Context, projectID string, opts ...storage.HMACKeyOption) *HMACKeysIterator
ListHMACKeys returns an instrumented object iterator that traces and proxies requests to the underlying cloud.google.com/go/storage.HMACKeysIterator.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client.ListHMACKeys for further details on wrapped method.
func (*Client) ServiceAccount ¶
ServiceAccount calls and traces the ServiceAccount() method of the wrapped cloud.google.com/go/storage.Client.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Client.ServiceAccount for further details on wrapped method.
type Composer ¶
type Composer struct { *storage.Composer DestinationBucket, DestinationName string SourceObjects []string }
Composer is an instrumented wrapper for cloud.google.com/go/storage.Composer. that traces calls made to Google Cloud Storage API
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Composer for further details on wrapped type.
func (*Composer) Run ¶
Run calls and traces the Run() method of the wrapped cloud.google.com/go/storage.Composer.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Composer.Run for further details on wrapped method.
type Copier ¶
type Copier struct { *storage.Copier SourceBucket, SourceName string DestinationBucket, DestinationName string }
Copier is an instrumented wrapper for cloud.google.com/go/storage.Copier that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Copier for further details on wrapped type.
func (*Copier) Run ¶
Run calls and traces the Run() method of the wrapped Copier.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Copier.Run for further details on wrapped method.
type HMACKeyHandle ¶
type HMACKeyHandle struct { *storage.HMACKeyHandle ProjectID string AccessID string }
HMACKeyHandle is an instrumented wrapper for cloud.google.com/go/storage.HMACKeyHandle that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#HMACKeyHandle for further details on wrapped type.
func (*HMACKeyHandle) Delete ¶
func (hkh *HMACKeyHandle) Delete(ctx context.Context, opts ...storage.HMACKeyOption) (err error)
Delete calls and traces the Delete() method of the wrapped cloud.google.com/go/storage.HMACKeyHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#HMACKeyHandle.Delete for further details on wrapped method.
func (*HMACKeyHandle) Get ¶
func (hkh *HMACKeyHandle) Get(ctx context.Context, opts ...storage.HMACKeyOption) (hk *storage.HMACKey, err error)
Get calls and traces the Get() method of the wrapped cloud.google.com/go/storage.HMACKeyHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#HMACKeyHandle.Get for further details on wrapped method.
func (*HMACKeyHandle) Update ¶
func (hkh *HMACKeyHandle) Update(ctx context.Context, au storage.HMACKeyAttrsToUpdate, opts ...storage.HMACKeyOption) (hk *storage.HMACKey, err error)
Update calls and traces the Update() method of the wrapped cloud.google.com/go/storage.HMACKeyHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#HMACKeyHandle.Update for further details on wrapped method.
type HMACKeysIterator ¶
type HMACKeysIterator struct { *storage.HMACKeysIterator ProjectID string // contains filtered or unexported fields }
HMACKeysIterator is an instrumented wrapper for cloud.google.com/go/storage.HMACKeysIterator that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#HMACKeysIterator for further details on wrapped type.
func (*HMACKeysIterator) Next ¶
func (it *HMACKeysIterator) Next() (hk *storage.HMACKey, err error)
Next calls the Next() method of the wrapped iterator and creates a span for each call that results in an API request.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#HMACKeysIterator.Next for further details on wrapped method.
type ObjectHandle ¶
type ObjectHandle struct { *storage.ObjectHandle Bucket string Name string }
ObjectHandle is an instrumented wrapper for cloud.google.com/go/storage.ObjectHandle that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle for further details on wrapped type.
func (*ObjectHandle) ACL ¶
func (o *ObjectHandle) ACL() *ACLHandle
ACL returns an instrumented cloud.google.com/go/storage.ACLHandle that provides access to the object's access control list.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.ACL for further details on wrapped method.
func (*ObjectHandle) Attrs ¶
func (o *ObjectHandle) Attrs(ctx context.Context) (attrs *storage.ObjectAttrs, err error)
Attrs calls and traces the Attrs() method of the wrapped cloud.google.com/go/storage.ObjectHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.Attrs for further details on wrapped method.
func (*ObjectHandle) ComposerFrom ¶
func (o *ObjectHandle) ComposerFrom(srcs ...*ObjectHandle) *Composer
ComposerFrom returns an instrumented cloud.google.com/go/storage.Composer.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.ComposerFrom for further details on wrapped method.
func (*ObjectHandle) CopierFrom ¶
func (o *ObjectHandle) CopierFrom(src *ObjectHandle) *Copier
CopierFrom returns an instrumented cloud.google.com/go/storage.Copier.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.CopierFrom for further details on wrapped method.
func (*ObjectHandle) Delete ¶
func (o *ObjectHandle) Delete(ctx context.Context) (err error)
Delete calls and traces the Delete() method of the wrapped cloud.google.com/go/storage.ObjectHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.Delete for further details on wrapped method.
func (*ObjectHandle) Generation ¶
func (o *ObjectHandle) Generation(gen int64) *ObjectHandle
Generation returns an instrumented cloud.google.com/go/storage.ObjectHandle that operates on a specific generation of the object.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.Generation for further details on wrapped method.
func (*ObjectHandle) If ¶
func (o *ObjectHandle) If(conds storage.Conditions) *ObjectHandle
If returns an instrumented cloud.google.com/go/storage.ObjectHandle that applies a set of preconditions.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.If for further details on wrapped method.
func (*ObjectHandle) Key ¶
func (o *ObjectHandle) Key(encryptionKey []byte) *ObjectHandle
Key returns an instrumented cloud.google.com/go/storage.ObjectHandle that uses the supplied encryption key to encrypt and decrypt the object's contents.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.Key for further details on wrapped method.
func (*ObjectHandle) NewRangeReader ¶
func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) (r *Reader, err error)
NewRangeReader returns an instrumented wrapper for cloud.google.com/go/storage.Reader that reads the object partially.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.NewRangeReader for further details on wrapped method.
func (*ObjectHandle) NewReader ¶
func (o *ObjectHandle) NewReader(ctx context.Context) (*Reader, error)
NewReader returns an instrumented wrapper for cloud.google.com/go/storage.Reader for an object.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.NewReader for further details on wrapped method.
func (*ObjectHandle) NewWriter ¶
func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer
NewWriter returns an instrumented cloud.google.com/go/storage.Writer that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.NewWriter for further details on wrapped method.
func (*ObjectHandle) ReadCompressed ¶
func (o *ObjectHandle) ReadCompressed(compressed bool) *ObjectHandle
ReadCompressed returns an instrumented cloud.google.com/go/storage.ObjectHandle that performs reads without decompressing when given true as an argument.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.ReadCompressed for further details on wrapped method.
func (*ObjectHandle) Update ¶
func (o *ObjectHandle) Update(ctx context.Context, uattrs storage.ObjectAttrsToUpdate) (oa *storage.ObjectAttrs, err error)
Update calls and traces the Update() method of the wrapped cloud.google.com/go/storage.ObjectHandle.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.Update for further details on wrapped method.
type ObjectIterator ¶
type ObjectIterator struct { *storage.ObjectIterator Bucket string // contains filtered or unexported fields }
ObjectIterator is an instrumented wrapper for cloud.google.com/go/storage.ObjectIterator that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectIterator for further details on wrapped type.
func (*ObjectIterator) Next ¶
func (it *ObjectIterator) Next() (attrs *storage.ObjectAttrs, err error)
Next calls the Next() method of the wrapped iterator and creates a span for each call that results in an API request.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectIterator.Next for further details on wrapped method.
type Reader ¶
type Reader struct { *storage.Reader Bucket string Name string // contains filtered or unexported fields }
Reader is an instrumented wrapper for cloud.google.com/go/storage.Reader that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Reader for further details on wrapped type.
type Writer ¶
Writer is an instrumented wrapper for cloud.google.com/go/storage.Writer that traces calls made to Google Cloud Storage API.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Writer for further details on wrapped type.
func (*Writer) Close ¶
Close closes the underlying cloud.google.com/go/storage.Writer and finalizes current exit span.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Writer.Close for further details on wrapped method.
func (*Writer) CloseWithError
deprecated
CloseWithError terminates any writes performed by this Writer with an error and finalizes current exit span.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Writer.CloseWithError for further details on wrapped method.
Deprecated: this method is added for compatibility with the cloud.google.com/go/storage.Writer interface, however it is recommended to cancel the write operation using the context passed to NewWriter instead.
func (*Writer) Write ¶
Write calls the Write() method of the wrapped cloud.google.com/go/storage.Writer and initiates an exit span. Note that this span will be finished only when Close() is called, since writes are performed asynchronously and only guaranteed to be finished upon close. Thus each created span represents a single object insertion operation regardless of the number of Write() calls before the Writer is closed.
See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#Writer.Write for further details on wrapped method.