package endpoint

import "strings"

type Endpoints struct {
	Endpoints   []string
	TidbPool    string
	Comment     string
	ModRevision int64
	Replicas    int
}

func ParsePodFromEndpoint(endpoint string) (podName, podIP string) {
	result := strings.Split(endpoint, ",")
	if len(result) == 2 {
		return result[0], result[1]
	}
	return
}

func GenEndpointFromPod(podName, podIP string) string {
	return podName + "," + podIP
}
