Added container labels to ContainerReport interface

This commit is contained in:
Stefan Zwanenburg 2023-06-06 23:37:14 +02:00
parent 36391b0ae7
commit ee49fb953e
7 changed files with 816 additions and 3 deletions

View file

@ -76,6 +76,11 @@ func (c Container) IsRestarting() bool {
return c.containerInfo.State.Restarting
}
// Labels returns a map of all the labels present on the container
func (c Container) Labels() map[string]string {
return c.containerInfo.Config.Labels
}
// Name returns the Docker container name.
func (c Container) Name() string {
return c.containerInfo.Name