You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: destination.go
    path of file: ./repos/rudder-server/regulation-worker/internal/destination
    
    the code of the file until where you have to start completion: package destination

import (
	"context"
	"sync"

	"github.com/rudderlabs/rudder-go-kit/logger"
	backendconfig "github.com/rudderlabs/rudder-server/backend-config"
	"github.com/rudderlabs/rudder-server/regulation-worker/internal/model"
	"github.com/rudderlabs/rudder-server/rruntime"
	"github.com/rudderlabs/rudder-server/utils/pubsub"
)

var pkgLogger = logger.NewLogger().Child("client")

//go:generate mockgen -source=destination.go -destination=mock_destination.go -package=destination github.com/rudderlabs/rudder-server/regulation-worker/internal/Destination/destination
type destMiddleware interface {
	Subscribe(ctx context.Context, topic backendconfig.Topic) pub
    
func (d *DestinationConfig) Start(ctx context.Context) {
	initialized := make(chan struct{})
	ch := d.Dest.Subscribe(ctx, backendconfig.TopicBackendConfig)
	rruntime.Go(func() {
		for data := range ch {
			destinations := make(map[string]model.Destination)
			configs := data.Data.(map[string]backendconfig.ConfigT)
			for _, config := range configs {
				for _, source := range config.Sources {
					for _, dest := range source.Destinations {
						destinations[dest.ID] = model.Destination{
							DestinationID: dest.ID,
							Config:        dest.Config,
							Name:          dest.DestinationDefinition.Name,
							DestDefConfig: dest.DestinationDefinition.Config,
						}
					}
				}
			}
			d.mu.Lock()
			d.destinations = destinations
			d.mu.Unlock()
			select {
			case <-initialized:
			default:
				close(initialized)
			}
		}
	})
	<-initialized
}