datastore

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// to be used for candidates created without an owner
	DefaultOwner = "__sdcio"
)

Variables

View Source
var (
	ErrDatastoreLocked = errors.New("Datastore is locked, other action is ongoing.")
)
View Source
var ErrIntentNotFound = errors.New("intent not found")

Functions

This section is empty.

Types

type Datastore

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

func New

New creates a new datastore, its schema server client and initializes the SBI target func New(c *config.DatastoreConfig, schemaServer *config.RemoteSchemaServer) *Datastore {

func (*Datastore) Candidates

func (d *Datastore) Candidates(ctx context.Context) ([]*sdcpb.DataStore, error)

func (*Datastore) Config

func (d *Datastore) Config() *config.DatastoreConfig

func (*Datastore) ConnectionState

func (d *Datastore) ConnectionState() *target.TargetStatus

func (*Datastore) CreateCandidate

func (d *Datastore) CreateCandidate(ctx context.Context, ds *sdcpb.DataStore) error

func (*Datastore) DeleteCache

func (d *Datastore) DeleteCache(ctx context.Context) error

func (*Datastore) DeleteCandidate

func (d *Datastore) DeleteCandidate(ctx context.Context, name string) error

func (*Datastore) DeviationMgr

func (d *Datastore) DeviationMgr(ctx context.Context)

func (*Datastore) Discard

func (d *Datastore) Discard(ctx context.Context, req *sdcpb.DiscardRequest) error

func (*Datastore) Get

func (d *Datastore) Get(ctx context.Context, req *sdcpb.GetDataRequest, nCh chan *sdcpb.GetDataResponse) error

func (*Datastore) GetIntent

func (*Datastore) ListIntent

func (*Datastore) Name

func (d *Datastore) Name() string

func (*Datastore) Schema

func (d *Datastore) Schema() *config.SchemaConfig

func (*Datastore) SdcpbTransactionIntentToInternalTI added in v0.0.54

func (d *Datastore) SdcpbTransactionIntentToInternalTI(ctx context.Context, req *sdcpb.TransactionIntent) (*types.TransactionIntent, error)

SdcpbTransactionIntentToInternalTI converts sdcpb.TransactionIntent to types.TransactionIntent

func (*Datastore) Stop

func (d *Datastore) Stop() error

func (*Datastore) StopDeviationsWatch

func (d *Datastore) StopDeviationsWatch(peer string)

func (*Datastore) Subscribe

func (*Datastore) Sync

func (d *Datastore) Sync(ctx context.Context)

func (*Datastore) TransactionCancel added in v0.0.54

func (d *Datastore) TransactionCancel(ctx context.Context, transactionId string) error

func (*Datastore) TransactionConfirm added in v0.0.54

func (d *Datastore) TransactionConfirm(ctx context.Context, transactionId string) error

func (*Datastore) TransactionSet added in v0.0.54

func (d *Datastore) TransactionSet(ctx context.Context, transactionId string, transactionIntents []*types.TransactionIntent, replaceIntent *types.TransactionIntent, transactionTimeout time.Duration, dryRun bool) (*sdcpb.TransactionSetResponse, error)

func (*Datastore) WatchDeviations

type DatastoreRollbackAdapter added in v0.0.54

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

DatastoreRollbackAdapter implements the types.RollbackInterface and encapsulates the Datastore.

func NewDatastoreRollbackAdapter added in v0.0.54

func NewDatastoreRollbackAdapter(d *Datastore) *DatastoreRollbackAdapter

NewDatastoreRollbackAdapter constructor for the DatastoreRollbackAdapter.

func (*DatastoreRollbackAdapter) TransactionRollback added in v0.0.54

func (dra *DatastoreRollbackAdapter) TransactionRollback(ctx context.Context, transaction *types.Transaction, dryRun bool) (*sdcpb.TransactionSetResponse, error)

TransactionRollback is adapted to the datastore.lowlevelTransactionSet() function

type SdcpbUpdateDedup added in v0.0.43

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

func NewSdcpbUpdateDedup added in v0.0.43

func NewSdcpbUpdateDedup() *SdcpbUpdateDedup

func (*SdcpbUpdateDedup) AddUpdate added in v0.0.43

func (s *SdcpbUpdateDedup) AddUpdate(upd *sdcpb.Update)

func (*SdcpbUpdateDedup) AddUpdates added in v0.0.43

func (s *SdcpbUpdateDedup) AddUpdates(upds []*sdcpb.Update)

func (*SdcpbUpdateDedup) Updates added in v0.0.43

func (s *SdcpbUpdateDedup) Updates() []*sdcpb.Update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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