package repo

import (
	"context"

	"github.com/tidbcloud/cluster-service-ng/domain/entity"
)

type CassandraProxyStateRepo interface {
	Save(ctx context.Context, state *entity.CassandraProxyState) error
	LoadByClusterID(ctx context.Context, clusterID string, deleted bool) (*entity.CassandraProxyState, error)
	ListBySharedPoolID(ctx context.Context, sharedPoolID string) ([]*entity.CassandraProxyState, error)
	UpdatePhase(ctx context.Context, clusterID, hostID string, phase entity.ComponentPhase) error
	UpdatePhaseIfCurrent(ctx context.Context, clusterID, hostID string, currentPhases []entity.ComponentPhase, nextPhase entity.ComponentPhase) (*entity.CassandraProxyState, bool, error)
	Delete(ctx context.Context, clusterID, hostID string) error
}
