Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Add project.GetName() #466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions project/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
5 changes: 5 additions & 0 deletions project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down