github.com/yanndegat/hiera@v0.6.8/api/mergestrategy.go (about)

     1  package api
     2  
     3  import (
     4  	"github.com/lyraproj/dgo/dgo"
     5  )
     6  
     7  // MergeStrategy is responsible for merging or prioritizing the result of several lookups into one.
     8  type MergeStrategy interface {
     9  	// Label returns a short descriptive label of this strategy.
    10  	Label() string
    11  
    12  	// Name returns the name of this strategy
    13  	Name() string
    14  
    15  	// MergeLookup performs a series of lookups for each variant found in the given variants slice. The actual
    16  	// lookup value is returned by the given value function which will be called at least once. The argument to
    17  	// the value function will be an element of the variants slice.
    18  	MergeLookup(variants interface{}, invocation Invocation, value func(location interface{}) dgo.Value) dgo.Value
    19  
    20  	// Options returns the options for this strategy or an empty map if strategy has no options
    21  	Options() dgo.Map
    22  }