gcs

package
v0.11.0-a.13 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package gcs stores state snapshots in Google Cloud Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(service *storage.Service, bucket string) client

NewClient returns a GCS client backed by the Google Storage REST API.

Types

type Store

type Store struct {
	Bucket     string
	Prefix     string
	KMSKeyName string
	// contains filtered or unexported fields
}

Store reads and writes snapshots under a per-stack key prefix.

func NewStore

func NewStore(
	client client,
	bucket, prefix, kmsKeyName, factory, stack string,
	enc sdkencrypt.Encrypter,
) (*Store, error)

NewStore returns a Store for factory and stack in bucket.

func (*Store) Current

func (s *Store) Current() (*sdkstate.Snapshot, error)

func (*Store) CurrentRev

func (s *Store) CurrentRev() (string, error)

func (*Store) Delete

func (s *Store) Delete(rev string) error

func (*Store) ForceUnlock

func (s *Store) ForceUnlock() error

func (*Store) Get

func (s *Store) Get(rev string) (*sdkstate.Snapshot, error)

func (*Store) List

func (s *Store) List() ([]string, error)

func (*Store) Lock

func (s *Store) Lock(ctx context.Context) (sdkstate.Lock, error)

func (*Store) SetCurrent

func (s *Store) SetCurrent(rev string) error

func (*Store) Stack

func (s *Store) Stack() string

func (*Store) Write

func (s *Store) Write(snap *sdkstate.Snapshot) (string, error)

Jump to

Keyboard shortcuts

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