package main

import (
	"context"
	"encoding/json"

	log "github.com/sirupsen/logrus"
	"github.com/tidbcloud/metering/pkg/common/models"
)

type LocalPrintMeasureSender struct {
}

func (l LocalPrintMeasureSender) SendMeasure(ctx context.Context, billingMeasure models.BillingReport) error {
	billingData, err := json.Marshal(billingMeasure)
	if err != nil {
		panic(err)
	}
	log.Info(string(billingData))
	return nil
}

func (l LocalPrintMeasureSender) InitMeasureHandler(env string, vendor string, skipclusterid, usesqs bool, url ...string) error {
	panic("implement me")
}

func (l LocalPrintMeasureSender) CheckMeasure(billingMeasure models.BillingReport) error {
	//TODO implement me
	panic("implement me")
}
