Documentation ¶
Overview ¶
Package hpi contains the Handler Programming Interface for value merge handlers
Index ¶
- Constants
- Variables
- func Assign(hint Hint, spec *Specification)
- func GenericMerge[T any](ctx Context, m *Specification, hint string, local T, inbound T) (bool, T, error)
- func Merge(ctx Context, m *Specification, hint Hint, local Value, inbound *Value) (bool, error)
- func Register(h Handler)
- func SetFor(ctx datacontext.Context, registry Registry)
- type Config
- type Context
- type EmptyConfig
- type Handler
- type Hint
- type Merger
- type Registry
- type Specification
- type Value
Constants ¶
View Source
const ATTR_MERGE_HANDLERS = "github.com/open-component-model/ocm/pkg/contexts/ocm/valuemergehandlers"
View Source
const KIND_VALUE_MERGE_ALGORITHM = metav1.KIND_VALUE_MERGE_ALGORITHM
Variables ¶
View Source
var Log = ocmlog.DynamicLogger(REALM)
View Source
var REALM = ocmlog.DefineSubRealm("value marge handling", "valuemerge")
Functions ¶
func Assign ¶
func Assign(hint Hint, spec *Specification)
func GenericMerge ¶
func Merge ¶
Merge merges two value using the given merge specification. The hint describes a merge hint if no algorithm is specified. It used the format <string>[@<version>]. If used the is looks for an assignment for this hint, first with version and the without version.
func SetFor ¶
func SetFor(ctx datacontext.Context, registry Registry)
Types ¶
type EmptyConfig ¶
type EmptyConfig struct{}
func (*EmptyConfig) Complete ¶
func (c *EmptyConfig) Complete(ctx Context) error
type Specification ¶
type Specification = internal.Specification
func NewSpecification ¶
func NewSpecification(algo string, cfg ...Config) (*Specification, error)
Click to show internal directories.
Click to hide internal directories.