gcslock

package
v0.0.0-...-a17d912 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextLocker

type ContextLocker interface {
	sync.Locker
	ContextLock(ctx context.Context) error
	ContextUnlock(ctx context.Context) error
}

func New

func New(ctx context.Context, bucket, object string, client *storage.Client) (ContextLocker, error)

New creates a GCS-based sync.Locker. It uses Application Default Credentials to make authenticated requests to Google Cloud Storage. See the DefaultClient function of the golang.org/x/oauth2/google package for App Default Credentials details.

If ctx argument is nil, context.Background is used.

Jump to

Keyboard shortcuts

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