Documentation ¶
Index ¶
- func NewPeerDescriptor(typedDescriptor *PeerDescriptor) *KVDescriptor
- type PeerDescriptor
- type PeerDescriptorAdapter
- func (da *PeerDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)
- func (da *PeerDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error
- func (da *PeerDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency
- func (da *PeerDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair
- func (da *PeerDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)
- func (da *PeerDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)
- func (da *PeerDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool
- func (da *PeerDescriptorAdapter) Validate(key string, value proto.Message) (err error)
- func (da *PeerDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool
- type PeerKVWithMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPeerDescriptor ¶
func NewPeerDescriptor(typedDescriptor *PeerDescriptor) *KVDescriptor
Types ¶
type PeerDescriptor ¶
type PeerDescriptor struct { Name string KeySelector KeySelector ValueTypeName string KeyLabel func(key string) string ValueComparator func(key string, oldValue, newValue *vpp_wg.Peer) bool NBKeyPrefix string WithMetadata bool MetadataMapFactory MetadataMapFactory Validate func(key string, value *vpp_wg.Peer) error Create func(key string, value *vpp_wg.Peer) (metadata *wgidx.WgMetadata, err error) Delete func(key string, value *vpp_wg.Peer, metadata *wgidx.WgMetadata) error Update func(key string, oldValue, newValue *vpp_wg.Peer, oldMetadata *wgidx.WgMetadata) (newMetadata *wgidx.WgMetadata, err error) UpdateWithRecreate func(key string, oldValue, newValue *vpp_wg.Peer, metadata *wgidx.WgMetadata) bool Retrieve func(correlate []PeerKVWithMetadata) ([]PeerKVWithMetadata, error) IsRetriableFailure func(err error) bool DerivedValues func(key string, value *vpp_wg.Peer) []KeyValuePair Dependencies func(key string, value *vpp_wg.Peer) []Dependency RetrieveDependencies []string /* descriptor name */ }
type PeerDescriptorAdapter ¶
type PeerDescriptorAdapter struct {
// contains filtered or unexported fields
}
func (*PeerDescriptorAdapter) Create ¶
func (da *PeerDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)
func (*PeerDescriptorAdapter) Delete ¶
func (da *PeerDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error
func (*PeerDescriptorAdapter) Dependencies ¶
func (da *PeerDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency
func (*PeerDescriptorAdapter) DerivedValues ¶
func (da *PeerDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair
func (*PeerDescriptorAdapter) Retrieve ¶
func (da *PeerDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)
func (*PeerDescriptorAdapter) Update ¶
func (da *PeerDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)
func (*PeerDescriptorAdapter) UpdateWithRecreate ¶
func (da *PeerDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool
func (*PeerDescriptorAdapter) Validate ¶
func (da *PeerDescriptorAdapter) Validate(key string, value proto.Message) (err error)
func (*PeerDescriptorAdapter) ValueComparator ¶
func (da *PeerDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool
type PeerKVWithMetadata ¶
type PeerKVWithMetadata struct { Key string Value *vpp_wg.Peer Metadata *wgidx.WgMetadata Origin ValueOrigin }
Click to show internal directories.
Click to hide internal directories.