January 2020
Intermediate to advanced
640 pages
16h 56m
English
As you probably guessed, the Master type would encapsulate the implementation details for creating and operating a master node. Let's take a quick look into its constructor:
func NewMaster(cfg MasterConfig) (*Master, error) { if err := cfg.Validate(); err != nil { return nil, xerrors.Errorf("master config validation failed: %w", err) } return &Master{ cfg: cfg, workerPool: newWorkerPool(), }, nil }
The constructor expects a MasterConfig object as an argument that defines the following: