func WithClusterNew(f func(ctx context.Context, config *cluster.Config, options ...cluster.Option) (cluster.Cluster, error)) Option {
	return func(c *Component) {
		c.clusterNew = f
	}
}
WithClusterNew returns an option that overrides the component's function for
setting up the cluster.
This allows extending the cluster configuration with custom logic based on
information in the context.
package component
import (
	"context"
	"fmt"
	"net/http"
	"os"
	"os/signal"
	"sort"
	"strings"
	"sync"
	"syscall"
	"github.com/heptiolabs/healthcheck"
	"go.thethings.network/lorawan-stack/v3/pkg/auth/rights"
	"go.thethings.network/lorawan-stack/v3/pkg/cluster"
	"go.thethings.network/lorawan-stack/v3/pkg/config"
	"go.thethings.network/lorawan-stack/v3/pkg/crypto"
	"go.thethings.network/lorawan-stack/v3/pkg/fillcontext"
	"go.thethings.network/lorawan-stack/v3/pkg/frequencyplans"
	"go.thethings.network/lorawan-stack/v3/pkg/interop"
	"go.thethings.network/lorawan-stack/v3/pkg/log"
	"go.thethings.network/lorawan-stack/v3/pkg/ratelimit"
	"go.thethings.network/lorawan-stack/v3/pkg/rpcserver"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
	"go.thethings.network/lorawan-stack/v3/pkg/web"
	"golang.org/x/crypto/acme/autocert"
	"google.golang.org/grpc"
)
type Config struct {
	config.ServiceBase `name:",squash" yaml:",inline"`
}
type Component struct {
	ctx                context.Context
	cancelCtx          context.CancelFunc
	terminationSignals chan os.Signal
	config        *Config
	getBaseConfig func(ctx context.Context) config.ServiceBase
	acme *autocert.Manager
	logger log.Stack
	cluster    cluster.Cluster
	clusterNew func(ctx context.Context, config *cluster.Config, options ...cluster.Option) (cluster.Cluster, error)
	grpc           *rpcserver.Server
	grpcLogger     log.Interface
	grpcSubsystems []rpcserver.Registerer
	web           *web.Server
	webSubsystems []web.Registerer
	interop           *interop.Server
	interopSubsystems []interop.Registerer
	healthHandler healthcheck.Handler
	loopback *grpc.ClientConn
	tcpListeners   map[string]*listener
	tcpListenersMu sync.Mutex
	fillers []fillcontext.Filler
	FrequencyPlans *frequencyplans.Store
	KeyVault       crypto.KeyVault
	rightsFetcher rights.Fetcher
	taskStarter TaskStarter
	taskConfigs []*TaskConfig
	limiter ratelimit.Interface
}
type Option func(*Component)