adapter

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSADescriptor

func NewSADescriptor(typedDescriptor *SADescriptor) *KVDescriptor

func NewSPDDescriptor

func NewSPDDescriptor(typedDescriptor *SPDDescriptor) *KVDescriptor

func NewSPDInterfaceDescriptor

func NewSPDInterfaceDescriptor(typedDescriptor *SPDInterfaceDescriptor) *KVDescriptor

func NewSPDescriptor added in v3.2.0

func NewSPDescriptor(typedDescriptor *SPDescriptor) *KVDescriptor

func NewTunProtectDescriptor added in v3.1.0

func NewTunProtectDescriptor(typedDescriptor *TunProtectDescriptor) *KVDescriptor

Types

type SADescriptor

type SADescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityAssociation) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityAssociation) error
	Create               func(key string, value *vpp_ipsec.SecurityAssociation) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityAssociation, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityAssociation, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityAssociation, metadata interface{}) bool
	Retrieve             func(correlate []SAKVWithMetadata) ([]SAKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityAssociation) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityAssociation) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SADescriptorAdapter

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

func (*SADescriptorAdapter) Create

func (da *SADescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SADescriptorAdapter) Delete

func (da *SADescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SADescriptorAdapter) Dependencies

func (da *SADescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SADescriptorAdapter) DerivedValues

func (da *SADescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SADescriptorAdapter) Retrieve

func (da *SADescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SADescriptorAdapter) Update

func (da *SADescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SADescriptorAdapter) UpdateWithRecreate

func (da *SADescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SADescriptorAdapter) Validate

func (da *SADescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SADescriptorAdapter) ValueComparator

func (da *SADescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SAKVWithMetadata

type SAKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityAssociation
	Metadata interface{}
	Origin   ValueOrigin
}

type SPDDescriptor

type SPDDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityPolicyDatabase) error
	Create               func(key string, value *vpp_ipsec.SecurityPolicyDatabase) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityPolicyDatabase, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase, metadata interface{}) bool
	Retrieve             func(correlate []SPDKVWithMetadata) ([]SPDKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityPolicyDatabase) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityPolicyDatabase) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SPDDescriptorAdapter

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

func (*SPDDescriptorAdapter) Create

func (da *SPDDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SPDDescriptorAdapter) Delete

func (da *SPDDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SPDDescriptorAdapter) Dependencies

func (da *SPDDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SPDDescriptorAdapter) DerivedValues

func (da *SPDDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SPDDescriptorAdapter) Retrieve

func (da *SPDDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SPDDescriptorAdapter) Update

func (da *SPDDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SPDDescriptorAdapter) UpdateWithRecreate

func (da *SPDDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SPDDescriptorAdapter) Validate

func (da *SPDDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SPDDescriptorAdapter) ValueComparator

func (da *SPDDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SPDInterfaceDescriptor

type SPDInterfaceDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_Interface) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) error
	Create               func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_Interface, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_Interface, metadata interface{}) bool
	Retrieve             func(correlate []SPDInterfaceKVWithMetadata) ([]SPDInterfaceKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SPDInterfaceDescriptorAdapter

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

func (*SPDInterfaceDescriptorAdapter) Create

func (da *SPDInterfaceDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SPDInterfaceDescriptorAdapter) Delete

func (da *SPDInterfaceDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SPDInterfaceDescriptorAdapter) Dependencies

func (da *SPDInterfaceDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SPDInterfaceDescriptorAdapter) DerivedValues

func (da *SPDInterfaceDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SPDInterfaceDescriptorAdapter) Retrieve

func (da *SPDInterfaceDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SPDInterfaceDescriptorAdapter) Update

func (da *SPDInterfaceDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SPDInterfaceDescriptorAdapter) UpdateWithRecreate

func (da *SPDInterfaceDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SPDInterfaceDescriptorAdapter) Validate

func (da *SPDInterfaceDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SPDInterfaceDescriptorAdapter) ValueComparator

func (da *SPDInterfaceDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SPDInterfaceKVWithMetadata

type SPDInterfaceKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityPolicyDatabase_Interface
	Metadata interface{}
	Origin   ValueOrigin
}

type SPDKVWithMetadata

type SPDKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityPolicyDatabase
	Metadata interface{}
	Origin   ValueOrigin
}

type SPDescriptor added in v3.2.0

type SPDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicy) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityPolicy) error
	Create               func(key string, value *vpp_ipsec.SecurityPolicy) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityPolicy, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicy, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicy, metadata interface{}) bool
	Retrieve             func(correlate []SPKVWithMetadata) ([]SPKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityPolicy) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityPolicy) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SPDescriptorAdapter added in v3.2.0

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

func (*SPDescriptorAdapter) Create added in v3.2.0

func (da *SPDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SPDescriptorAdapter) Delete added in v3.2.0

func (da *SPDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SPDescriptorAdapter) Dependencies added in v3.2.0

func (da *SPDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SPDescriptorAdapter) DerivedValues added in v3.2.0

func (da *SPDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SPDescriptorAdapter) Retrieve added in v3.2.0

func (da *SPDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SPDescriptorAdapter) Update added in v3.2.0

func (da *SPDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SPDescriptorAdapter) UpdateWithRecreate added in v3.2.0

func (da *SPDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SPDescriptorAdapter) Validate added in v3.2.0

func (da *SPDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SPDescriptorAdapter) ValueComparator added in v3.2.0

func (da *SPDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SPKVWithMetadata added in v3.2.0

type SPKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityPolicy
	Metadata interface{}
	Origin   ValueOrigin
}

type TunProtectDescriptor added in v3.1.0

type TunProtectDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.TunnelProtection) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.TunnelProtection) error
	Create               func(key string, value *vpp_ipsec.TunnelProtection) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.TunnelProtection, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.TunnelProtection, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.TunnelProtection, metadata interface{}) bool
	Retrieve             func(correlate []TunProtectKVWithMetadata) ([]TunProtectKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.TunnelProtection) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.TunnelProtection) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type TunProtectDescriptorAdapter added in v3.1.0

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

func (*TunProtectDescriptorAdapter) Create added in v3.1.0

func (da *TunProtectDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*TunProtectDescriptorAdapter) Delete added in v3.1.0

func (da *TunProtectDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*TunProtectDescriptorAdapter) Dependencies added in v3.1.0

func (da *TunProtectDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*TunProtectDescriptorAdapter) DerivedValues added in v3.1.0

func (da *TunProtectDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*TunProtectDescriptorAdapter) Retrieve added in v3.1.0

func (da *TunProtectDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*TunProtectDescriptorAdapter) Update added in v3.1.0

func (da *TunProtectDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*TunProtectDescriptorAdapter) UpdateWithRecreate added in v3.1.0

func (da *TunProtectDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*TunProtectDescriptorAdapter) Validate added in v3.1.0

func (da *TunProtectDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*TunProtectDescriptorAdapter) ValueComparator added in v3.1.0

func (da *TunProtectDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type TunProtectKVWithMetadata added in v3.1.0

type TunProtectKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.TunnelProtection
	Metadata interface{}
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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