Documentation
¶
Index ¶
- Constants
- Variables
- type Datastore
- func (d *Datastore) Candidates(ctx context.Context) ([]*sdcpb.DataStore, error)
- func (d *Datastore) Config() *config.DatastoreConfig
- func (d *Datastore) ConnectionState() *target.TargetStatus
- func (d *Datastore) CreateCandidate(ctx context.Context, ds *sdcpb.DataStore) error
- func (d *Datastore) DeleteCache(ctx context.Context) error
- func (d *Datastore) DeleteCandidate(ctx context.Context, name string) error
- func (d *Datastore) DeviationMgr(ctx context.Context)
- func (d *Datastore) Discard(ctx context.Context, req *sdcpb.DiscardRequest) error
- func (d *Datastore) Get(ctx context.Context, req *sdcpb.GetDataRequest, ...) error
- func (d *Datastore) GetIntent(ctx context.Context, req *sdcpb.GetIntentRequest) (*sdcpb.GetIntentResponse, error)
- func (d *Datastore) ListIntent(ctx context.Context, req *sdcpb.ListIntentRequest) (*sdcpb.ListIntentResponse, error)
- func (d *Datastore) Name() string
- func (d *Datastore) Schema() *config.SchemaConfig
- func (d *Datastore) SdcpbTransactionIntentToInternalTI(ctx context.Context, req *sdcpb.TransactionIntent) (*types.TransactionIntent, error)
- func (d *Datastore) Stop() error
- func (d *Datastore) StopDeviationsWatch(peer string)
- func (d *Datastore) Subscribe(req *sdcpb.SubscribeRequest, stream sdcpb.DataServer_SubscribeServer) error
- func (d *Datastore) Sync(ctx context.Context)
- func (d *Datastore) TransactionCancel(ctx context.Context, transactionId string) error
- func (d *Datastore) TransactionConfirm(ctx context.Context, transactionId string) error
- func (d *Datastore) TransactionSet(ctx context.Context, transactionId string, ...) (*sdcpb.TransactionSetResponse, error)
- func (d *Datastore) WatchDeviations(req *sdcpb.WatchDeviationRequest, ...) error
- type DatastoreRollbackAdapter
- type SdcpbUpdateDedup
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 ¶
func New(ctx context.Context, c *config.DatastoreConfig, sc schema.Client, cc cache.Client, opts ...grpc.DialOption) *Datastore
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 (*Datastore) Config ¶
func (d *Datastore) Config() *config.DatastoreConfig
func (*Datastore) ConnectionState ¶
func (d *Datastore) ConnectionState() *target.TargetStatus
func (*Datastore) CreateCandidate ¶
func (*Datastore) DeleteCandidate ¶
func (*Datastore) DeviationMgr ¶
func (*Datastore) Get ¶
func (d *Datastore) Get(ctx context.Context, req *sdcpb.GetDataRequest, nCh chan *sdcpb.GetDataResponse) error
func (*Datastore) GetIntent ¶
func (d *Datastore) GetIntent(ctx context.Context, req *sdcpb.GetIntentRequest) (*sdcpb.GetIntentResponse, error)
func (*Datastore) ListIntent ¶
func (d *Datastore) ListIntent(ctx context.Context, req *sdcpb.ListIntentRequest) (*sdcpb.ListIntentResponse, error)
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) StopDeviationsWatch ¶
func (*Datastore) Subscribe ¶
func (d *Datastore) Subscribe(req *sdcpb.SubscribeRequest, stream sdcpb.DataServer_SubscribeServer) error
func (*Datastore) TransactionCancel ¶ added in v0.0.54
func (*Datastore) TransactionConfirm ¶ added in v0.0.54
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 ¶
func (d *Datastore) WatchDeviations(req *sdcpb.WatchDeviationRequest, stream sdcpb.DataServer_WatchDeviationsServer) error
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.