Documentation
¶
Overview ¶
Package gcs stores state snapshots in Google Cloud Storage.
Index ¶
- func NewClient(service *storage.Service, bucket string) client
- type Store
- func (s *Store) Current() (*sdkstate.Snapshot, error)
- func (s *Store) CurrentRev() (string, error)
- func (s *Store) Delete(rev string) error
- func (s *Store) ForceUnlock() error
- func (s *Store) Get(rev string) (*sdkstate.Snapshot, error)
- func (s *Store) List() ([]string, error)
- func (s *Store) Lock(ctx context.Context) (sdkstate.Lock, error)
- func (s *Store) SetCurrent(rev string) error
- func (s *Store) Stack() string
- func (s *Store) Write(snap *sdkstate.Snapshot) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) CurrentRev ¶
func (*Store) ForceUnlock ¶
func (*Store) SetCurrent ¶
Click to show internal directories.
Click to hide internal directories.