// WithTransforms adds the provided transforms to be applied in the pipeline.
14437
func WithTransforms(t []*Transform) OptionFunc {
	return func(n *Node) error {
		n.transforms = t
		return nil
	}
}
301659
func (t *fingerprintTransformation) Transform(ctx *resources.ResourceTransformationCtx) error {

	h, err := newHash(t.algo)
	if err != nil {
		return err
	}

	io.Copy(io.MultiWriter(h, ctx.To), ctx.From)
	d, err := digest(h)
	if err != nil {
		return err
	}

	ctx.Data["Integrity"] = integrity(t.algo, d)
	ctx.AddOutPathIdentifier("." + hex.EncodeToString(d[:]))
	return nil
}
818752
func (s *DescribeTransformJobOutput) SetTransformJobName(v string) *DescribeTransformJobOutput {
	s.TransformJobName = &v
	return s
}
1183582
func (s *DescribeTransformJobOutput) SetTransformResources(v *TransformResources) *DescribeTransformJobOutput {
	s.TransformResources = v
	return s
}
809139
func (o *nameHashTransformer) Transform(m resmap.ResMap) error {
	for _, res := range m {
		if res.NeedHashSuffix() {
			h, err := NewKustHash().Hash(res.Map())
			if err != nil {
				return err
			}
			res.SetName(fmt.Sprintf("%s-%s", res.GetName(), h))
		}
	}
	return nil
}
688647
func (e Entry) WithFields(fields ...Field) Entry {
	ne := newEntry(e)
	ne.Fields = append(ne.Fields, fields...)
	return ne
}
681139
func (th *transformHeader) Transform(column int, s string) string {
	return HeaderColor(s)
}
13764
func convertToAdvancedTransform(oldFunc func(s string) []string) AdvancedTransformFunction {
	return func(s string) *PathKey {
		return &PathKey{Path: oldFunc(s), FileName: s}
	}
}
783362
func (s *TransformJobSummary) SetTransformJobStatus(v string) *TransformJobSummary {
	s.TransformJobStatus = &v
	return s
}
39240
func (rep *Responder) With(formats interface{}, fc func()) *Responder {
	if f, ok := formats.(string); ok {
		rep.responds[f] = fc
	} else if fs, ok := formats.([]string); ok {
		for _, f := range fs {
			rep.responds[f] = fc
		}
	}

	if rep.DefaultResponder == nil {
		rep.DefaultResponder = fc
	}
	return rep
}
1030846
func (s *DescribeTransformJobOutput) SetTransformJobArn(v string) *DescribeTransformJobOutput {
	s.TransformJobArn = &v
	return s
}
635114
func (logger *Logger) WithFields(fields Fields) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithFields(fields)
}
631671
func (pt *patchTransformer) Transform(baseResourceMap resmap.ResMap) error {
	// Merge and then index the patches by Id.
	patches, err := pt.mergePatches()
	if err != nil {
		return err
	}

	// Strategic merge the resources exist in both base and patches.
	for _, patch := range patches {
		// Merge patches with base resource.
		id := patch.Id()
		matchedIds := baseResourceMap.GetMatchingIds(id.GvknEquals)
		if len(matchedIds) == 0 {
			return fmt.Errorf("failed to find an object with %s to apply the patch", id.GvknString())
		}
		if len(matchedIds) > 1 {
			return fmt.Errorf("found multiple objects %#v targeted by patch %#v (ambiguous)", matchedIds, id)
		}
		id = matchedIds[0]
		base := baseResourceMap[id]
		merged := map[string]interface{}{}
		versionedObj, err := scheme.Scheme.New(toSchemaGvk(id.Gvk()))
		baseName := base.GetName()
		switch {
		case runtime.IsNotRegisteredError(err):
			// Use JSON merge patch to handle types w/o schema
			baseBytes, err := json.Marshal(base.Map())
			if err != nil {
				return err
			}
			patchBytes, err := json.Marshal(patch.Map())
			if err != nil {
				return err
			}
			mergedBytes, err := jsonpatch.MergePatch(baseBytes, patchBytes)
			if err != nil {
				return err
			}
			err = json.Unmarshal(mergedBytes, &merged)
			if err != nil {
				return err
			}
		case err != nil:
			return err
		default:
			// Use Strategic-Merge-Patch to handle types w/ schema
			// TODO: Change this to use the new Merge package.
			// Store the name of the base object, because this name may have been munged.
			// Apply this name to the patched object.
			lookupPatchMeta, err := strategicpatch.NewPatchMetaFromStruct(versionedObj)
			if err != nil {
				return err
			}
			merged, err = strategicpatch.StrategicMergeMapPatchUsingLookupPatchMeta(
				base.Map(),
				patch.Map(),
				lookupPatchMeta)
			if err != nil {
				return err
			}
		}
		base.SetName(baseName)
		baseResourceMap[id].SetMap(merged)
	}
	return nil
}
262842
func (gc *StackGraphicContext) ComposeMatrixTransform(tr Matrix) {
	gc.current.Tr.Compose(tr)
}
271899
func NewToTransformation(d execute.Dataset, cache execute.TableBuilderCache, spec *ToProcedureSpec, deps ToDependencies) (*ToTransformation, error) {
	var fn *execute.RowMapFn
	var err error

	if spec.Spec.FieldFn != nil {
		if fn, err = execute.NewRowMapFn(spec.Spec.FieldFn); err != nil {
			return nil, err
		}
	}

	return &ToTransformation{
		d:     d,
		fn:    fn,
		cache: cache,
		spec:  spec,
		deps:  deps,
	}, nil
}
640381
func TransformFeedbackVaryings(program uint32, count int32, varyings **uint8, bufferMode uint32) {
	C.glowTransformFeedbackVaryings(gpTransformFeedbackVaryings, (C.GLuint)(program), (C.GLsizei)(count), (**C.GLchar)(unsafe.Pointer(varyings)), (C.GLenum)(bufferMode))
}
849733
func (c *Collector) transform() (out []producers.MetricsMessage) {
	var msg producers.MetricsMessage
	t := time.Unix(c.timestamp, 0)

	// Produce node metrics
	msg = producers.MetricsMessage{
		Name:       producers.NodeMetricPrefix,
		Datapoints: c.nodeMetrics,
		Dimensions: producers.Dimensions{
			MesosID:   c.nodeInfo.MesosID,
			ClusterID: c.nodeInfo.ClusterID,
			Hostname:  c.nodeInfo.Hostname,
		},
		Timestamp: t.UTC().Unix(),
	}
	out = append(out, msg)

	return out
}