diff --git a/project/interface.go b/project/interface.go index 3356407c2..136904146 100644 --- a/project/interface.go +++ b/project/interface.go @@ -40,6 +40,7 @@ type APIProject interface { Load(bytes []byte) error Containers(ctx context.Context, filter Filter, services ...string) ([]string, error) + GetName() string GetServiceConfig(service string) (*config.ServiceConfig, bool) } diff --git a/project/project.go b/project/project.go index ef783120a..bb48d2b14 100644 --- a/project/project.go +++ b/project/project.go @@ -540,6 +540,11 @@ func (p *Project) Notify(eventType events.EventType, serviceName string, data ma } } +// GetName returns the name of the project. +func (p *Project) GetName() string { + return p.Name +} + // GetServiceConfig looks up a service config for a given service name, returning the ServiceConfig // object and a bool flag indicating whether it was found func (p *Project) GetServiceConfig(name string) (*config.ServiceConfig, bool) {