// NewStatusFormatter takes stored model information (params.FullStatus) and populates
// the statusFormatter struct used in various status formatting methods
556138
func NewStatusFormatter(status *params.FullStatus, isoTime bool) *statusFormatter {
	return newStatusFormatter(
		newStatusFormatterParams{
			status:        status,
			isoTime:       isoTime,
			showRelations: true,
		})
}
92082
func (c *FakeTemplateInstances) UpdateStatus(templateInstance *template.TemplateInstance) (*template.TemplateInstance, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(templateinstancesResource, "status", c.ns, templateInstance), &template.TemplateInstance{})

	if obj == nil {
		return nil, err
	}
	return obj.(*template.TemplateInstance), err
}
243894
func (logger *Logger) SetFormatter(formatter Formatter) {
	logger.mu.Lock()
	defer logger.mu.Unlock()
	logger.Formatter = formatter
}
672297
func NewStatsdTable(cells Cells) Table {
	return Table{
		Cells: cells,
		Columns: []Column{
			{Field: Bucket, Name: "Bucket", Width: max(cells.MaxLen(Bucket)+2, 20)},
			{Field: Type, Name: "Type", Width: 11},
			{Field: Description, Name: "Description", Width: 60},
		},
	}
}
1341030
func NewFormatter() *Formatter {
	return &Formatter{
		KeyColor:        color.New(color.FgBlue, color.Bold),
		StringColor:     color.New(color.FgGreen, color.Bold),
		BoolColor:       color.New(color.FgYellow, color.Bold),
		NumberColor:     color.New(color.FgCyan, color.Bold),
		NullColor:       color.New(color.FgBlack, color.Bold),
		StringMaxLength: 0,
		DisabledColor:   false,
		Indent:          2,
		Newline:         "\n",
	}
}
815690
func DefaultFormatter(l *Logger, e *Entry) string {
	return fmt.Sprintf("%v [%v][%v] %v%v", e.Time.Format(time.RFC3339), e.Level, e.Category, e.Message, e.CallStack)
}
6082
func NewStatic(Vars []node.Node) *Static {
	return &Static{
		FreeFloating: nil,
		Vars:         Vars,
	}
}
407116
func (format *GrokToJSON) ApplyFormatter(msg *core.Message) error {
	content := format.GetAppliedContent(msg)

	values, err := format.applyGrok(string(content[:]))
	if err != nil {
		return err
	}

	serialized, err := json.Marshal(values)
	if err != nil {
		return err
	}

	format.SetAppliedContent(msg, serialized)
	return nil
}
179484
func NewSetCustomObjectFormatterEnabledArgs(enabled bool) *SetCustomObjectFormatterEnabledArgs {
	args := new(SetCustomObjectFormatterEnabledArgs)
	args.Enabled = enabled
	return args
}
94393
func NewStat() *Stat {
	s := &Stat{}
	runtime.SetFinalizer(s, (*Stat).free)

	initDone := make(chan bool)
	s.exitMessage = make(chan bool)

	C.sg_init(1)

	go func() {
		// We need some function calls to be performed on the same thread
		// Those for which statgrab is using a thread local
		runtime.LockOSThread()
		defer runtime.UnlockOSThread()

		// Throw away the first reading as thats averaged over the machines uptime
		C.sg_get_cpu_stats_diff(nil)
		C.sg_get_network_io_stats_diff(nil)
		C.sg_get_page_stats_diff(nil)
		C.sg_get_disk_io_stats_diff(nil)

		initDone <- true

		for {
			select {
			case <-s.exitMessage:
				return
			case f := <-mainfunc:
				f()
			}
		}

	}()

	<-initDone

	return s
}
304468
func NewStatusSetter(st state.EntityFinder, getCanModify GetAuthFunc) *StatusSetter {
	return &StatusSetter{
		st:           st,
		getCanModify: getCanModify,
	}
}
1250500
func (il IfLogger) SetFormatter(f Formatter) ContextLogger {
	return &contextLogger{
		isTrue:    il.ok(),
		formatter: f,
	}
}
582914
func defaultFormatter(val float64, precision int) string {
	return strconv.FormatFloat(val, 'f', precision, 64)
}
726124
func NewSearchFormat(source string) formatter.Format {
	switch source {
	case "":
		return defaultSearchTableFormat
	case formatter.TableFormatKey:
		return defaultSearchTableFormat
	}
	return formatter.Format(source)
}
891755
func (_m *FacadeInterface) ReportHealthStatus(key health.HealthStatusKey, value health.HealthStatus, expires time.Duration) {
	_m.Called(key, value, expires)
}
431621
func (format *CollectdToInflux08) ApplyFormatter(msg *core.Message) error {
	contentData := format.GetAppliedContent(msg)

	collectdData, err := parseCollectdPacket(contentData)
	if err != nil {
		format.Logger.Error("Collectd parser error: ", err)
		return err
	}

	// Manually convert to JSON lines
	influxData := tio.NewByteStream(len(contentData))
	name := format.createMetricName(collectdData.Plugin,
		collectdData.PluginInstance,
		collectdData.PluginType,
		collectdData.TypeInstance,
		collectdData.Host)

	for _, value := range collectdData.Values {
		fmt.Fprintf(&influxData, `{"name": "%s", "columns": ["time", "value"], "points":[[%d, %f]]},`, name, int32(collectdData.Time), value)
	}

	format.SetAppliedContent(msg, influxData.Bytes())
	return nil
}
726931
func NewStatusSetCmd(ctx HookContext) (*StatusSetCmd, error) {
	return &StatusSetCmd{hookContextFunc: componentHookContext(ctx)}, nil
}