package private_link

import (
	"context"

	"github.com/tidbcloud/dataflow-service/app/container"
)

func MeterPrivateLinkWorker(ctx context.Context) error {
	err := container.Global().PrivateLinkWorker.MeterChangefeeds(ctx)
	if err != nil {
		return err
	}
	return nil
}

func BillPrivateLinkWorker(ctx context.Context) error {
	err := container.Global().PrivateLinkWorker.BillChangefeeds(ctx)
	if err != nil {
		return err
	}
	return nil
}

func SyncSinkEndpointWorker(ctx context.Context) error {
	return container.Global().SinkEndpointWorker.SyncAllEndpoints(ctx)
}

func CleanupUnusedEndpointsWorker(ctx context.Context) error {
	return container.Global().SinkEndpointWorker.CleanupUnusedEndpoints(ctx)
}
