Documentation ¶
Index ¶
Constants ¶
const Interval = 20
Interval represents the number of seconds to wait between each schedule iteration
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { Results []Result `json:"results" yaml:"results"` Err string `json:"err" yaml:"err"` }
Batch holds all the query results for a singular query
type Cluster ¶
type Cluster interface { database.DBAccessor db.ClusterOpener 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) // SchemaVersion returns the underlying schema version for the cluster SchemaVersion() int // Close the database facade. Close() error }
Cluster mediates access to data stored in the cluster dqlite database.
type Daemon ¶
type Daemon interface { // Gateway returns the underlying Daemon Gateway Gateway() Gateway // Cluster returns the underlying Cluster Cluster() Cluster // Node returns the underlying Node associated with the daemon Node() Node // NodeConfigSchema returns the daemon schema for the local Node NodeConfigSchema() config.Schema }
Daemon can respond to requests from a shared client.
type Gateway ¶
type Gateway interface { // IsDatabaseNode returns true if this gateway also run acts a raft database // node. IsDatabaseNode() bool // LeaderAddress returns the address of the current raft leader. LeaderAddress() (string, error) }
Gateway mediates access to the dqlite cluster using a gRPC SQL client, and possibly runs a dqlite replica on this node (if we're configured to do so).
type Node ¶
type Node interface { database.DBAccessor db.NodeOpener db.NodeTransactioner // Dir returns the directory of the underlying database file. Dir() string // Close the database facade. Close() error }
Node mediates access to the data stored locally
type Option ¶
type Option func(*options)
Option to be passed to Connect to customize the resulting instance.
func WithLogger ¶
WithLogger sets the logger on the option
type Result ¶
type Result struct { Type string `json:"type" yaml:"type"` Columns []string `json:"columns" yaml:"columns"` Rows [][]interface{} `json:"rows" yaml:"rows"` RowsAffected int64 `json:"rows_affected" yaml:"rows_affected"` }
Result holds the query result for a singular query
type Schedules ¶
type Schedules struct {
// contains filtered or unexported fields
}
Schedules represents a task collection of things that want to be run
type Status ¶
type Status int
Status defines all the state a schedule task can be in