spanner

package
v0.0.0-...-2e1c697 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Spanner is an implementation of the witness persistence interface which relies on Google Cloud Spanner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Persistence

type Persistence struct {
	// contains filtered or unexported fields
}

Persistence is a witness.Persistence implementation which knows how to use Spanner to safely store witness state.

func New

func New(ctx context.Context, spannerURI string) (*Persistence, func() error, error)

New returns a persistence object that is backed by the Spanner database.

func (*Persistence) AddLogs

func (p *Persistence) AddLogs(ctx context.Context, lc []config.Log) error

func (*Persistence) Init

func (p *Persistence) Init(ctx context.Context) error

func (*Persistence) Latest

func (p *Persistence) Latest(ctx context.Context, origin string) ([]byte, error)

func (*Persistence) Log

func (p *Persistence) Log(ctx context.Context, origin string) (config.Log, bool, error)

func (*Persistence) Logs

func (*Persistence) Update

func (p *Persistence) Update(ctx context.Context, origin string, f func([]byte) ([]byte, error)) error

Jump to

Keyboard shortcuts

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