Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify ProviderResources close #835

Merged
merged 1 commit into from
Dec 27, 2022
Merged
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
6 changes: 1 addition & 5 deletions internal/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ func setupRunners(cfg *config.Server) error {
// Wait until done
<-ctx.Done()
// Close messages
pResources.GatewayAPIResources.Close()
pResources.GatewayStatuses.Close()
pResources.HTTPRouteStatuses.Close()
pResources.TLSRouteStatuses.Close()
pResources.UDPRouteStatuses.Close()
pResources.Close()
xdsIR.Close()
infraIR.Close()
xds.Close()
Expand Down
8 changes: 8 additions & 0 deletions internal/message/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ func (p *ProviderResources) GetResourcesKey() string {
return ""
}

func (p *ProviderResources) Close() {
p.GatewayAPIResources.Close()
p.GatewayStatuses.Close()
p.HTTPRouteStatuses.Close()
p.TLSRouteStatuses.Close()
p.UDPRouteStatuses.Close()
}

// XdsIR message
type XdsIR struct {
watchable.Map[string, *ir.Xds]
Expand Down