func newCollapseOptions() *collapseOptions {
	return &collapseOptions{
		config:     nodeConfigShim{},
		fileSystem: fsys.NewLocalFileSystem(false),
		logger:     log.NewNopLogger(),
	}
}
Create a options instance with default values.
package membership
import (
	"fmt"
	"path/filepath"
	"time"
	dqlite "github.com/CanonicalLtd/go-dqlite"
	"github.com/go-kit/kit/log"
	"github.com/pkg/errors"
	"github.com/spoke-d/thermionic/internal/cert"
	"github.com/spoke-d/thermionic/internal/cluster"
	"github.com/spoke-d/thermionic/internal/config"
	"github.com/spoke-d/thermionic/internal/db"
	querycluster "github.com/spoke-d/thermionic/internal/db/cluster"
	"github.com/spoke-d/thermionic/internal/fsys"
	"github.com/spoke-d/thermionic/internal/node"
)
type CollapseOption func(*collapseOptions)
type collapseOptions struct {
	nodeConfigSchema config.Schema
	state            State
	gateway          Gateway
	endpoints        Endpoints
	config           NodeConfigProvider
	fileSystem       fsys.FileSystem
	logger           log.Logger
}
func WithStateForCollapse(state State) CollapseOption {
	return func(options *collapseOptions) {
		options.state = state
	}
}
func WithGatewayForCollapse(gateway Gateway) CollapseOption {
	return func(options *collapseOptions) {
		options.gateway = gateway
	}
}
func WithEndpointsForCollapse(endpoints Endpoints) CollapseOption {
	return func(options *collapseOptions) {
		options.endpoints = endpoints
	}
}
func WithConfigForCollapse(config NodeConfigProvider) CollapseOption {
	return func(options *collapseOptions) {
		options.config = config
	}
}
func WithNodeConfigSchemaForCollapse(nodeConfigSchema config.Schema) CollapseOption {
	return func(options *collapseOptions) {
		options.nodeConfigSchema = nodeConfigSchema
	}
}
func WithFileSystemForCollapse(fileSystem fsys.FileSystem) CollapseOption {
	return func(options *collapseOptions) {
		options.fileSystem = fileSystem
	}
}
func WithLoggerForCollapse(logger log.Logger) CollapseOption {
	return func(options *collapseOptions) {
		options.logger = logger
	}
}