adapter

package
v0.0.0-...-d5eb696 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNSMClientDescriptor

func NewNSMClientDescriptor(typedDescriptor *NSMClientDescriptor) *KVDescriptor

func NewNSMEndpointDescriptor

func NewNSMEndpointDescriptor(typedDescriptor *NSMEndpointDescriptor) *KVDescriptor

Types

type NSMClientDescriptor

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

type NSMClientDescriptorAdapter

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

func (*NSMClientDescriptorAdapter) Create

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

func (*NSMClientDescriptorAdapter) Delete

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

func (*NSMClientDescriptorAdapter) Dependencies

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

func (*NSMClientDescriptorAdapter) DerivedValues

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

func (*NSMClientDescriptorAdapter) Retrieve

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

func (*NSMClientDescriptorAdapter) Update

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

func (*NSMClientDescriptorAdapter) UpdateWithRecreate

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

func (*NSMClientDescriptorAdapter) Validate

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

func (*NSMClientDescriptorAdapter) ValueComparator

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

type NSMClientKVWithMetadata

type NSMClientKVWithMetadata struct {
	Key      string
	Value    *nsm.NetworkServiceClient
	Metadata *nsmetadata.NsmClientMetadata
	Origin   ValueOrigin
}

type NSMEndpointDescriptor

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

type NSMEndpointDescriptorAdapter

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

func (*NSMEndpointDescriptorAdapter) Create

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

func (*NSMEndpointDescriptorAdapter) Delete

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

func (*NSMEndpointDescriptorAdapter) Dependencies

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

func (*NSMEndpointDescriptorAdapter) DerivedValues

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

func (*NSMEndpointDescriptorAdapter) Retrieve

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

func (*NSMEndpointDescriptorAdapter) Update

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

func (*NSMEndpointDescriptorAdapter) UpdateWithRecreate

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

func (*NSMEndpointDescriptorAdapter) Validate

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

func (*NSMEndpointDescriptorAdapter) ValueComparator

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

type NSMEndpointKVWithMetadata

type NSMEndpointKVWithMetadata struct {
	Key      string
	Value    *nsm.NetworkServiceEndpoint
	Metadata interface{}
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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