package containers

import (
	"fmt"
	"github.com/prometheus/client_golang/prometheus"
)

const (
	Namespace   = "namespace"
	PodName     = "pod_name"
	Workload    = "workload"
	ProcessName = "process_name"
)

func setLabels(container_id, ns, pod_name, process_name, pid string) prometheus.Labels {
	return map[string]string{
		"container_id": container_id,
		"ns":           ns,
		"pod_name":     pod_name,
		"process_name": process_name,
		"pid":          pid,
	}
}

func setK8sTag(c *Container, tag map[string]string, pid uint32) {
	sPid := fmt.Sprintf("%d", pid)
	c.K8sContainer.ns = tag[Namespace]
	c.K8sContainer.podName = tag[PodName]
	c.K8sContainer.containerName = tag[ProcessName]
	c.K8sContainer.pid = sPid
}
