package health

import (
	"context"
)

type GetTmobileConnCheckFunc func() (TmobileConnCheckInterface, error)

func NewTmobileCheck(fn GetTmobileConnCheckFunc) CheckFunc {
	return func(ctx context.Context) error {
		client, err := fn()
		if err != nil {
			return err
		}

		err = client.Ping(ctx)
		return err
	}
}

type TmobileConnCheckInterface interface {
	Ping(ctx context.Context) error
}
