adapter

package
v2.4.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRuleChainDescriptor

func NewRuleChainDescriptor(typedDescriptor *RuleChainDescriptor) *KVDescriptor

Types

type RuleChainDescriptor

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

type RuleChainDescriptorAdapter

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

func (*RuleChainDescriptorAdapter) Create

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

func (*RuleChainDescriptorAdapter) Delete

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

func (*RuleChainDescriptorAdapter) Dependencies

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

func (*RuleChainDescriptorAdapter) DerivedValues

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

func (*RuleChainDescriptorAdapter) Retrieve

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

func (*RuleChainDescriptorAdapter) Update

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

func (*RuleChainDescriptorAdapter) UpdateWithRecreate

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

func (*RuleChainDescriptorAdapter) Validate

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

func (*RuleChainDescriptorAdapter) ValueComparator

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

type RuleChainKVWithMetadata

type RuleChainKVWithMetadata struct {
	Key      string
	Value    *linux_iptables.RuleChain
	Metadata interface{}
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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