func NewState(options ...Option) *State {
	opts := newOptions()
	for _, option := range options {
		option(opts)
	}
	return &State{
		node:    opts.node,
		cluster: opts.cluster,
		os:      opts.os,
	}
}
NewState returns a new State object with the given database and operating
system components.
package state
import (
	"os/user"
	"github.com/spoke-d/thermionic/internal/db"
	"github.com/spoke-d/thermionic/internal/db/database"
)
type OS interface {
	LocalDatabasePath() string
	GlobalDatabaseDir() string
	GlobalDatabasePath() string
	VarDir() string
	Hostname() (string, error)
	HostNames() ([]string, error)
	User() (*user.User, error)
}
type Node interface {
	database.DBAccessor
	db.NodeOpener
	db.NodeTransactioner
	Dir() string
	Close() error
}
type Cluster interface {
	database.DBAccessor
	db.ClusterOpener
	db.ClusterExclusiveLocker
	db.ClusterTransactioner
	NodeID(int64)
	SchemaVersion() int
	Close() error
}
type State struct {
	node    Node
	cluster Cluster
	os      OS
}