Documentation ¶
Overview ¶
Package local implements a scheduler that persists jobs on a local storage. The implementation currently uses BoltDB (https://github.com/boltdb/bolt).
Index ¶
Constants ¶
View Source
const Name = "local"
Name contains the adapter registered name
Variables ¶
View Source
var ( // ErrMarshalling occurs when a storage message cannot be marshalled ErrMarshalling = errors.New("schedule marshalling error") // ErrUnmarshalling occurs when a storage message cannot be unmarshalled ErrUnmarshalling = errors.New("schedule unmarshalling error") )
Functions ¶
Types ¶
type Config ¶
type Config struct { // DB is the path to the database file DB string `toml:"db"` // Workers is the maximum number of goroutines that process jobs in parallel Workers int `toml:"workers"` // Encryption activates data encryption. // It is worth noting that once a database created, it is no longer possible // to change this option. Encryption *EncryptionConfig `toml:"encryption"` }
Config is the local scheduler configuration
type EncryptionConfig ¶
type EncryptionConfig struct { // Default is the key to use to encrypt new data Default uint32 `toml:"default"` // Keys contains all encryption keys available Keys []string `toml:"keys"` }
EncryptionConfig is the configuration to encrypt data stored. The database encryption supports key rotation, so new keys can be added without affecting existing data. Old keys should be kept (almost) forever.
Click to show internal directories.
Click to hide internal directories.