package configs

import "fmt"

type MetricShard struct {
	Index int
	Start int64
	End   int64
}

func (s MetricShard) ID() string {
	return fmt.Sprintf("%d-%d", s.Start, s.End)
}

type FileShard struct {
	Index        int
	SourcePrefix string
	DestPrefix   string
	Hour         string
	Date         string
	Component    string
	ClusterID    string
}

func (s FileShard) ID() string {
	if s.Hour != "" {
		return fmt.Sprintf("%s-%s-%s", s.ClusterID, s.Component, s.Hour)
	}
	return fmt.Sprintf("%s-%s-%s", s.ClusterID, s.Component, s.Date)
}
