Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotConnected = errors.New("not connected")
ErrNotConnected indicates the southbound interface (device connection) of a datastore is not established
Functions ¶
This section is empty.
Types ¶
type RunningStore ¶
type SyncResult ¶
type SyncResult struct {
// contains filtered or unexported fields
}
func NewSyncResult ¶
func NewSyncResult() *SyncResult
func (*SyncResult) AddDeletes ¶
func (r *SyncResult) AddDeletes(d ...*sdcpb.Path)
type TargetSource ¶
type TargetSource interface {
// ToJson returns the Tree contained structure as JSON
// use e.g. json.MarshalIndent() on the returned struct
ToJson(ctx context.Context, onlyNewOrUpdated bool) (any, error)
// ToJsonIETF returns the Tree contained structure as JSON_IETF
// use e.g. json.MarshalIndent() on the returned struct
ToJsonIETF(ctx context.Context, onlyNewOrUpdated bool) (any, error)
ToXML(ctx context.Context, onlyNewOrUpdated bool, honorNamespace bool, operationWithNamespace bool, useOperationRemove bool) (*etree.Document, error)
ToProtoUpdates(ctx context.Context, onlyNewOrUpdated bool) ([]*sdcpb.Update, error)
ToProtoDeletes(ctx context.Context) ([]*sdcpb.Path, error)
ContainsChanges(ctx context.Context) (bool, error)
}
type TargetStatus ¶
type TargetStatus struct {
Status sdcpb.TargetStatus
Details string
}
TargetStatus is the southbound connection state of a target. The zero value is sdcpb.TargetStatus_UNKNOWN
func NewTargetStatus ¶
func NewTargetStatus(status sdcpb.TargetStatus) *TargetStatus
func (*TargetStatus) Err ¶ added in v0.0.72
func (ts *TargetStatus) Err() error
Err reports the connection state as an error, so callers can propagate it and match it with errors.Is. It returns nil when the target is connected. This is the single place where a connection state turns into ErrNotConnected, keeping the Details a target collected attached to the error.
func (*TargetStatus) IsConnected ¶
func (ts *TargetStatus) IsConnected() bool
Click to show internal directories.
Click to hide internal directories.