Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { db.ClusterTransactioner db.ClusterExclusiveLocker // NodeID sets the the node NodeID associated with this cluster instance. It's used for // backward-compatibility of all db-related APIs that were written before // clustering and don't accept a node NodeID, so in those cases we automatically // use this value as implicit node NodeID. NodeID(int64) }
Cluster mediates access to data stored in the cluster dqlite database.
type Node ¶
type Node interface { db.NodeTransactioner }
Node mediates access to the data stored in the node-local SQLite database.
type Notifier ¶
type Notifier interface { // Run is a function that invokes the given function against each node in // the cluster excluding the invoking one. Run(func(*client.Client) error, notifier.Policy) error }
Notifier is a function that invokes the given function against each node in the cluster excluding the invoking one.
type NotifierProvider ¶
type NotifierProvider interface { // New creates a new Notifier using a cert New(State, *cert.Info, config.Schema) Notifier }
NotifierProvider creates a new Notifier as a dependency
type OS ¶
type OS interface { // LocalDatabasePath returns the path of the local database file. LocalDatabasePath() string // GlobalDatabaseDir returns the path of the global database directory. GlobalDatabaseDir() string // GlobalDatabasePath returns the path of the global database SQLite file // managed by dqlite. GlobalDatabasePath() string // VarDir represents the Data directory (e.g. /var/lib/therm/). VarDir() string }
OS is a high-level facade for accessing all operating-system level functionality that therm uses.
type Option ¶
type Option func(*options)
Option to be passed to Connect to customize the resulting instance.
func WithNodeConfigSchema ¶
WithNodeConfigSchema sets the node configuration schema on the options
func WithNotifierProvider ¶
func WithNotifierProvider(notifierProvider NotifierProvider) Option
WithNotifierProvider sets the notifierProvider on the options
type State ¶
type State interface { // Node returns the underlying Node Node() Node // Cluster returns the underlying Cluster Cluster() Cluster // OS returns the underlying OS values OS() OS }
State is a gateway to the two main stateful components, the database and the operating system. It's typically used by model entities in order to perform changes.
type Upgraded ¶
type Upgraded struct {
// contains filtered or unexported fields
}
Upgraded defines a task, that when run notifies back that a upgrade task has been completed